diff --git a/.github/CODEOWNERS_vim b/.github/CODEOWNERS_vim index 45c8d33790..9bac8b2dd1 100644 --- a/.github/CODEOWNERS_vim +++ b/.github/CODEOWNERS_vim @@ -9,21 +9,15 @@ # So if a pull request only touches javascript files, only these owners # will be requested to review. +nsis/lang/russian.nsi @RestorerZ runtime/autoload/freebasic.vim @dkearns -runtime/autoload/getscript.vim @cecamp runtime/autoload/haskell.vim @alx741 runtime/autoload/javascript.vim @jsit runtime/autoload/modula2.vim @dkearns -runtime/autoload/netrw.vim @cecamp -runtime/autoload/netrwFileHandlers.vim @cecamp -runtime/autoload/netrwSettings.vim @cecamp runtime/autoload/php.vim @david-szabo97 runtime/autoload/rubycomplete.vim @segfault @dkearns runtime/autoload/rust.vim @lilyball -runtime/autoload/tar.vim @cecamp -runtime/autoload/vimball.vim @cecamp runtime/autoload/xmlformat.vim @chrisbra -runtime/autoload/zip.vim @cecamp runtime/autoload/dist/json.vim @habamax runtime/colors/blue.vim @habamax @romainl @neutaaaaan runtime/colors/darkblue.vim @habamax @romainl @neutaaaaan @@ -108,12 +102,6 @@ runtime/compiler/xmllint.vim @dkearns runtime/compiler/xo.vim @dkearns runtime/compiler/yamllint.vim @romainl runtime/compiler/zsh.vim @dkearns -runtime/doc/pi_getscript.txt @cecamp -runtime/doc/pi_logipat.txt @cecamp -runtime/doc/pi_netrw.txt @cecamp -runtime/doc/pi_tar.txt @cecamp -runtime/doc/pi_vimball.txt @cecamp -runtime/doc/pi_zip.txt @cecamp runtime/doc/ps1.txt @heaths runtime/ftplugin/abaqus.vim @costerwi runtime/ftplugin/apache.vim @dubgeiser @@ -127,6 +115,7 @@ runtime/ftplugin/cs.vim @nickspoons runtime/ftplugin/csh.vim @dkearns runtime/ftplugin/css.vim @dkearns runtime/ftplugin/cucumber.vim @tpope +runtime/ftplugin/deb822sources.vim @jamessan runtime/ftplugin/debchangelog.vim @jamessan runtime/ftplugin/debcontrol.vim @jamessan runtime/ftplugin/debsources.vim @jamessan @@ -167,6 +156,7 @@ runtime/ftplugin/icon.vim @dkearns runtime/ftplugin/indent.vim @dkearns runtime/ftplugin/ishd.vim @dkearns runtime/ftplugin/j.vim @glts +runtime/ftplugin/java.vim @zzzyxwvut runtime/ftplugin/javascript.vim @dkearns runtime/ftplugin/javascriptreact.vim @dkearns runtime/ftplugin/json.vim @dbarnett @@ -182,7 +172,6 @@ runtime/ftplugin/lynx.vim @dkearns runtime/ftplugin/m3build.vim @dkearns runtime/ftplugin/m3quake.vim @dkearns runtime/ftplugin/markdown.vim @tpope -runtime/ftplugin/matlab.vim @cecamp runtime/ftplugin/meson.vim @Liambeguin runtime/ftplugin/modula2.vim @dkearns runtime/ftplugin/modula3.vim @dkearns @@ -205,14 +194,9 @@ runtime/ftplugin/pymanifest.vim @ObserverOfTime runtime/ftplugin/python.vim @tpict runtime/ftplugin/qb64.vim @dkearns runtime/ftplugin/qml.vim @ChaseKnowlden -runtime/ftplugin/r.vim @jalvesaq runtime/ftplugin/racket.vim @benknoble runtime/ftplugin/readline.vim @dkearns -runtime/ftplugin/rhelp.vim @jalvesaq -runtime/ftplugin/rmd.vim @jalvesaq -runtime/ftplugin/rnoweb.vim @jalvesaq runtime/ftplugin/routeros.vim @zainin -runtime/ftplugin/rrst.vim @jalvesaq runtime/ftplugin/rst.vim @marshallward runtime/ftplugin/ruby.vim @tpope @dkearns runtime/ftplugin/rust.vim @lilyball @@ -239,6 +223,7 @@ runtime/ftplugin/typescript.vim @dkearns runtime/ftplugin/typescriptreact.vim @dkearns runtime/ftplugin/unison.vim @chuwy runtime/ftplugin/vdf.vim @ObserverOfTime +runtime/ftplugin/vim.vim @dkearns runtime/ftplugin/wast.vim @rhysd runtime/ftplugin/wget.vim @dkearns runtime/ftplugin/wget2.vim @dkearns @@ -302,14 +287,9 @@ runtime/indent/prolog.vim @dkearns runtime/indent/ps1.vim @heaths runtime/indent/qb64.vim @dkearns runtime/indent/qml.vim @ChaseKnowlden -runtime/indent/r.vim @jalvesaq runtime/indent/racket.vim @benknoble runtime/indent/rapid.vim @KnoP-01 runtime/indent/readline.vim @dkearns -runtime/indent/rhelp.vim @jalvesaq -runtime/indent/rmd.vim @jalvesaq -runtime/indent/rnoweb.vim @jalvesaq -runtime/indent/rrst.vim @jalvesaq runtime/indent/ruby.vim @AndrewRadev @dkearns runtime/indent/sass.vim @tpope runtime/indent/scala.vim @derekwyatt @@ -327,21 +307,18 @@ runtime/indent/xml.vim @chrisbra runtime/indent/zsh.vim @chrisbra runtime/keymap/armenian-eastern_utf-8.vim @blinskey runtime/keymap/armenian-western_utf-8.vim @blinskey +runtime/keymap/russian-typograph.vim @RestorerZ runtime/keymap/tamil_tscii.vim @yegappan runtime/lang/menu_en_gb.latin1.vim @mrdubya +runtime/lang/menu_ru_ru.cp1251.vim @RestorerZ +runtime/lang/menu_ru_ru.koi8-r.vim @RestorerZ +runtime/lang/menu_ru_ru.utf-8.vim @RestorerZ runtime/pack/dist/opt/cfilter/plugin/cfilter.vim @yegappan runtime/pack/dist/opt/matchit/ @chrisbra -runtime/plugin/getscriptPlugin.vim @cecamp -runtime/plugin/logiPat.vim @cecamp -runtime/plugin/netrwPlugin.vim @cecamp -runtime/plugin/tarPlugin.vim @cecamp -runtime/plugin/vimballPlugin.vim @cecamp -runtime/plugin/zipPlugin.vim @cecamp runtime/plugin/manpager.vim @Konfekt runtime/syntax/shared/hgcommitDiff.vim @vegerot runtime/syntax/abaqus.vim @costerwi runtime/syntax/aidl.vim @dpelle -runtime/syntax/amiga.vim @cecamp runtime/syntax/ant.vim @dkearns runtime/syntax/arduino.vim @johshoff runtime/syntax/asciidoc.vim @aerostitch @@ -362,12 +339,10 @@ runtime/syntax/chatito.vim @ObserverOfTime runtime/syntax/chuck.vim @gacallea runtime/syntax/clojure.vim @axvr runtime/syntax/cs.vim @nickspoons -runtime/syntax/csh.vim @cecamp runtime/syntax/cucumber.vim @tpope runtime/syntax/d.vim @JesseKPhillips runtime/syntax/dart.vim @pr3d4t0r runtime/syntax/datascript.vim @dpelle -runtime/syntax/dcl.vim @cecamp runtime/syntax/deb822sources.vim @jamessan runtime/syntax/debchangelog.vim @jamessan runtime/syntax/debcontrol.vim @jamessan @@ -383,11 +358,9 @@ runtime/syntax/dtd.vim @chrisbra runtime/syntax/dts.vim @zonque runtime/syntax/editorconfig.vim @gpanders runtime/syntax/eiffel.vim @jocelyn -runtime/syntax/elmfilt.vim @cecamp runtime/syntax/erlang.vim @hcs42 runtime/syntax/eruby.vim @tpope @dkearns runtime/syntax/expect.vim @dkearns -runtime/syntax/exports.vim @cecamp runtime/syntax/falcon.vim @steveno runtime/syntax/fennel.vim @gpanders runtime/syntax/fetchmail.vim @dkearns @@ -414,6 +387,7 @@ runtime/syntax/gyp.vim @ObserverOfTime runtime/syntax/haml.vim @tpope runtime/syntax/hare.vim @rsaihe runtime/syntax/haskell.vim @coot +runtime/syntax/help_ru.vim @RestorerZ runtime/syntax/hgcommit.vim @k-takata runtime/syntax/hitest.vim @lacygoill runtime/syntax/hog.vim @wtfbbqhax @@ -424,7 +398,7 @@ runtime/syntax/icon.vim @dkearns runtime/syntax/indent.vim @dkearns runtime/syntax/j.vim @glts runtime/syntax/jargon.vim @h3xx -runtime/syntax/java.vim @fleiner +runtime/syntax/java.vim @zzzyxwvut runtime/syntax/javascript.vim @fleiner runtime/syntax/jsonc.vim @izhakjakov runtime/syntax/julia.vim @carlobaldassi @@ -432,9 +406,7 @@ runtime/syntax/kconfig.vim @chrisbra runtime/syntax/kotlin.vim @udalov runtime/syntax/krl.vim @KnoP-01 runtime/syntax/less.vim @genoma -runtime/syntax/lex.vim @cecamp runtime/syntax/liquid.vim @tpope -runtime/syntax/lisp.vim @cecamp runtime/syntax/lua.vim @marcuscf runtime/syntax/lyrics.vim @ObserverOfTime runtime/syntax/lynx.vim @dkearns @@ -443,7 +415,6 @@ runtime/syntax/m3quake.vim @dkearns runtime/syntax/mailcap.vim @dkearns runtime/syntax/make.vim @rohieb runtime/syntax/mallard.vim @jhradilek -runtime/syntax/maple.vim @cecamp runtime/syntax/markdown.vim @tpope runtime/syntax/mason.vim @petdance runtime/syntax/meson.vim @Liambeguin @@ -453,7 +424,6 @@ runtime/syntax/modula2/opt/pim.vim @trijezdci runtime/syntax/modula2/opt/r10.vim @trijezdci runtime/syntax/modula3.vim @dkearns runtime/syntax/n1ql.vim @pr3d4t0r -runtime/syntax/netrw.vim @cecamp runtime/syntax/nginx.vim @chr4 runtime/syntax/ninja.vim @nico runtime/syntax/nix.vim @equill @@ -478,7 +448,6 @@ runtime/syntax/psl.vim @danielkho runtime/syntax/pymanifest.vim @ObserverOfTime runtime/syntax/qb64.vim @dkearns runtime/syntax/qml.vim @ChaseKnowlden -runtime/syntax/r.vim @jalvesaq runtime/syntax/racket.vim @benknoble runtime/syntax/raml.vim @in3d runtime/syntax/rapid.vim @KnoP-01 @@ -488,11 +457,8 @@ runtime/syntax/rcs.vim @hdima runtime/syntax/rebol.vim @mrdubya runtime/syntax/rego.vim @zenmatic runtime/syntax/resolv.vim @rid9 -runtime/syntax/rmd.vim @jalvesaq runtime/syntax/rng.vim @jhradilek runtime/syntax/routeros.vim @zainin -runtime/syntax/rpcgen.vim @cecamp -runtime/syntax/rrst.vim @jalvesaq runtime/syntax/rst.vim @marshallward runtime/syntax/ruby.vim @dkearns runtime/syntax/sass.vim @tpope @@ -500,9 +466,7 @@ runtime/syntax/scala.vim @derekwyatt runtime/syntax/scss.vim @tpope runtime/syntax/sdoc.vim @gpanders runtime/syntax/sed.vim @dkearns -runtime/syntax/sh.vim @cecamp runtime/syntax/shared/debversions.vim @jamessan -runtime/syntax/sm.vim @cecamp runtime/syntax/solidity.vim @cothi runtime/syntax/spec.vim @ignatenkobrain runtime/syntax/sqloracle.vim @chrisbra @@ -516,11 +480,9 @@ runtime/syntax/svn.vim @hdima runtime/syntax/swayconfig.vim @jamespeapen runtime/syntax/swig.vim @jmarrec runtime/syntax/systemverilog.vim @Kocha -runtime/syntax/tags.vim @cecamp runtime/syntax/tap.vim @petdance runtime/syntax/tcsh.vim @dkearns runtime/syntax/teraterm.vim @k-takata -runtime/syntax/tex.vim @cecamp runtime/syntax/tidy.vim @dkearns runtime/syntax/tmux.vim @ericpruitt runtime/syntax/toml.vim @averms @@ -532,7 +494,6 @@ runtime/syntax/typescriptcommon.vim @HerringtonDarkholme runtime/syntax/typescriptreact.vim @HerringtonDarkholme runtime/syntax/unison.vim @chuwy runtime/syntax/vdf.vim @ObserverOfTime -runtime/syntax/vim.vim @cecamp runtime/syntax/vroom.vim @dbarnett runtime/syntax/wast.vim @rhysd runtime/syntax/wdl.vim @zenmatic @@ -540,18 +501,18 @@ runtime/syntax/wget.vim @dkearns runtime/syntax/wget2.vim @dkearns runtime/syntax/xbl.vim @dkearns runtime/syntax/xcompose.vim @ObserverOfTime -runtime/syntax/xmath.vim @cecamp runtime/syntax/xml.vim @chrisbra runtime/syntax/xs.vim @petdance runtime/syntax/xslt.vim @Boobies -runtime/syntax/xxd.vim @cecamp -runtime/syntax/yacc.vim @cecamp runtime/syntax/zserio.vim @dpelle runtime/syntax/zsh.vim @chrisbra runtime/tutor/tutor.eo @dpelle runtime/tutor/tutor.eo.utf-8 @dpelle runtime/tutor/tutor.fr @dpelle runtime/tutor/tutor.fr.utf-8 @dpelle +runtime/tutor/tutor.ru @RestorerZ +runtime/tutor/tutor.ru.cp1251 @RestorerZ +runtime/tutor/tutor.ru.utf-8 @RestorerZ src/iscygpty.* @k-takata src/libvterm/ @leonerd src/po/ca.po @nfdisco @@ -563,6 +524,7 @@ src/po/fr.po @dpelle src/po/ga.po @kscanne src/po/it.po @azc100 src/po/ja.po @k-takata +src/po/ru.po @RestorerZ src/po/sr.po @eevan78 src/po/tr.po @bitigchi src/po/uk.po @sakhnik diff --git a/.github/workflows/ci-macvim.yaml b/.github/workflows/ci-macvim.yaml index 3342de1e28..022f2d1c76 100644 --- a/.github/workflows/ci-macvim.yaml +++ b/.github/workflows/ci-macvim.yaml @@ -129,6 +129,17 @@ jobs: run: | brew install libtool + - name: Install packages for testing + run: | + # Apple diff is broken. Use GNU diff instead. See http://github.com/vim/vim/issues/14056. + brew install diffutils + + - name: Grant microphone access for macos-14 + if: matrix.os == 'macos-14' + run: | + # Temporary fix to fix microphone permission issues for macos-14 when playing sound. + sqlite3 $HOME/Library/Application\ Support/com.apple.TCC/TCC.db "INSERT OR IGNORE INTO access VALUES ('kTCCServiceMicrophone','/usr/local/opt/runner/provisioner/provisioner',1,2,4,1,NULL,NULL,0,'UNUSED',NULL,0,1687786159,NULL,NULL,'UNUSED',1687786159);" + - name: Install scripting runtimes if: matrix.publish run: | diff --git a/.gitignore b/.gitignore index 214cb73f9d..2edfedf90c 100644 --- a/.gitignore +++ b/.gitignore @@ -148,6 +148,12 @@ src/a.out.dSYM # Generated by "make install" runtime/doc/doctags +runtime/doc/tags-* + +# Temporarily generated by "runtime/syntax/generator/make" +runtime/syntax/generator/generator.err +runtime/syntax/generator/sanity_check.err +runtime/syntax/generator/vim.vim.rc # Generated by "make shadow". The directory names could be anything but we # restrict them to shadow (the default) or shadow-* diff --git a/.hgignore b/.hgignore index 14fc3ecc51..8b73f1b82a 100644 --- a/.hgignore +++ b/.hgignore @@ -98,6 +98,7 @@ src/kword_test # Generated by "make install" runtime/doc/doctags +runtime/doc/tags-* # Generated by "make shadow". The directory names could be anything but we # restrict them to shadow (the default) or shadow-* diff --git a/Filelist b/Filelist index 237923e879..57eb8dd402 100644 --- a/Filelist +++ b/Filelist @@ -1,7 +1,7 @@ # List of distributed Vim files. # Used by Makefile. -# source files for all source archives +# Source files for all source archives. SRC_ALL = \ .cirrus.yml \ .gitattributes \ @@ -430,7 +430,7 @@ SRC_ALL = \ src/xdiff/xutils.h \ -# source files for Unix only +# Source files for Unix-like only. SRC_UNIX = \ Makefile \ Filelist \ @@ -496,7 +496,7 @@ SRC_UNIX = \ src/which.sh \ src/xxd/Makefile \ -# source files for both DOS and Unix +# Source files for both MS Windows and Unix-like. SRC_DOS_UNIX = \ src/gui_xim.c \ src/if_cscope.c \ @@ -522,7 +522,7 @@ SRC_DOS_UNIX = \ src/proto/if_tcl.pro \ src/typemap \ -# source files for MS-Windows (also in the extra archive) +# Source files for MS Windows (also in the extra archive). SRC_DOS = \ src/GvimExt/*.mak \ src/GvimExt/GvimExt.reg \ @@ -596,9 +596,10 @@ SRC_DOS = \ nsis/gvim_version.nsh \ nsis/README.txt \ nsis/lang/*.nsi \ + nsis/lang/README.txt \ uninstall.txt \ -# source files for DOS without CR/LF translation (also in the extra archive) +# Source files for MS Windows without CR/LF translation (also in the extra archive). SRC_DOS_BIN = \ src/tearoff.bmp \ src/tools.bmp \ @@ -615,10 +616,10 @@ SRC_DOS_BIN = \ runtime/bitmaps/vim.ico \ nsis/icons.zip \ -# source files for Amiga, DOS, etc. (also in the extra archive) +# Source files for Amiga, DOS, etc. (also in the extra archive). SRC_AMI_DOS = \ -# source files for Amiga (also in the extra archive) +# Source files for Amiga (also in the extra archive). SRC_AMI = \ README_amisrc.txt \ README_amisrc.txt.info \ @@ -632,7 +633,7 @@ SRC_AMI = \ src/testdir/amiga.vim \ src/xxd/Make_amiga.mak \ -# source files for Haiku (also in the extra archive) +# Source files for Haiku (also in the extra archive). SRC_HAIKU = \ README_haiku.txt \ src/os_haiku.h \ @@ -641,7 +642,7 @@ SRC_HAIKU = \ src/gui_haiku.h \ src/proto/gui_haiku.pro \ -# source files for the Mac (also in the extra archive) +# Source files for the Mac (also in the extra archive). SRC_MAC = \ src/INSTALLmac.txt \ src/os_mac.h \ @@ -650,7 +651,7 @@ SRC_MAC = \ src/proto/os_mac_conv.pro \ src/proto/os_macosx.pro \ -# source files for VMS (in the extra archive) +# Source files for VMS (in the extra archive). SRC_VMS = \ src/INSTALLvms.txt \ src/Make_vms.mms \ @@ -664,7 +665,7 @@ SRC_VMS = \ src/xxd/Make_vms.mms \ vimtutor.com \ -# source files for QNX (in the extra archive) +# Source files for QNX (in the extra archive). SRC_QNX = \ src/os_qnx.c \ src/os_qnx.h \ @@ -672,7 +673,7 @@ SRC_QNX = \ src/proto/gui_photon.pro \ src/proto/os_qnx.pro \ -# source files for the extra archive (all sources that are not for Unix) +# Source files for the extra archive (all sources that are not for Unix). SRC_EXTRA = \ $(SRC_AMI) \ $(SRC_AMI_DOS) \ @@ -687,7 +688,7 @@ SRC_EXTRA = \ src/os_vms_fix.com \ src/toolbar.phi \ -# runtime files for all distributions +# Runtime files for all distributions. RT_ALL = \ README.txt \ README.md \ @@ -778,12 +779,12 @@ RT_ALL = \ runtime/pack/dist/opt/swapmouse/plugin/swapmouse.vim \ runtime/pack/dist/opt/termdebug/plugin/termdebug.vim \ -# runtime files for all distributions without CR-NL translation +# Runtime files for all distributions without CR/LF translation. RT_ALL_BIN = \ runtime/doc/tags \ runtime/print/*.ps \ -# runtime script files +# Runtime script files. RT_SCRIPTS = \ runtime/filetype.vim \ runtime/scripts.vim \ @@ -825,10 +826,17 @@ RT_SCRIPTS = \ runtime/syntax/Makefile \ runtime/syntax/testdir/README.txt \ runtime/syntax/testdir/runtest.vim \ + runtime/syntax/testdir/ftplugin/*.* \ runtime/syntax/testdir/input/*.* \ + runtime/syntax/testdir/input/setup/*.* \ runtime/syntax/testdir/dumps/*.dump \ + runtime/syntax/generator/Makefile \ + runtime/syntax/generator/README.md \ + runtime/syntax/generator/gen_syntax_vim.vim \ + runtime/syntax/generator/update_date.vim \ + runtime/syntax/generator/vim.vim.base \ -# Unix runtime +# Unix-like runtime. RT_UNIX = \ README_unix.txt \ runtime/hi16-action-make.png \ @@ -836,7 +844,7 @@ RT_UNIX = \ runtime/gvim.desktop \ runtime/vim.desktop \ -# Unix and DOS runtime without CR-LF translation +# Unix-like and MS Windows runtime without CR/LF translation. RT_UNIX_DOS_BIN = \ runtime/vim16x16.gif \ runtime/vim16x16.png \ @@ -848,10 +856,10 @@ RT_UNIX_DOS_BIN = \ runtime/vim48x48.png \ runtime/vim48x48.xpm \ -# runtime not for unix or extra +# Runtime not for Unix-like or extra. RT_NO_UNIX = \ -# runtime for Amiga (also in the extra archive) +# Runtime for Amiga (also in the extra archive). RT_AMI_DOS = \ runtime/doc/evim.man \ runtime/doc/vim.man \ @@ -859,15 +867,16 @@ RT_AMI_DOS = \ runtime/doc/vimtutor.man \ runtime/doc/xxd.man \ -# DOS runtime (also in the extra archive) +# MS Windows runtime (also in the extra archive). RT_DOS = \ README_dos.txt \ runtime/doc/Make_mvc.mak \ + runtime/indent/Make_mvc.mak \ runtime/tutor/Make_mvc.mak \ runtime/lang/Make_mvc.mak \ vimtutor.bat \ -# DOS runtime without CR-LF translation (also in the extra archive) +# MS Windows runtime without CR/LF translation (also in the extra archive). RT_DOS_BIN = \ runtime/vimlogo.cdr \ runtime/vimlogo.eps \ @@ -895,7 +904,7 @@ RT_AMI = \ runtime/tutor.info \ runtime/tutor/*.info \ -# runtime files in extra archive +# Runtime files in extra archive. RT_EXTRA = \ $(RT_AMI) \ $(RT_AMI_DOS) \ @@ -903,46 +912,46 @@ RT_EXTRA = \ $(RT_DOS_BIN) \ README_mac.txt \ -# included in all Amiga archives +# Included in all Amiga archives. ROOT_AMI = \ Contents \ Contents.info \ runtime.info \ vimdir.info \ -# root files for the extra archive +# Root files for the extra archive. ROOT_EXTRA = \ $(ROOT_AMI) \ -# files for Amiga small binary (also in extra archive) +# Files for Amiga small binary (also in extra archive). BIN_AMI = \ README_amibin.txt \ README_amibin.txt.info \ Vim.info \ Xxd.info \ -# files for DOS binary (also in extra archive) +# Files for MS Windows binary (also in extra archive). BIN_DOS = \ README_bindos.txt \ uninstall.txt \ -# files for Win32 OLE binary (also in extra archive) +# Files for Win32 OLE binary (also in extra archive). BIN_OLE = \ README_ole.txt \ -# files for Win32s binary (also in extra archive) +# Files for Win32s binary (also in extra archive). BIN_W32S = \ README_w32s.txt \ -# files for VMS binary (also in extra archive) +# Files for VMS binary (also in extra archive). BIN_VMS = \ README_vms.txt \ -# files for OS/2 binary (also in extra archive) +# Files for OS/2 binary (also in extra archive). BIN_OS2 = \ README_os2.txt \ -# binary files for extra archive +# Binary files for extra archive. BIN_EXTRA = \ $(BIN_AMI) \ $(BIN_DOS) \ @@ -951,7 +960,7 @@ BIN_EXTRA = \ $(BIN_VMS) \ $(BIN_OS2) \ -# all files for extra archive +# All files for extra archive. EXTRA = \ $(BIN_EXTRA) \ $(ROOT_EXTRA) \ @@ -960,7 +969,7 @@ EXTRA = \ README_extra.txt \ runtime/vimlogo.xpm \ -# files in READMEdir that are included from the top dir +# Files in READMEdir that are included from the top dir. IN_README_DIR = \ README.txt.info \ README_ami.txt \ @@ -991,8 +1000,9 @@ IN_README_DIR = \ src.info \ vimdir.info \ -# generic language files +# Generic language files. LANG_GEN = \ + README.??x.txt \ runtime/doc/*-da.1 \ runtime/doc/*-da.UTF-8.1 \ runtime/doc/*-de.1 \ @@ -1008,6 +1018,7 @@ LANG_GEN = \ runtime/doc/*-ru.UTF-8.1 \ runtime/doc/*-tr.1 \ runtime/doc/*-tr.UTF-8.1 \ + runtime/doc/uganda.??x \ runtime/lang/README.txt \ runtime/lang/Makefile \ runtime/lang/Make_all.mak \ @@ -1044,7 +1055,7 @@ LANG_GEN = \ runtime/spell/main.aap \ runtime/spell/*.vim \ -# generic language files, binary +# Generic language files, binary. LANG_GEN_BIN = \ runtime/spell/README_en.txt \ runtime/spell/en.ascii.spl \ @@ -1054,7 +1065,7 @@ LANG_GEN_BIN = \ runtime/spell/en.latin1.sug \ runtime/spell/en.utf-8.sug \ -# all files for lang archive +# All files for lang archive. LANG_SRC = \ src/po/README.txt \ src/po/README_mingw.txt \ @@ -1074,7 +1085,7 @@ LANG_SRC = \ src/po/big5corr.c \ src/po/*.po \ -# the language files for the Win32 lang archive +# The language files for the Win32 lang archive. LANG_DOS = \ src/po/*.mo \ diff --git a/Makefile b/Makefile index 0d352ebf20..f4db80fb82 100644 --- a/Makefile +++ b/Makefile @@ -267,7 +267,7 @@ dist: # Copy README files to the top directory. prepare: if test -f runtime/doc/uganda.nsis.txt; then \ - rm runtime/doc/uganda.nsis.txt; fi + rm runtime/doc/uganda.nsis.???; fi for name in $(IN_README_DIR); do \ cp READMEdir/"$$name" .; \ done @@ -407,12 +407,8 @@ amisrc: dist prepare gzip -9 dist/vim$(VERSION)src.tar mv dist/vim$(VERSION)src.tar.gz dist/vim$(VERSION)src.tgz -no_title.vim: Makefile - echo "set notitle noicon nocp nomodeline viminfo=" >no_title.vim - # MS-DOS sources -dossrc: dist no_title.vim dist/$(COMMENT_SRC) \ - runtime/doc/uganda.nsis.txt \ +dossrc: dist dist/$(COMMENT_SRC) runtime/doc/uganda.nsis.txt \ nsis/gvim_version.nsh -rm -rf dist/vim$(VERSION)src.zip -rm -rf dist/vim @@ -424,16 +420,14 @@ dossrc: dist no_title.vim dist/$(COMMENT_SRC) \ $(SRC_DOS_BIN) \ $(SRC_AMI_DOS) \ $(SRC_DOS_UNIX) \ - runtime/doc/uganda.nsis.txt \ + runtime/doc/uganda.nsis.??? \ nsis/gvim_version.nsh \ | (cd dist/vim/$(VIMRTDIR); tar xf -) mv dist/vim/$(VIMRTDIR)/runtime/* dist/vim/$(VIMRTDIR) rmdir dist/vim/$(VIMRTDIR)/runtime - # This file needs to be in dos fileformat for NSIS. - $(VIM) -e -X -u no_title.vim -c ":set tx|wq" dist/vim/$(VIMRTDIR)/doc/uganda.nsis.txt cd dist && zip -9 -rD -z vim$(VERSION)src.zip vim <$(COMMENT_SRC) -runtime/doc/uganda.nsis.txt: runtime/doc/uganda.txt +runtime/doc/uganda.nsis.txt: runtime/doc/uganda.??? cd runtime/doc && $(MAKE) uganda.nsis.txt nsis/gvim_version.nsh: Makefile @@ -450,7 +444,7 @@ dosrt: dist dist/$(COMMENT_RT) dosrt_files # Split in two parts to avoid an "argument list too long" error. # We no longer convert the files from unix to dos fileformat. -dosrt_files: dist prepare no_title.vim +dosrt_files: dist prepare -rm -rf dist/vim mkdir dist/vim mkdir dist/vim/$(VIMRTDIR) @@ -506,7 +500,7 @@ dosbin: prepare dosbin_gvim dosbin_w32 dosbin_ole $(DOSBIN_S) -rm $(IN_README_DIR) # make Win32 gvim -dosbin_gvim: dist no_title.vim dist/$(COMMENT_GVIM) +dosbin_gvim: dist dist/$(COMMENT_GVIM) -rm -rf dist/gvim$(VERSION).zip -rm -rf dist/vim mkdir dist/vim @@ -528,7 +522,7 @@ dosbin_gvim: dist no_title.vim dist/$(COMMENT_GVIM) cp gvim.pdb dist/gvim$(VERSION).pdb # make Win32 console -dosbin_w32: dist no_title.vim dist/$(COMMENT_W32) +dosbin_w32: dist dist/$(COMMENT_W32) -rm -rf dist/vim$(VERSION)w32.zip -rm -rf dist/vim mkdir dist/vim @@ -545,7 +539,7 @@ dosbin_w32: dist no_title.vim dist/$(COMMENT_W32) cp vimw32.pdb dist/vim$(VERSION)w32.pdb # make Win32 gvim with OLE -dosbin_ole: dist no_title.vim dist/$(COMMENT_OLE) +dosbin_ole: dist dist/$(COMMENT_OLE) -rm -rf dist/gvim$(VERSION)ole.zip -rm -rf dist/vim mkdir dist/vim diff --git a/README.rux.txt b/README.rux.txt new file mode 100644 index 0000000000..5c92b85634 --- /dev/null +++ b/README.rux.txt @@ -0,0 +1,161 @@ +README.rux.txt для версии 9.1 программы Vim — Vi IMproved. + + +ЧТО ТАКОЕ РЕДАКТОР VIM? + +Программа Vim — это значительно улучшенная версия старого доброго редактора Vi +из системы UNIX. При разработке этого редактора было добавлено множество новых +возможностей: многоуровневая отмена изменений, подсветка синтаксиса, журнал +командной строки, интерактивная справка, проверка орфографии, подстановка +наименований файлов и команд, операции с произвольными блоками текста, +встроенный язык программирования и т. д. Также доступен графический интерфейс +пользователя (GUI). И при этом сохраняется совместимость с редактором Vi, +и те, у кого Vi «в крови», будут чувствовать себя как дома. Подробности о +различиях с редактором Vi см. в файле "runtime/doc/vi_diff.txt". + +Этот редактор очень удобен для работы с исходным кодом программ, а также +разного рода других текстовых файлов. Все команды вводятся набором обычных +символов клавиатуры, поэтому те, кто освоил десятипальцевый метод печати, могут +работать очень быстро. Кроме того, пользователи могут назначить на +функциональные клавиши клавиатуры необходимые команды, и использовать +манипулятор «мышь». + +Редактор Vim работает в ОС MS Windows (7, 8, 10, 11), macOS, Haiku, VMS и +практически во всех UNIX-подобных системах. А перенос на другие платформы не +должен представлять особой сложности. +Предыдущие версии редактора Vim работают в операционных системах OS/2, MS-DOS, +MS Windows 95/98/Me/NT/2000/XP/Vista, AmigaDOS, Atari MiNT, BeOS и RISC OS. +Но поддержка этих версий больше не осуществляется. + + +ПРЕДОСТАВЛЕНИЕ РЕДАКТОРА Vim + +Для установки редактора Vim можно воспользоваться привычным диспетчером пакетов. +В системах Mac и Linux уже предустановленна начальная версия программы Vim, +но вам все равно нужно установить редактор Vim, если вы хотите получить больше +возможностей. + +Существуют отдельные версии для Unix, PC, Amiga и некоторых других систем. +Данный файл README.rux.txt поставляется вместе с архивом рабочих файлов +программы. Этот архив включает в себя документацию, файлы подсветки синтаксиса +и другие файлы, которые используются редактором во время работы. Чтобы +запустить программу Vim, вы должны получить либо архив с исполняемыми файлами, +либо архив с исходным кодом. Какой из них вам нужен, зависит от того, на какой +системе вы хотите запустить редактор Vim, и есть ли для этой системы +исполняемые файлы или вы должны компилировать программу самостоятельно. +Чтобы узнать о доступных в настоящее время пакетах программы, посмотрите на +веб‐странице https://www.vim.org/download.php. + +Несколько полезных мест, где можно получить последнюю версию редактора Vim: +* Посмотрите в git-хранилище на GitHub: https://github.com/vim/vim. +* Получить исходный код в виде архива: https://github.com/vim/vim/releases. +* Получить исполняемый файл для ОС Windows из хранилища vim-win32-installer: +https://github.com/vim/vim-win32-installer/releases. + + +КОМПИЛЯЦИЯ РЕДАКТОРА Vim + +Если для вашей системы уже есть готовые исполняемые файлы, вам не нужно самому +компилировать редактор Vim. Если вы скачали архив с исходным кодом, то всё +необходимое для компиляции программы Vim находится в каталоге "src". +Инструкции смотрите в файле src/INSTALL. + + +УСТАНОВКА ПРОГРАММЫ Vim + +Инструкции для конкретной системы смотрите в одном из нижеуказанных файлов. +Или в каталоге READMEdir (на https://github.com/vim/vim), или в основном +каталоге (если вы распаковываете архив): + +README_ami.txt Amiga +README_unix.txt Unix +README_dos.txt MS-DOS и MS Windows +README_mac.txt Macintosh +README_haiku.txt Haiku +README_vms.txt VMS + +Существует ещё несколько файлов README_*.txt, в зависимости от предоставляемого +пакета. + + +ДОКУМЕНТАЦИЯ ПО РЕДАКТОРУ Vim + +Учебник Vim — это часовой практический курс для начинающих. Как правило, для +работы с ним нужно набрать команду "vimtutor". Чтобы получить дополнительную +информацию, смотрите раздел документации ":help tutor". + +Лучше всего воспользоваться командой ":help" в редакторе Vim. Если у вас ещё +нет исполняемого файла программы, прочитайте файл "runtime/doc/help.txt". +В нём содержатся отсылки на другие полезные файлы документации. Руководство +пользователя можно читать как книгу, и оно рекомендуется для обучения работе +с редактором Vim. Смотрите ":help user-manual". + + +ЛИЦЕНЗИОННЫЕ ПРАВА + +Редактор Vim является благотворительным программным обеспечением. +Использование и копирование программы Vim не ограничено, однако рекомендуется +сделать добровольное пожертвование для нуждающихся детей в Уганде. Чтобы узнать +подробности, прочитайте, пожалуйста, файл "runtime/doc/uganda.rux" (введите +команду ":help uganda" в редакторе Vim). + +Краткое описание лицензии. +Нет никаких ограничений на использование или распространение немодифицированной +копии программы Vim. Части программы Vim также могут предоставляться отдельно, +но текст лицензии Vim всегда должен быть включён в поставку. +Для модифицированных версий программы действует несколько ограничений. +Лицензия Vim совместима с лицензией GNU GPL, вы можете компилировать +и распространять программу Vim с библиотеками, лицензированными под GNU GPL. + + +ФИНАНСОВАЯ ПОДДЕРЖКА ДЛЯ РАЗРАБОТКИ РЕДАКТОРА Vim + +Устранение ошибок и добавление новых функциональных возможностей требует +вложения немалого количества времени и сил. Выразить признательность за труд +и подкрепить заинтересованность разработчиков программы в дальнейшей работе +над редактором Vim можно с помощью оказания финансовой поддержки. + +Пожертвованные вами деньги будут в основном направлены на оказание помощи детям +Уганды, см. "runtime/doc/uganda.rux". Однако в любом случае финансирование +будет способствовать повышению заинтересованности команды разработчиков +в продолжении работы над редактором Vim! + +Самая свежая информация об оказании финансовой поддержки публикуется на +веб-сайте программы Vim: + https://www.vim.org/sponsor/ + + +ПОМОЩЬ В РАЗРАБОТКЕ РЕДАКТОРА Vim + +Если вы хотите помочь сделать редактор Vim лучше, смотрите файл CONTRIBUTING.md. + + +ДОПОЛНИТЕЛЬНАЯ ИНФОРМАЦИЯ + +Для системе macOS вы може использовать MacVim: https://macvim.org + +Последние новости о редакторе Vim можно найти на его домашней странице: + https://www.vim.org/ + +Если у вас возникли вопросы, посмотрите полезные советы или документацию по +редактору Vim: + https://www.vim.org/docs.php + https://vim.fandom.com/wiki/Vim_Tips_Wiki + +Если у вас все ещё остались вопросы или есть сложности, воспользуйтесь одним +из списков рассылки, чтобы обсудить их с пользователями и разработчиками: + https://www.vim.org/maillist.php + +Если ничего не помогает, сообщайте об ошибках непосредственно в список рассылки +vim-dev: + + + +ОСНОВНОЙ АВТОР ПРОГРАММЫ + +Большая часть редактора Vim была создана Брамом Моленаром , +см. ":help Bram-Moolenaar" + +Присылайте все прочие комментарии, исправления, цветы и предложения в список +рассылки vim-dev: + diff --git a/README.txt b/README.txt index 5128afdf23..bdfefaf8d7 100644 --- a/README.txt +++ b/README.txt @@ -6,10 +6,9 @@ WHAT IS VIM? Vim is a greatly improved version of the good old UNIX editor Vi. Many new features have been added: multi-level undo, syntax highlighting, command line history, on-line help, spell checking, filename completion, block operations, -script language, etc. There is also a Graphical User Interface (GUI) -available. Still, Vi compatibility is maintained, those who have Vi "in the -fingers" will feel at home. See "runtime/doc/vi_diff.txt" for differences with -Vi. +script language, etc. There is also a Graphical User Interface (GUI) available. +Still, Vi compatibility is maintained, those who have Vi "in the fingers" will +feel at home. See "runtime/doc/vi_diff.txt" for differences with Vi. This editor is very useful for editing programs and other plain text files. All commands are given with normal keyboard characters, so those who can type @@ -60,9 +59,10 @@ README_ami.txt Amiga README_unix.txt Unix README_dos.txt MS-DOS and MS-Windows README_mac.txt Macintosh +README_haiku.txt Haiku README_vms.txt VMS -There are more README_*.txt files, depending on the distribution you used. +There are other README_*.txt files, depending on the distribution you used. DOCUMENTATION @@ -71,9 +71,9 @@ The Vim tutor is a one hour training course for beginners. Often it can be started as "vimtutor". See ":help tutor" for more information. The best is to use ":help" in Vim. If you don't have an executable yet, read -"runtime/doc/help.txt". It contains pointers to the other documentation -files. The User Manual reads like a book and is recommended to learn to use -Vim. See ":help user-manual". +"runtime/doc/help.txt". It contains pointers to the other documentation files. +The User Manual reads like a book and is recommended to learn to use Vim. See +":help user-manual". COPYING @@ -92,15 +92,14 @@ distribute it. SPONSORING Fixing bugs and adding new features takes a lot of time and effort. To show -your appreciation for the work and motivate Bram and others to continue -working on Vim please send a donation. +your appreciation for the work and motivate developers to continue working on +Vim please send a donation. -Since Bram is back to a paid job the money will now be used to help children -in Uganda. See runtime/doc/uganda.txt. But at the same time donations -increase Bram's motivation to keep working on Vim! +The money you donated will be mainly used to help children in Uganda. See +"runtime/doc/uganda.txt". But at the same time donations increase the +development team motivation to keep working on Vim! For the most recent information about sponsoring look on the Vim web site: - https://www.vim.org/sponsor/ @@ -111,6 +110,8 @@ If you would like to help make Vim better, see the CONTRIBUTING.md file. INFORMATION +If you are on macOS, you can use MacVim: https://macvim.org + The latest news about Vim can be found on the Vim home page: https://www.vim.org/ @@ -118,8 +119,8 @@ If you have problems, have a look at the Vim documentation or tips: https://www.vim.org/docs.php https://vim.fandom.com/wiki/Vim_Tips_Wiki -If you still have problems or any other questions, use one of the mailing -lists to discuss them with Vim users and developers: +If you still have problems or any other questions, use one of the mailing lists +to discuss them with Vim users and developers: https://www.vim.org/maillist.php If nothing else works, report bugs directly to the vim-dev mailing list: @@ -128,8 +129,7 @@ If nothing else works, report bugs directly to the vim-dev mailing list: MAIN AUTHOR -Most of Vim was created by Bram Moolenaar |Bram-Moolenaar| +Most of Vim was created by Bram Moolenaar , ":help Bram-Moolenaar" -Send any other comments, patches, flowers and suggestions to the vim-dev mailing list: - - +Send any other comments, patches, flowers and suggestions to the vim-dev +mailing list: diff --git a/README_vim.md b/README_vim.md index 0f7f5dac1b..6e6cf11b89 100644 --- a/README_vim.md +++ b/README_vim.md @@ -109,12 +109,12 @@ distribute it. ## Sponsoring Fixing bugs and adding new features takes a lot of time and effort. To show -your appreciation for the work and motivate Bram and others to continue -working on Vim please send a donation. +your appreciation for the work and motivate developers to continue working on +Vim please send a donation. -Since Bram is back to a paid job the money will now be used to help children -in Uganda. See [`runtime/doc/uganda.txt`](./runtime/doc/uganda.txt). But -at the same time donations increase Bram's motivation to keep working on Vim! +The money you donated will be mainly used to help children in Uganda. See +[`runtime/doc/uganda.txt`](./runtime/doc/uganda.txt). But at the same time +donations increase the development team motivation to keep working on Vim! For the most recent information about sponsoring look on the Vim web site: https://www.vim.org/sponsor/ @@ -126,7 +126,7 @@ If you would like to help make Vim better, see the ## Information -If you are on macOS, you can use [Macvim](https://macvim-dev.github.io/macvim/). +If you are on macOS, you can use [MacVim](https://macvim.org). The latest news about Vim can be found on the Vim home page: https://www.vim.org/ diff --git a/nsis/README.txt b/nsis/README.txt index e1abc4a95c..79c1952133 100644 --- a/nsis/README.txt +++ b/nsis/README.txt @@ -1,7 +1,7 @@ -This builds a one-click install for Vim for Win32 using the Nullsoft +This builds a one-click install for Vim for MS Windows using the Nullsoft Installation System (NSIS), available at http://nsis.sourceforge.net/ -To build the installable .exe: +To build the installable .exe file: 1. Unpack three archives: PC sources @@ -16,10 +16,9 @@ To build the installable .exe: install.exe, uninstall.exe, tee/tee.exe, - xxd/xxd.exe, + xxd/xxd.exe - Then execute tools/rename.bat to rename the executables. (mv command is - required.) + Then execute tools/rename.bat to rename the executables. 3. Go to the GvimExt directory and build gvimext.dll (or get it from a binary archive). Both 64- and 32-bit versions are needed and should be placed @@ -28,19 +27,37 @@ To build the installable .exe: 32-bit: src/GvimExt/gvimext.dll 4. Get a "diff.exe" program. If you skip this the built-in diff will always - be used (which is fine for most users). If you do have your own - "diff.exe" put it in the "../.." directory (above the "vim90" directory, - it's the same for all Vim versions). + be used (which is fine for most users). You can find one in previous Vim versions or in this archive: - http://www.mossbayeng.com/~ron/vim/diffutils.tar.gz - -5 Also put winpty32.dll and winpty-agent.exe in "../.." (above the "vim90" - directory). This is required for the terminal window. - -6. Do "make uganda.nsis.txt" in runtime/doc. This requires sed, you may have - to do this on Unix. Make sure the file is in DOS file format! - -7. Get gettext and iconv DLLs from the following site: + https://www.mediafire.com/file/9edk4g3xvfgzby0/diff4Vim.zip/file + When will you have "diff.exe" put it in the "../.." directory (above the + "vim91" directory, it's the same for all Vim versions). However, you can + specify another directory by passing /DVIMTOOLS= option to the + "makensis.exe" program via the command line. + +5. For the terminal window to work in Vim, the library winpty is required. + You can get it at the following url: + https://github.com/rprichard/winpty/releases/download/0.4.3/winpty-0.4.3-msvc2015.zip + For the 32-bit version, rename "winpty.dll" from ia32/bin to "winpty32.dll", + and for the 64-bit version — "winpty.dll" from x64/bin to "winpty64.dll". + Put the renamed file and "winpty-agent.exe" in "../.." (above the "vim91" + directory). However, you can specify another directory by passing + /DVIMTOOLS= option to the "makensis.exe" program via the command line. + +6. To use stronger encryption, add the Sodium library. You can get it here: + https://github.com/jedisct1/libsodium/releases/download/1.0.19-RELEASE/libsodium-1.0.19-msvc.zip + Unpack the archive. Put the "libsodium.dll" from + path/to/libsodium/Win32/Release/v143/dynamic for the 32‐bit version or + path/to/libsodium/X64/Release/v143/dynamic for the 64‐bit version in the + "../.." directory (above the "vim91" directory, where "diff.exe" and + "winpty{32|64}.dll"). + +7. On MS Windows do "nmake.exe -f Make_mvc.mak uganda.nsis.txt" in runtime/doc. + On Unix-like system do "make runtime/doc/uganda.nsis.txt" in top directory + or "make uganda.nsis.txt" in runtime/doc. The created files + "uganda.nsis.???" will be automatically converted to DOS file format. + +8. Get gettext and iconv DLLs from the following site: https://github.com/mlocati/gettext-iconv-windows/releases Both 64- and 32-bit versions are needed. Download the files gettextX.X.X.X-iconvX.XX-shared-{32,64}.zip, extract @@ -53,25 +70,39 @@ To build the installable .exe: | libiconv-2.dll | libgcc_s_sjlj-1.dll | - ` gettext64/ + + gettext64/ libintl-8.dll libiconv-2.dll - The default is "..", however, you can change it by - passing /DGETTEXT=... option to the makensis command. + The default is "..", however, you can specify another + directory by passing /DGETTEXT= option to "makensis.exe" program via + the command line. Install NSIS if you didn't do that already. -Also install UPX, if you want a compressed file. -Download and include the ShellExecAsUser.dll Unicode version which can be -sourced from: https://nsis.sourceforge.io/ShellExecAsUser_plug-in +Download Unicode version the ShellExecAsUser plug-in for NSIS from: + https://nsis.sourceforge.io/ShellExecAsUser_plug-in +and put ShellExecAsUser.dll to path\to\NSIS\Plugins\x86-unicode Unpack the images: cd nsis - unzip icons.zip + unzip icons.zip or 7z x icons.zip (on Unix-like or MS Windows) + WinRar.exe x icons.zip (on MS Windows) Then build gvim.exe: - cd nsis - makensis gvim.nsi + makensis.exe [options] gvim.nsi + +Options (not mandatory): + /DVIMSRC= — directory where location of gvim_ole.exe, vimw32.exe, + GvimExt/*, etc. + /DVIMRT= — directory where location of runtime files + /DVIMTOOLS= — directory where location of extra tools: diff.exe, + winpty{32|64}.dll, winpty-agent.exe, libsodium.dll + /DGETTEXT= — directory where location of gettext libraries + /DHAVE_UPX=1 — additional compression of the installer. UPX program + must be installed. + /DHAVE_NLS=0 — do not add native language support + /DHAVE_MULTI_LANG=0 — to create an English-only the installer + /DWIN64=1 — to create a 64-bit the installer diff --git a/nsis/gvim.nsi b/nsis/gvim.nsi index 72252527c7..b8ef079dba 100644 --- a/nsis/gvim.nsi +++ b/nsis/gvim.nsi @@ -1,6 +1,6 @@ # NSIS file to create a self-installing exe for Vim. # It requires NSIS version 3.0 or later. -# Last Change: 2014 Nov 5 +# Last Change: 2024 Mar 20 Unicode true @@ -17,7 +17,7 @@ Unicode true !define VIMRT ".." !endif -# Location of extra tools: diff.exe +# Location of extra tools: diff.exe, winpty{32|64}.dll, winpty-agent.exe, etc. !ifndef VIMTOOLS !define VIMTOOLS ..\.. !endif @@ -29,40 +29,82 @@ Unicode true !define GETTEXT ${VIMRT} !endif -# Comment the next line if you don't have UPX. -# Get it at https://upx.github.io/ -!define HAVE_UPX +# If you have UPX, use the switch /DHAVE_UPX=1 on the command line makensis.exe. +# This property will be set to 1. Get it at https://upx.github.io/ +!ifndef HAVE_UPX + !define HAVE_UPX 0 +!endif -# Comment the next line if you do not want to add Native Language Support -!define HAVE_NLS +# If you do not want to add Native Language Support, use the switch /DHAVE_NLS=0 +# in the command line makensis.exe. This property will be set to 0. +!ifndef HAVE_NLS + !define HAVE_NLS 1 +!endif -# Comment the following line to create an English-only installer: -!define HAVE_MULTI_LANG +# To create an English-only the installer, use the switch /DHAVE_MULTI_LANG=0 on +# the command line makensis.exe. This property will be set to 0. +!ifndef HAVE_MULTI_LANG + !define HAVE_MULTI_LANG 1 +!endif -# Uncomment the next line if you want to create a 64-bit installer. -#!define WIN64 +# if you want to create a 64-bit the installer, use the switch /DWIN64=1 on +# the command line makensis.exe. This property will be set to 1. +!ifndef WIN64 + !define WIN64 0 +!endif !include gvim_version.nsh # for version number -# Definition of Patch for Vim +# Definition of Patch for Vim. !ifndef PATCHLEVEL !define PATCHLEVEL 0 !endif # ----------- No configurable settings below this line ----------- -!include "Library.nsh" # For DLL install +!include "Library.nsh" # for DLL install !include "LogicLib.nsh" !include "MUI2.nsh" !include "nsDialogs.nsh" !include "Sections.nsh" !include "x64.nsh" +# See https://nsis.sourceforge.io/LogicLib +;FileExists is already part of LogicLib, but returns true for directories +;as well as files +!macro _FileExists2 _a _b _t _f + !insertmacro _LOGICLIB_TEMP + StrCpy $_LOGICLIB_TEMP "0" +;if path is not blank, continue to next check + StrCmp `${_b}` `` +4 0 +;if path exists, continue to next check (IfFileExists returns true if this +;is a directory) + IfFileExists `${_b}` `0` +3 +;if path is not a directory, continue to confirm exists + IfFileExists `${_b}\*.*` +2 0 + StrCpy $_LOGICLIB_TEMP "1" ;file exists +;now we have a definitive value - the file exists or it does not + StrCmp $_LOGICLIB_TEMP "1" `${_t}` `${_f}` +!macroend +!undef FileExists +!define FileExists `"" FileExists2` +!macro _DirExists _a _b _t _f + !insertmacro _LOGICLIB_TEMP + StrCpy $_LOGICLIB_TEMP "0" +;if path is not blank, continue to next check + StrCmp `${_b}` `` +3 0 +;if directory exists, continue to confirm exists + IfFileExists `${_b}\*.*` 0 +2 + StrCpy $_LOGICLIB_TEMP "1" + StrCmp $_LOGICLIB_TEMP "1" `${_t}` `${_f}` +!macroend +!define DirExists `"" DirExists` + !define PRODUCT "Vim ${VER_MAJOR}.${VER_MINOR}" !define UNINST_REG_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall" !define UNINST_REG_KEY_VIM "${UNINST_REG_KEY}\${PRODUCT}" -!ifdef WIN64 +!if ${WIN64} Name "${PRODUCT} (x64)" !else Name "${PRODUCT}" @@ -75,11 +117,11 @@ ManifestDPIAware true SetDatablockOptimize on RequestExecutionLevel highest -!ifdef HAVE_UPX +!if ${HAVE_UPX} !packhdr temp.dat "upx --best --compress-icons=1 temp.dat" !endif -!ifdef WIN64 +!if ${WIN64} !define BIT 64 !else !define BIT 32 @@ -96,6 +138,8 @@ RequestExecutionLevel highest # Show all languages, despite user's codepage: !define MUI_LANGDLL_ALLLANGUAGES +# Always show dialog choice language +#!define MUI_LANGDLL_ALWAYSSHOW !define MUI_LANGDLL_REGISTRY_ROOT "HKCU" !define MUI_LANGDLL_REGISTRY_KEY "Software\Vim" !define MUI_LANGDLL_REGISTRY_VALUENAME "Installer Language" @@ -113,13 +157,13 @@ RequestExecutionLevel highest !define MUI_COMPONENTSPAGE_SMALLDESC !define MUI_LICENSEPAGE_CHECKBOX -!define MUI_FINISHPAGE_RUN -!define MUI_FINISHPAGE_RUN_FUNCTION LaunchApplication -!define MUI_FINISHPAGE_RUN_TEXT $(str_show_readme) +!define MUI_FINISHPAGE_SHOWREADME +!define MUI_FINISHPAGE_SHOWREADME_TEXT $(str_show_readme) +!define MUI_FINISHPAGE_SHOWREADME_FUNCTION LaunchApplication # This adds '\Vim' to the user choice automagically. The actual value is # obtained below with CheckOldVim. -!ifdef WIN64 +!if ${WIN64} !define DEFAULT_INSTDIR "$PROGRAMFILES64\Vim" !else !define DEFAULT_INSTDIR "$PROGRAMFILES\Vim" @@ -139,7 +183,7 @@ SilentInstall normal # Installer pages !insertmacro MUI_PAGE_WELCOME -!insertmacro MUI_PAGE_LICENSE "${VIMRT}\doc\uganda.nsis.txt" +!insertmacro MUI_PAGE_LICENSE $(page_lic_file) !insertmacro MUI_PAGE_COMPONENTS Page custom SetCustom ValidateCustom #!define MUI_PAGE_CUSTOMFUNCTION_LEAVE VimFinalCheck @@ -163,13 +207,15 @@ Page custom SetCustom ValidateCustom !include "lang\english.nsi" # Include support for other languages: -!ifdef HAVE_MULTI_LANG +!if ${HAVE_MULTI_LANG} !include "lang\danish.nsi" !include "lang\dutch.nsi" !include "lang\german.nsi" + !include "lang\greek.nsi" !include "lang\italian.nsi" !include "lang\japanese.nsi" !include "lang\russian.nsi" + !include "lang\serbian.nsi" !include "lang\simpchinese.nsi" !include "lang\tradchinese.nsi" !include "lang\turkish.nsi" @@ -319,7 +365,7 @@ FunctionEnd Function LaunchApplication SetOutPath $0 - ShellExecAsUser::ShellExecAsUser "" "$0\gvim.exe" '-R "$0\README.txt"' + ShellExecAsUser::ShellExecAsUser "" "$0\gvim.exe" '-R "$0\$(vim_readme_file)"' FunctionEnd ########################################################## @@ -363,9 +409,6 @@ Section "$(str_section_exe)" id_section_exe File /oname=gvim.exe ${VIMSRC}\gvim_ole.exe !if /FileExists "${VIMSRC}\vim${BIT}.dll" File ${VIMSRC}\vim${BIT}.dll -!endif -!if /FileExists "${VIMRT}\libsodium.dll" - File ${VIMRT}\libsodium.dll !endif File /oname=install.exe ${VIMSRC}\installw32.exe File /oname=uninstall.exe ${VIMSRC}\uninstallw32.exe @@ -377,9 +420,18 @@ Section "$(str_section_exe)" id_section_exe File ..\uninstall.txt File ${VIMRT}\*.vim +!if /FileExists "${VIMTOOLS}\diff.exe" File ${VIMTOOLS}\diff.exe +!endif +!if /FileExists "${VIMTOOLS}\winpty${BIT}.dll" File ${VIMTOOLS}\winpty${BIT}.dll +!endif +!if /FileExists "${VIMTOOLS}\winpty-agent.exe" File ${VIMTOOLS}\winpty-agent.exe +!endif +!if /FileExists "${VIMTOOLS}\libsodium.dll" + File ${VIMTOOLS}\libsodium.dll +!endif SetOutPath $0\colors File /r ${VIMRT}\colors\*.* @@ -388,20 +440,22 @@ Section "$(str_section_exe)" id_section_exe File ${VIMRT}\compiler\*.* SetOutPath $0\doc - File ${VIMRT}\doc\*.txt + File /x uganda.nsis.txt ${VIMRT}\doc\*.txt File ${VIMRT}\doc\tags SetOutPath $0\ftplugin File ${VIMRT}\ftplugin\*.* SetOutPath $0\indent - File ${VIMRT}\indent\*.* + File ${VIMRT}\indent\README.txt + File ${VIMRT}\indent\*.vim SetOutPath $0\keymap - File ${VIMRT}\keymap\*.* + File ${VIMRT}\keymap\README.txt + File ${VIMRT}\keymap\*.vim SetOutPath $0\macros - File /r ${VIMRT}\macros\*.* + File /r /x *.info ${VIMRT}\macros\*.* SetOutPath $0\pack File /r ${VIMRT}\pack\*.* @@ -419,7 +473,7 @@ Section "$(str_section_exe)" id_section_exe File ${VIMSRC}\vim.ico SetOutPath $0\syntax - File /r /x testdir ${VIMRT}\syntax\*.* + File /r /x testdir /x generator /x Makefile ${VIMRT}\syntax\*.* SetOutPath $0\spell File ${VIMRT}\spell\*.txt @@ -431,7 +485,7 @@ Section "$(str_section_exe)" id_section_exe File ${VIMRT}\tools\*.* SetOutPath $0\tutor - File ${VIMRT}\tutor\*.* + File /x Makefile /x *.info ${VIMRT}\tutor\*.* SectionEnd ########################################################## @@ -557,15 +611,116 @@ SectionGroup $(str_group_plugin) id_group_plugin SectionGroupEnd ########################################################## -!ifdef HAVE_NLS +!if ${HAVE_NLS} Section "$(str_section_nls)" id_section_nls SectionIn 1 3 +#; FIXME: When adding new translations, do not forget to make changes here. + SetOutPath $0 +!if /FileExists ..\README.dax.txt + ${If} $Language = ${LANG_DANISH} + File ..\README.dax.txt + ${EndIf} +!endif +!if /FileExists ..\README.nlx.txt + ${If} $Language = ${LANG_DUTCH} + File ..\README.nlx.txt + ${EndIf} +!endif +!if /FileExists ..\README.dex.txt + ${If} $Language = ${LANG_GERMAN} + File ..\README.dex.txt + ${EndIf} +!endif +!if /FileExists ..\README.itx.txt + ${If} $Language = ${LANG_ITALIAN} + File ..\README.itx.txt + ${EndIf} +!endif +!if /FileExists ..\README.jax.txt + ${If} $Language = ${LANG_JAPANESE} + File ..\README.jax.txt + ${EndIf} +!endif +!if /FileExists ..\README.rux.txt + ${If} $Language = ${LANG_RUSSIAN} + File ..\README.rux.txt + ${EndIf} +!endif +!if /FileExists ..\README.srx.txt + ${If} $Language = ${LANG_SERBIAN} + File ..\README.srx.txt + ${EndIf} +!endif +!if /FileExists ..\README.cnx.txt + ${If} $Language = ${LANG_SIMPCHINESE} + File ..\README.cnx.txt + ${EndIf} +!endif +!if /FileExists ..\README.twx.txt + ${If} $Language = ${LANG_TRADCHINESE} + File ..\README.twx.txt + ${EndIf} +!endif +!if /FileExists ..\README.trx.txt + ${OrIf} $Language = ${LANG_TURKISH} + File ..\README.trx.txt + ${EndIf} +!endif +#; FIXME: When adding new translations, do not forget to make changes here. + SetOutPath $0\doc +!if /FileExists "${VIMRT}\doc\uganda.dax" + ${If} $Language = ${LANG_DANISH} + File ${VIMRT}\doc\uganda.dax + ${EndIf} +!endif +!if /FileExists "${VIMRT}\doc\uganda.nlx" + ${If} $Language = ${LANG_DUTCH} + File ${VIMRT}\doc\uganda.nlx + ${EndIf} +!endif +!if /FileExists "${VIMRT}\doc\uganda.dex" + ${If} $Language = ${LANG_GERMAN} + File ${VIMRT}\doc\uganda.dex + ${EndIf} +!endif +!if /FileExists "${VIMRT}\doc\uganda.itx" + ${If} $Language = ${LANG_ITALIAN} + File ${VIMRT}\doc\uganda.itx + ${EndIf} +!endif +!if /FileExists "${VIMRT}\doc\uganda.jax" + ${If} $Language = ${LANG_JAPANESE} + File ${VIMRT}\doc\uganda.jax + ${EndIf} +!endif +!if /FileExists "${VIMRT}\doc\uganda.rux" + ${If} $Language = ${LANG_RUSSIAN} + File ${VIMRT}\doc\uganda.rux + ${EndIf} +!endif +!if /FileExists "${VIMRT}\doc\uganda.srx" + ${If} $Language = ${LANG_SERBIAN} + File ${VIMRT}\doc\uganda.srx + ${EndIf} +!endif +!if /FileExists "${VIMRT}\doc\uganda.cnx" + ${If} $Language = ${LANG_SIMPCHINESE} + File ${VIMRT}\doc\uganda.cnx + ${EndIf} +!endif +!if /FileExists "${VIMRT}\doc\uganda.twx" + ${If} $Language = ${LANG_TRADCHINESE} + File ${VIMRT}\doc\uganda.twx + ${EndIf} +!endif +!if /FileExists "${VIMRT}\doc\uganda.trx" + ${If} $Language = ${LANG_TURKISH} + File ${VIMRT}\doc\uganda.trx + ${EndIf} +!endif SetOutPath $0\lang - File /r ${VIMRT}\lang\*.* - SetOutPath $0\keymap - File ${VIMRT}\keymap\README.txt - File ${VIMRT}\keymap\*.vim + File /r /x Makefile ${VIMRT}\lang\*.* SetOutPath $0 !insertmacro InstallLib DLL NOTSHARED REBOOT_NOTPROTECTED \ "${GETTEXT}\gettext${BIT}\libintl-8.dll" \ @@ -573,12 +728,12 @@ Section "$(str_section_nls)" id_section_nls !insertmacro InstallLib DLL NOTSHARED REBOOT_NOTPROTECTED \ "${GETTEXT}\gettext${BIT}\libiconv-2.dll" \ "$0\libiconv-2.dll" "$0" - !if /FileExists "${GETTEXT}\gettext${BIT}\libgcc_s_sjlj-1.dll" - # Install libgcc_s_sjlj-1.dll only if it is needed. - !insertmacro InstallLib DLL NOTSHARED REBOOT_NOTPROTECTED \ - "${GETTEXT}\gettext${BIT}\libgcc_s_sjlj-1.dll" \ - "$0\libgcc_s_sjlj-1.dll" "$0" - !endif +# Install libgcc_s_sjlj-1.dll only if it is needed. +# !if /FileExists "${GETTEXT}\gettext${BIT}\libgcc_s_sjlj-1.dll" +# !insertmacro InstallLib DLL NOTSHARED REBOOT_NOTPROTECTED \ +# "${GETTEXT}\gettext${BIT}\libgcc_s_sjlj-1.dll" \ +# "$0\libgcc_s_sjlj-1.dll" "$0" +# !endif ${If} ${SectionIsSelected} ${id_section_editwith} ${If} ${RunningX64} @@ -604,12 +759,12 @@ Section "$(str_section_nls)" id_section_nls !insertmacro InstallLib DLL NOTSHARED REBOOT_NOTPROTECTED \ "${GETTEXT}\gettext32\libiconv-2.dll" \ "$0\GvimExt32\libiconv-2.dll" "$0\GvimExt32" - !if /FileExists "${GETTEXT}\gettext32\libgcc_s_sjlj-1.dll" - # Install libgcc_s_sjlj-1.dll only if it is needed. - !insertmacro InstallLib DLL NOTSHARED REBOOT_NOTPROTECTED \ - "${GETTEXT}\gettext32\libgcc_s_sjlj-1.dll" \ - "$0\GvimExt32\libgcc_s_sjlj-1.dll" "$0\GvimExt32" - !endif +# Install libgcc_s_sjlj-1.dll only if it is needed. +# !if /FileExists "${GETTEXT}\gettext32\libgcc_s_sjlj-1.dll" +# !insertmacro InstallLib DLL NOTSHARED REBOOT_NOTPROTECTED \ +# "${GETTEXT}\gettext32\libgcc_s_sjlj-1.dll" \ +# "$0\GvimExt32\libgcc_s_sjlj-1.dll" "$0\GvimExt32" +# !endif ${EndIf} SectionEnd !endif @@ -650,7 +805,7 @@ Section -post SectionGetSize ${id_section_editwith} $4 IntOp $3 $3 + $4 ${EndIf} -!ifdef HAVE_NLS +!if ${HAVE_NLS} ${If} ${SectionIsSelected} ${id_section_nls} SectionGetSize ${id_section_nls} $4 IntOp $3 $3 + $4 @@ -680,7 +835,7 @@ Section -post !insertmacro SaveSectionSelection ${id_section_vimrc} "select_vimrc" !insertmacro SaveSectionSelection ${id_section_pluginhome} "select_pluginhome" !insertmacro SaveSectionSelection ${id_section_pluginvim} "select_pluginvim" -!ifdef HAVE_NLS +!if ${HAVE_NLS} !insertmacro SaveSectionSelection ${id_section_nls} "select_nls" !endif ${If} ${RunningX64} @@ -713,7 +868,7 @@ SectionEnd !macroend Function .onInit -!ifdef HAVE_MULTI_LANG +!if ${HAVE_MULTI_LANG} # Select a language (or read from the registry). !insertmacro MUI_LANGDLL_DISPLAY !endif @@ -751,7 +906,7 @@ Function .onInit !insertmacro LoadSectionSelection ${id_section_vimrc} "select_vimrc" !insertmacro LoadSectionSelection ${id_section_pluginhome} "select_pluginhome" !insertmacro LoadSectionSelection ${id_section_pluginvim} "select_pluginvim" -!ifdef HAVE_NLS +!if ${HAVE_NLS} !insertmacro LoadSectionSelection ${id_section_nls} "select_nls" !endif # Load the default _vimrc settings from the registry (if any). @@ -809,12 +964,12 @@ Function SetCustom # 1st group - Compatibility - ${NSD_CreateGroupBox} 0 0 100% 32% $(str_msg_compat_title) + ${NSD_CreateGroupBox} 0u 0u 296u 44u $(str_msg_compat_title) Pop $3 - ${NSD_CreateLabel} 5% 10% 35% 8% $(str_msg_compat_desc) + ${NSD_CreateLabel} 16u 14u 269u 10u $(str_msg_compat_desc) Pop $3 - ${NSD_CreateDropList} 18% 19% 75% 8% "" + ${NSD_CreateDropList} 42u 26u 237u 13u "" Pop $vim_nsd_compat ${NSD_CB_AddString} $vim_nsd_compat $(str_msg_compat_vi) ${NSD_CB_AddString} $vim_nsd_compat $(str_msg_compat_vim) @@ -834,12 +989,12 @@ Function SetCustom # 2nd group - Key remapping - ${NSD_CreateGroupBox} 0 35% 100% 31% $(str_msg_keymap_title) + ${NSD_CreateGroupBox} 0u 48u 296u 44u $(str_msg_keymap_title) Pop $3 - ${NSD_CreateLabel} 5% 45% 90% 8% $(str_msg_keymap_desc) + ${NSD_CreateLabel} 16u 62u 269u 10u $(str_msg_keymap_desc) Pop $3 - ${NSD_CreateDropList} 38% 54% 55% 8% "" + ${NSD_CreateDropList} 42u 74u 236u 13u "" Pop $vim_nsd_keymap ${NSD_CB_AddString} $vim_nsd_keymap $(str_msg_keymap_default) ${NSD_CB_AddString} $vim_nsd_keymap $(str_msg_keymap_windows) @@ -853,12 +1008,12 @@ Function SetCustom # 3rd group - Mouse behavior - ${NSD_CreateGroupBox} 0 69% 100% 31% $(str_msg_mouse_title) + ${NSD_CreateGroupBox} 0u 95u 296u 44u $(str_msg_mouse_title) Pop $3 - ${NSD_CreateLabel} 5% 79% 90% 8% $(str_msg_mouse_desc) + ${NSD_CreateLabel} 16u 108u 269u 10u $(str_msg_mouse_desc) Pop $3 - ${NSD_CreateDropList} 23% 87% 70% 8% "" + ${NSD_CreateDropList} 42u 121u 237u 13u "" Pop $vim_nsd_mouse ${NSD_CB_AddString} $vim_nsd_mouse $(str_msg_mouse_default) ${NSD_CB_AddString} $vim_nsd_mouse $(str_msg_mouse_windows) @@ -925,7 +1080,7 @@ FunctionEnd !insertmacro MUI_DESCRIPTION_TEXT ${id_group_plugin} $(str_desc_plugin) !insertmacro MUI_DESCRIPTION_TEXT ${id_section_pluginhome} $(str_desc_plugin_home) !insertmacro MUI_DESCRIPTION_TEXT ${id_section_pluginvim} $(str_desc_plugin_vim) -!ifdef HAVE_NLS +!if ${HAVE_NLS} !insertmacro MUI_DESCRIPTION_TEXT ${id_section_nls} $(str_desc_nls) !endif !insertmacro MUI_FUNCTION_DESCRIPTION_END @@ -935,7 +1090,7 @@ FunctionEnd # Uninstaller Functions and Sections Function un.onInit -!ifdef HAVE_MULTI_LANG +!if ${HAVE_MULTI_LANG} # Get the language from the registry. !insertmacro MUI_UNGETLANGUAGE !endif @@ -945,7 +1100,7 @@ Section "un.$(str_unsection_register)" id_unsection_register SectionIn RO # Apparently $INSTDIR is set to the directory where the uninstaller is - # created. Thus the "vim61" directory is included in it. + # created. Thus the "vim91" directory is included in it. StrCpy $0 "$INSTDIR" # delete the context menu entry and batch files @@ -1042,6 +1197,7 @@ Section "un.$(str_unsection_exe)" id_unsection_exe RMDir /r $0\tutor RMDir /r $0\lang RMDir /r $0\keymap + RMDir /r $0\bitmaps Delete $0\*.exe Delete $0\*.bat Delete $0\*.vim @@ -1051,14 +1207,17 @@ Section "un.$(str_unsection_exe)" id_unsection_exe MessageBox MB_OK|MB_ICONEXCLAMATION $(str_msg_rm_exe_fail) /SD IDOK ${EndIf} - # No error message if the "vim62" directory can't be removed, the + # No error message if the "vim91" directory can't be removed, the # gvimext.dll may still be there. RMDir $0 SectionEnd # Remove "vimfiles" directory under the specified directory. !macro RemoveVimfiles dir - ${If} ${FileExists} ${dir}\vimfiles + ${If} ${FileExists} ${dir}\_viminfo + Delete ${dir}\_viminfo + ${EndIf} + ${If} ${DirExists} ${dir}\vimfiles RMDir ${dir}\vimfiles\colors RMDir ${dir}\vimfiles\compiler RMDir ${dir}\vimfiles\doc @@ -1068,6 +1227,9 @@ SectionEnd RMDir ${dir}\vimfiles\keymap RMDir ${dir}\vimfiles\plugin RMDir ${dir}\vimfiles\syntax + ${If} ${FileExists} ${dir}\vimfiles\.netrwhist* + Delete ${dir}\vimfiles\.netrwhist* + ${EndIf} RMDir ${dir}\vimfiles ${EndIf} !macroend diff --git a/nsis/lang/README.txt b/nsis/lang/README.txt new file mode 100644 index 0000000000..68ff1124ca --- /dev/null +++ b/nsis/lang/README.txt @@ -0,0 +1,34 @@ +This directory contains a file with text strings for gVim installer. +It also contains files with translations of the text strings for gVim installer +into different languages. + +For translators. + +If you want to prepare a translation for the gVim installer, use the file +"english.nsi" as a master file. See the other translation files in this +directory. +Note that in the definition of the MUI_LANGUAGE macro, the name of the language +to be translated must be the English name of the language. +The name of the file with the translation must match the name of the target +language. +Also, when translating strings, pay attention to some restrictions on the +allowable length of strings. For example: + component description field - 117 characters; + description above the drop-down lists on the .vimrc page - 53 characters; + drop-down lists on the .vimrc page - 55 characters. +Characters in this case mean characters of the English alphabet. + +If you do not yet have a translated "uganda.txt" file and a main "README.txt" +file, set the following values: + +for the license file +LicenseLangString page_lic_file 0 "${VIMRT}\doc\uganda.nsis.txt" + +for the readme.txt file +LangString vim_readme_file 0 "README.txt" + +Once you have the translations of these files, then set the values for these +variables similarly to what is done in the other translation files. +Also add the appropriate entries to the "gvim.nsi" file as done for other +languages. + diff --git a/nsis/lang/danish.nsi b/nsis/lang/danish.nsi index b365413c1d..ceb18be2f1 100644 --- a/nsis/lang/danish.nsi +++ b/nsis/lang/danish.nsi @@ -3,6 +3,7 @@ # danish.nsi: Danish language strings for gvim NSIS installer. # # Locale ID : 1030 +# Locale Name : da # fileencoding : UTF-8 # Author : scootergrisen @@ -14,6 +15,20 @@ LangString ^SetupCaption ${LANG_DANISH} "$(^Name) Setup" LangString ^UninstallCaption ${LANG_DANISH} "$(^Name) Uninstall" +############################################################################## +# Translated license file for the license page {{{1 +############################################################################## + +LicenseLangString page_lic_file 0 "${VIMRT}\doc\uganda.nsis.txt" +#LicenseLangString page_lic_file ${LANG_DANISH} "${VIMRT}\doc\uganda.nsis.dax" + +############################################################################## +# Translated README.txt file, which is opened after installation {{{1 +############################################################################## + +LangString vim_readme_file 0 "README.txt" +#LangString vim_readme_file ${LANG_DANISH} "README.dax.txt" + ############################################################################## # MUI Configuration Strings {{{1 ############################################################################## diff --git a/nsis/lang/dutch.nsi b/nsis/lang/dutch.nsi index 1d1322411e..49b1ed07c9 100644 --- a/nsis/lang/dutch.nsi +++ b/nsis/lang/dutch.nsi @@ -17,6 +17,20 @@ LangString ^SetupCaption ${LANG_DUTCH} \ LangString ^UninstallCaption ${LANG_DUTCH} \ "$(^Name) Uninstall" +############################################################################## +# Translated license file for the license page {{{1 +############################################################################## + +LicenseLangString page_lic_file 0 "${VIMRT}\doc\uganda.nsis.txt" +#LicenseLangString page_lic_file ${LANG_DUTCH} "${VIMRT}\doc\uganda.nsis.nlx" + +############################################################################## +# Translated README.txt file, which is opened after installation {{{1 +############################################################################## + +LangString vim_readme_file 0 "README.txt" +#LangString vim_readme_file ${LANG_DUTCH} "README.nlx.txt" + ############################################################################## # MUI Configuration Strings {{{1 ############################################################################## diff --git a/nsis/lang/english.nsi b/nsis/lang/english.nsi index e1be985e15..6f69f58df1 100644 --- a/nsis/lang/english.nsi +++ b/nsis/lang/english.nsi @@ -3,6 +3,7 @@ # english.nsi: English language strings for gvim NSIS installer. # # Locale ID : 1033 +# Locale Name : en # fileencoding : UTF-8 # Author : Guopeng Wen, Ken Takata @@ -16,6 +17,18 @@ LangString ^SetupCaption ${LANG_ENGLISH} \ LangString ^UninstallCaption ${LANG_ENGLISH} \ "$(^Name) Uninstall" +############################################################################## +# License file for the license page {{{1 +############################################################################## + +LicenseLangString page_lic_file ${LANG_ENGLISH} "${VIMRT}\doc\uganda.nsis.txt" + +############################################################################## +# README.txt file, which is opened after installation {{{1 +############################################################################## + +LangString vim_readme_file ${LANG_ENGLISH} "README.txt" + ############################################################################## # MUI Configuration Strings {{{1 ############################################################################## diff --git a/nsis/lang/german.nsi b/nsis/lang/german.nsi index b976ef4a2f..21cf80e52e 100644 --- a/nsis/lang/german.nsi +++ b/nsis/lang/german.nsi @@ -3,6 +3,7 @@ # german.nsi : German language strings for gvim NSIS installer. # # Locale ID : 1031 +# Locale Name : de # fileencoding : UTF-8 # Author : Christian Brabandt, tux @@ -16,6 +17,20 @@ LangString ^SetupCaption ${LANG_GERMAN} \ LangString ^UninstallCaption ${LANG_GERMAN} \ "$(^Name) Uninstall" +############################################################################## +# Translated license file for the license page {{{1 +############################################################################## + +LicenseLangString page_lic_file 0 "${VIMRT}\doc\uganda.nsis.txt" +#LicenseLangString page_lic_file ${LANG_GERMAN} "${VIMRT}\doc\uganda.nsis.dex" + +############################################################################## +# Translated README.txt file, which is opened after installation {{{1 +############################################################################## + +LangString vim_readme_file 0 "README.txt" +#LangString vim_readme_file ${LANG_GERMAN} "README.dex.txt" + ############################################################################## # MUI Configuration Strings {{{1 ############################################################################## diff --git a/nsis/lang/greek.nsi b/nsis/lang/greek.nsi new file mode 100644 index 0000000000..b92d3f326b --- /dev/null +++ b/nsis/lang/greek.nsi @@ -0,0 +1,291 @@ +# vi:set ts=8 sts=4 sw=4 et fdm=marker: +# +# greek.nsi: Greek language strings for gvim NSIS installer. +# +# Locale ID : 1032 +# Locale Name : el +# fileencoding : UTF-8 +# Author : Christos Longros + +!insertmacro MUI_LANGUAGE "Greek" + + +# Overwrite the default translation. +# These strings should be always English. Otherwise dosinst.c fails. +LangString ^SetupCaption ${LANG_GREEK} \ + "$(^Name) Setup" +LangString ^UninstallCaption ${LANG_GREEK} \ + "$(^Name) Uninstall" + +############################################################################## +# Translated license file for the license page {{{1 +############################################################################## + +LicenseLangString page_lic_file 0 "${VIMRT}\doc\uganda.nsis.txt" +#LicenseLangString page_lic_file ${LANG_GREEK} "${VIMRT}\doc\uganda.nsis.elx" + +############################################################################## +# Translated README.txt file, which is opened after installation {{{1 +############################################################################## + +LangString vim_readme_file 0 "README.txt" +#LangString vim_readme_file ${LANG_GREEK} "README.elx.txt" + +############################################################################## +# MUI Configuration Strings {{{1 +############################################################################## + +#LangString str_dest_folder ${LANG_GREEK} \ +# "Φάκελος προορισμός (Πρέπει να τελειώνει σε $\"vim$\")" + +LangString str_show_readme ${LANG_GREEK} \ + "Εμφάνιση README μετά την ολοκλήρωση της εγκατάστασης" + +# Install types: +LangString str_type_typical ${LANG_GREEK} \ + "Typical" + +LangString str_type_minimal ${LANG_GREEK} \ + "Minimal" + +LangString str_type_full ${LANG_GREEK} \ + "Full" + + +############################################################################## +# Section Titles & Description {{{1 +############################################################################## + +LangString str_section_old_ver ${LANG_GREEK} \ + "Απεγκατάσταση υπάρχουσων εκδόσεων" +LangString str_desc_old_ver ${LANG_GREEK} \ + "Απεγκατάσταση υπάρχουσων εκδόσεων Vim από το σύστημά σας." + +LangString str_section_exe ${LANG_GREEK} \ + "Vim GUI and runtime files" +LangString str_desc_exe ${LANG_GREEK} \ + "Vim GUI executables and runtime files. This component is required." + +LangString str_section_console ${LANG_GREEK} \ + "Vim console program" +LangString str_desc_console ${LANG_GREEK} \ + "Console version of Vim (vim.exe)." + +LangString str_section_batch ${LANG_GREEK} \ + "Δημιουργία αρχείων .bat" +LangString str_desc_batch ${LANG_GREEK} \ + "Δημιουργία αρχείων .bat από παράγωγα Vim στον κατάλογο των Windows για \ + χρήση γραμμής εντολών." + +LangString str_group_icons ${LANG_GREEK} \ + "Δημιουργία εικονιδίων Vim" +LangString str_desc_icons ${LANG_GREEK} \ + "Δημιουργία εικονιδίων για τον Vim σε διάφορες τοποθεσίες για την διευκόλυνση της προσβασιμότητας." + +LangString str_section_desktop ${LANG_GREEK} \ + "Στην επιφάνεια εργασίας" +LangString str_desc_desktop ${LANG_GREEK} \ + "Δημιουργία εικονιδίων για gVim εκτελέσιμα στην επιφάνεια εργασίας." + +LangString str_section_start_menu ${LANG_GREEK} \ + "In the Start Menu Programs Folder" +LangString str_desc_start_menu ${LANG_GREEK} \ + "Προσθήκη του Vim στον φάκελο προγραμμάτων του μενού εκκίνησης." + +#LangString str_section_quick_launch ${LANG_GREEK} \ +# "In the Quick Launch Bar" +#LangString str_desc_quick_launch ${LANG_GREEK} \ +# "Add Vim shortcut in the quick launch bar." + +LangString str_section_edit_with ${LANG_GREEK} \ + "Add Vim Context Menu" +LangString str_desc_edit_with ${LANG_GREEK} \ + "Add Vim to the $\"Open With...$\" context menu list." + +#LangString str_section_edit_with32 ${LANG_GREEK} \ +# "32-bit Version" +#LangString str_desc_edit_with32 ${LANG_GREEK} \ +# "Add Vim to the $\"Open With...$\" context menu list \ +# for 32-bit applications." + +#LangString str_section_edit_with64 ${LANG_GREEK} \ +# "64-bit Version" +#LangString str_desc_edit_with64 ${LANG_GREEK} \ +# "Add Vim to the $\"Open With...$\" context menu list \ +# for 64-bit applications." + +LangString str_section_vim_rc ${LANG_GREEK} \ + "Δημιουργία προεπιλεγμένων ρυθμίσεων" +LangString str_desc_vim_rc ${LANG_GREEK} \ + "Δημιουργία προεπιλεγμένου αρχείου ρυθμίσεων (_vimrc) αν δεν υπάρχει ήδη." + +LangString str_group_plugin ${LANG_GREEK} \ + "Δημιουργία καταλόγων Plugin" +LangString str_desc_plugin ${LANG_GREEK} \ + "Δημιουργία καταλόγων plugin. Οι κατάλογοι Plugin επιτρέπουν την επέκταση του Vim \ + με την μεταφορά ενός αρχείου σε έναν κατάλογο." + +LangString str_section_plugin_home ${LANG_GREEK} \ + "Private" +LangString str_desc_plugin_home ${LANG_GREEK} \ + "Δημιουργία καταλόγων plugin στον κατάλογο HOME." + +LangString str_section_plugin_vim ${LANG_GREEK} \ + "Shared" +LangString str_desc_plugin_vim ${LANG_GREEK} \ + "Δημιουργία καταλόγων plugin στον κατάλογο εγκατάστασης του Vim, χρησιμοποιείται από \ + όλους στο σύστημα." + +LangString str_section_nls ${LANG_GREEK} \ + "Native Language Support" +LangString str_desc_nls ${LANG_GREEK} \ + "Install files for native language support." + +LangString str_unsection_register ${LANG_GREEK} \ + "Unregister Vim" +LangString str_desc_unregister ${LANG_GREEK} \ + "Unregister Vim from the system." + +LangString str_unsection_exe ${LANG_GREEK} \ + "Remove Vim Executables/Runtime Files" +LangString str_desc_rm_exe ${LANG_GREEK} \ + "Remove all Vim executables and runtime files." + +LangString str_ungroup_plugin ${LANG_GREEK} \ + "Remove plugin directories" +LangString str_desc_rm_plugin ${LANG_GREEK} \ + "Remove the plugin directories if they are empty." + +LangString str_unsection_plugin_home ${LANG_GREEK} \ + "Private" +LangString str_desc_rm_plugin_home ${LANG_GREEK} \ + "Remove the plugin directories from HOME directory." + +LangString str_unsection_plugin_vim ${LANG_GREEK} \ + "Shared" +LangString str_desc_rm_plugin_vim ${LANG_GREEK} \ + "Remove the plugin directories from Vim install directory." + +LangString str_unsection_rootdir ${LANG_GREEK} \ + "Remove the Vim root directory" +LangString str_desc_rm_rootdir ${LANG_GREEK} \ + "Remove the Vim root directory. It contains your Vim configuration files!" + + +############################################################################## +# Messages {{{1 +############################################################################## + +#LangString str_msg_too_many_ver ${LANG_GREEK} \ +# "Found $vim_old_ver_count Vim versions on your system.$\r$\n\ +# This installer can only handle ${VIM_MAX_OLD_VER} versions \ +# at most.$\r$\n\ +# Please remove some versions and start again." + +#LangString str_msg_invalid_root ${LANG_GREEK} \ +# "Invalid install path: $vim_install_root!$\r$\n\ +# It should end with $\"vim$\"." + +#LangString str_msg_bin_mismatch ${LANG_GREEK} \ +# "Binary path mismatch!$\r$\n$\r$\n\ +# Expect the binary path to be $\"$vim_bin_path$\",$\r$\n\ +# but system indicates the binary path is $\"$INSTDIR$\"." + +#LangString str_msg_vim_running ${LANG_GREEK} \ +# "Vim is still running on your system.$\r$\n\ +# Please close all instances of Vim before you continue." + +#LangString str_msg_register_ole ${LANG_GREEK} \ +# "Attempting to register Vim with OLE. \ +# There is no message indicates whether this works or not." + +#LangString str_msg_unreg_ole ${LANG_GREEK} \ +# "Attempting to unregister Vim with OLE. \ +# There is no message indicates whether this works or not." + +#LangString str_msg_rm_start ${LANG_GREEK} \ +# "Uninstalling the following version:" + +#LangString str_msg_rm_fail ${LANG_GREEK} \ +# "Fail to uninstall the following version:" + +#LangString str_msg_no_rm_key ${LANG_GREEK} \ +# "Cannot find uninstaller registry key." + +#LangString str_msg_no_rm_reg ${LANG_GREEK} \ +# "Cannot find uninstaller from registry." + +#LangString str_msg_no_rm_exe ${LANG_GREEK} \ +# "Cannot access uninstaller." + +#LangString str_msg_rm_copy_fail ${LANG_GREEK} \ +# "Fail to copy uninstaller to temporary directory." + +#LangString str_msg_rm_run_fail ${LANG_GREEK} \ +# "Αποτυχία εκτέλεσης της λειτουργίας απεγκατάστασης." + +#LangString str_msg_abort_install ${LANG_GREEK} \ +# "Installer will abort." + +LangString str_msg_install_fail ${LANG_GREEK} \ + "Η εγκατάσταση απέτυχε. Better luck next time." + +LangString str_msg_rm_exe_fail ${LANG_GREEK} \ + "Μερικά αρχεία στο $0 δεν έχουν διαγραφεί!$\r$\n\ + Πρέπει να το κάνετε χειροκίνητα." + +#LangString str_msg_rm_root_fail ${LANG_GREEK} \ +# "ΠΡΟΕΙΔΟΠΟΙΗΣΗ: Αδύνατη η αφαίρεση $\"$vim_install_root$\", δεν είναι κενό!" + +LangString str_msg_uninstalling ${LANG_GREEK} \ + "Απεγκατάσταση παλιάς έκδοσης the old version..." + +LangString str_msg_registering ${LANG_GREEK} \ + "Καταχώρηση..." + +LangString str_msg_unregistering ${LANG_GREEK} \ + "Unregistering..." + + +############################################################################## +# Dialog Box {{{1 +############################################################################## + +LangString str_vimrc_page_title ${LANG_GREEK} \ + "Επιλογή ρυθμίσεων _vimrc" +LangString str_vimrc_page_subtitle ${LANG_GREEK} \ + "Choose the settings for enhancement, keyboard and mouse." + +LangString str_msg_compat_title ${LANG_GREEK} \ + " Συμπεριφορά Vi / Vim " +LangString str_msg_compat_desc ${LANG_GREEK} \ + "&Compatibility and enhancements" +LangString str_msg_compat_vi ${LANG_GREEK} \ + "Vi compatible" +LangString str_msg_compat_vim ${LANG_GREEK} \ + "Vim original" +LangString str_msg_compat_defaults ${LANG_GREEK} \ + "Vim with some enhancements (load defaults.vim)" +LangString str_msg_compat_all ${LANG_GREEK} \ + "Vim with all enhancements (load vimrc_example.vim) (Default)" + +LangString str_msg_keymap_title ${LANG_GREEK} \ + " Mappings " +LangString str_msg_keymap_desc ${LANG_GREEK} \ + "&Remap a few keys for Windows (Ctrl-V, Ctrl-C, Ctrl-A, Ctrl-S, Ctrl-F, etc)" +LangString str_msg_keymap_default ${LANG_GREEK} \ + "Do not remap keys (Default)" +LangString str_msg_keymap_windows ${LANG_GREEK} \ + "Remap a few keys" + +LangString str_msg_mouse_title ${LANG_GREEK} \ + " Ποντίκι " +LangString str_msg_mouse_desc ${LANG_GREEK} \ + "&Behavior of right and left buttons" +LangString str_msg_mouse_default ${LANG_GREEK} \ + "Right: popup menu, Left: visual mode (Default)" +LangString str_msg_mouse_windows ${LANG_GREEK} \ + "Right: popup menu, Left: select mode (Windows)" +LangString str_msg_mouse_unix ${LANG_GREEK} \ + "Right: extends selection, Left: visual mode (Unix)" + diff --git a/nsis/lang/italian.nsi b/nsis/lang/italian.nsi index 029737f035..5f326809a7 100644 --- a/nsis/lang/italian.nsi +++ b/nsis/lang/italian.nsi @@ -3,6 +3,7 @@ # italian.nsi : Italian language strings for gvim NSIS installer. # # Locale ID : 1040 +# Locale Name : it # fileencoding : UTF-8 # Author : Antonio Colombo, bovirus - revision: 12.05.2023 @@ -16,6 +17,20 @@ LangString ^SetupCaption ${LANG_ITALIAN} \ LangString ^UninstallCaption ${LANG_ITALIAN} \ "$(^Name) Uninstall" +############################################################################## +# Translated license file for the license page {{{1 +############################################################################## + +LicenseLangString page_lic_file 0 "${VIMRT}\doc\uganda.nsis.txt" +#LicenseLangString page_lic_file ${LANG_ITALIAN} "${VIMRT}\doc\uganda.nsis.itx" + +############################################################################## +# Translated README.txt file, which is opened after installation {{{1 +############################################################################## + +LangString vim_readme_file 0 "README.txt" +#LangString vim_readme_file ${LANG_ITALIAN} "README.itx.txt" + ############################################################################## # MUI Configuration Strings {{{1 ############################################################################## diff --git a/nsis/lang/japanese.nsi b/nsis/lang/japanese.nsi index 58f4dccc1b..d290355d10 100644 --- a/nsis/lang/japanese.nsi +++ b/nsis/lang/japanese.nsi @@ -3,6 +3,7 @@ # japanese.nsi: Japanese language strings for gvim NSIS installer. # # Locale ID : 1041 +# Locale Name : ja # fileencoding : UTF-8 # Author : Ken Takata @@ -26,6 +27,20 @@ LangString ^SpaceRequired ${LANG_JAPANESE} \ LangString ^InstallBtn ${LANG_JAPANESE} \ "インストール(&I)" +############################################################################## +# Translated license file for the license page {{{1 +############################################################################## + +LicenseLangString page_lic_file 0 "${VIMRT}\doc\uganda.nsis.txt" +#LicenseLangString page_lic_file ${LANG_JAPANESE} "${VIMRT}\doc\uganda.nsis.jax" + +############################################################################## +# Translated README.txt file, which is opened after installation {{{1 +############################################################################## + +LangString vim_readme_file 0 "README.txt" +#LangString vim_readme_file ${LANG_JAPANESE} "README.jax.txt" + ############################################################################## # MUI Configuration Strings {{{1 ############################################################################## diff --git a/nsis/lang/russian.nsi b/nsis/lang/russian.nsi index e4512081a9..876bef2b89 100644 --- a/nsis/lang/russian.nsi +++ b/nsis/lang/russian.nsi @@ -3,7 +3,7 @@ # russian.nsi: Russian language strings for gvim NSIS installer. # # Locale ID : 1049 -# Locale name : ru-RU +# Locale name : ru # fileencoding : UTF-8 # Author : Restorer @@ -17,25 +17,37 @@ LangString ^SetupCaption ${LANG_RUSSIAN} \ LangString ^UninstallCaption ${LANG_RUSSIAN} \ "$(^Name) Uninstall" +############################################################################## +# Translated license file for the license page {{{1 +############################################################################## + +LicenseLangString page_lic_file ${LANG_RUSSIAN} "${VIMRT}\doc\uganda.nsis.rux" + +############################################################################## +# Translated README.txt file, which is opened after installation {{{1 +############################################################################## + +LangString vim_readme_file ${LANG_RUSSIAN} "README.rux.txt" + ############################################################################## # MUI Configuration Strings {{{1 ############################################################################## #LangString str_dest_folder ${LANG_RUSSIAN} \ -# "Маршрут к каталогу установки (должен оканчиваться каталогом $\"vim$\")" +# "Маршрут установки программы (должен завершаться каталогом $\"vim$\")" LangString str_show_readme ${LANG_RUSSIAN} \ - "После окончания установки ознакомиться с кратким описанием" + " Ознакомиться с кратким описанием программы" # Install types: LangString str_type_typical ${LANG_RUSSIAN} \ - "Стандартная" + "Стандартный" LangString str_type_minimal ${LANG_RUSSIAN} \ - "Минимальная" + "Минимальный" LangString str_type_full ${LANG_RUSSIAN} \ - "Полная" + "Полный" ############################################################################## @@ -50,59 +62,61 @@ LangString str_desc_old_ver ${LANG_RUSSIAN} \ LangString str_section_exe ${LANG_RUSSIAN} \ "Графический интерфейс и вспомогательные файлы" LangString str_desc_exe ${LANG_RUSSIAN} \ - "Графический интерфейс программы Vim и все необходимые для этого файлы. \ + "Исполняемые файлы и все необходимые для работы программы файлы. \ Это обязательный компонент" LangString str_section_console ${LANG_RUSSIAN} \ "Консольная программа Vim" LangString str_desc_console ${LANG_RUSSIAN} \ - "Вариант редактора Vim (vim.exe), используемый в командной оболочке" + "Вариант редактора Vim (vim.exe), используемый для работы в командной \ + оболочке" LangString str_section_batch ${LANG_RUSSIAN} \ "Создать командные файлы" LangString str_desc_batch ${LANG_RUSSIAN} \ - "Создание командных bat-файлов позволяющих работать с редактором \ - Vim из командной строки Windows" + "Создание командных bat-файлов в каталоге Windows для работы с редактором \ + Vim из командной строки" LangString str_group_icons ${LANG_RUSSIAN} \ "Создать ярлыки для редактора Vim" LangString str_desc_icons ${LANG_RUSSIAN} \ - "Создание ярлыков редактора Vim для облегчения запуска программы" + "Создание ярлыков программы для удобного и быстрого запуска редактора Vim" LangString str_section_desktop ${LANG_RUSSIAN} \ "На Рабочем столе" LangString str_desc_desktop ${LANG_RUSSIAN} \ - "Создание ярлыков программы Gvim на Рабочем столе" + "Создание ярлыков редактора Vim на Рабочем столе" LangString str_section_start_menu ${LANG_RUSSIAN} \ "В меню кнопки Пуск" LangString str_desc_start_menu ${LANG_RUSSIAN} \ - "Создание ярлыков программы Gvim в меню кнопки Пуск" + "Создание ярлыков редактора Vim в меню кнопки Пуск" #LangString str_section_quick_launch ${LANG_RUSSIAN} \ # "На панели быстрого запуска" #LangString str_desc_quick_launch ${LANG_RUSSIAN} \ -# "Создание ярлыков программы GVim на панели быстрого запуска" +# "Создание ярлыков редактора Vim на панели быстрого запуска" LangString str_section_edit_with ${LANG_RUSSIAN} \ - "В контекстном меню" + "Запуск редактора Vim из контекстного меню" LangString str_desc_edit_with ${LANG_RUSSIAN} \ - "Добавление вызова программы Gvim в пункт $\"Открыть с помощью...$\" контекстного меню" + "Добавление необходимой строки в пункт контекстного меню \ + «Открыть с помощью...»" #LangString str_section_edit_with32 ${LANG_RUSSIAN} \ -# "32-разрядная версия программы" +# "Для 32-разрядной версии программы" #LangString str_desc_edit_with32 ${LANG_RUSSIAN} \ -# "Добавление вызова программы Gvim в пункт $\"Открыть с помощью...$\" контекстного меню \ -# для 32-разрядных приложений" +# "Добавление в пункт контекстного меню \ +# «Открыть с помощью...» 32-разрядных приложений" #LangString str_section_edit_with64 ${LANG_RUSSIAN} \ -# "64-разрядная версия программы" +# "Для 64-разрядной версии программы" #LangString str_desc_edit_with64 ${LANG_RUSSIAN} \ -# "Добавление вызова программы Gvim в пункт $\"Открыть с помощью...$\" контекстного меню \ -# для 64-разрядных приложений" +# "Добавление в пункт контекстного меню \ +# «Открыть с помощью...» 64-разрядных приложений" LangString str_section_vim_rc ${LANG_RUSSIAN} \ - "Настройки программы по умолчанию" + "Начальная настройка программы" LangString str_desc_vim_rc ${LANG_RUSSIAN} \ "Создание файла _vimrc с предустановленными настройками, если нет других \ файлов настроек" @@ -110,25 +124,31 @@ LangString str_desc_vim_rc ${LANG_RUSSIAN} \ LangString str_group_plugin ${LANG_RUSSIAN} \ "Создать каталог для подключаемых модулей" LangString str_desc_plugin ${LANG_RUSSIAN} \ - "Создание каталога для размещения подключаемых модулей, которые расширяют \ - возможности редактора Vim" + "Создание каталога для подключаемых модулей, которые расширяют возможности \ + редактора Vim" LangString str_section_plugin_home ${LANG_RUSSIAN} \ "Личный каталог" LangString str_desc_plugin_home ${LANG_RUSSIAN} \ - "Создание каталога для подключаемых модулей в домашнем каталоге пользователя" + "В домашнем каталоге пользователя. Модули в этом каталоге доступны только \ + этому пользователю" LangString str_section_plugin_vim ${LANG_RUSSIAN} \ "Общий каталог" LangString str_desc_plugin_vim ${LANG_RUSSIAN} \ - "Создание каталога для подключаемых модулей в каталоге установки редактора Vim. \ - Модули в этом каталоге будут доступны для любого пользователя \ - зарегистрировавшегося в системе" + "В каталоге установки редактора Vim. Модули в этом каталоге доступны для \ + всех пользователей" + +#LangString str_section_vis_vim ${LANG_RUSSIAN} \ +# "Подключаемый модуль VisVim" +#LangString str_desc_vis_vim ${LANG_RUSSIAN} \ +# "Подключаемый модуль VisVim используется для интеграции с \ +# Microsoft Visual Studio" LangString str_section_nls ${LANG_RUSSIAN} \ "Поддержка региональных языков" LangString str_desc_nls ${LANG_RUSSIAN} \ - "Установка файлов для поддержки региональных языков операционной системы" + "Установка файлов для работы программе на различных региональных языках" LangString str_unsection_register ${LANG_RUSSIAN} \ "Отменить регистрацию компонентов программы Vim" @@ -158,8 +178,8 @@ LangString str_desc_rm_plugin_vim ${LANG_RUSSIAN} \ LangString str_unsection_rootdir ${LANG_RUSSIAN} \ "Удалить основной каталог программы Vim" LangString str_desc_rm_rootdir ${LANG_RUSSIAN} \ - "Удаление основного каталога программы Vim. В этом каталоге находятся файлы \ - настроек!" + "Удаление основного каталога программы Vim. В этом каталоге находятся \ + файлы настроек!" ############################################################################## @@ -199,10 +219,11 @@ LangString str_desc_rm_rootdir ${LANG_RUSSIAN} \ # "Произошёл сбой при выполнении удаления следующих версий программы:" #LangString str_msg_no_rm_key ${LANG_RUSSIAN} \ -# "Не удалось найти раздел реестра, содержащий информацию об удалении программы" +# "Не удалось найти раздел реестра, содержащий информацию об удалении \ +# программы" #LangString str_msg_no_rm_reg ${LANG_RUSSIAN} \ -# "Не удалось найти программу выполняющую удаление, указанную в разделе реестра" +# "Не удалось найти указанную в реестре программу, которая выполняет удаление" #LangString str_msg_no_rm_exe ${LANG_RUSSIAN} \ # "Отсутствуют права на доступ к программе, выполняющей удаление" @@ -219,14 +240,15 @@ LangString str_desc_rm_rootdir ${LANG_RUSSIAN} \ LangString str_msg_install_fail ${LANG_RUSSIAN} \ "Произошла ошибка при установке программы. Попробуйте повторить установку \ немного попозже" -# когда луна будет в другой фазе и ветер должен дуть с юго‐запада +# когда Луна будет в другой фазе и ветер должен дуть с юго‐запада LangString str_msg_rm_exe_fail ${LANG_RUSSIAN} \ "Некоторые файлы не были удалены из каталога $0 $\r$\n\ Необходимо выполнить их удаление самостоятельно" #LangString str_msg_rm_root_fail ${LANG_RUSSIAN} \ -# "Внимание! В каталоге $\"$vim_install_root$\" содержатся файлы. Удаление каталога не выполнено" +# "Внимание! В каталоге $\"$vim_install_root$\" содержатся файлы. Удаление \ +# каталога не выполнено" LangString str_msg_uninstalling ${LANG_RUSSIAN} \ "Удаление предыдущих версий программ..." @@ -245,7 +267,8 @@ LangString str_msg_unregistering ${LANG_RUSSIAN} \ LangString str_vimrc_page_title ${LANG_RUSSIAN} \ "Установка параметров программы" LangString str_vimrc_page_subtitle ${LANG_RUSSIAN} \ - "Параметры, используемые для клавиатуры, «мыши» и функциональности программы" + "Параметры, используемые для клавиатуры, манипулятора «мышь» и \ + функциональности программы" LangString str_msg_compat_title ${LANG_RUSSIAN} \ " Варианты использования программы " @@ -256,27 +279,26 @@ LangString str_msg_compat_vi ${LANG_RUSSIAN} \ LangString str_msg_compat_vim ${LANG_RUSSIAN} \ "Работа в варианте функциональности редактора Vim" LangString str_msg_compat_defaults ${LANG_RUSSIAN} \ - "Работа редактора Vim с некоторыми улучшениями (файл defaults.vim)" + "Включить некоторые улучшения (из файла defaults.vim)" LangString str_msg_compat_all ${LANG_RUSSIAN} \ - "Работа редактора Vim со всеми улучшениями (файл vimrc_example.vim). \ - Используется по умолчанию" + "Включить все улучшения (из файла vimrc_example.vim). Стандартно" LangString str_msg_keymap_title ${LANG_RUSSIAN} \ " Клавиатурные команды " LangString str_msg_keymap_desc ${LANG_RUSSIAN} \ - "Клавиатурные команды используемые в ОС Windows (CTRL+V, CTRL+C, CTRL+S, CTRL+F и т. п.)" + "Изменение клавиатурных команд CTRL+V, CTRL+C, CTRL+S, CTRL+F и т. п." LangString str_msg_keymap_default ${LANG_RUSSIAN} \ - "Не изменять клавиатурные команды. Использовать принятые в редакторе Vim" + "Без изменения, использовать как принято в редакторе Vim" LangString str_msg_keymap_windows ${LANG_RUSSIAN} \ - "Изменить указанные клавиатурные команды" + "Изменить и использовать как принято в ОС Windows" LangString str_msg_mouse_title ${LANG_RUSSIAN} \ " Манипулятор «мышь» " LangString str_msg_mouse_desc ${LANG_RUSSIAN} \ - "Действий правой и левой кнопки манипулятора «мышь»" + "Действия правой и левой кнопки манипулятора «мышь»" LangString str_msg_mouse_default ${LANG_RUSSIAN} \ - "Правая кнопка — всплывающее меню, левая кнопка — режим визуальный" + "Правая — всплывающее меню, левая — режим визуальный (Vim)" LangString str_msg_mouse_windows ${LANG_RUSSIAN} \ - "Правая кнопка — всплывающее меню, левая кнопка — режим выборки (как в ОС Windows)" + "Правая — всплывающее меню, левая — режим выборки (Windows)" LangString str_msg_mouse_unix ${LANG_RUSSIAN} \ - "Правая кнопка — расширяемый режим выбора, левая кнопка — режим визуальный (как в UNIX‐подобных ОС)" + "Правая — расширение выборки, левая — режим визуальный (UNIX)" diff --git a/nsis/lang/serbian.nsi b/nsis/lang/serbian.nsi index 9912ec5df8..122727d11a 100644 --- a/nsis/lang/serbian.nsi +++ b/nsis/lang/serbian.nsi @@ -3,10 +3,11 @@ # serbian.nsi: Serbian language strings for gvim NSIS installer. # # Locale ID : 3098 +# Locale Name : sr # fileencoding : UTF-8 # Author : Ivan Pešić -!insertmacro MUI_LANGUAGE "Српски" +!insertmacro MUI_LANGUAGE "Serbian" # Overwrite the default translation. @@ -16,6 +17,20 @@ LangString ^SetupCaption ${LANG_SERBIAN} \ LangString ^UninstallCaption ${LANG_SERBIAN} \ "$(^Name) Uninstall" +############################################################################## +# Translated license file for the license page {{{1 +############################################################################## + +LicenseLangString page_lic_file 0 "${VIMRT}\doc\uganda.nsis.txt" +#LicenseLangString page_lic_file ${LANG_SERBIAN} "${VIMRT}\doc\uganda.nsis.srx" + +############################################################################## +# Translated README.txt file, which is opened after installation {{{1 +############################################################################## + +LangString vim_readme_file 0 "README.txt" +#LangString vim_readme_file ${LANG_SERBIAN} "README.srx.txt" + ############################################################################## # MUI Configuration Strings {{{1 ############################################################################## diff --git a/nsis/lang/simpchinese.nsi b/nsis/lang/simpchinese.nsi index 2c80054d19..8d2d073f79 100644 --- a/nsis/lang/simpchinese.nsi +++ b/nsis/lang/simpchinese.nsi @@ -4,6 +4,7 @@ # installer. # # Locale ID : 2052 +# Locale Name : cn # fileencoding : UTF-8 # Author : Guopeng Wen, David Liu @@ -17,6 +18,21 @@ LangString ^SetupCaption ${LANG_SIMPCHINESE} \ LangString ^UninstallCaption ${LANG_SIMPCHINESE} \ "$(^Name) Uninstall" +############################################################################## +# Translated license file for the license page {{{1 +############################################################################## + +LicenseLangString page_lic_file 0 "${VIMRT}\doc\uganda.nsis.txt" +#LicenseLangString page_lic_file ${LANG_SIMPCHINESE} \ +# "${VIMRT}\doc\uganda.nsis.cnx" + +############################################################################## +# Translated README.txt file, which is opened after installation {{{1 +############################################################################## + +LangString vim_readme_file 0 "README.txt" +#LangString vim_readme_file ${LANG_SIMPCHINESE} "README.cnx.txt" + ############################################################################## # MUI Configuration Strings {{{1 ############################################################################## diff --git a/nsis/lang/tradchinese.nsi b/nsis/lang/tradchinese.nsi index 16b6747c20..66bb1b8800 100644 --- a/nsis/lang/tradchinese.nsi +++ b/nsis/lang/tradchinese.nsi @@ -4,6 +4,7 @@ # installer. # # Locale ID : 1028 +# Locale Name : tw # fileencoding : UTF-8 # Author : Guopeng Wen @@ -17,6 +18,21 @@ LangString ^SetupCaption ${LANG_TRADCHINESE} \ LangString ^UninstallCaption ${LANG_TRADCHINESE} \ "$(^Name) Uninstall" +############################################################################## +# Translated license file for the license page {{{1 +############################################################################## + +LicenseLangString page_lic_file 0 "${VIMRT}\doc\uganda.nsis.txt" +#LicenseLangString page_lic_file ${LANG_TRADCHINESE} \ +# "${VIMRT}\doc\uganda.nsis.twx" + +############################################################################## +# Translated README.txt file, which is opened after installation {{{1 +############################################################################## + +LangString vim_readme_file 0 "README.txt" +#LangString vim_readme_file ${LANG_TRADCHINESE} "README.twx.txt" + ############################################################################## # MUI Configuration Strings {{{1 ############################################################################## diff --git a/nsis/lang/turkish.nsi b/nsis/lang/turkish.nsi index 1046b8195d..429cbb3d90 100644 --- a/nsis/lang/turkish.nsi +++ b/nsis/lang/turkish.nsi @@ -1,4 +1,9 @@ +# vi:set ts=8 sts=4 sw=4 et fdm=marker: +# # turkish.nsi: Turkish language strings for gvim NSIS installer. +# +# Locale ID : 1055 +# Locale Name : tr # fileencoding : UTF-8 # Author : Emir SARI @@ -11,6 +16,22 @@ LangString ^SetupCaption ${LANG_TURKISH} \ LangString ^UninstallCaption ${LANG_TURKISH} \ "$(^Name) Uninstall" +############################################################################## +# Translated license file for the license page {{{1 +############################################################################## + +LicenseLangString page_lic_file 0 "${VIMRT}\doc\uganda.nsis.txt" +#LicenseLangString page_lic_file ${LANG_TURKISH} "${VIMRT}\doc\uganda.nsis.trx" + +############################################################################## +# Translated README.txt file, which is opened after installation {{{1 +############################################################################## + +LangString vim_readme_file 0 "README.txt" +#LangString vim_readme_file ${LANG_TURKISH} "README.trx.txt" + +############################################################################## + LangString str_show_readme ${LANG_TURKISH} \ "Kurulum bittikten sonra README dosyasını aç" diff --git a/runtime/autoload/dist/ft.vim b/runtime/autoload/dist/ft.vim index 9d0f2ee7af..05f1611b22 100644 --- a/runtime/autoload/dist/ft.vim +++ b/runtime/autoload/dist/ft.vim @@ -3,14 +3,16 @@ vim9script # Vim functions for file type detection # # Maintainer: The Vim Project -# Last Change: 2024 Jan 05 +# Last Change: 2024 Feb 18 # Former Maintainer: Bram Moolenaar # These functions are moved here from runtime/filetype.vim to make startup # faster. export def Check_inp() - if getline(1) =~ '^\*' + if getline(1) =~ '%%' + setf tex + elseif getline(1) =~ '^\*' setf abaqus else var n = 1 @@ -280,6 +282,10 @@ export def DtraceCheck() enddef export def FTdef() + # LaTeX def files are usually generated by docstrip, which will output '%%' in first line + if getline(1) =~ '%%' + setf tex + endif if get(g:, "filetype_def", "") == "modula2" || IsModula2() SetFiletypeModula2() return @@ -531,7 +537,7 @@ def IsLProlog(): bool enddef def IsModula2(): bool - return getline(nextnonblank(1)) =~ '\ +" 2024 Feb 19 by Vim Project: (announce adoption) +" 2024 Feb 29 by Vim Project: handle symlinks in tree mode correctly +" 2024 Apr 03 by Vim Project: detect filetypes for remote edited files +" Former Maintainer: Charles E Campbell " GetLatestVimScripts: 1075 1 :AutoInstall: netrw.vim " Copyright: Copyright (C) 2016 Charles E. Campbell {{{1 " Permission is hereby granted to use and distribute this code, @@ -1800,7 +1804,9 @@ fun! s:NetrwOptionsRestore(vt) " call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo." a:vt=".a:vt,'~'.expand("")) if !exists("{a:vt}netrw_optionsave") " call Decho("case ".a:vt."netrw_optionsave : doesn't exist",'~'.expand("")) - if filereadable(expand("%")) + + " filereadable() returns zero for remote files (e.g. scp://localhost//etc/fstab) + if filereadable(expand("%")) || expand("%") =~# '^\w\+://\f\+/' " call Decho("..doing filetype detect anyway") filetype detect " call Decho("..settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo." a:vt=".a:vt,'~'.expand("")) @@ -2724,7 +2730,7 @@ fun! netrw#NetWrite(...) range let url= g:netrw_choice call s:NetrwExe(s:netrw_silentxfer."!".g:netrw_http_put_cmd." ".s:ShellEscape(tmpfile,1)." ".s:ShellEscape(url,1) ) elseif !exists("g:netrw_quiet") - call netrw#ErrorMsg(s:ERROR,"can't write to http using <".g:netrw_http_put_cmd.">".",16) + call netrw#ErrorMsg(s:ERROR,"can't write to http using <".g:netrw_http_put_cmd.">",16) endif "......................................... @@ -9474,7 +9480,7 @@ fun! s:NetrwTreeDir(islocal) " call Decho("treedir<".treedir.">",'~'.expand("")) elseif curline =~ '@$' " call Decho("handle symbolic link from current line",'~'.expand("")) - let treedir= resolve(substitute(substitute(getline('.'),'@.*$','','e'),'^|*\s*','','e')) + let potentialdir= resolve(substitute(substitute(getline('.'),'@.*$','','e'),'^|*\s*','','e')) " call Decho("treedir<".treedir.">",'~'.expand("")) else " call Decho("do not extract tree subdirectory from current line and set treedir to empty",'~'.expand("")) @@ -9499,7 +9505,6 @@ fun! s:NetrwTreeDir(islocal) " call Decho("COMBAK#23 : mod=".&mod." win#".winnr()) " call Decho("islocal=".a:islocal." curline<".curline.">",'~'.expand("")) - let potentialdir= s:NetrwFile(substitute(curline,'^'.s:treedepthstring.'\+ \(.*\)@$','\1','')) " call Decho("potentialdir<".potentialdir."> isdir=".isdirectory(potentialdir),'~'.expand("")) " call Decho("COMBAK#24 : mod=".&mod." win#".winnr()) @@ -9512,8 +9517,15 @@ fun! s:NetrwTreeDir(islocal) " " call Decho("newdir <".newdir.">",'~'.expand("")) " else " call Decho("apply NetrwTreePath to treetop<".w:netrw_treetop.">",'~'.expand("")) - let treedir = s:NetrwTreePath(w:netrw_treetop) -" endif + if a:islocal && curline =~ '@$' + if isdirectory(s:NetrwFile(potentialdir)) + let treedir = w:netrw_treetop.'/'.potentialdir.'/' + let w:netrw_treetop = treedir + endif + else + let potentialdir= s:NetrwFile(substitute(curline,'^'.s:treedepthstring.'\+ \(.*\)@$','\1','')) + let treedir = s:NetrwTreePath(w:netrw_treetop) + endif endif " call Decho("COMBAK#25 : mod=".&mod." win#".winnr()) diff --git a/runtime/autoload/netrwFileHandlers.vim b/runtime/autoload/netrwFileHandlers.vim index d07235c107..2b6f8f7a0f 100644 --- a/runtime/autoload/netrwFileHandlers.vim +++ b/runtime/autoload/netrwFileHandlers.vim @@ -1,6 +1,7 @@ " netrwFileHandlers: contains various extension-based file handlers for " netrw's browsers' x command ("eXecute launcher") -" Author: Charles E. Campbell +" Maintainer: This runtime file is looking for a new maintainer. +" Original Author: Charles E. Campbell " Date: Sep 18, 2020 " Version: 11 " Copyright: Copyright (C) 1999-2012 Charles E. Campbell {{{1 diff --git a/runtime/autoload/netrwSettings.vim b/runtime/autoload/netrwSettings.vim index d65f83144e..5525c0d035 100644 --- a/runtime/autoload/netrwSettings.vim +++ b/runtime/autoload/netrwSettings.vim @@ -1,6 +1,7 @@ " netrwSettings.vim: makes netrw settings simpler " Date: Nov 15, 2021 -" Maintainer: Charles E Campbell +" Maintainer: This runtime file is looking for a new maintainer. +" Former Maintainer: Charles E Campbell " Version: 18 " Copyright: Copyright (C) 1999-2007 Charles E. Campbell {{{1 " Permission is hereby granted to use and distribute this code, diff --git a/runtime/autoload/tar.vim b/runtime/autoload/tar.vim index 3c4c9ccfb2..9c4f16d7f6 100644 --- a/runtime/autoload/tar.vim +++ b/runtime/autoload/tar.vim @@ -2,7 +2,8 @@ " AUTOLOAD PORTION " Date: Nov 14, 2023 " Version: 32b (with modifications from the Vim Project) -" Maintainer: Charles E Campbell +" Maintainer: This runtime file is looking for a new maintainer. +" Former Maintainer: Charles E Campbell " License: Vim License (see vim's :help license) " " Contains many ideas from Michael Toren's diff --git a/runtime/autoload/vimball.vim b/runtime/autoload/vimball.vim index 9c7dcbda0f..774b798a83 100644 --- a/runtime/autoload/vimball.vim +++ b/runtime/autoload/vimball.vim @@ -1,6 +1,7 @@ " vimball.vim : construct a file containing both paths and files -" Author: Charles E. Campbell -" Date: Apr 11, 2016 +" Maintainer: This runtime file is looking for a new maintainer. +" Original Author: Charles E. Campbell +" Date: Apr 11, 2016 " Version: 37 " GetLatestVimScripts: 1502 1 :AutoInstall: vimball.vim " Copyright: (c) 2004-2011 by Charles E. Campbell diff --git a/runtime/autoload/zip.vim b/runtime/autoload/zip.vim index e61293c357..c0034f8a7a 100644 --- a/runtime/autoload/zip.vim +++ b/runtime/autoload/zip.vim @@ -2,7 +2,8 @@ " AUTOLOAD PORTION " Date: Mar 12, 2023 " Version: 33 -" Maintainer: Charles E Campbell +" Maintainer: This runtime file is looking for a new maintainer. +" Former Maintainer: Charles E Campbell " License: Vim License (see vim's :help license) " Copyright: Copyright (C) 2005-2019 Charles E. Campbell {{{1 " Permission is hereby granted to use and distribute this code, diff --git a/runtime/colors/lists/default.vim b/runtime/colors/lists/default.vim index 073a0da11b..c8df0c9167 100644 --- a/runtime/colors/lists/default.vim +++ b/runtime/colors/lists/default.vim @@ -1,5 +1,5 @@ " Maintainer: Drew Vogel -" Last Change: 2023 Apr 19 +" Last Change: 2024 Mar 20 " " Replaced rgb.txt as the source of de facto standard color names. This is " sourced each time the colorscheme command is run. It is also sourced each @@ -13,7 +13,38 @@ let s:keepcpo = &cpo set cpo&vim -call extend(v:colornames, { +function! s:Cleanup() + let &cpo = s:keepcpo + unlet s:keepcpo +endfunction + +function! s:AddColors(cnames) abort + call extend(v:colornames, a:cnames, 'keep') + + " all keys should be in lower case, convert keys that are not yet + let len_after = len(v:colornames) + if len_after == len(a:cnames) + " after extend(): v:colornames has all the keys of default_cnames + " checked: v:colornames also has no extra keys + " => keys are the same, and keys(default_cnames) are known to be ok + return + endif + + for [key, val] in items(filter(copy(v:colornames), { key -> key =~ '\u'})) + call remove(v:colornames, key) + if !has_key(v:colornames, tolower(key)) + call extend(v:colornames, {tolower(key): val}, 'keep') + endif + endfor +endfunction + +if exists('s:default_cnames') + call s:AddColors(s:default_cnames) + call s:Cleanup() + finish +endif + +let s:default_cnames = { \ 'snow': '#fffafa', \ 'ghost white': '#f8f8ff', \ 'ghostwhite': '#f8f8ff', @@ -802,17 +833,9 @@ call extend(v:colornames, { \ 'rebeccapurple': '#663399', \ 'silver': '#c0c0c0', \ 'teal': '#008080' - \ }, 'keep') - -" all keys should be in lower case, convert keys that are not yet -for [key, val] in items(filter(copy(v:colornames), { key -> key =~ '\u'})) - call remove(v:colornames, key) - if !has_key(v:colornames, tolower(key)) - call extend(v:colornames, {tolower(key): val}, 'keep') - endif -endfor + \ } -let &cpo = s:keepcpo -unlet s:keepcpo +call s:AddColors(s:default_cnames) +call s:Cleanup() "vim: sw=4 diff --git a/runtime/compiler/ant.vim b/runtime/compiler/ant.vim index 0605c69fab..6219b01c36 100644 --- a/runtime/compiler/ant.vim +++ b/runtime/compiler/ant.vim @@ -2,16 +2,13 @@ " Compiler: ant " Maintainer: Johannes Zellner " Last Change: Mi, 13 Apr 2005 22:50:07 CEST +" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition) if exists("current_compiler") finish endif let current_compiler = "ant" -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - let s:cpo_save = &cpo set cpo&vim diff --git a/runtime/compiler/bcc.vim b/runtime/compiler/bcc.vim index 5bd284a581..2d9d4fbb36 100644 --- a/runtime/compiler/bcc.vim +++ b/runtime/compiler/bcc.vim @@ -2,16 +2,13 @@ " Compiler: bcc - Borland C " Maintainer: Emile van Raaij (eraaij@xs4all.nl) " Last Change: 2004 Mar 27 +" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition) if exists("current_compiler") finish endif let current_compiler = "bcc" -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - " A workable errorformat for Borland C CompilerSet errorformat=%*[^0-9]%n\ %f\ %l:\ %m diff --git a/runtime/compiler/bdf.vim b/runtime/compiler/bdf.vim index b062e847aa..2aaa93bc27 100644 --- a/runtime/compiler/bdf.vim +++ b/runtime/compiler/bdf.vim @@ -1,7 +1,9 @@ " Vim compiler file " Compiler: BDF to PCF Conversion " Previous Maintainer: Nikolai Weibull -" Latest Revision: 2006-04-19 +" Contributors: Enno Nagel +" Last Change: 2024 Mar 29 +" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition) if exists("current_compiler") finish @@ -11,9 +13,8 @@ let current_compiler = "bdf" let s:cpo_save = &cpo set cpo-=C -setlocal makeprg=bdftopcf\ $* - -setlocal errorformat=%ABDF\ %trror\ on\ line\ %l:\ %m, +CompilerSet makeprg=bdftopcf\ $* +CompilerSet errorformat=%ABDF\ %trror\ on\ line\ %l:\ %m, \%-Z%p^, \%Cbdftopcf:\ bdf\ input\\,\ %f\\,\ corrupt, \%-G%.%# diff --git a/runtime/compiler/cargo.vim b/runtime/compiler/cargo.vim index aa9b01e93c..bbea45dee7 100644 --- a/runtime/compiler/cargo.vim +++ b/runtime/compiler/cargo.vim @@ -2,6 +2,7 @@ " Compiler: Cargo Compiler " Maintainer: Damien Radtke " Latest Revision: 2023-09-11 +" 2024 Apr 05 by The Vim Project (removed :CompilerSet definition) " For bugs, patches and license go to https://github.com/rust-lang/rust.vim if exists('current_compiler') @@ -15,10 +16,6 @@ let s:save_cpo = &cpo set cpo&vim " vint: +ProhibitAbbreviationOption -if exists(':CompilerSet') != 2 - command -nargs=* CompilerSet setlocal -endif - if exists('g:cargo_makeprg_params') execute 'CompilerSet makeprg=cargo\ '.escape(g:cargo_makeprg_params, ' \|"').'\ $*' else diff --git a/runtime/compiler/checkstyle.vim b/runtime/compiler/checkstyle.vim index 4ebd9e15b5..3c17ee45bf 100644 --- a/runtime/compiler/checkstyle.vim +++ b/runtime/compiler/checkstyle.vim @@ -1,17 +1,13 @@ " Vim compiler file " Compiler: Checkstyle " Maintainer: Doug Kearns -" Last Change: 2020 Aug 2 +" Last Change: 2024 Apr 03 if exists("current_compiler") finish endif let current_compiler = "checkstyle" -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - let s:cpo_save = &cpo set cpo&vim diff --git a/runtime/compiler/cm3.vim b/runtime/compiler/cm3.vim index 3de51282e6..0ec360855c 100644 --- a/runtime/compiler/cm3.vim +++ b/runtime/compiler/cm3.vim @@ -1,17 +1,13 @@ " Vim compiler file " Compiler: Critical Mass Modula-3 Compiler " Maintainer: Doug Kearns -" Last Change: 2021 Apr 08 +" Last Change: 2024 Apr 03 if exists("current_compiler") finish endif let current_compiler = "cm3" -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - let s:cpo_save = &cpo set cpo&vim diff --git a/runtime/compiler/context.vim b/runtime/compiler/context.vim index f600936f1a..093943e22d 100644 --- a/runtime/compiler/context.vim +++ b/runtime/compiler/context.vim @@ -3,7 +3,9 @@ vim9script # Language: ConTeXt typesetting engine # Maintainer: Nicola Vitacolonna # Former Maintainers: Nikolai Weibull -# Latest Revision: 2023 Dec 26 +# Contributors: Enno Nagel +# Last Change: 2024 Mar 29 +# 2024 Apr 03 by The Vim Project (removed :CompilerSet definition) if exists("g:current_compiler") finish @@ -11,15 +13,12 @@ endif import autoload '../autoload/context.vim' -if exists(":CompilerSet") != 2 # Older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - g:current_compiler = 'context' if get(b:, 'context_ignore_makefile', get(g:, 'context_ignore_makefile', 0)) || (!filereadable('Makefile') && !filereadable('makefile')) - &l:makeprg = join(context.ConTeXtCmd(shellescape(expand('%:p:t'))), ' ') + var makeprg = join(context.ConTeXtCmd(shellescape(expand('%:p:t'))), ' ') + execute 'CompilerSet makeprg=' .. escape(makeprg, ' ') else g:current_compiler = 'make' endif diff --git a/runtime/compiler/cs.vim b/runtime/compiler/cs.vim index 4f6dd3cdfd..123dff854f 100644 --- a/runtime/compiler/cs.vim +++ b/runtime/compiler/cs.vim @@ -3,6 +3,7 @@ " Maintainer: Yichao Zhou (broken.zhou@gmail.com) " Previous Maintainer: Joseph H. Yao (hyao@sina.com) " Last Change: Jul 22, 2019 +" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition) if exists("current_compiler") finish @@ -11,10 +12,6 @@ let current_compiler = "cs" let s:keepcpo= &cpo set cpo&vim -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - CompilerSet errorformat& CompilerSet errorformat+=%f(%l\\,%v):\ %t%*[^:]:\ %m, \%trror%*[^:]:\ %m, diff --git a/runtime/compiler/csslint.vim b/runtime/compiler/csslint.vim index 14c4289a24..608cc74864 100644 --- a/runtime/compiler/csslint.vim +++ b/runtime/compiler/csslint.vim @@ -1,16 +1,13 @@ " Vim compiler file " Compiler: csslint for CSS -" Maintainer: Daniel Moch -" Last Change: 2016 May 21 +" Maintainer: Daniel Moch +" Last Change: 2016 May 21 +" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition) if exists("current_compiler") finish endif let current_compiler = "csslint" -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - CompilerSet makeprg=csslint\ --format=compact CompilerSet errorformat=%-G,%-G%f:\ lint\ free!,%f:\ line\ %l\\,\ col\ %c\\,\ %trror\ -\ %m,%f:\ line\ %l\\,\ col\ %c\\,\ %tarning\ -\ %m,%f:\ line\ %l\\,\ col\ %c\\,\ %m diff --git a/runtime/compiler/cucumber.vim b/runtime/compiler/cucumber.vim index 17ce3627c1..8089a5ee5c 100644 --- a/runtime/compiler/cucumber.vim +++ b/runtime/compiler/cucumber.vim @@ -2,16 +2,13 @@ " Compiler: Cucumber " Maintainer: Tim Pope " Last Change: 2016 Aug 29 +" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition) if exists("current_compiler") finish endif let current_compiler = "cucumber" -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - let s:cpo_save = &cpo set cpo-=C diff --git a/runtime/compiler/dart.vim b/runtime/compiler/dart.vim index f9ebfe1b27..9577236bee 100644 --- a/runtime/compiler/dart.vim +++ b/runtime/compiler/dart.vim @@ -1,17 +1,13 @@ " Vim compiler file " Compiler: Dart VM " Maintainer: Doug Kearns -" Last Change: 2019 May 08 +" Last Change: 2024 Apr 03 if exists("current_compiler") finish endif let current_compiler = "dart" -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - let s:cpo_save = &cpo set cpo&vim diff --git a/runtime/compiler/dart2js.vim b/runtime/compiler/dart2js.vim index b6a4e4d530..a05dead2a9 100644 --- a/runtime/compiler/dart2js.vim +++ b/runtime/compiler/dart2js.vim @@ -1,17 +1,13 @@ " Vim compiler file " Compiler: Dart to JavaScript Compiler " Maintainer: Doug Kearns -" Last Change: 2019 May 08 +" Last Change: 2024 Apr 03 if exists("current_compiler") finish endif let current_compiler = "dart2js" -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - let s:cpo_save = &cpo set cpo&vim diff --git a/runtime/compiler/dart2native.vim b/runtime/compiler/dart2native.vim index 51bdab0cc3..6604fc4bd4 100644 --- a/runtime/compiler/dart2native.vim +++ b/runtime/compiler/dart2native.vim @@ -1,17 +1,13 @@ " Vim compiler file " Compiler: Dart to Native Compiler " Maintainer: Doug Kearns -" Last Change: 2019 May 08 +" Last Change: 2024 Apr 03 if exists("current_compiler") finish endif let current_compiler = "dart2native" -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - let s:cpo_save = &cpo set cpo&vim diff --git a/runtime/compiler/dartanalyser.vim b/runtime/compiler/dartanalyser.vim index e691d80b61..48a976a016 100644 --- a/runtime/compiler/dartanalyser.vim +++ b/runtime/compiler/dartanalyser.vim @@ -1,17 +1,13 @@ " Vim compiler file " Compiler: Dart Analyzer " Maintainer: Doug Kearns -" Last Change: 2019 May 08 +" Last Change: 2024 Apr 03 if exists("current_compiler") finish endif let current_compiler = "dartanalyzer" -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - let s:cpo_save = &cpo set cpo&vim diff --git a/runtime/compiler/dartdevc.vim b/runtime/compiler/dartdevc.vim index e8d1988ed6..16e4ed7ced 100644 --- a/runtime/compiler/dartdevc.vim +++ b/runtime/compiler/dartdevc.vim @@ -1,17 +1,13 @@ " Vim compiler file " Compiler: Dart Development Compiler " Maintainer: Doug Kearns -" Last Change: 2019 May 08 +" Last Change: 2024 Apr 03 if exists("current_compiler") finish endif let current_compiler = "dartdevc" -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - let s:cpo_save = &cpo set cpo&vim diff --git a/runtime/compiler/dartdoc.vim b/runtime/compiler/dartdoc.vim index 26b38d8dd4..78f0d241a4 100644 --- a/runtime/compiler/dartdoc.vim +++ b/runtime/compiler/dartdoc.vim @@ -1,17 +1,13 @@ " Vim compiler file " Compiler: Dart Documentation Generator " Maintainer: Doug Kearns -" Last Change: 2019 May 08 +" Last Change: 2024 Apr 03 if exists("current_compiler") finish endif let current_compiler = "dartdoc" -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - let s:cpo_save = &cpo set cpo&vim diff --git a/runtime/compiler/dartfmt.vim b/runtime/compiler/dartfmt.vim index 2e4ab02ad3..d204df8a73 100644 --- a/runtime/compiler/dartfmt.vim +++ b/runtime/compiler/dartfmt.vim @@ -1,17 +1,13 @@ " Vim compiler file " Compiler: Dart Formatter " Maintainer: Doug Kearns -" Last Change: 2019 May 08 +" Last Change: 2024 Apr 03 if exists("current_compiler") finish endif let current_compiler = "dartfmt" -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - let s:cpo_save = &cpo set cpo&vim diff --git a/runtime/compiler/decada.vim b/runtime/compiler/decada.vim index 0bf5487c89..11b0cb412a 100644 --- a/runtime/compiler/decada.vim +++ b/runtime/compiler/decada.vim @@ -14,6 +14,7 @@ " 08.09.2006 MK Correct double load protection. " Help Page: compiler-decada "------------------------------------------------------------------------------ +" Last Change: 2024 Apr 03 by The Vim Project (removed :CompilerSet definition) if (exists("current_compiler") && current_compiler == "decada") || version < 700 finish @@ -34,13 +35,6 @@ if !exists("g:decada") call g:decada.Set_Session () endif -if exists(":CompilerSet") != 2 - " - " plugin loaded by other means then the "compiler" command - " - command -nargs=* CompilerSet setlocal -endif - execute "CompilerSet makeprg=" . escape (g:decada.Make_Command, ' ') execute "CompilerSet errorformat=" . escape (g:decada.Error_Format, ' ') diff --git a/runtime/compiler/dot.vim b/runtime/compiler/dot.vim index 0327739aae..145411ebd3 100644 --- a/runtime/compiler/dot.vim +++ b/runtime/compiler/dot.vim @@ -1,15 +1,15 @@ " Vim compiler file " Compiler: ATT dot " Maintainer: Marcos Macedo -" Last Change: 2004 May 16 +" Last Change: 2024 March 21 +" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition) if exists("current_compiler") finish endif let current_compiler = "dot" -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - CompilerSet makeprg=dot\ -T$*\ \"%:p\"\ -o\ \"%:p:r.$*\" +" matches error messages as below skipping final part after line number +" Error: ./file.dot: syntax error in line 1 near 'rankdir' +CompilerSet errorformat=%trror:\ %f:\ %m\ in\ line\ %l%.%# diff --git a/runtime/compiler/dotnet.vim b/runtime/compiler/dotnet.vim index ac64084663..1290357221 100644 --- a/runtime/compiler/dotnet.vim +++ b/runtime/compiler/dotnet.vim @@ -2,6 +2,7 @@ " Compiler: dotnet build (.NET CLI) " Maintainer: Nick Jensen " Last Change: 2022-12-06 +" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition) " License: Vim (see :h license) " Repository: https://github.com/nickspoons/vim-cs @@ -10,10 +11,6 @@ if exists("current_compiler") endif let current_compiler = "dotnet" -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - let s:cpo_save = &cpo set cpo&vim diff --git a/runtime/compiler/erlang.vim b/runtime/compiler/erlang.vim index e22887e05e..b30b5c11e7 100644 --- a/runtime/compiler/erlang.vim +++ b/runtime/compiler/erlang.vim @@ -2,6 +2,7 @@ " Compiler: Erlang " Maintainer: Dmitry Vasiliev " Last Change: 2019 Jul 23 +" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition) if exists("current_compiler") finish diff --git a/runtime/compiler/eruby.vim b/runtime/compiler/eruby.vim index a81a3f3b77..815d082f86 100644 --- a/runtime/compiler/eruby.vim +++ b/runtime/compiler/eruby.vim @@ -3,17 +3,13 @@ " Maintainer: Doug Kearns " URL: https://github.com/vim-ruby/vim-ruby " Release Coordinator: Doug Kearns -" Last Change: 2018 Jan 25 +" Last Change: 2024 Apr 03 if exists("current_compiler") finish endif let current_compiler = "eruby" -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - let s:cpo_save = &cpo set cpo-=C diff --git a/runtime/compiler/eslint.vim b/runtime/compiler/eslint.vim index 7d57acbdf4..db7a665991 100644 --- a/runtime/compiler/eslint.vim +++ b/runtime/compiler/eslint.vim @@ -2,15 +2,12 @@ " Compiler: ESLint for JavaScript " Maintainer: Romain Lafourcade " Last Change: 2020 August 20 +" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition) if exists("current_compiler") finish endif let current_compiler = "eslint" -if exists(":CompilerSet") != 2 - command -nargs=* CompilerSet setlocal -endif - CompilerSet makeprg=npx\ eslint\ --format\ compact CompilerSet errorformat=%f:\ line\ %l\\,\ col\ %c\\,\ %m,%-G%.%# diff --git a/runtime/compiler/fbc.vim b/runtime/compiler/fbc.vim index 1c29392da8..afedc32dff 100644 --- a/runtime/compiler/fbc.vim +++ b/runtime/compiler/fbc.vim @@ -1,17 +1,13 @@ " Vim compiler file " Compiler: FreeBASIC Compiler " Maintainer: Doug Kearns -" Last Change: 2015 Jan 10 +" Last Change: 2024 Apr 03 if exists("current_compiler") finish endif let current_compiler = "fbc" -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - let s:cpo_save = &cpo set cpo&vim diff --git a/runtime/compiler/fortran_F.vim b/runtime/compiler/fortran_F.vim index d9cb47cc1f..7f6ec818e0 100644 --- a/runtime/compiler/fortran_F.vim +++ b/runtime/compiler/fortran_F.vim @@ -3,17 +3,14 @@ " URL: http://www.unb.ca/chem/ajit/compiler/fortran_F.vim " Maintainer: Ajit J. Thakkar (ajit AT unb.ca); " Version: 0.2 -" Last Change: 2004 Mar 27 +" Last Change: 2004 Mar 27 +" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition) if exists("current_compiler") finish endif let current_compiler = "fortran_F" -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - let s:cposet=&cpoptions set cpoptions-=C diff --git a/runtime/compiler/fortran_cv.vim b/runtime/compiler/fortran_cv.vim index bc217bdc66..ea46d99af4 100644 --- a/runtime/compiler/fortran_cv.vim +++ b/runtime/compiler/fortran_cv.vim @@ -2,16 +2,13 @@ " Compiler: Compaq Visual Fortran " Maintainer: Joh.-G. Simon (johann-guenter.simon@linde-le.com) " Last Change: 11/05/2002 +" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition) if exists("current_compiler") finish endif let current_compiler = "fortran_cv" -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - let s:cposet = &cpoptions set cpoptions-=C diff --git a/runtime/compiler/fortran_elf90.vim b/runtime/compiler/fortran_elf90.vim index 34c33cfaf8..903701e8e6 100644 --- a/runtime/compiler/fortran_elf90.vim +++ b/runtime/compiler/fortran_elf90.vim @@ -4,17 +4,14 @@ " URL: http://www.unb.ca/chem/ajit/compiler/fortran_elf90.vim " Maintainer: Ajit J. Thakkar (ajit AT unb.ca); " Version: 0.2 -" Last Change: 2004 Mar 27 +" Last Change: 2004 Mar 27 +" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition) if exists("current_compiler") finish endif let current_compiler = "fortran_elf90" -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - let s:cposet=&cpoptions set cpoptions-=C diff --git a/runtime/compiler/fortran_g77.vim b/runtime/compiler/fortran_g77.vim index 744ce6a334..dcac2a7c9a 100644 --- a/runtime/compiler/fortran_g77.vim +++ b/runtime/compiler/fortran_g77.vim @@ -2,6 +2,7 @@ " Compiler: g77 (GNU Fortran) " Maintainer: Ralf Wildenhues " Last Change: $Date: 2004/06/13 18:17:36 $ +" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition) " $Revision: 1.1 $ if exists("current_compiler") @@ -9,10 +10,6 @@ if exists("current_compiler") endif let current_compiler = "fortran_g77" -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - let s:cpo_save = &cpo set cpo-=C diff --git a/runtime/compiler/fortran_lf95.vim b/runtime/compiler/fortran_lf95.vim index 685fee7b4a..2cb71589b2 100644 --- a/runtime/compiler/fortran_lf95.vim +++ b/runtime/compiler/fortran_lf95.vim @@ -3,17 +3,14 @@ " URL: http://www.unb.ca/chem/ajit/compiler/fortran_lf95.vim " Maintainer: Ajit J. Thakkar (ajit AT unb.ca); " Version: 0.2 -" Last Change: 2004 Mar 27 +" Last Change: 2004 Mar 27 +" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition) if exists("current_compiler") finish endif let current_compiler = "fortran_lf95" -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - let s:cposet=&cpoptions set cpoptions-=C diff --git a/runtime/compiler/fpc.vim b/runtime/compiler/fpc.vim index de8e2fe3dc..0d321ab4c7 100644 --- a/runtime/compiler/fpc.vim +++ b/runtime/compiler/fpc.vim @@ -2,16 +2,13 @@ " Compiler: FPC 2.1 " Maintainer: Jaroslaw Blasiok " Last Change: 2005 October 07 +" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition) if exists("current_compiler") finish endif let current_compiler = "fpc" -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - " NOTE: compiler must be run with -vb to write whole source path, not only file " name. CompilerSet errorformat=%f(%l\\,%c)\ %m diff --git a/runtime/compiler/g95.vim b/runtime/compiler/g95.vim index ecb3212cbe..e0b3a688f2 100644 --- a/runtime/compiler/g95.vim +++ b/runtime/compiler/g95.vim @@ -2,6 +2,7 @@ " Maintainer: H Xu " Version: 0.1.3 " Last Change: 2012 Apr 30 +" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition) " Homepage: http://www.vim.org/scripts/script.php?script_id=3492 " https://bitbucket.org/xuhdev/compiler-g95.vim " License: Same as Vim @@ -13,10 +14,6 @@ let current_compiler = 'g95' let s:keepcpo= &cpo set cpo&vim -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - CompilerSet errorformat= \%AIn\ file\ %f:%l, \%-C%p1, diff --git a/runtime/compiler/gawk.vim b/runtime/compiler/gawk.vim index a109eb8642..f2a360d5f3 100644 --- a/runtime/compiler/gawk.vim +++ b/runtime/compiler/gawk.vim @@ -1,17 +1,13 @@ " Vim compiler file " Compiler: GNU Awk " Maintainer: Doug Kearns -" Last Change: 2020 Feb 10 +" Last Change: 2024 Apr 03 if exists("current_compiler") finish endif let current_compiler = "gawk" -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - let s:cpo_save = &cpo set cpo&vim diff --git a/runtime/compiler/gcc.vim b/runtime/compiler/gcc.vim index 30e5149f9f..7b6ebb98f4 100644 --- a/runtime/compiler/gcc.vim +++ b/runtime/compiler/gcc.vim @@ -1,10 +1,11 @@ " Vim compiler file -" Compiler: GNU C Compiler -" Previous Maintainer: Nikolai Weibull -" Latest Revision: 2010-10-14 -" changed pattern for entering/leaving directories -" by Daniel Hahler, 2019 Jul 12 -" added line suggested by Anton Lindqvist 2016 Mar 31 +" Compiler: GNU C Compiler +" Previous Maintainer: Nikolai Weibull +" Last Change: 2010 Oct 14 +" changed pattern for entering/leaving directories +" by Daniel Hahler, 2019 Jul 12 +" added line suggested by Anton Lindqvist 2016 Mar 31 +" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition) if exists("current_compiler") finish diff --git a/runtime/compiler/gfortran.vim b/runtime/compiler/gfortran.vim index 1e4e5cf4f4..1fea3bcb18 100644 --- a/runtime/compiler/gfortran.vim +++ b/runtime/compiler/gfortran.vim @@ -2,6 +2,7 @@ " Maintainer: H Xu " Version: 0.1.3 " Last Change: 2012 Apr 30 +" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition) " Homepage: http://www.vim.org/scripts/script.php?script_id=3496 " https://bitbucket.org/xuhdev/compiler-gfortran.vim " License: Same as Vim @@ -13,10 +14,6 @@ let current_compiler = 'gfortran' let s:keepcpo= &cpo set cpo&vim -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - CompilerSet errorformat= \%A%f:%l.%c:, \%-Z%trror:\ %m, diff --git a/runtime/compiler/gjs.vim b/runtime/compiler/gjs.vim index e033764030..b1be8cf3e6 100644 --- a/runtime/compiler/gjs.vim +++ b/runtime/compiler/gjs.vim @@ -1,17 +1,13 @@ " Vim compiler file " Compiler: GJS (Gnome JavaScript Bindings) " Maintainer: Doug Kearns -" Last Change: 2019 Jul 10 +" Last Change: 2024 Apr 03 if exists("current_compiler") finish endif let current_compiler = "gjs" -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - let s:cpo_save = &cpo set cpo&vim diff --git a/runtime/compiler/gm2.vim b/runtime/compiler/gm2.vim index 5053912200..954da9d0e7 100644 --- a/runtime/compiler/gm2.vim +++ b/runtime/compiler/gm2.vim @@ -1,17 +1,13 @@ " Vim compiler file " Compiler: GNU Modula-2 Compiler " Maintainer: Doug Kearns -" Last Change: 2024 Jan 04 +" Last Change: 2024 Apr 03 if exists("current_compiler") finish endif let current_compiler = "gm2" -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - let s:cpo_save = &cpo set cpo&vim diff --git a/runtime/compiler/gnat.vim b/runtime/compiler/gnat.vim index 3ad1eb4e3f..086edbede3 100644 --- a/runtime/compiler/gnat.vim +++ b/runtime/compiler/gnat.vim @@ -52,13 +52,6 @@ if !exists("g:gnat") call g:gnat.Set_Session () endif -if exists(":CompilerSet") != 2 - " - " plugin loaded by other means then the "compiler" command - " - command -nargs=* CompilerSet setlocal -endif - execute "CompilerSet makeprg=" . escape (g:gnat.Get_Command('Make'), ' ') execute "CompilerSet errorformat=" . escape (g:gnat.Error_Format, ' ') diff --git a/runtime/compiler/go.vim b/runtime/compiler/go.vim index cf638f23d6..9c1a6f3119 100644 --- a/runtime/compiler/go.vim +++ b/runtime/compiler/go.vim @@ -2,16 +2,13 @@ " Compiler: Go " Maintainer: David Barnett (https://github.com/google/vim-ft-go) " Last Change: 2014 Aug 16 +" 2024 Apr 05 by The Vim Project (removed :CompilerSet definition) if exists('current_compiler') finish endif let current_compiler = 'go' -if exists(':CompilerSet') != 2 - command -nargs=* CompilerSet setlocal -endif - let s:save_cpo = &cpo set cpo-=C diff --git a/runtime/compiler/haml.vim b/runtime/compiler/haml.vim index 9464c3dc85..99c171d76c 100644 --- a/runtime/compiler/haml.vim +++ b/runtime/compiler/haml.vim @@ -2,16 +2,13 @@ " Compiler: Haml " Maintainer: Tim Pope " Last Change: 2016 Aug 29 +" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition) if exists("current_compiler") finish endif let current_compiler = "haml" -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - let s:cpo_save = &cpo set cpo-=C diff --git a/runtime/compiler/hare.vim b/runtime/compiler/hare.vim index c0fa68cc00..c98bbb9c63 100644 --- a/runtime/compiler/hare.vim +++ b/runtime/compiler/hare.vim @@ -2,6 +2,7 @@ " Compiler: Hare Compiler " Maintainer: Amelia Clarke " Last Change: 2022-09-21 +" 2024 Apr 05 by The Vim Project (removed :CompilerSet definition) if exists("g:current_compiler") finish @@ -11,10 +12,6 @@ let g:current_compiler = "hare" let s:cpo_save = &cpo set cpo&vim -if exists(':CompilerSet') != 2 - command -nargs=* CompilerSet setlocal -endif - if filereadable("Makefile") || filereadable("makefile") CompilerSet makeprg=make else diff --git a/runtime/compiler/hp_acc.vim b/runtime/compiler/hp_acc.vim index 15d5ce5f19..f6ccc57c73 100644 --- a/runtime/compiler/hp_acc.vim +++ b/runtime/compiler/hp_acc.vim @@ -3,6 +3,7 @@ " Maintainer: Matthias Ulrich " URL: http://www.subhome.de/vim/hp_acc.vim " Last Change: 2012 Apr 30 +" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition) " " aCC --version says: "HP ANSI C++ B3910B A.03.13" " This compiler has been tested on: @@ -22,10 +23,6 @@ let current_compiler = "hp_acc" let s:keepcpo= &cpo set cpo&vim -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - CompilerSet errorformat=%A%trror\ %n\:\ \"%f\"\\,\ line\ %l\ \#\ %m, \%A%tarning\ (suggestion)\ %n\:\ \"%f\"\\,\ line\ %l\ \#\ %m\ %#, \%A%tarning\ %n\:\ \"%f\"\\,\ line\ %l\ \#\ %m\ %#, diff --git a/runtime/compiler/icc.vim b/runtime/compiler/icc.vim index 751fba65c7..37958f1c94 100644 --- a/runtime/compiler/icc.vim +++ b/runtime/compiler/icc.vim @@ -2,16 +2,13 @@ " Compiler: icc - Intel C++ " Maintainer: Peter Puck " Last Change: 2004 Mar 27 +" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition) if exists("current_compiler") finish endif let current_compiler = "icc" -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - " I think that Intel is calling the compiler icl under Windows CompilerSet errorformat=%-Z%p^,%f(%l):\ remark\ #%n:%m,%f(%l)\ :\ (col.\ %c)\ remark:\ %m,%E%f(%l):\ error:\ %m,%E%f(%l):\ error:\ #%n:\ %m,%W%f(%l):\ warning\ #%n:\ %m,%W%f(%l):\ warning:\ %m,%-C%.%# diff --git a/runtime/compiler/icon.vim b/runtime/compiler/icon.vim index 40f67930f7..8b46af2a13 100644 --- a/runtime/compiler/icon.vim +++ b/runtime/compiler/icon.vim @@ -1,17 +1,13 @@ " Vim compiler file " Compiler: Icon Compiler " Maintainer: Doug Kearns -" Last Change: 2022 Jun 16 +" Last Change: 2024 Apr 03 if exists("current_compiler") finish endif let current_compiler = "icont" -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - let s:cpo_save = &cpo set cpo&vim diff --git a/runtime/compiler/ifort.vim b/runtime/compiler/ifort.vim index 3a60d0cd12..8c58ba685d 100644 --- a/runtime/compiler/ifort.vim +++ b/runtime/compiler/ifort.vim @@ -2,6 +2,7 @@ " Maintainer: H Xu " Version: 0.1.1 " Last Change: 2012 Apr 30 +" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition) " Homepage: http://www.vim.org/scripts/script.php?script_id=3497 " https://bitbucket.org/xuhdev/compiler-ifort.vim " License: Same as Vim @@ -13,10 +14,6 @@ let current_compiler = 'ifort' let s:keepcpo= &cpo set cpo&vim -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - CompilerSet errorformat= \%A%f(%l):\ %trror\ \#%n:\ %m, \%A%f(%l):\ %tarning\ \#%n:\ %m, diff --git a/runtime/compiler/intel.vim b/runtime/compiler/intel.vim index 254d13b6d8..cde62b1c48 100644 --- a/runtime/compiler/intel.vim +++ b/runtime/compiler/intel.vim @@ -2,6 +2,7 @@ " Compiler: Intel C++ 7.1 " Maintainer: David Harrison " Last Change: 2012 Apr 30 +" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition) if exists("current_compiler") finish @@ -10,10 +11,6 @@ let current_compiler = "intel" let s:keepcpo= &cpo set cpo&vim -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - CompilerSet errorformat=%E%f(%l):\ error:\ %m, \%W%f(%l):\ warning:\ %m, \%I%f(%l):\ remark\ #%n:\ %m, diff --git a/runtime/compiler/irix5_c.vim b/runtime/compiler/irix5_c.vim index f440e74f05..f70bfb1ea7 100644 --- a/runtime/compiler/irix5_c.vim +++ b/runtime/compiler/irix5_c.vim @@ -2,6 +2,7 @@ " Compiler: SGI IRIX 5.3 cc " Maintainer: David Harrison " Last Change: 2012 Apr 30 +" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition) if exists("current_compiler") finish @@ -10,10 +11,6 @@ let current_compiler = "irix5_c" let s:keepcpo= &cpo set cpo&vim -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - CompilerSet errorformat=\%Ecfe:\ Error:\ %f\\,\ line\ %l:\ %m, \%Wcfe:\ Warning:\ %n:\ %f\\,\ line\ %l:\ %m, \%Wcfe:\ Warning\ %n:\ %f\\,\ line\ %l:\ %m, diff --git a/runtime/compiler/irix5_cpp.vim b/runtime/compiler/irix5_cpp.vim index 0112dc1cbc..85ab8c67f2 100644 --- a/runtime/compiler/irix5_cpp.vim +++ b/runtime/compiler/irix5_cpp.vim @@ -2,6 +2,7 @@ " Compiler: SGI IRIX 5.3 CC or NCC " Maintainer: David Harrison " Last Change: 2012 Apr 30 +" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition) if exists("current_compiler") finish @@ -10,10 +11,6 @@ let current_compiler = "irix5_cpp" let s:keepcpo= &cpo set cpo&vim -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - CompilerSet errorformat=%E\"%f\"\\,\ line\ %l:\ error(%n):\ , \%E\"%f\"\\,\ line\ %l:\ error(%n):\ %m, \%W\"%f\"\\,\ line\ %l:\ warning(%n):\ %m, diff --git a/runtime/compiler/javac.vim b/runtime/compiler/javac.vim index 8507efd67c..f5fe84124f 100644 --- a/runtime/compiler/javac.vim +++ b/runtime/compiler/javac.vim @@ -1,17 +1,13 @@ " Vim compiler file " Compiler: Java Development Kit Compiler " Maintainer: Doug Kearns -" Last Change: 2019 Oct 21 +" Last Change: 2024 Apr 03 if exists("current_compiler") finish endif let current_compiler = "javac" -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - let s:cpo_save = &cpo set cpo&vim diff --git a/runtime/compiler/jest.vim b/runtime/compiler/jest.vim index a4bb549de1..663123c30f 100644 --- a/runtime/compiler/jest.vim +++ b/runtime/compiler/jest.vim @@ -1,17 +1,13 @@ " Vim compiler file " Compiler: Jest " Maintainer: Doug Kearns -" Last Change: 2021 Nov 20 +" Last Change: 2024 Apr 03 if exists("current_compiler") finish endif let current_compiler = "jest" -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - let s:cpo_save = &cpo set cpo&vim diff --git a/runtime/compiler/jikes.vim b/runtime/compiler/jikes.vim index 2d4500e894..f12c2cf5f1 100644 --- a/runtime/compiler/jikes.vim +++ b/runtime/compiler/jikes.vim @@ -2,6 +2,7 @@ " Compiler: Jikes " Maintainer: Dan Sharp " Last Change: 2019 Jul 23 +" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition) " URL: http://dwsharp.users.sourceforge.net/vim/compiler if exists("current_compiler") @@ -9,10 +10,6 @@ if exists("current_compiler") endif let current_compiler = "jikes" -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - " Jikes defaults to printing output on stderr CompilerSet makeprg=jikes\ -Xstdout\ +E\ \"%:S\" CompilerSet errorformat=%f:%l:%v:%*\\d:%*\\d:%*\\s%m diff --git a/runtime/compiler/jjs.vim b/runtime/compiler/jjs.vim index 09a973683a..543d9ca3d4 100644 --- a/runtime/compiler/jjs.vim +++ b/runtime/compiler/jjs.vim @@ -1,17 +1,13 @@ " Vim compiler file " Compiler: Nashorn Shell " Maintainer: Doug Kearns -" Last Change: 2018 Jan 9 +" Last Change: 2024 Apr 03 if exists("current_compiler") finish endif let current_compiler = "jjs" -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - let s:cpo_save = &cpo set cpo&vim diff --git a/runtime/compiler/jshint.vim b/runtime/compiler/jshint.vim index 865591cd2b..9879ef49e5 100644 --- a/runtime/compiler/jshint.vim +++ b/runtime/compiler/jshint.vim @@ -1,17 +1,13 @@ " Vim compiler file " Compiler: JSHint " Maintainer: Doug Kearns -" Last Change: 2019 Jul 10 +" Last Change: 2024 Apr 03 if exists("current_compiler") finish endif let current_compiler = "jshint" -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - let s:cpo_save = &cpo set cpo&vim diff --git a/runtime/compiler/jsonlint.vim b/runtime/compiler/jsonlint.vim index 5466dcc7f4..6283b1b01f 100644 --- a/runtime/compiler/jsonlint.vim +++ b/runtime/compiler/jsonlint.vim @@ -1,17 +1,13 @@ " Vim compiler file " Compiler: JSON Lint " Maintainer: Doug Kearns -" Last Change: 2019 Jul 10 +" Last Change: 2024 Apr 03 if exists("current_compiler") finish endif let current_compiler = "jsonlint" -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - let s:cpo_save = &cpo set cpo&vim diff --git a/runtime/compiler/mcs.vim b/runtime/compiler/mcs.vim index c606586870..0c265b3de5 100644 --- a/runtime/compiler/mcs.vim +++ b/runtime/compiler/mcs.vim @@ -1,8 +1,9 @@ " Vim compiler file -" Compiler: Mono C# Compiler -" Maintainer: Jarek Sobiecki -" Last Updated By: Peter Collingbourne -" Latest Revision: 2012 Jul 19 +" Compiler: Mono C# Compiler +" Maintainer: Jarek Sobiecki +" Contributors: Peter Collingbourne and Enno Nagel +" Last Change: 2024 Mar 29 +" 2024 Apr 05 by The Vim Project (removed :CompilerSet definition) if exists("current_compiler") finish @@ -12,7 +13,8 @@ let current_compiler = "mcs" let s:cpo_save = &cpo set cpo-=C -setlocal errorformat= +CompilerSet makeprg=mcs +CompilerSet errorformat= \%D%.%#Project\ \"%f/%[%^/\"]%#\"%.%#, \%X%.%#Done\ building\ project\ \"%f/%[%^/\"]%#\"%.%#, \%-G%\\s%.%#, diff --git a/runtime/compiler/mips_c.vim b/runtime/compiler/mips_c.vim index a0ebfe7ba2..544f314a1a 100644 --- a/runtime/compiler/mips_c.vim +++ b/runtime/compiler/mips_c.vim @@ -2,6 +2,7 @@ " Compiler: SGI IRIX 6.5 MIPS C (cc) " Maintainer: David Harrison " Last Change: 2012 Apr 30 +" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition) if exists("current_compiler") finish @@ -10,10 +11,6 @@ let current_compiler = "mips_c" let s:keepcpo= &cpo set cpo&vim -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - CompilerSet errorformat=%Ecc\-%n\ %.%#:\ ERROR\ File\ =\ %f\%\\,\ Line\ =\ %l, \%Wcc\-%n\ %.%#:\ WARNING\ File\ =\ %f\%\\,\ Line\ =\ %l, \%Icc\-%n\ %.%#:\ REMARK\ File\ =\ %f\%\\,\ Line\ =\ %l, diff --git a/runtime/compiler/mipspro_c89.vim b/runtime/compiler/mipspro_c89.vim index 20eb70d3fe..4d6bdabeef 100644 --- a/runtime/compiler/mipspro_c89.vim +++ b/runtime/compiler/mipspro_c89.vim @@ -2,6 +2,7 @@ " Compiler: SGI IRIX 6.5 MIPSPro C (c89) " Maintainer: David Harrison " Last Change: 2012 Apr 30 +" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition) if exists("current_compiler") finish @@ -10,10 +11,6 @@ let current_compiler = "mipspro_c89" let s:keepcpo= &cpo set cpo&vim -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - CompilerSet errorformat=%Ecc\-%n\ %.%#:\ ERROR\ File\ =\ %f\%\\,\ Line\ =\ %l, \%Wcc\-%n\ %.%#:\ WARNING\ File\ =\ %f\%\\,\ Line\ =\ %l, \%Icc\-%n\ %.%#:\ REMARK\ File\ =\ %f\%\\,\ Line\ =\ %l, diff --git a/runtime/compiler/mipspro_cpp.vim b/runtime/compiler/mipspro_cpp.vim index 2f43af8455..9aac2a6564 100644 --- a/runtime/compiler/mipspro_cpp.vim +++ b/runtime/compiler/mipspro_cpp.vim @@ -2,6 +2,7 @@ " Compiler: SGI IRIX 6.5 MIPSPro C++ (CC) " Maintainer: David Harrison " Last Change: 2012 Apr 30 +" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition) if exists("current_compiler") finish @@ -10,10 +11,6 @@ let current_compiler = "mipspro_cpp" let s:keepcpo= &cpo set cpo&vim -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - CompilerSet errorformat=%Ecc\-%n\ %.%#:\ ERROR\ File\ =\ %f\%\\,\ Line\ =\ %l, \%Wcc\-%n\ %.%#:\ WARNING\ File\ =\ %f\%\\,\ Line\ =\ %l, \%Icc\-%n\ %.%#:\ REMARK\ File\ =\ %f\%\\,\ Line\ =\ %l, diff --git a/runtime/compiler/modelsim_vcom.vim b/runtime/compiler/modelsim_vcom.vim index 6aa1bde0b3..8c6b8063ad 100644 --- a/runtime/compiler/modelsim_vcom.vim +++ b/runtime/compiler/modelsim_vcom.vim @@ -1,7 +1,9 @@ " Vim Compiler File " Compiler: Modelsim Vcom " Maintainer: Paul Baleme -" Last Change: September 8, 2003 +" Contributors: Enno Nagel +" Last Change: 2024 Mar 29 +" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition) " Thanks to: allanherriman@hotmail.com if exists("current_compiler") @@ -9,12 +11,9 @@ if exists("current_compiler") endif let current_compiler = "modelsim_vcom" -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif +CompilerSet makeprg=vcom "setlocal errorformat=\*\*\ %tRROR:\ %f(%l):\ %m,%tRROR:\ %f(%l):\ %m,%tARNING\[%*[0-9]\]:\ %f(%l):\ %m,\*\*\ %tRROR:\ %m,%tRROR:\ %m,%tARNING\[%*[0-9]\]:\ %m - "setlocal errorformat=%tRROR:\ %f(%l):\ %m,%tARNING\[%*[0-9]\]:\ %m CompilerSet errorformat=\*\*\ %tRROR:\ %f(%l):\ %m,\*\*\ %tRROR:\ %m,\*\*\ %tARNING:\ %m,\*\*\ %tOTE:\ %m,%tRROR:\ %f(%l):\ %m,%tARNING\[%*[0-9]\]:\ %f(%l):\ %m,%tRROR:\ %m,%tARNING\[%*[0-9]\]:\ %m diff --git a/runtime/compiler/msbuild.vim b/runtime/compiler/msbuild.vim index 3652ca0e04..c871efaf3d 100644 --- a/runtime/compiler/msbuild.vim +++ b/runtime/compiler/msbuild.vim @@ -2,6 +2,7 @@ " Compiler: Microsoft Visual Studio C# " Maintainer: Chiel ten Brinke (ctje92@gmail.com) " Last Change: 2013 May 13 +" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition) if exists("current_compiler") finish @@ -10,10 +11,6 @@ let current_compiler = "msbuild" let s:keepcpo= &cpo set cpo&vim -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - CompilerSet errorformat=\ %#%f(%l\\\,%c):\ %m CompilerSet makeprg=msbuild\ /nologo\ /v:q\ /property:GenerateFullPaths=true diff --git a/runtime/compiler/msvc.vim b/runtime/compiler/msvc.vim index 0d5660c103..3d40de5b7f 100644 --- a/runtime/compiler/msvc.vim +++ b/runtime/compiler/msvc.vim @@ -2,6 +2,7 @@ " Compiler: Microsoft Visual C " Maintainer: The Vim Project " Last Change: 2023 Aug 10 +" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition) " Former Maintainer: Bram Moolenaar if exists("current_compiler") diff --git a/runtime/compiler/neato.vim b/runtime/compiler/neato.vim index bd184b7f6e..0f36734130 100644 --- a/runtime/compiler/neato.vim +++ b/runtime/compiler/neato.vim @@ -1,15 +1,15 @@ " Vim compiler file " Compiler: ATT neato " Maintainer: Marcos Macedo -" Last Change: 2004 May 16 +" Last Change: 2024 March 21 +" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition) if exists("current_compiler") finish endif let current_compiler = "neato" -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - CompilerSet makeprg=neato\ -T$*\ \"%:p\"\ -o\ \"%:p:r.$*\" +" matches error messages as below skipping final part after line number +" Error: ./file.dot: syntax error in line 1 near 'rankdir' +CompilerSet errorformat=%trror:\ %f:\ %m\ in\ line\ %l%.%# diff --git a/runtime/compiler/ocaml.vim b/runtime/compiler/ocaml.vim index faa8af1f5f..754289fc14 100644 --- a/runtime/compiler/ocaml.vim +++ b/runtime/compiler/ocaml.vim @@ -3,6 +3,7 @@ " Maintainer: Markus Mottl " URL: https://github.com/ocaml/vim-ocaml " Last Change: +" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition) " 2020 Mar 28 - Improved error format (Thomas Leonard) " 2017 Nov 26 - Improved error format (Markus Mottl) " 2013 Aug 27 - Added a new OCaml error format (Markus Mottl) diff --git a/runtime/compiler/onsgmls.vim b/runtime/compiler/onsgmls.vim index 68925ef459..4306f99de5 100644 --- a/runtime/compiler/onsgmls.vim +++ b/runtime/compiler/onsgmls.vim @@ -2,16 +2,13 @@ " Compiler: onsgmls " Maintainer: Robert Rowsome " Last Change: 2019 Jul 23 +" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition) if exists("current_compiler") finish endif let current_compiler = "onsgmls" -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - let s:cpo_save = &cpo set cpo-=C diff --git a/runtime/compiler/pandoc.vim b/runtime/compiler/pandoc.vim new file mode 100644 index 0000000000..6c151930c5 --- /dev/null +++ b/runtime/compiler/pandoc.vim @@ -0,0 +1,55 @@ +" Vim compiler file +" Compiler: Pandoc +" Maintainer: Konfekt +" +" Expects output file extension, say `:make html` or `:make pdf`. +" Passes additional arguments to pandoc, say `:make html --self-contained`. + +if exists("current_compiler") + finish +endif + +let s:keepcpo = &cpo +set cpo&vim + +let current_compiler = 'pandoc' + +" As of 2024-04-08 pandoc supports the following text input formats with +" an ftplugin on Github: +let s:supported_filetypes = + \ [ 'bibtex', 'markdown', 'creole', 'json', 'csv', 'tsv', 'docbook', + \ 'xml', 'fb2', 'html', 'jira', 'tex', 'mediawiki', 'nroff', 'org', + \ 'rtf', 'rst', 't2t', 'textile', 'twiki', 'typst', 'vimwiki' ] +" .. and out of those the following are included in Vim's runtime: +" 'xml', 'tex', 'html', 'rst', 'json', 'nroff', 'markdown' + +silent! function s:PandocFiletype(filetype) abort + let ft = a:filetype + if ft ==# 'pandoc' + return 'markdown' + elseif ft ==# 'tex' + return 'latex' + elseif ft ==# 'xml' + " Pandoc does not support XML as a generic input format, but it does support + " EndNote XML and Jats XML out of which the latter seems more universal. + return 'jats' + elseif ft ==# 'text' || empty(ft) + return 'markdown' + elseif index(s:supported_filetypes, &ft) >= 0 + return ft + else + echomsg 'Unsupported filetype: ' . ft . ', falling back to Markdown as input format!' + return 'markdown' + endif +endfunction +execute 'CompilerSet makeprg=pandoc\ --standalone' . + \ '\ --metadata\ title=%:t:r:S' . + \ '\ --metadata\ lang=' . matchstr(&spelllang, '^\a\a') . + \ '\ --from=' . s:PandocFiletype(&filetype) . + \ '\ ' . escape(get(b:, 'pandoc_compiler_args', get(g:, 'pandoc_compiler_args', '')), ' ') . + \ '\ --output\ %:r:S.$*\ %:S' + +CompilerSet errorformat="%f",\ line\ %l:\ %m + +let &cpo = s:keepcpo +unlet s:keepcpo diff --git a/runtime/compiler/pbx.vim b/runtime/compiler/pbx.vim index 9e81ea7355..5a45f7ffe0 100644 --- a/runtime/compiler/pbx.vim +++ b/runtime/compiler/pbx.vim @@ -2,16 +2,13 @@ " Compiler: Apple Project Builder " Maintainer: Alexander von Below (public@vonBelow.Com) " Last Change: 2004 Mar 27 +" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition) if exists("current_compiler") finish endif let current_compiler = "pbx" -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - " The compiler actually is gcc, so the errorformat is unchanged CompilerSet errorformat& diff --git a/runtime/compiler/perl.vim b/runtime/compiler/perl.vim index 21e384fb85..6aeaac3fa1 100644 --- a/runtime/compiler/perl.vim +++ b/runtime/compiler/perl.vim @@ -6,16 +6,13 @@ " Bugs/requests: https://github.com/vim-perl/vim-perl/issues " License: Vim License (see :help license) " Last Change: 2021 Nov 2 +" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition) if exists("current_compiler") finish endif let current_compiler = "perl" -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - let s:savecpo = &cpo set cpo&vim diff --git a/runtime/compiler/perlcritic.vim b/runtime/compiler/perlcritic.vim index cf0678eeb2..4b5f34dd2e 100644 --- a/runtime/compiler/perlcritic.vim +++ b/runtime/compiler/perlcritic.vim @@ -6,16 +6,13 @@ " Bugs/requests: https://github.com/vim-perl/vim-perl/issues " License: Vim License (see :help license) " Last Change: 2021 Oct 20 +" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition) if exists("current_compiler") finish endif let current_compiler = "perlcritic" -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - let s:cpo_save = &cpo set cpo&vim diff --git a/runtime/compiler/php.vim b/runtime/compiler/php.vim index 92f93b89fc..f5d521098b 100644 --- a/runtime/compiler/php.vim +++ b/runtime/compiler/php.vim @@ -1,17 +1,13 @@ " Vim compiler file " Compiler: PHP CLI " Maintainer: Doug Kearns -" Last Change: 2013 Jun 25 +" Last Change: 2024 Apr 03 if exists("current_compiler") finish endif let current_compiler = "php" -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - let s:cpo_save = &cpo set cpo-=C diff --git a/runtime/compiler/pip_compile.vim b/runtime/compiler/pip_compile.vim new file mode 100644 index 0000000000..ca4d509660 --- /dev/null +++ b/runtime/compiler/pip_compile.vim @@ -0,0 +1,43 @@ +" the Requirements File Format syntax support for Vim +" Version: 1.8.0 +" Author: raimon +" Upstream: https://github.com/raimon49/requirements.txt.vim +" License: MIT LICENSE +" The MIT License (MIT) +" +" Copyright (c) 2015 raimon +" +" 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. + +if exists('b:current_compiler') + finish +endif +let b:current_compiler = 'pip_compile' + +let s:save_cpoptions = &cpoptions +set cpoptions&vim + +CompilerSet makeprg=pip-compile\ %:S +CompilerSet errorformat=%ECould\ not\ find\ a\ version\ that\ matches\ %o\ (from\ -r\ %f\ (line\ %l)), + \%C%m, + \%Z, + \%-G%.%# +let &cpoptions = s:save_cpoptions +unlet s:save_cpoptions +" vim: et sw=4 ts=4 sts=4: diff --git a/runtime/compiler/podchecker.vim b/runtime/compiler/podchecker.vim index 2cd4e13660..20faaa4bcc 100644 --- a/runtime/compiler/podchecker.vim +++ b/runtime/compiler/podchecker.vim @@ -6,16 +6,13 @@ " Bugs/requests: https://github.com/vim-perl/vim-perl/issues " License: Vim License (see :help license) " Last Change: 2021 Oct 20 +" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition) if exists("current_compiler") finish endif let current_compiler = "podchecker" -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - let s:cpo_save = &cpo set cpo&vim diff --git a/runtime/compiler/powershell.vim b/runtime/compiler/powershell.vim index 45d5ec2191..821fea4085 100644 --- a/runtime/compiler/powershell.vim +++ b/runtime/compiler/powershell.vim @@ -1,17 +1,16 @@ " Vim compiler file " Compiler: powershell " URL: https://github.com/PProvost/vim-ps1 -" Last Change: 2020 Mar 30 +" Contributors: Enno Nagel +" Last Change: 2024 Mar 29 +" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition) +" 2024 Apr 05 by The Vim Project (avoid leaving behind g:makeprg) if exists("current_compiler") finish endif let current_compiler = "powershell" -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - let s:cpo_save = &cpo set cpo-=C @@ -37,7 +36,7 @@ let g:ps1_efm_show_error_categories = get(g:, 'ps1_efm_show_error_categories', 0 " Use absolute path because powershell requires explicit relative paths " (./file.ps1 is okay, but # expands to file.ps1) -let &l:makeprg = g:ps1_makeprg_cmd .' %:p:S' +let s:makeprg = g:ps1_makeprg_cmd .. ' %:p:S' " Parse file, line, char from callstacks: " Write-Ouput : The term 'Write-Ouput' is not recognized as the name of a @@ -50,6 +49,8 @@ let &l:makeprg = g:ps1_makeprg_cmd .' %:p:S' " + CategoryInfo : ObjectNotFound: (Write-Ouput:String) [], CommandNotFoundException " + FullyQualifiedErrorId : CommandNotFoundException +execute 'CompilerSet makeprg=' .. escape(s:makeprg, ' ') + " Showing error in context with underlining. CompilerSet errorformat=%+G+%m " Error summary. diff --git a/runtime/compiler/pylint.vim b/runtime/compiler/pylint.vim index 93079ce61d..14e9696dbb 100644 --- a/runtime/compiler/pylint.vim +++ b/runtime/compiler/pylint.vim @@ -2,15 +2,12 @@ " Compiler: Pylint for Python " Maintainer: Daniel Moch " Last Change: 2016 May 20 +" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition) if exists("current_compiler") finish endif let current_compiler = "pylint" -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - CompilerSet makeprg=pylint\ --output-format=text\ --msg-template=\"{path}:{line}:{column}:{C}:\ [{symbol}]\ {msg}\"\ --reports=no CompilerSet errorformat=%A%f:%l:%c:%t:\ %m,%A%f:%l:\ %m,%A%f:(%l):\ %m,%-Z%p^%.%#,%-G%.%# diff --git a/runtime/compiler/pyunit.vim b/runtime/compiler/pyunit.vim index 2a4ea92b68..2368346dd2 100644 --- a/runtime/compiler/pyunit.vim +++ b/runtime/compiler/pyunit.vim @@ -2,15 +2,12 @@ " Compiler: Unit testing tool for Python " Maintainer: Max Ischenko " Last Change: 2004 Mar 27 +" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition) if exists("current_compiler") finish endif let current_compiler = "pyunit" -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - CompilerSet efm=%C\ %.%#,%A\ \ File\ \"%f\"\\,\ line\ %l%.%#,%Z%[%^\ ]%\\@=%m diff --git a/runtime/compiler/raco.vim b/runtime/compiler/raco.vim index bd10859aa9..d35d86b8c2 100644 --- a/runtime/compiler/raco.vim +++ b/runtime/compiler/raco.vim @@ -3,12 +3,9 @@ " Maintainer: D. Ben Knoble " URL: https://github.com/benknoble/vim-racket " Last Change: 2022 Aug 12 +" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition) let current_compiler = 'raco' -if exists(":CompilerSet") != 2 - command -nargs=* CompilerSet setlocal -endif - CompilerSet makeprg=raco CompilerSet errorformat=%f:%l:%c:%m diff --git a/runtime/compiler/racomake.vim b/runtime/compiler/racomake.vim index dae95fec42..bd2c327037 100644 --- a/runtime/compiler/racomake.vim +++ b/runtime/compiler/racomake.vim @@ -3,12 +3,9 @@ " Maintainer: D. Ben Knoble " URL: https://github.com/benknoble/vim-racket " Last Change: 2022 Aug 12 +" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition) let current_compiler = 'racomake' -if exists(":CompilerSet") != 2 - command -nargs=* CompilerSet setlocal -endif - CompilerSet makeprg=raco\ make\ --\ % CompilerSet errorformat=%f:%l:%c:%m diff --git a/runtime/compiler/racosetup.vim b/runtime/compiler/racosetup.vim index 1efe8a15a2..e16faf081a 100644 --- a/runtime/compiler/racosetup.vim +++ b/runtime/compiler/racosetup.vim @@ -3,12 +3,9 @@ " Maintainer: D. Ben Knoble " URL: https://github.com/benknoble/vim-racket " Last Change: 2022 Aug 12 +" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition) let current_compiler = 'racosetup' -if exists(":CompilerSet") != 2 - command -nargs=* CompilerSet setlocal -endif - CompilerSet makeprg=raco\ setup CompilerSet errorformat=%f:%l:%c:%m diff --git a/runtime/compiler/racotest.vim b/runtime/compiler/racotest.vim index d2a1a3c0f3..3ac11737d2 100644 --- a/runtime/compiler/racotest.vim +++ b/runtime/compiler/racotest.vim @@ -3,12 +3,9 @@ " Maintainer: D. Ben Knoble " URL: https://github.com/benknoble/vim-racket " Last Change: 2022 Aug 12 +" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition) let current_compiler = 'racotest' -if exists(":CompilerSet") != 2 - command -nargs=* CompilerSet setlocal -endif - CompilerSet makeprg=raco\ test\ % CompilerSet errorformat=location:%f:%l:%c diff --git a/runtime/compiler/rake.vim b/runtime/compiler/rake.vim index 3d11a31f89..5b3c7f4092 100644 --- a/runtime/compiler/rake.vim +++ b/runtime/compiler/rake.vim @@ -4,16 +4,13 @@ " URL: https://github.com/vim-ruby/vim-ruby " Release Coordinator: Doug Kearns " Last Change: 2018 Mar 02 +" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition) if exists("current_compiler") finish endif let current_compiler = "rake" -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - let s:cpo_save = &cpo set cpo-=C diff --git a/runtime/compiler/rhino.vim b/runtime/compiler/rhino.vim index 30f3dd3252..b6fc9c8d8c 100644 --- a/runtime/compiler/rhino.vim +++ b/runtime/compiler/rhino.vim @@ -1,17 +1,13 @@ " Vim compiler file " Compiler: Rhino Shell (JavaScript in Java) " Maintainer: Doug Kearns -" Last Change: 2019 Jul 10 +" Last Change: 2024 Apr 03 if exists("current_compiler") finish endif let current_compiler = "rhino" -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - let s:cpo_save = &cpo set cpo&vim diff --git a/runtime/compiler/rime_deployer.vim b/runtime/compiler/rime_deployer.vim new file mode 100644 index 0000000000..e0c8daef6e --- /dev/null +++ b/runtime/compiler/rime_deployer.vim @@ -0,0 +1,30 @@ +" Vim Compiler File +" Language: rime_deployer +" Maintainer: Wu, Zhenyu +" URL: https://rime.im +" Latest Revision: 2024-04-09 + +if exists('b:current_compiler') + finish +endif +let b:current_compiler = 'rime_deployer' + +let s:save_cpoptions = &cpoptions +set cpoptions&vim + +" Android Termux +let s:prefix = getenv('PREFIX') +if s:prefix == v:null + let s:prefix = '/usr' +endif +" Android, NixOS, GNU/Linux, BSD +for s:shared_data_dir in ['/sdcard/rime-data', '/run/current-system/sw/share/rime-data', '/usr/local/share/rime-data', s:prefix . '/share/rime-data'] + if isdirectory(s:shared_data_dir) + break + endif +endfor +execute 'CompilerSet makeprg=rime_deployer\ --build\ %:p:h:S\' s:shared_data_dir +unlet s:prefix s:shared_data_dir + +let &cpoptions = s:save_cpoptions +unlet s:save_cpoptions diff --git a/runtime/compiler/rspec.vim b/runtime/compiler/rspec.vim index 0cfce04572..ee848f703a 100644 --- a/runtime/compiler/rspec.vim +++ b/runtime/compiler/rspec.vim @@ -4,16 +4,13 @@ " URL: https://github.com/vim-ruby/vim-ruby " Release Coordinator: Doug Kearns " Last Change: 2018 Aug 07 +" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition) if exists("current_compiler") finish endif let current_compiler = "rspec" -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - let s:cpo_save = &cpo set cpo-=C diff --git a/runtime/compiler/rst.vim b/runtime/compiler/rst.vim index 392bea6ae0..72b6a58b67 100644 --- a/runtime/compiler/rst.vim +++ b/runtime/compiler/rst.vim @@ -2,7 +2,8 @@ " Compiler: sphinx >= 1.0.8, http://www.sphinx-doc.org " Description: reStructuredText Documentation Format " Previous Maintainer: Nikolai Weibull -" Latest Revision: 2017-03-31 +" Last Change: 2017 Mar 31 +" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition) if exists("current_compiler") finish @@ -12,10 +13,6 @@ let current_compiler = "rst" let s:cpo_save = &cpo set cpo&vim -if exists(":CompilerSet") != 2 - command -nargs=* CompilerSet setlocal -endif - CompilerSet errorformat= \%f\\:%l:\ %tEBUG:\ %m, \%f\\:%l:\ %tNFO:\ %m, diff --git a/runtime/compiler/rubocop.vim b/runtime/compiler/rubocop.vim index 7764b4ad20..9d2f01499f 100644 --- a/runtime/compiler/rubocop.vim +++ b/runtime/compiler/rubocop.vim @@ -1,17 +1,13 @@ " Vim compiler file " Compiler: RuboCop " Maintainer: Doug Kearns -" Last Change: 2019 Jul 10 +" Last Change: 2024 Apr 03 if exists("current_compiler") finish endif let current_compiler = "rubocop" -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - let s:cpo_save = &cpo set cpo&vim diff --git a/runtime/compiler/ruby.vim b/runtime/compiler/ruby.vim index 82d4d1c876..70dff5bf24 100644 --- a/runtime/compiler/ruby.vim +++ b/runtime/compiler/ruby.vim @@ -5,16 +5,13 @@ " URL: https://github.com/vim-ruby/vim-ruby " Release Coordinator: Doug Kearns " Last Change: 2019 Jan 06 +" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition) if exists("current_compiler") finish endif let current_compiler = "ruby" -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - let s:cpo_save = &cpo set cpo-=C diff --git a/runtime/compiler/rubyunit.vim b/runtime/compiler/rubyunit.vim index 48e8fa41ab..e59873fa21 100644 --- a/runtime/compiler/rubyunit.vim +++ b/runtime/compiler/rubyunit.vim @@ -4,16 +4,13 @@ " URL: https://github.com/vim-ruby/vim-ruby " Release Coordinator: Doug Kearns " Last Change: 2014 Mar 23 +" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition) if exists("current_compiler") finish endif let current_compiler = "rubyunit" -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - let s:cpo_save = &cpo set cpo-=C diff --git a/runtime/compiler/rustc.vim b/runtime/compiler/rustc.vim index efcf24ed80..b3c8091987 100644 --- a/runtime/compiler/rustc.vim +++ b/runtime/compiler/rustc.vim @@ -14,10 +14,6 @@ let s:save_cpo = &cpo set cpo&vim " vint: +ProhibitAbbreviationOption -if exists(":CompilerSet") != 2 - command -nargs=* CompilerSet setlocal -endif - if get(g:, 'rustc_makeprg_no_percent', 0) CompilerSet makeprg=rustc else diff --git a/runtime/compiler/sass.vim b/runtime/compiler/sass.vim index 9c540ac443..d0ed65cfa5 100644 --- a/runtime/compiler/sass.vim +++ b/runtime/compiler/sass.vim @@ -2,16 +2,13 @@ " Compiler: Sass " Maintainer: Tim Pope " Last Change: 2016 Aug 29 +" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition) if exists("current_compiler") finish endif let current_compiler = "sass" -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - let s:cpo_save = &cpo set cpo-=C diff --git a/runtime/compiler/scdoc.vim b/runtime/compiler/scdoc.vim index c37969f89c..364ddc179c 100644 --- a/runtime/compiler/scdoc.vim +++ b/runtime/compiler/scdoc.vim @@ -2,6 +2,7 @@ " Compiler: scdoc " Maintainer: Gregory Anders " Last Updated: 2019-10-24 +" 2024 Apr 05 by The Vim Project (removed :CompilerSet definition) " Upstream: https://github.com/gpanders/vim-scdoc if exists('current_compiler') @@ -9,9 +10,5 @@ if exists('current_compiler') endif let current_compiler = 'scdoc' -if exists(':CompilerSet') != 2 - command -nargs=* CompilerSet setlocal -endif - CompilerSet makeprg=scdoc\ <\ %\ 2>&1 CompilerSet errorformat=Error\ at\ %l:%c:\ %m,%-G%.%# diff --git a/runtime/compiler/se.vim b/runtime/compiler/se.vim index 38fd10c131..c9332277e5 100644 --- a/runtime/compiler/se.vim +++ b/runtime/compiler/se.vim @@ -1,17 +1,13 @@ " Vim compiler file " Compiler: se (Liberty Eiffel Compiler) " Maintainer: Doug Kearns -" Last Change: 2013 Jun 29 +" Last Change: 2024 Apr 03 if exists("current_compiler") finish endif let current_compiler = "se" -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - let s:cpo_save = &cpo set cpo-=C diff --git a/runtime/compiler/shellcheck.vim b/runtime/compiler/shellcheck.vim index 7550439aa2..5eeddc69c1 100644 --- a/runtime/compiler/shellcheck.vim +++ b/runtime/compiler/shellcheck.vim @@ -1,17 +1,13 @@ " Vim compiler file " Compiler: ShellCheck " Maintainer: Doug Kearns -" Last Change: 2020 Sep 4 +" Last Change: 2024 Apr 03 if exists("current_compiler") finish endif let current_compiler = "shellcheck" -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - let s:cpo_save = &cpo set cpo&vim diff --git a/runtime/compiler/sml.vim b/runtime/compiler/sml.vim index a0b13b6c8a..e829e20e8c 100644 --- a/runtime/compiler/sml.vim +++ b/runtime/compiler/sml.vim @@ -1,17 +1,13 @@ " Vim compiler file " Compiler: SML/NJ Compiler " Maintainer: Doug Kearns -" Last Change: 2022 Feb 09 +" Last Change: 2024 Apr 03 if exists("current_compiler") finish endif let current_compiler = "sml" -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - let s:cpo_save = &cpo set cpo&vim diff --git a/runtime/compiler/spectral.vim b/runtime/compiler/spectral.vim index bd13c51f43..f1ea8653e5 100644 --- a/runtime/compiler/spectral.vim +++ b/runtime/compiler/spectral.vim @@ -2,16 +2,13 @@ " Compiler: Spectral for YAML " Maintainer: Romain Lafourcade " Last Change: 2021 July 21 +" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition) if exists("current_compiler") finish endif let current_compiler = "spectral" -if exists(":CompilerSet") != 2 - command -nargs=* CompilerSet setlocal -endif - CompilerSet makeprg=spectral\ lint\ %\ -f\ text CompilerSet errorformat=%f:%l:%c\ %t%.%\\{-}\ %m diff --git a/runtime/compiler/splint.vim b/runtime/compiler/splint.vim index 3d7ada6d1d..e00460149c 100644 --- a/runtime/compiler/splint.vim +++ b/runtime/compiler/splint.vim @@ -3,6 +3,7 @@ " Maintainer: Ralf Wildenhues " Splint Home: http://www.splint.org/ " Last Change: 2019 Jul 23 +" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition) " $Revision: 1.3 $ if exists("current_compiler") @@ -10,10 +11,6 @@ if exists("current_compiler") endif let current_compiler = "splint" -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - let s:cpo_save = &cpo set cpo-=C diff --git a/runtime/compiler/standard.vim b/runtime/compiler/standard.vim index 50b7c97ca7..fdc79ae2ba 100644 --- a/runtime/compiler/standard.vim +++ b/runtime/compiler/standard.vim @@ -2,15 +2,12 @@ " Compiler: Standard for JavaScript " Maintainer: Romain Lafourcade " Last Change: 2020 August 20 +" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition) if exists("current_compiler") finish endif let current_compiler = "standard" -if exists(":CompilerSet") != 2 - command -nargs=* CompilerSet setlocal -endif - CompilerSet makeprg=npx\ standard CompilerSet errorformat=%f:%l:%c:\ %m,%-G%.%# diff --git a/runtime/compiler/stylelint.vim b/runtime/compiler/stylelint.vim index 784a61d46a..22acea9eb0 100644 --- a/runtime/compiler/stylelint.vim +++ b/runtime/compiler/stylelint.vim @@ -1,17 +1,13 @@ " Vim compiler file " Compiler: Stylelint " Maintainer: Doug Kearns -" Last Change: 2020 Jun 10 +" Last Change: 2024 Apr 03 if exists("current_compiler") finish endif let current_compiler = "stylelint" -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - let s:cpo_save = &cpo set cpo&vim diff --git a/runtime/compiler/tcl.vim b/runtime/compiler/tcl.vim index 81af185f5e..1e6d1f39e1 100644 --- a/runtime/compiler/tcl.vim +++ b/runtime/compiler/tcl.vim @@ -1,17 +1,13 @@ " Vim compiler file " Compiler: tcl " Maintainer: Doug Kearns -" Last Change: 2004 Nov 27 +" Last Change: 2024 Apr 03 if exists("current_compiler") finish endif let current_compiler = "tcl" -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - CompilerSet makeprg=tcl CompilerSet errorformat=%EError:\ %m,%+Z\ %\\{4}(file\ \"%f\"\ line\ %l),%-G%.%# diff --git a/runtime/compiler/tex.vim b/runtime/compiler/tex.vim index 65e15cf6e2..282b3a0588 100644 --- a/runtime/compiler/tex.vim +++ b/runtime/compiler/tex.vim @@ -1,7 +1,10 @@ " Vim compiler file " Compiler: TeX " Maintainer: Artem Chuprina -" Last Change: 2012 Apr 30 +" Contributors: Enno Nagel +" Last Change: 2024 Mar 29 +" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition) +" 2024 Apr 05 by The Vim Project (avoid leaving behind g:makeprg) if exists("current_compiler") finish @@ -9,10 +12,6 @@ endif let s:keepcpo= &cpo set cpo&vim -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - " If makefile exists and we are not asked to ignore it, we use standard make " (do not redefine makeprg) if exists('b:tex_ignore_makefile') || exists('g:tex_ignore_makefile') || @@ -27,7 +26,8 @@ if exists('b:tex_ignore_makefile') || exists('g:tex_ignore_makefile') || else let current_compiler = "latex" endif - let &l:makeprg=current_compiler.' -interaction=nonstopmode' + let s:makeprg=current_compiler .. ' -interaction=nonstopmode' + execute 'CompilerSet makeprg=' .. escape(s:makeprg, ' ') else let current_compiler = 'make' endif diff --git a/runtime/compiler/tidy.vim b/runtime/compiler/tidy.vim index 3f8e68ebf2..9e72207862 100644 --- a/runtime/compiler/tidy.vim +++ b/runtime/compiler/tidy.vim @@ -1,17 +1,13 @@ " Vim compiler file " Compiler: HTML Tidy " Maintainer: Doug Kearns -" Last Change: 2020 Sep 4 +" Last Change: 2024 Apr 03 if exists("current_compiler") finish endif let current_compiler = "tidy" -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - let s:cpo_save = &cpo set cpo&vim diff --git a/runtime/compiler/ts-node.vim b/runtime/compiler/ts-node.vim index 14f0ea790c..1b46d3bf5a 100644 --- a/runtime/compiler/ts-node.vim +++ b/runtime/compiler/ts-node.vim @@ -1,17 +1,13 @@ " Vim compiler file " Compiler: TypeScript Runner " Maintainer: Doug Kearns -" Last Change: 2020 Feb 10 +" Last Change: 2024 Apr 03 if exists("current_compiler") finish endif let current_compiler = "node" -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - let s:cpo_save = &cpo set cpo&vim diff --git a/runtime/compiler/tsc.vim b/runtime/compiler/tsc.vim index a246fc7751..76f525baa6 100644 --- a/runtime/compiler/tsc.vim +++ b/runtime/compiler/tsc.vim @@ -1,17 +1,13 @@ " Vim compiler file " Compiler: TypeScript Compiler " Maintainer: Doug Kearns -" Last Change: 2020 Feb 10 +" Last Change: 2024 Apr 03 if exists("current_compiler") finish endif let current_compiler = "tsc" -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - let s:cpo_save = &cpo set cpo&vim diff --git a/runtime/compiler/typedoc.vim b/runtime/compiler/typedoc.vim index 3be06f3d4e..7a152e85fd 100644 --- a/runtime/compiler/typedoc.vim +++ b/runtime/compiler/typedoc.vim @@ -1,17 +1,13 @@ " Vim compiler file " Compiler: TypeDoc " Maintainer: Doug Kearns -" Last Change: 2020 Feb 10 +" Last Change: 2024 Apr 03 if exists("current_compiler") finish endif let current_compiler = "typedoc" -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - let s:cpo_save = &cpo set cpo&vim diff --git a/runtime/compiler/vimdoc.vim b/runtime/compiler/vimdoc.vim new file mode 100644 index 0000000000..a30355f855 --- /dev/null +++ b/runtime/compiler/vimdoc.vim @@ -0,0 +1,20 @@ +" Vim Compiler File +" Language: vimdoc +" Maintainer: Wu, Zhenyu +" Latest Revision: 2024-04-13 +" +" If you can not find 'vimdoc' in the package manager of your distribution e.g +" 'pip', then you may need to build it from its source. + +if exists('b:current_compiler') + finish +endif +let b:current_compiler = 'vimdoc' + +let s:save_cpoptions = &cpoptions +set cpoptions&vim + +CompilerSet makeprg=vimdoc + +let &cpoptions = s:save_cpoptions +unlet s:save_cpoptions diff --git a/runtime/compiler/xbuild.vim b/runtime/compiler/xbuild.vim index b508a4616a..42c7c65f53 100644 --- a/runtime/compiler/xbuild.vim +++ b/runtime/compiler/xbuild.vim @@ -2,6 +2,7 @@ " Compiler: Mono C# " Maintainer: Chiel ten Brinke (ctje92@gmail.com) " Last Change: 2013 May 13 +" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition) if exists("current_compiler") finish @@ -11,10 +12,6 @@ let current_compiler = "xbuild" let s:keepcpo= &cpo set cpo&vim -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - CompilerSet errorformat=\ %#%f(%l\\\,%c):\ %m CompilerSet makeprg=xbuild\ /nologo\ /v:q\ /property:GenerateFullPaths=true diff --git a/runtime/compiler/xmllint.vim b/runtime/compiler/xmllint.vim index 79d38b4d14..16eebb45ce 100644 --- a/runtime/compiler/xmllint.vim +++ b/runtime/compiler/xmllint.vim @@ -1,17 +1,13 @@ " Vim compiler file " Compiler: Libxml2 Command-Line Tool " Maintainer: Doug Kearns -" Last Change: 2020 Jul 30 +" Last Change: 2024 Apr 03 if exists("current_compiler") finish endif let current_compiler = "xmllint" -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - let s:cpo_save = &cpo set cpo&vim diff --git a/runtime/compiler/xmlwf.vim b/runtime/compiler/xmlwf.vim index 3de9d08d55..2e38ca4aba 100644 --- a/runtime/compiler/xmlwf.vim +++ b/runtime/compiler/xmlwf.vim @@ -2,6 +2,7 @@ " Compiler: xmlwf " Maintainer: Robert Rowsome " Last Change: 2019 Jul 23 +" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition) if exists("current_compiler") finish @@ -11,10 +12,6 @@ let current_compiler = "xmlwf" let s:cpo_save = &cpo set cpo&vim -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - CompilerSet makeprg=xmlwf\ %:S CompilerSet errorformat=%f:%l%c:%m diff --git a/runtime/compiler/xo.vim b/runtime/compiler/xo.vim index 525657d4bb..74804ca6d0 100644 --- a/runtime/compiler/xo.vim +++ b/runtime/compiler/xo.vim @@ -1,17 +1,13 @@ " Vim compiler file " Compiler: XO " Maintainer: Doug Kearns -" Last Change: 2019 Jul 10 +" Last Change: 2024 Apr 03 if exists("current_compiler") finish endif let current_compiler = "xo" -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - let s:cpo_save = &cpo set cpo&vim diff --git a/runtime/compiler/yamllint.vim b/runtime/compiler/yamllint.vim index 889b04b63c..88e2efb27a 100644 --- a/runtime/compiler/yamllint.vim +++ b/runtime/compiler/yamllint.vim @@ -2,15 +2,12 @@ " Compiler: Yamllint for YAML " Maintainer: Romain Lafourcade " Last Change: 2021 July 21 +" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition) if exists("current_compiler") finish endif let current_compiler = "yamllint" -if exists(":CompilerSet") != 2 - command -nargs=* CompilerSet setlocal -endif - CompilerSet makeprg=yamllint\ -f\ parsable diff --git a/runtime/compiler/zig.vim b/runtime/compiler/zig.vim index 2cc6831329..44014a3775 100644 --- a/runtime/compiler/zig.vim +++ b/runtime/compiler/zig.vim @@ -10,10 +10,6 @@ let current_compiler = "zig" let s:save_cpo = &cpo set cpo&vim -if exists(":CompilerSet") != 2 - command -nargs=* CompilerSet setlocal -endif - " a subcommand must be provided for the this compiler (test, build-exe, etc) if has('patch-7.4.191') CompilerSet makeprg=zig\ \$*\ \%:S diff --git a/runtime/compiler/zig_build.vim b/runtime/compiler/zig_build.vim index 0441267b64..5a61c9f423 100644 --- a/runtime/compiler/zig_build.vim +++ b/runtime/compiler/zig_build.vim @@ -1,6 +1,7 @@ " Vim compiler file " Compiler: Zig Compiler (zig build) " Upstream: https://github.com/ziglang/zig.vim +" Last Change: 2024 Apr 05 by The Vim Project (removed :CompilerSet definition) if exists('current_compiler') finish @@ -11,11 +12,6 @@ let current_compiler = 'zig_build' let s:save_cpo = &cpo set cpo&vim - -if exists(':CompilerSet') != 2 - command -nargs=* CompilerSet setlocal -endif - if exists('g:zig_build_makeprg_params') execute 'CompilerSet makeprg=zig\ build\ '.escape(g:zig_build_makeprg_params, ' \|"').'\ $*' else diff --git a/runtime/compiler/zig_build_exe.vim b/runtime/compiler/zig_build_exe.vim index 20f0bb3366..259d0e267b 100644 --- a/runtime/compiler/zig_build_exe.vim +++ b/runtime/compiler/zig_build_exe.vim @@ -1,6 +1,7 @@ " Vim compiler file " Compiler: Zig Compiler (zig build-exe) " Upstream: https://github.com/ziglang/zig.vim +" Last Change: 2024 Apr 05 by The Vim Project (removed :CompilerSet definition) if exists('current_compiler') finish @@ -11,11 +12,6 @@ let current_compiler = 'zig_build_exe' let s:save_cpo = &cpo set cpo&vim - -if exists(':CompilerSet') != 2 - command -nargs=* CompilerSet setlocal -endif - if has('patch-7.4.191') CompilerSet makeprg=zig\ build-exe\ \%:S\ \$* else diff --git a/runtime/compiler/zig_test.vim b/runtime/compiler/zig_test.vim index a82d2a6378..dafeb6f1e3 100644 --- a/runtime/compiler/zig_test.vim +++ b/runtime/compiler/zig_test.vim @@ -1,6 +1,7 @@ " Vim compiler file " Compiler: Zig Compiler (zig test) " Upstream: https://github.com/ziglang/zig.vim +" Last Change: 2024 Apr 05 by The Vim Project (removed :CompilerSet definition) if exists('current_compiler') finish @@ -11,11 +12,6 @@ let current_compiler = 'zig_test' let s:save_cpo = &cpo set cpo&vim - -if exists(':CompilerSet') != 2 - command -nargs=* CompilerSet setlocal -endif - if has('patch-7.4.191') CompilerSet makeprg=zig\ test\ \%:S\ \$* else diff --git a/runtime/compiler/zsh.vim b/runtime/compiler/zsh.vim index 5703c1fc44..bd195582c1 100644 --- a/runtime/compiler/zsh.vim +++ b/runtime/compiler/zsh.vim @@ -1,17 +1,13 @@ " Vim compiler file " Compiler: Zsh " Maintainer: Doug Kearns -" Last Change: 2020 Sep 6 +" Last Change: 2024 Apr 03 if exists("current_compiler") finish endif let current_compiler = "zsh" -if exists(":CompilerSet") != 2 " older Vim always used :setlocal - command -nargs=* CompilerSet setlocal -endif - let s:cpo_save = &cpo set cpo&vim diff --git a/runtime/doc/Make_mvc.mak b/runtime/doc/Make_mvc.mak index 850d86bb74..f2fbc52ed5 100644 --- a/runtime/doc/Make_mvc.mak +++ b/runtime/doc/Make_mvc.mak @@ -1,7 +1,7 @@ # # Makefile for the Vim documentation on Windows # -# 17.11.23, Restorer, +# 20.03.24, Restorer, # Common components !INCLUDE Make_all.mak @@ -23,7 +23,7 @@ ICONV_PATH = D:\Programs\GetText\bin # If the "touch" program is installed on the system, but it is not registered # in the %PATH% environment variable, then specify the full path to this file. !IF EXIST ("touch.exe") -TOUCH = "touch.exe" %1 +TOUCH = touch.exe %1 !ELSE TOUCH = if exist %1 ( copy /b %1+,, ) else ( type nul >%1 ) !ENDIF @@ -33,7 +33,7 @@ TOUCH = if exist %1 ( copy /b %1+,, ) else ( type nul >%1 ) # If the "iconv" program is installed on the system, but it is not registered # in the %PATH% environment variable, then specify the full path to this file. !IF EXIST ("iconv.exe") -ICONV = "iconv.exe" +ICONV = iconv.exe !ELSEIF EXIST ("$(ICONV_PATH)\iconv.exe") ICONV = "$(ICONV_PATH)\iconv.exe" !ENDIF @@ -53,8 +53,8 @@ all : tags perlhtml $(CONVERTED) tags : doctags $(DOCS) doctags.exe $(DOCS) | sort /L C /O tags $(PS) $(PSFLAGS) \ - (Get-Content -Raw tags ^| Get-Unique ^| %%{$$_ -replace \"`r\", \"\"})\ - ^| New-Item -Force -Path . -ItemType file -Name tags + (Get-Content -Raw tags ^| Get-Unique ^| %%{$$_ -replace \"`r\", \"\"}) \ + ^| New-Item -Path . -Force -ItemType file -Name tags doctags : doctags.c $(CC) doctags.c @@ -67,13 +67,12 @@ vimtags : $(DOCS) uganda.nsis.txt : uganda.??? - !@$(PS) $(PSFLAGS) $$ext=(Get-Item $?).Extension; (Get-Content $? ^| \ - %%{$$_ -replace '\s*\*[-a-zA-Z0-9.]*\*', '' -replace 'vim:tw=78:.*', ''})\ - ^| Set-Content $*$$ext - !@$(PS) $(PSFLAGS) $$ext=(Get-Item $?).Extension; \ - (Get-Content -Raw $(@B)$$ext).Trim() -replace '(\r\n){3,}', '$$1$$1' \ - ^| Set-Content $(@B)$$ext - + ! $(PS) $(PSFLAGS) (Get-Content $? -Encoding UTF8 \ + ^| %%{$$_ -replace '[\t\s]*\*.*\*', '' -replace 'vim:tw=\d\d:.*', ''}) \ + ^| Set-Content \"$(@B)$$((Get-Item $?).Extension)\" -Encoding Unicode + ! $(PS) $(PSFLAGS)\ + (Get-Content $(@B)$$((Get-Item $?).Extension) -Raw).Trim() -replace '(\r\n){3,}', '$$1$$1' \ + ^| Set-Content \"$(@B)$$((Get-Item $?).Extension)\" -Encoding Unicode # TODO: #html: noerrors tags $(HTMLS) diff --git a/runtime/doc/Makefile b/runtime/doc/Makefile index eecce55a78..30a4f08bd7 100644 --- a/runtime/doc/Makefile +++ b/runtime/doc/Makefile @@ -50,9 +50,15 @@ vimtutor.man: vimtutor.1 xxd.man: xxd.1 nroff -man $< | sed -e s/.//g > $@ -uganda.nsis.txt: uganda.txt - sed -e 's/[ ]*\*[-a-zA-Z0-9.]*\*//g' -e 's/vim:tw=78:.*//' \ - uganda.txt | uniq >uganda.nsis.txt +uganda.nsis.txt : uganda.??? + for dpn in $?; do \ + trg=$@; \ + sed -e 's/[ ]*\*.*\*//g' -e 's/vim:tw=[[:digit:]][[:digit:]]:.*//' \ + $${dpn} | uniq > $${trg%txt}$${dpn##*.}; \ + done +# This files needs to be in dos fileformat for NSIS. + $(VIMEXE) -e -X -u NONE --cmd "set notitle noicon nocp noml viminfo=" \ + -c "argdo write ++ff=dos" -c "qa" uganda.nsis.??? # Awk version of .txt to .html conversion. html: noerrors tags $(HTMLS) diff --git a/runtime/doc/autocmd.txt b/runtime/doc/autocmd.txt index 5e2ab65f57..16d162a1ff 100644 --- a/runtime/doc/autocmd.txt +++ b/runtime/doc/autocmd.txt @@ -1,4 +1,4 @@ -*autocmd.txt* For Vim version 9.1. Last change: 2024 Jan 25 +*autocmd.txt* For Vim version 9.1. Last change: 2024 Mar 26 VIM REFERENCE MANUAL by Bram Moolenaar @@ -430,6 +430,9 @@ Name triggered by ~ |SessionLoadPost| after loading a session file +|SessionWritePost| After writing the session file using + the |:mksession| command. + |MenuPopup| just before showing the popup menu |CompleteChanged| after Insert mode completion menu changed |CompleteDonePre| after Insert mode completion is done, before clearing @@ -1122,6 +1125,9 @@ SafeStateAgain Like SafeState but after processing any *SessionLoadPost* SessionLoadPost After loading the session file created using + the |:mksession| command. + *SessionWritePost* +SessionWritePost After writing a session file by calling the |:mksession| command. *ShellCmdPost* ShellCmdPost After executing a shell command with |:!cmd|, diff --git a/runtime/doc/builtin.txt b/runtime/doc/builtin.txt index 0cd023c1a8..d156579f46 100644 --- a/runtime/doc/builtin.txt +++ b/runtime/doc/builtin.txt @@ -1,4 +1,4 @@ -*builtin.txt* For Vim version 9.1. Last change: 2024 Feb 01 +*builtin.txt* For Vim version 9.1. Last change: 2024 Apr 07 VIM REFERENCE MANUAL by Bram Moolenaar @@ -220,12 +220,12 @@ getbufvar({buf}, {varname} [, {def}]) any variable {varname} in buffer {buf} getcellwidths() List get character cell width overrides getchangelist([{buf}]) List list of change list items -getchar([expr]) Number or String +getchar([{expr}]) Number or String get one character from the user getcharmod() Number modifiers for the last typed character getcharpos({expr}) List position of cursor, mark, etc. getcharsearch() Dict last character search -getcharstr([expr]) String get one character from the user +getcharstr([{expr}]) String get one character from the user getcmdcompltype() String return the type of the current command-line completion getcmdline() String return the current command-line @@ -263,6 +263,8 @@ getqflist({what}) Dict get specific quickfix list properties getreg([{regname} [, 1 [, {list}]]]) String or List contents of a register getreginfo([{regname}]) Dict information about a register +getregion({pos1}, {pos2} [, {opts}]) + List get the text from {pos1} to {pos2} getregtype([{regname}]) String type of a register getscriptinfo([{opts}]) List list of sourced scripts gettabinfo([{expr}]) List list of tab pages @@ -396,7 +398,7 @@ menu_info({name} [, {mode}]) Dict get menu item information min({expr}) Number minimum value of items in {expr} mkdir({name} [, {flags} [, {prot}]]) Number create directory {name} -mode([expr]) String current editing mode +mode([{expr}]) String current editing mode mzeval({expr}) any evaluate |MzScheme| expression nextnonblank({lnum}) Number line nr of non-blank line >= {lnum} nr2char({expr} [, {utf8}]) String single char with ASCII/UTF-8 value {expr} @@ -699,7 +701,7 @@ test_override({expr}, {val}) none test with Vim internal overrides test_refcount({expr}) Number get the reference count of {expr} test_setmouse({row}, {col}) none set the mouse position for testing test_settime({expr}) none set current time for testing -test_srand_seed([seed]) none set seed for testing srand() +test_srand_seed([{seed}]) none set seed for testing srand() test_unknown() any unknown value for testing test_void() any void value for testing timer_info([{id}]) List information about timers @@ -729,7 +731,7 @@ virtcol({expr} [, {list} [, {winid}]) screen column of cursor or mark virtcol2col({winid}, {lnum}, {col}) Number byte index of a character on screen -visualmode([expr]) String last visual mode used +visualmode([{expr}]) String last visual mode used wildmenumode() Number whether 'wildmenu' mode is active win_execute({id}, {command} [, {silent}]) String execute {command} in window {id} @@ -1771,7 +1773,7 @@ confirm({msg} [, {choices} [, {default} [, {type}]]]) made. It returns the number of the choice. For the first choice this is 1. Note: confirm() is only supported when compiled with dialog - support, see |+dialog_con| and |+dialog_gui|. + support, see |+dialog_con| |+dialog_con_gui| and |+dialog_gui|. {msg} is displayed in a |dialog| with {choices} as the alternatives. When {choices} is missing or empty, "&OK" is @@ -2076,26 +2078,31 @@ diff({fromlist}, {tolist} [, {options}]) *diff()* The {options} Dict argument also specifies diff options (similar to 'diffopt') and supports the following items: + algorithm Dict specifying the diff algorithm to + use. Supported boolean items are + "myers", "minimal", "patience" and + "histogram". + context diff context length. Default is 0. iblank ignore changes where lines are all blank. icase ignore changes in case of text. + indent-heuristic use the indent heuristic for the + internal diff library. iwhite ignore changes in amount of white space. iwhiteall ignore all white space changes. iwhiteeol ignore white space changes at end of line. - indent-heuristic use the indent heuristic for the - internal diff library. - algorithm Dict specifying the diff algorithm to - use. Supported boolean items are - "myers", "minimal", "patience" and - "histogram". For more information about these options, refer to 'diffopt'. + To compute the unified diff, all the items in {fromlist} are + concatenated into a string using a newline separator and the + same for {tolist}. The unified diff output uses line numbers. + Returns an empty List or String if {fromlist} and {tolist} are identical. - Examples: + Examples: > :echo diff(['abc'], ['xxx']) @@ -1 +1 @@ -abc @@ -2105,7 +2112,7 @@ diff({fromlist}, {tolist} [, {options}]) *diff()* [{'from_idx': 0, 'from_count': 1, 'to_idx': 0, 'to_count': 1}] :echo diff(readfile('oldfile'), readfile('newfile')) :echo diff(getbufline(5, 1, '$'), getbufline(6, 1, '$')) - +< For more examples, refer to |diff-func-examples| Can also be used as a |method|: > @@ -2260,6 +2267,8 @@ empty({expr}) *empty()* - A |Job| is empty when it failed to start. - A |Channel| is empty when it is closed. - A |Blob| is empty when its length is zero. + - An |Object| is empty, when the empty() method in the object + (if present) returns true. |object-empty()| For a long |List| this is much faster than comparing the length with zero. @@ -2300,7 +2309,8 @@ eval({string}) Evaluate {string} and return the result. Especially useful to turn the result of |string()| back into the original value. This works for Numbers, Floats, Strings, Blobs and composites of them. Also works for |Funcref|s that refer to existing - functions. + functions. In |Vim9| script, it can be used to obtain |enum| + values from their fully qualified names. Can also be used as a |method|: > argv->join()->eval() @@ -2400,11 +2410,11 @@ exists({expr}) The result is a Number, which is |TRUE| if {expr} is defined, varname internal variable (see dict.key |internal-variables|). Also works list[i] for |curly-braces-names|, |Dictionary| - import.Func entries, |List| items, imported - items, etc. - Does not work for local variables in a - compiled `:def` function. - Also works for a function in |Vim9| + import.Func entries, |List| items, class and + class.Func object methods, imported items, etc. + object.Func Does not work for local variables in a + class.varname compiled `:def` function. + object.varname Also works for a function in |Vim9| script, since it can be used as a function reference. Beware that evaluating an index may @@ -2535,6 +2545,9 @@ expand({string} [, {nosuf} [, {list}]]) *expand()* for a non-existing file is not included, unless {string} does not start with '%', '#' or '<', see below. + For a |:terminal| window '%' expands to a '!' followed by + the command or shell that is run |terminal-bufname| + When {string} starts with '%', '#' or '<', the expansion is done like for the |cmdline-special| variables with their associated modifiers. Here is a short overview: @@ -3444,16 +3457,16 @@ getchangelist([{buf}]) *getchangelist()* Can also be used as a |method|: > GetBufnr()->getchangelist() -getchar([expr]) *getchar()* +getchar([{expr}]) *getchar()* Get a single character from the user or input stream. - If [expr] is omitted, wait until a character is available. - If [expr] is 0, only get a character when one is available. + If {expr} is omitted, wait until a character is available. + If {expr} is 0, only get a character when one is available. Return zero otherwise. - If [expr] is 1, only check if a character is available, it is + If {expr} is 1, only check if a character is available, it is not consumed. Return zero if no character available. If you prefer always getting a string use |getcharstr()|. - Without [expr] and when [expr] is 0 a whole character or + Without {expr} and when {expr} is 0 a whole character or special key is returned. If it is a single character, the result is a Number. Use |nr2char()| to convert it to a String. Otherwise a String is returned with the encoded character. @@ -3463,11 +3476,11 @@ getchar([expr]) *getchar()* also a String when a modifier (shift, control, alt) was used that is not included in the character. - When [expr] is 0 and Esc is typed, there will be a short delay + When {expr} is 0 and Esc is typed, there will be a short delay while Vim waits to see if this is the start of an escape sequence. - When [expr] is 1 only the first byte is returned. For a + When {expr} is 1 only the first byte is returned. For a one-byte character it is the character itself as a number. Use nr2char() to convert it to a String. @@ -3578,13 +3591,13 @@ getcharsearch() *getcharsearch()* < Also see |setcharsearch()|. -getcharstr([expr]) *getcharstr()* +getcharstr([{expr}]) *getcharstr()* Get a single character from the user or input stream as a string. - If [expr] is omitted, wait until a character is available. - If [expr] is 0 or false, only get a character when one is + If {expr} is omitted, wait until a character is available. + If {expr} is 0 or false, only get a character when one is available. Return an empty string otherwise. - If [expr] is 1 or true, only check if a character is + If {expr} is 1 or true, only check if a character is available, it is not consumed. Return an empty string if no character is available. Otherwise this works like |getchar()|, except that a number @@ -4263,6 +4276,59 @@ getreginfo([{regname}]) *getreginfo()* Can also be used as a |method|: > GetRegname()->getreginfo() +getregion({pos1}, {pos2} [, {opts}]) *getregion()* + Returns the list of strings from {pos1} to {pos2} from a + buffer. + + {pos1} and {pos2} must both be |List|s with four numbers. + See |getpos()| for the format of the list. It's possible + to specify positions from a different buffer, but please + note the limitations at |getregion-notes|. + + The optional argument {opts} is a Dict and supports the + following items: + + type Specify the region's selection type + (default: "v"): + "v" for |characterwise| mode + "V" for |linewise| mode + "" for |blockwise-visual| mode + + exclusive If |TRUE|, use exclusive selection + for the end position + (default: follow 'selection') + + You can get the last selection type by |visualmode()|. + If Visual mode is active, use |mode()| to get the Visual mode + (e.g., in a |:vmap|). + This function is useful to get text starting and ending in + different columns, such as a |characterwise-visual| selection. + + *getregion-notes* + Note that: + - Order of {pos1} and {pos2} doesn't matter, it will always + return content from the upper left position to the lower + right position. + - If 'virtualedit' is enabled and the region is past the end + of the lines, resulting lines are padded with spaces. + - If the region is blockwise and it starts or ends in the + middle of a multi-cell character, it is not included but + its selected part is substituted with spaces. + - If {pos1} and {pos2} are not in the same buffer, an empty + list is returned. + - {pos1} and {pos2} must belong to a |bufloaded()| buffer. + - It is evaluated in current window context, which makes a + difference if the buffer is displayed in a window with + different 'virtualedit' or 'list' values. + + Examples: > + :xnoremap + \ echow getregion( + \ getpos('v'), getpos('.'), #{ type: mode() }) +< + Can also be used as a |method|: > + getpos('.')->getregion(getpos("'a")) +< getregtype([{regname}]) *getregtype()* The result is a String, which is type of register {regname}. The value will be one of: @@ -5422,7 +5488,9 @@ len({expr}) The result is a Number, which is the length of the argument. When {expr} is a |Blob| the number of bytes is returned. When {expr} is a |Dictionary| the number of entries in the |Dictionary| is returned. - Otherwise an error is given and returns zero. + When {expr} is an |Object|, invokes the len() method in the + object (if present) to get the length (|object-len()|). + Otherwise returns zero. Can also be used as a |method|: > mylist->len() @@ -6043,6 +6111,7 @@ match({expr}, {pat} [, {start} [, {count}]]) *match()* Note that when {count} is added the way {start} works changes, see above. + *match-pattern* See |pattern| for the patterns that are accepted. The 'ignorecase' option is used to set the ignore-caseness of the pattern. 'smartcase' is NOT used. The matching is always @@ -6190,6 +6259,9 @@ matchbufline({buf}, {pat}, {lnum}, {end}, [, {dict}]) This function works only for loaded buffers. First call |bufload()| if needed. + See |match-pattern| for information about the effect of some + option settings on the pattern. + When {buf} is not a valid buffer, the buffer is not loaded or {lnum} or {end} is not valid then an error is given and an empty |List| is returned. @@ -6364,6 +6436,9 @@ matchstrlist({list}, {pat} [, {dict}]) submatches a List of submatches. Present only if "submatches" is set to v:true in {dict}. + See |match-pattern| for information about the effect of some + option settings on the pattern. + Example: > :echo matchstrlist(['tik tok'], '\<\k\+\>') [{'idx': 0, 'byteidx': 0, 'text': 'tik'}, {'idx': 0, 'byteidx': 4, 'text': 'tok'}] @@ -6575,8 +6650,8 @@ mkdir({name} [, {flags} [, {prot}]]) GetName()->mkdir() < *mode()* -mode([expr]) Return a string that indicates the current mode. - If [expr] is supplied and it evaluates to a non-zero Number or +mode([{expr}]) Return a string that indicates the current mode. + If {expr} is supplied and it evaluates to a non-zero Number or a non-empty String (|non-zero-arg|), then the full mode is returned, otherwise only the first letter is returned. Also see |state()|. @@ -7033,6 +7108,9 @@ printf({fmt}, {expr1} ...) *printf()* echo printf("%1$*2$.*3$f", 1.4142135, 6, 2) < 1.41 + You will get an overflow error |E1510|, when the field-width + or precision will result in a string longer than 6400 chars. + *E1500* You cannot mix positional and non-positional arguments: > echo printf("%s%1$s", "One", "Two") @@ -7908,6 +7986,7 @@ search({pattern} [, {flags} [, {stopline} [, {timeout} [, {skip}]]]]) When a match has been found its line number is returned. If there is no match a 0 is returned and the cursor doesn't move. No error message is given. + To get the matched string, use |matchbufline()|. {flags} is a String, which can contain these character flags: 'b' search Backward instead of forward @@ -9014,7 +9093,8 @@ slice({expr}, {start} [, {end}]) *slice()* Similar to using a |slice| "expr[start : end]", but "end" is used exclusive. And for a string the indexes are used as character indexes instead of byte indexes, like in - |vim9script|. Also, composing characters are not counted. + |vim9script|. Also, composing characters are treated as a + part of the preceding base character. When {end} is omitted the slice continues to the last item. When {end} is -1 the last item is omitted. Returns an empty value if {start} or {end} are invalid. @@ -9411,8 +9491,8 @@ strcharpart({src}, {start} [, {len} [, {skipcc}]]) *strcharpart()* of byte index and length. When {skipcc} is omitted or zero, composing characters are counted separately. - When {skipcc} set to 1, Composing characters are ignored, - similar to |slice()|. + When {skipcc} set to 1, composing characters are treated as a + part of the preceding base character, similar to |slice()|. When a character index is used where a character does not exist it is omitted and counted as one character. For example: > @@ -9430,7 +9510,7 @@ strchars({string} [, {skipcc}]) *strchars()* in String {string}. When {skipcc} is omitted or zero, composing characters are counted separately. - When {skipcc} set to 1, Composing characters are ignored. + When {skipcc} set to 1, composing characters are ignored. |strcharlen()| always does this. Returns zero on error. @@ -9543,11 +9623,17 @@ string({expr}) Return {expr} converted to a String. If {expr} is a Number, Dictionary {key: value, key: value} Class class SomeName Object object of SomeName {lnum: 1, col: 3} + Enum enum EnumName + EnumValue enum name.value {name: str, ordinal: nr} When a |List| or |Dictionary| has a recursive reference it is replaced by "[...]" or "{...}". Using eval() on the result will then fail. + For an object, invokes the string() method to get a textual + representation of the object. If the method is not present, + then the default representation is used. |object-string()| + Can also be used as a |method|: > mylist->string() @@ -10402,6 +10488,8 @@ type({expr}) The result is a Number representing the type of {expr}. Class: 12 |v:t_class| Object: 13 |v:t_object| Typealias: 14 |v:t_typealias| + Enum: 15 |v:t_enum| + EnumValue: 16 |v:t_enumvalue| For backward compatibility, this method can be used: > :if type(myvar) == type(0) :if type(myvar) == type("") @@ -10774,17 +10862,16 @@ win_screenpos({nr}) *win_screenpos()* [1, 1], unless there is a tabline, then it is [2, 1]. {nr} can be the window number or the |window-ID|. Use zero for the current window. - Returns [0, 0] if the window cannot be found in the current - tabpage. + Returns [0, 0] if the window cannot be found. Can also be used as a |method|: > GetWinid()->win_screenpos() < win_splitmove({nr}, {target} [, {options}]) *win_splitmove()* - Move the window {nr} to a new split of the window {target}. - This is similar to moving to {target}, creating a new window - using |:split| but having the same contents as window {nr}, and - then closing {nr}. + Temporarily switch to window {target}, then move window {nr} + to a new split adjacent to {target}. + Unlike commands such as |:split|, no new windows are created + (the |window-ID| of window {nr} is unchanged after the move). Both {nr} and {target} can be window numbers or |window-ID|s. Both must be in the current tab page. @@ -10893,7 +10980,9 @@ winnr([{arg}]) The result is a Number, which is the number of the current # the number of the last accessed window (where |CTRL-W_p| goes to). If there is no previous window or it is in another tab page 0 is - returned. + returned. May refer to the current window in + some cases (e.g. when evaluating 'statusline' + expressions). {N}j the number of the Nth window below the current window (where |CTRL-W_j| goes to). {N}k the number of the Nth window above the current @@ -11135,6 +11224,7 @@ cscope Compiled with |cscope| support. cursorbind Compiled with |'cursorbind'| (always true) debug Compiled with "DEBUG" defined. dialog_con Compiled with console dialog support. +dialog_con_gui Compiled with console and GUI dialog support. dialog_gui Compiled with GUI dialog support. diff Compiled with |vimdiff| and 'diff' support. digraphs Compiled with support for digraphs. diff --git a/runtime/doc/change.txt b/runtime/doc/change.txt index cb24f25c92..fad389b2ff 100644 --- a/runtime/doc/change.txt +++ b/runtime/doc/change.txt @@ -1,4 +1,4 @@ -*change.txt* For Vim version 9.1. Last change: 2023 Dec 19 +*change.txt* For Vim version 9.1. Last change: 2024 Apr 14 VIM REFERENCE MANUAL by Bram Moolenaar @@ -1345,8 +1345,8 @@ expression (like with the "/" command). The expression must evaluate to a String. A Number is always automatically converted to a String. For the "p" and ":put" command, if the result is a Float it's converted into a String. If the result is a List each element is -turned into a String and used as a line. A Dictionary or FuncRef results in -an error message (use string() to convert). +turned into a String and used as a line. A Dictionary is converted into a +String. A FuncRef results in an error message (use string() to convert). If the "= register is used for the "p" command, the String is split up at characters. If the String ends in a , it is regarded as a linewise diff --git a/runtime/doc/diff.txt b/runtime/doc/diff.txt index 05dd4a6be9..e3abbdeff5 100644 --- a/runtime/doc/diff.txt +++ b/runtime/doc/diff.txt @@ -510,9 +510,14 @@ between two Lists of strings are below. [{'from_idx': 1, 'from_count': 2, 'to_idx': 1, 'to_count': 0}] " disjointed changes - :echo diff(['ab', 'def', 'ghi', 'jkl'], ['abc', 'def', 'ghi', 'jk'], {'output': 'indices'}) + :echo diff(['ab', 'def', 'ghi', 'jkl'], ['abc', 'def', 'ghi', 'jk'], {'output': 'indices', 'context': 0}) [{'from_idx': 0, 'from_count': 1, 'to_idx': 0, 'to_count': 1}, {'from_idx': 3, 'from_count': 1, 'to_idx': 3, 'to_count': 1}] + + " disjointed changes with context length 1 + :echo diff(['ab', 'def', 'ghi', 'jkl'], ['abc', 'def', 'ghi', 'jk'], {'output': 'indices', 'context': 1}) + [{'from_idx': 0, 'from_count': 4, 'to_idx': 0, 'to_count': 4}] + < vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/editing.txt b/runtime/doc/editing.txt index d0f8938562..ca8f0aee85 100644 --- a/runtime/doc/editing.txt +++ b/runtime/doc/editing.txt @@ -1,4 +1,4 @@ -*editing.txt* For Vim version 9.1. Last change: 2024 Jan 14 +*editing.txt* For Vim version 9.1. Last change: 2024 Apr 12 VIM REFERENCE MANUAL by Bram Moolenaar @@ -658,9 +658,12 @@ list of the current window. :[count]arge[dit][!] [++opt] [+cmd] {name} .. *:arge* *:argedit* Add {name}s to the argument list and edit it. - When {name} already exists in the argument list, this - entry is edited. - This is like using |:argadd| and then |:edit|. + There is no check for duplicates, it is possible to + add a file to the argument list twice |:argded|. + This is like using |:argadd| and then |:edit| (with + the small exception that |:edit| does not change the + argument list, so the argument list pointer isn't + changed). Spaces in filenames have to be escaped with "\". [count] is used like with |:argadd|. If the current file cannot be |abandon|ed {name}s will @@ -679,12 +682,12 @@ list of the current window. If the argument list is "a b c", and "b" is the current argument, then these commands result in: command new argument list ~ - :argadd x a b x c - :0argadd x x a b c - :1argadd x a x b c - :$argadd x a b c x + :argadd x a [b] x c + :0argadd x x a [b] c + :1argadd x a x [b] c + :$argadd x a [b] c x And after the last one: - :+2argadd y a b c x y + :+2argadd y a [b] c x y There is no check for duplicates, it is possible to add a file to the argument list twice. You can use |:argdedupe| to fix it afterwards: > diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index 9e71392fd2..92a116e52e 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -1,4 +1,4 @@ -*eval.txt* For Vim version 9.1. Last change: 2024 Feb 05 +*eval.txt* For Vim version 9.1. Last change: 2024 Mar 28 VIM REFERENCE MANUAL by Bram Moolenaar @@ -303,10 +303,15 @@ List concatenation ~ *list-concatenation* Two lists can be concatenated with the "+" operator: > :let longlist = mylist + [5, 6] - :let mylist += [7, 8] + :let longlist = [5, 6] + mylist +To prepend or append an item, turn it into a list by putting [] around it. -To prepend or append an item, turn the item into a list by putting [] around -it. To change a list in-place, refer to |list-modification| below. +A list can be concatenated with another one in-place using |:let+=| or +|extend()|: > + :let mylist += [7, 8] + :call extend(mylist, [7, 8]) +< +See |list-modification| below for more about changing a list in-place. Sublist ~ @@ -425,6 +430,18 @@ To change part of a list you can specify the first and last item to be modified. The value must at least have the number of items in the range: > :let list[3:5] = [3, 4, 5] +To add items to a List in-place, you can use |:let+=| (|list-concatenation|): > + :let listA = [1, 2] + :let listA += [3, 4] +< +When two variables refer to the same List, changing one List in-place will +cause the referenced List to be changed in-place: > + :let listA = [1, 2] + :let listB = listA + :let listB += [3, 4] + :echo listA + [1, 2, 3, 4] +< Adding and removing items from a list is done with functions. Here are a few examples: > :call insert(list, 'a') " prepend item 'a' @@ -745,12 +762,15 @@ This calls Doit() with 0x11, 0x22 and 0x33. Blob concatenation ~ - + *blob-concatenation* Two blobs can be concatenated with the "+" operator: > :let longblob = myblob + 0z4455 + :let longblob = 0z4455 + myblob +< +A blob can be concatenated with another one in-place using |:let+=|: > :let myblob += 0z6677 - -To change a blob in-place see |blob-modification| below. +< +See |blob-modification| below for more about changing a blob in-place. Part of a blob ~ @@ -793,6 +813,18 @@ To change part of a blob you can specify the first and last byte to be modified. The value must have the same number of bytes in the range: > :let blob[3:5] = 0z334455 +To add items to a Blob in-place, you can use |:let+=| (|blob-concatenation|): > + :let blobA = 0z1122 + :let blobA += 0z3344 +< +When two variables refer to the same Blob, changing one Blob in-place will +cause the referenced Blob to be changed in-place: > + :let blobA = 0z1122 + :let blobB = blobA + :let blobB += 0z3344 + :echo blobA + 0z11223344 +< You can also use the functions |add()|, |remove()| and |insert()|. @@ -2044,6 +2076,10 @@ v:colornames A dictionary that maps color names to hex color strings. These both automatically load all `colors/lists/default.vim` color scripts. + You can make changes to that file, but make sure to add new + keys instead of updating existing ones, otherwise Vim will skip + loading the file (thinking is hasn't been changed). + *v:completed_item* *completed_item-variable* v:completed_item |Dictionary| containing the |complete-items| for the most @@ -2577,6 +2613,10 @@ v:t_class Value of |class| type. Read-only. See: |type()| v:t_object Value of |object| type. Read-only. See: |type()| *v:t_typealias* *t_typealias-variable* v:t_typealias Value of |typealias| type. Read-only. See: |type()| + *v:t_enum* *t_enum-variable* +v:t_enum Value of |enum| type. Read-only. See: |type()| + *v:t_enumvalue* *t_enumvalue-variable* +v:t_enumvalue Value of |enumvalue| type. Read-only. See: |type()| *v:termresponse* *termresponse-variable* v:termresponse The escape sequence returned by the terminal for the |t_RV| @@ -2821,6 +2861,8 @@ declarations and assignments do not use a command. |vim9-declaration| :let {var} ..= {expr1} Like ":let {var} = {var} .. {expr1}". These fail if {var} was not set yet and when the type of {var} and {expr1} don't fit the operator. + `+=` modifies a |List| or a |Blob| in-place instead of + creating a new one. `.=` is not supported with Vim script version 2 and later, see |vimscript-version|. diff --git a/runtime/doc/filetype.txt b/runtime/doc/filetype.txt index 4876e3d754..f13cfc60d1 100644 --- a/runtime/doc/filetype.txt +++ b/runtime/doc/filetype.txt @@ -1,4 +1,4 @@ -*filetype.txt* For Vim version 9.1. Last change: 2024 Jan 04 +*filetype.txt* For Vim version 9.1. Last change: 2024 Apr 09 VIM REFERENCE MANUAL by Bram Moolenaar @@ -157,6 +157,8 @@ variables can be used to overrule the filetype used for certain extensions: *.inc g:filetype_inc *.lsl g:filetype_lsl *.m g:filetype_m |ft-mathematica-syntax| + *.markdown,*.mdown,*.mkd,*.mkdn,*.mdwn,*.md + g:filetype_md |ft-pandoc-syntax| *.mod g:filetype_mod *.p g:filetype_p |ft-pascal-syntax| *.pl g:filetype_pl @@ -437,6 +439,19 @@ So to enable this only for ruby, set the following variable: > If both, the global `plugin_exec` and the `_exec` specific variable are set, the filetype specific variable should have precedent. + +ASCIIDOC *ft-asciidoc-plugin* + +To enable |folding| use this: > + let g:asciidoc_folding = 1 + +To disable nesting of folded headers use this: > + let g:asciidoc_foldnested = 0 + +To disable folding everything under the title use this: > + let asciidoc_fold_under_title = 0 + + AWK *ft-awk-plugin* Support for features specific to GNU Awk, like @include, can be enabled by @@ -496,7 +511,7 @@ g:changelog_new_date_format %% insert a single '%' character %d insert the date from above %u insert the user from above - %p insert result of b:changelog_entry_prefix + %p insert result of b:changelog_entry_prefix %c where to position cursor when done The default is "%d %u\n\n\t* %p%c\n\n", which produces something like (| is where cursor will be, unless at @@ -510,7 +525,7 @@ g:changelog_new_entry_format The format used when creating a new entry. The following table describes special tokens in the string: - %p insert result of b:changelog_entry_prefix + %p insert result of b:changelog_entry_prefix %c where to position cursor when done The default is "\t*%c", which produces something similar to > diff --git a/runtime/doc/ft_ada.txt b/runtime/doc/ft_ada.txt index 80ed728d3f..35dd534bb1 100644 --- a/runtime/doc/ft_ada.txt +++ b/runtime/doc/ft_ada.txt @@ -172,7 +172,7 @@ GNAT OBJECT ~ *g:gnat.Make()* g:gnat.Make() Calls |g:gnat.Make_Command| and displays the result inside a - |quickfix| window. + |quickfix| window. *g:gnat.Pretty()* g:gnat.Pretty() diff --git a/runtime/doc/ft_sql.txt b/runtime/doc/ft_sql.txt index f98b06252b..110784d8cf 100644 --- a/runtime/doc/ft_sql.txt +++ b/runtime/doc/ft_sql.txt @@ -371,7 +371,7 @@ This command breaks down as: > 'sqlKeyword' - Display the items for the sqlKeyword highlight group 'sqlKeyword\w*' - A second option available with Vim 7.4 which - uses a regular expression to determine which + uses a regular expression to determine which syntax groups to use ) - Execute the :let command - Trigger the standard omni completion key stroke. diff --git a/runtime/doc/helphelp.txt b/runtime/doc/helphelp.txt index 07a4c96567..40039e3916 100644 --- a/runtime/doc/helphelp.txt +++ b/runtime/doc/helphelp.txt @@ -1,4 +1,4 @@ -*helphelp.txt* For Vim version 9.1. Last change: 2022 Jan 08 +*helphelp.txt* For Vim version 9.1. Last change: 2024 Apr 10 VIM REFERENCE MANUAL by Bram Moolenaar @@ -315,7 +315,7 @@ Hints for translators: using the "tag@en" notation. - Make a package with all the files and the tags file available for download. Users can drop it in one of the "doc" directories and start use it. - Report this to Bram, so that he can add a link on www.vim.org. + Report to the development team, so they can add a link on www.vim.org. - Use the |:helptags| command to generate the tags files. It will find all languages in the specified directory. diff --git a/runtime/doc/if_ole.txt b/runtime/doc/if_ole.txt index b08fa98181..c546e971a6 100644 --- a/runtime/doc/if_ole.txt +++ b/runtime/doc/if_ole.txt @@ -39,9 +39,9 @@ instance), code similar to the following should be used: $vim = new Win32::OLE 'Vim.Application'; [C#] > - // Add a reference to Vim in your project. - // Choose the COM tab. - // Select "Vim Ole Interface 1.1 Type Library" + // Add a reference to Vim in your project. + // Choose the COM tab. + // Select "Vim Ole Interface 1.1 Type Library" Vim.Vim vimobj = new Vim.Vim(); Vim does not support acting as a "hidden" OLE server, like some other OLE diff --git a/runtime/doc/indent.txt b/runtime/doc/indent.txt index 7865bb6893..fe24505ed1 100644 --- a/runtime/doc/indent.txt +++ b/runtime/doc/indent.txt @@ -1,4 +1,4 @@ -*indent.txt* For Vim version 9.1. Last change: 2023 Dec 27 +*indent.txt* For Vim version 9.1. Last change: 2024 Feb 29 VIM REFERENCE MANUAL by Bram Moolenaar @@ -1255,5 +1255,11 @@ Example of configuration: > This variable is equivalent to `g:vim_indent.line_continuation`. It's supported for backward compatibility. +YAML *ft-yaml-indent* + +By default, the yaml indent script does not try to detect multiline scalars. +If you want to enable this, set the following variable: > + + let g:yaml_indent_multiline_scalar = 1 vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/intro.txt b/runtime/doc/intro.txt index 120d65dc85..12808a5b5a 100644 --- a/runtime/doc/intro.txt +++ b/runtime/doc/intro.txt @@ -1,4 +1,4 @@ -*intro.txt* For Vim version 9.1. Last change: 2024 Jan 25 +*intro.txt* For Vim version 9.1. Last change: 2024 Apr 11 VIM REFERENCE MANUAL by Bram Moolenaar @@ -132,9 +132,9 @@ There are three ways to report bugs: 3. Send bug reports to: Vim Developers This is a maillist, you need to become a member first and many people will see the message. If you don't want that, e.g. because it is a security - issue, please contact any of the current Vim maintainers - https://github.com/orgs/vim/people (but not Bram or the vim-dev ML). - In the future, a proper process for handling security issues will be setup. + issue, please contact the current Vim maintainers at the e-mail address + or create a security advisory at Github: + https://github.com/vim/vim/security/advisories Please be brief; all the time that is spent on answering mail is subtracted from the time that is spent on improving Vim! Always give a reproducible @@ -145,7 +145,7 @@ Preferably start Vim with: > Where reproduce.vim is a script that reproduces the problem. Try different machines, if relevant (is this an MS-Windows specific bug perhaps?). -Send me patches if you can! If you create a pull request on +Send patches if you can! If you create a pull request on https://github.com/vim/vim then the automated checks will run and report any obvious problems. But you can also send the patch by email (use an attachment to avoid white space changes). diff --git a/runtime/doc/map.txt b/runtime/doc/map.txt index cf83ffc0c8..12297261c7 100644 --- a/runtime/doc/map.txt +++ b/runtime/doc/map.txt @@ -592,7 +592,7 @@ displayed in the first line. Also a key map will also display where it was last defined. Example: > :verbose map * - Kitty keyboard protocol: Cleared + Kitty keyboard protocol: Cleared n * * * Last set from /home/abcd/.vimrc diff --git a/runtime/doc/message.txt b/runtime/doc/message.txt index 133d47ad11..6453b95fab 100644 --- a/runtime/doc/message.txt +++ b/runtime/doc/message.txt @@ -1,4 +1,4 @@ -*message.txt* For Vim version 9.1. Last change: 2023 Dec 20 +*message.txt* For Vim version 9.1. Last change: 2024 Mar 13 VIM REFERENCE MANUAL by Bram Moolenaar @@ -122,6 +122,13 @@ wiped out a buffer which contains a mark or is referenced in another way. You cannot have two buffers with exactly the same name. This includes the path leading to the file. + *E1513* + Cannot switch buffer. 'winfixbuf' is enabled ~ + +If a window has 'winfixbuf' enabled, you cannot change that window's current +buffer. You need to set 'nowinfixbuf' before continuing. You may use [!] to +force the window to switch buffers, if your command supports it. + *E72* Close error on swap file ~ diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index 896cf0e828..8e3417e18e 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -1,4 +1,4 @@ -*options.txt* For Vim version 9.1. Last change: 2024 Jan 30 +*options.txt* For Vim version 9.1. Last change: 2024 Mar 29 VIM REFERENCE MANUAL by Bram Moolenaar @@ -333,6 +333,7 @@ created, thus they behave slightly differently: Option Reason ~ 'previewwindow' there can only be a single one 'scroll' specific to existing window + 'winfixbuf' specific to existing window 'winfixheight' specific to existing window 'winfixwidth' specific to existing window @@ -365,11 +366,24 @@ created, thus they behave slightly differently: For a global option the global value is shown (but that might change in the future). -:setl[ocal] {option}< Set the local value of {option} to its global value by - copying the value. - -:se[t] {option}< For |global-local| options: Remove the local value of - {option}, so that the global value will be used. +:se[t] {option}< Set the effective value of {option} to its global + value. + For string |global-local| options, the local value is + removed, so that the global value will be used. + For all other options, the global value is copied to + the local value. + +:setl[ocal] {option}< Set the effective value of {option} to its global + value. + For number and boolean |global-local| options, the + local value is removed, so that the global value will + be used. + For all other options, including string |global-local| + options, the global value is copied to the local + value. + +Note that the behaviour for |global-local| options is slightly different +between string and number-based options. *:setg* *:setglobal* :setg[lobal][!] ... Like ":set" but set only the global value for a local @@ -2934,7 +2948,7 @@ A jump table for the options with a short description can be found at |Q_op|. Use the indent heuristic for the internal diff library. - algorithm:{text} Use the specified diff algorithm with the + algorithm:{text} Use the specified diff algorithm with the internal diff engine. Currently supported algorithms are: myers the default algorithm @@ -4092,7 +4106,7 @@ A jump table for the options with a short description can be found at |Q_op|. *'guiligatures'* *'gli'* *E1243* 'guiligatures' 'gli' string (default "") global - {only for GTK GUI} + {only for GTK and Win32 GUI} List of ASCII characters that, when combined together, can create more complex shapes. Each character must be a printable ASCII character with a value in the 32-127 range. @@ -6585,7 +6599,7 @@ A jump table for the options with a short description can be found at |Q_op|. this option at the default "on". Only switch it off when working with old Vi scripts. - *'renderoptions'* *'rop'* + *'renderoptions'* *'rop'* 'renderoptions' 'rop' string (default: empty) global {only available when compiled with GUI and DIRECTX on @@ -7371,7 +7385,7 @@ A jump table for the options with a short description can be found at |Q_op|. q use "recording" instead of "recording @a" *shm-q* F don't give the file info when editing a file, like *shm-F* `:silent` was used for the command; note that this also - affects messages from autocommands + affects messages from autocommands and 'autoread' reloading S do not show search count message when searching, e.g. *shm-S* "[1/5]" @@ -7619,8 +7633,7 @@ A jump table for the options with a short description can be found at |Q_op|. highlighted with |hl-NonText|. You may also want to add "lastline" to the 'display' option to show as much of the last line as possible. - NOTE: only partly implemented, currently works with CTRL-E, CTRL-Y - and scrolling with the mouse. + NOTE: partly implemented, doesn't work yet for |gj| and |gk|. *'softtabstop'* *'sts'* 'softtabstop' 'sts' number (default 0) @@ -8139,6 +8152,8 @@ A jump table for the options with a short description can be found at |Q_op|. "split" when both are present. uselast If included, jump to the previously used window when jumping to errors with |quickfix| commands. + If a window has 'winfixbuf' enabled, 'switchbuf' is currently not + applied to the split window. *'synmaxcol'* *'smc'* 'synmaxcol' 'smc' number (default 3000) @@ -8221,7 +8236,7 @@ A jump table for the options with a short description can be found at |Q_op|. appear wrong in many places, e.g., when printing it. The value must be more than 0 and less than 10000. - There are four main ways to use tabs in Vim: + There are five main ways to use tabs in Vim: 1. Always keep 'tabstop' at 8, set 'softtabstop' and 'shiftwidth' to 4 (or 3 or whatever you prefer) and use 'noexpandtab'. Then Vim will use a mix of tabs and spaces, but typing and will @@ -9597,11 +9612,20 @@ A jump table for the options with a short description can be found at |Q_op|. will scroll 'window' minus two lines, with a minimum of one. When 'window' is equal to 'lines' minus one CTRL-F and CTRL-B scroll in a much smarter way, taking care of wrapping lines. - When resizing the Vim window, the value is smaller than 1 or more than - or equal to 'lines' it will be set to 'lines' minus 1. + When resizing the Vim window, and the value is smaller than 1 or more + than or equal to 'lines' it will be set to 'lines' minus 1. Note: Do not confuse this with the height of the Vim window, use 'lines' for that. + *'winfixbuf'* +'winfixbuf' 'wfb' boolean (default off) + local to window + If enabled, the window and the buffer it is displaying are paired. + For example, attempting to change the buffer with |:edit| will fail. + Other commands which change a window's buffer such as |:cnext| will + also skip any window with 'winfixbuf' enabled. However if an Ex + command has a "!" modifier, it can force switching buffers. + *'winfixheight'* *'wfh'* *'nowinfixheight'* *'nowfh'* 'winfixheight' 'wfh' boolean (default off) local to window |local-noglobal| diff --git a/runtime/doc/os_vms.txt b/runtime/doc/os_vms.txt index ff435482d3..862f31d07f 100644 --- a/runtime/doc/os_vms.txt +++ b/runtime/doc/os_vms.txt @@ -753,7 +753,7 @@ Solution 2. Different directories: > $ say "IA64 platform" $ define/nolog VIM RF10:[UTIL.IA64_EXE] ! IA64 executables $ endif - $! VIMRUNTIME must be defined in order to find runtime files + $! VIMRUNTIME must be defined in order to find runtime files $ define/nolog VIMRUNTIME RF10:[UTIL.VIM73] A good example for this approach is the [GNU]gnu_tools.com script from diff --git a/runtime/doc/pi_netrw.txt b/runtime/doc/pi_netrw.txt index 90164e2996..2b22105d56 100644 --- a/runtime/doc/pi_netrw.txt +++ b/runtime/doc/pi_netrw.txt @@ -642,7 +642,7 @@ additional prompting. work with your ftp client. Otherwise the script will prompt for user-id and password. - (*3) for ftp, "machine" may be machine#port or machine:port + (*3) for ftp, "machine" may be machine#port or machine:port if a different port is needed than the standard ftp port (*4) for http:..., if wget is available it will be used. Otherwise, @@ -788,7 +788,7 @@ below, a {netfile} is a URL to a remote file. (related: |netrw-userpass|) :NetrwSettings This command is described in |netrw-settings| -- used to - display netrw settings and change netrw behavior. + display netrw settings and change netrw behavior. ============================================================================== diff --git a/runtime/doc/quickfix.txt b/runtime/doc/quickfix.txt index 325f592204..e659d39508 100644 --- a/runtime/doc/quickfix.txt +++ b/runtime/doc/quickfix.txt @@ -1,4 +1,4 @@ -*quickfix.txt* For Vim version 9.1. Last change: 2023 Jan 18 +*quickfix.txt* For Vim version 9.1. Last change: 2023 Apr 15 VIM REFERENCE MANUAL by Bram Moolenaar @@ -378,14 +378,14 @@ processing a quickfix or location list command, it will be aborted. List all errors. :cl[ist]! +{count} List the current and next {count} error lines. This - is useful to see unrecognized lines after the current + is useful to see unrecognized lines after the current one. For example, if ":clist" shows: - 8384 testje.java:252: error: cannot find symbol ~ - Then using ":cl! +3" shows the reason: - 8384 testje.java:252: error: cannot find symbol ~ - 8385: ZexitCode = Fmainx(); ~ - 8386: ^ ~ - 8387: symbol: method Fmainx() ~ + 8384 testje.java:252: error: cannot find symbol ~ + Then using ":cl! +3" shows the reason: + 8384 testje.java:252: error: cannot find symbol ~ + 8385: ZexitCode = Fmainx(); ~ + 8386: ^ ~ + 8387: symbol: method Fmainx() ~ :lli[st] [from] [, [to]] *:lli* *:llist* Same as ":clist", except the location list for the @@ -1321,6 +1321,15 @@ If Vim was started from the compiler, the :sh and some :! commands will not work, because Vim is then running in the same process as the compiler and stdin (standard input) will not be interactive. +PANDOC *quickfix-pandoc* *compiler-pandoc* + +The Pandoc compiler plugin expects that an output file type extension is +passed to make, say :make html or :make pdf. + +Additional arguments can be passed to pandoc: + +- either by appending them to make, say `:make html --self-contained` . +- or setting them in `b:pandoc_compiler_args` or `g:pandoc_compiler_args` PERL *quickfix-perl* *compiler-perl* diff --git a/runtime/doc/quickref.txt b/runtime/doc/quickref.txt index 689da2a44f..583df7be99 100644 --- a/runtime/doc/quickref.txt +++ b/runtime/doc/quickref.txt @@ -1,4 +1,4 @@ -*quickref.txt* For Vim version 9.1. Last change: 2023 Dec 05 +*quickref.txt* For Vim version 9.1. Last change: 2024 Mar 03 VIM REFERENCE MANUAL by Bram Moolenaar @@ -1013,6 +1013,7 @@ Short explanation of each option: *option-list* 'winaltkeys' 'wak' when the windows system handles ALT keys 'wincolor' 'wcr' window-local highlighting 'window' 'wi' nr of lines to scroll for CTRL-F and CTRL-B +'winfixbuf' 'wfb' keep window focused on a single buffer 'winfixheight' 'wfh' keep window height when opening/closing windows 'winfixwidth' 'wfw' keep window width when opening/closing windows 'winheight' 'wh' minimum number of lines for the current window diff --git a/runtime/doc/sponsor.txt b/runtime/doc/sponsor.txt index 7f875176bb..7a12c5ecd2 100644 --- a/runtime/doc/sponsor.txt +++ b/runtime/doc/sponsor.txt @@ -8,11 +8,12 @@ SPONSOR VIM DEVELOPMENT *sponsor* Fixing bugs and adding new features takes a lot of time and effort. To show -your appreciation for the work and motivate Bram and others to continue -working on Vim please send a donation. +your appreciation for the work and motivate developers to continue working on +Vim please send a donation. -Since Bram does not need the money it will be used to help children in Uganda, -see |uganda|. Donations increase Bram's motivation to keep working on Vim! +The money you donated will be mainly used to help children in Uganda. See +|uganda|. But at the same time donations increase the development team +motivation to keep working on Vim! For the most recent information about sponsoring look on the Vim web site: @@ -39,22 +40,12 @@ More explanations can be found in the |register-faq|. VOTE FOR FEATURES *vote-for-features* -To give registered Vim users and sponsors an advantage over lurkers they can -vote for the items Bram should work on. How does this voting work? +Note: Voting for features has been discontinued since the passing of |Bram| in +2023. The following two links still work, but they are no longer updated. So +they now only provide a historic view as of summer 2023. -1. You send at least 10 euro. See below for ways to transfer money - |send-money|. - -2. You will be e-mailed a registration key. Enter this key on your account - page on the Vim website. You can easily create an account if you don't - have one yet. - -3. You can enter your votes on the voting page. There is a link to that page - on your account page after entering a registration key. Your votes will - be counted for two years. - -4. The voting results appear on the results page, which is visible for - everybody: http://www.vim.org/sponsor/vote_results.php +The voting results appear on the results page, which is visible for everybody: +http://www.vim.org/sponsor/vote_results.php Additionally, once you have sent 100 euro or more in total, your name appears in the "Vim hall of honour": http://www.vim.org/sponsor/hall_of_honour.php @@ -84,8 +75,9 @@ QUESTIONS AND ANSWERS *sponsor-faq* *register-faq* Why should I give money? -If you do not show your appreciation for Vim then Bram will be less motivated -to fix bugs and add new features. He will do something else instead. +If you do not show your appreciation for Vim, the development team will be +less motivated to fix bugs and add new features. They will do something else +instead. How much money should I send? @@ -96,18 +88,6 @@ professional use: 30 Euro per year per person. Send at least 10 euro to be able to vote for features. -What do I get in return? - -Each registered Vim user and sponsor who donates at least 10 euro will be able -to vote for new features. These votes will give priority to the work on Vim. -The votes are valid for two years. The more money you send the more your -votes count |votes-counted|. - -If you send 100 Euro or more in total you will be mentioned on the "Vim hall -of honour" page on the Vim web site. But only if you enable this on your -account page. You can also select whether the amount will be visible. - - How do I become a Vim sponsor or registered Vim user? Send money, as explained above |send-money| and include your e-mail address. @@ -152,29 +132,6 @@ No, suggestions for improving Vim can always be given. For improvements use the developer |maillist|, for reporting bugs see |bugs|. -How are my votes counted? *votes-counted* - -You may vote when you send 10 euro or more. You can enter up to ten votes. -You can select the same item several times to give it more points. You can -also enter three counter votes, these count as negative points. - -When you send 30 euro or more the points are doubled. Above 100 euro they -count four times, above 300 euro they count six times, above 1000 euro ten -times. - - -Can I change my votes? - -You can change your votes any time you like, up to two years after you -sent money. The points will be counted right away. - - -Can I add an item to vote on? - -Not directly. You can suggest items to vote on to Bram. He will consider -fitting your item into the list. - - How about Charityware? Currently the Vim donations go to |uganda| anyway. Thus it doesn't matter if @@ -184,18 +141,17 @@ for features. I donated $$$, now please add feature XYZ! -There is no direct relation between your donation and the work Bram does. -Otherwise you would be paying for work and we would have to pay tax over the -donation. If you want to hire Bram for specific work, contact him directly, -don't use the donation system. +There is no direct relation between your donation and the work developers +does. Otherwise you would be paying for work and we would have to pay tax +over the donation. If you want to hire one of the developers for specific +work, contact them directly, don't use the donation system. Are the donations tax deductible? That depends on your country. The donations to help the children in |Uganda| are tax deductible in Holland, Germany, Canada and in the USA. See the ICCF -website http://iccf-holland.org/donate.html. You must send an e-mail to Bram -to let him know that the donation is done because of the use of Vim. +website http://iccf-holland.org/donate.html. Can you send me a bill? diff --git a/runtime/doc/starting.txt b/runtime/doc/starting.txt index a73147d675..8ca570a66f 100644 --- a/runtime/doc/starting.txt +++ b/runtime/doc/starting.txt @@ -1,4 +1,4 @@ -*starting.txt* For Vim version 9.1. Last change: 2023 Oct 20 +*starting.txt* For Vim version 9.1. Last change: 2024 Apr 15 VIM REFERENCE MANUAL by Bram Moolenaar @@ -113,10 +113,10 @@ Additional characters may follow, they are ignored. For example, you can have "gvim-8" to start the GUI. You must have an executable by that name then, of course. -On Unix, you would normally have one executable called Vim, and links from the -different startup-names to that executable. If your system does not support -links and you do not want to have several copies of the executable, you could -use an alias instead. For example: > +On Unix, you would normally have one executable called "vim", and links from +the different startup-names to that executable. If your system does not +support links and you do not want to have several copies of the executable, +you could use an alias instead. For example, in a C shell descendant: > alias view vim -R alias gvim vim -g < @@ -194,7 +194,7 @@ a slash. Thus "-R" means recovery and "-/R" readonly. --cmd {command} *--cmd* {command} will be executed before processing any vimrc file. - Otherwise it acts like -c {command}. You can use up to 10 of + Otherwise, it acts like -c {command}. You can use up to 10 of these commands, independently from "-c" commands. *-S* @@ -279,7 +279,7 @@ a slash. Thus "-R" means recovery and "-/R" readonly. *-s-ex* -s Silent or batch mode. Only when Vim was started as "ex" or - when preceded with the "-e" argument. Otherwise see |-s|, + when preceded with the "-e" argument. Otherwise, see |-s|, which does take an argument while this use of "-s" doesn't. To be used when Vim is used to execute Ex commands from a file instead of a terminal. Switches off most prompts and @@ -289,12 +289,12 @@ a slash. Thus "-R" means recovery and "-/R" readonly. :list :number :set to display option values. - When 'verbose' is non-zero messages are printed (for + When 'verbose' is non-zero, messages are printed (for debugging, to stderr). 'term' and $TERM are not used. - If Vim appears to be stuck try typing "qa!". You don't - get a prompt thus you can't see Vim is waiting for you to type - something. + If Vim appears to be stuck, try typing "qa!". You + don't get a prompt, thus you can't see Vim is waiting for you + to type something. Initializations are skipped (except the ones given with the "-u" argument). Example: > @@ -317,7 +317,7 @@ a slash. Thus "-R" means recovery and "-/R" readonly. *-A* -A Arabic mode. Sets the 'arabic' option on. {only when compiled with the |+arabic| features (which include - |+rightleft|), otherwise Vim gives an error message + |+rightleft|), otherwise, Vim gives an error message and exits} *-F* @@ -326,7 +326,7 @@ a slash. Thus "-R" means recovery and "-/R" readonly. *-H* -H Hebrew mode. Sets the 'hkmap' and 'rightleft' options on. - {only when compiled with the |+rightleft| feature, otherwise + {only when compiled with the |+rightleft| feature, otherwise, Vim gives an error message and exits} *-V* *verbose* @@ -407,7 +407,7 @@ a slash. Thus "-R" means recovery and "-/R" readonly. few windows will be editing an empty file. *-O* --O[N] Open N windows, split vertically. Otherwise it's like -o. +-O[N] Open N windows, split vertically. Otherwise, it's like -o. If both the -o and the -O option are given, the last one on the command line determines how the windows will be split. @@ -483,8 +483,10 @@ a slash. Thus "-R" means recovery and "-/R" readonly. This can be used to start Vim in a special mode, with special mappings and settings. A shell alias can be used to make - this easy to use. For example: > - alias vimc vim -u ~/.c_vimrc !* + this easy to use. For example, in a C shell descendant: > + alias vimc 'vim -u ~/.c_vimrc \!*' +< And in a Bash shell: > + alias vimc='vim -u ~/.c_vimrc' < Also consider using autocommands; see |autocommand|. When {vimrc} is equal to "NONE" (all uppercase), all @@ -544,9 +546,9 @@ a slash. Thus "-R" means recovery and "-/R" readonly. window title and copy/paste using the X clipboard. This avoids a long startup time when running Vim in a terminal emulator and the connection to the X server is slow. - See |--startuptime| to find out if affects you. + See |--startuptime| to find out if this affects you. Only makes a difference on Unix or VMS, when compiled with the - |+X11| feature. Otherwise it's ignored. + |+X11| feature. Otherwise, it's ignored. To disable the connection only for specific terminals, see the 'clipboard' option. When the X11 Session Management Protocol (XSMP) handler has @@ -575,8 +577,8 @@ a slash. Thus "-R" means recovery and "-/R" readonly. ":source!". When the "scriptout" file already exists, new characters are appended. See also |complex-repeat|. {scriptout} cannot start with a digit. - If you want to record what is typed in a human readable for - you can use |ch_logfile()|, It adds "raw key input" lines. + If you want to record what is typed in a human readable form, + you can use |ch_logfile()|. It adds "raw key input" lines. Also see |--log|. *-W* @@ -666,7 +668,7 @@ If the executable is called "ex", Vim will start in "Ex" mode. This means it will accept only ":" commands. But when the "-v" argument is given, Vim will start in Normal mode anyway. -Additional arguments are available on unix like systems when compiled with +Additional arguments are available on Unix like systems when compiled with X11 GUI support. See |gui-resources|. ============================================================================== @@ -740,7 +742,7 @@ In Evim these options are changed from their default value: :set incsearch show matches halfway typing a pattern :set mouse=a use the mouse in all modes :set hlsearch highlight all matches for a search pattern - :set whichwrap+=<,>,[,] and wrap around line breaks + :set whichwrap+=<,>,[,] and wrap around line breaks :set guioptions-=a non-Unix only: don't do auto-select Key mappings: @@ -809,7 +811,8 @@ accordingly. Vim proceeds in this order: name. Also see |vimrc-intro|. Places for your personal initializations: - Unix $HOME/.vimrc or $HOME/.vim/vimrc + Unix $HOME/.vimrc, $HOME/.vim/vimrc + or $XDG_CONFIG_HOME/vim/vimrc MS-Windows $HOME/_vimrc, $HOME/vimfiles/vimrc or $VIM/_vimrc Amiga s:.vimrc, home:.vimrc, home:vimfiles:vimrc @@ -833,7 +836,7 @@ accordingly. Vim proceeds in this order: initializations until 4. are skipped. Only the "-u" option is interpreted. *evim.vim* - a. If vim was started as |evim| or |eview| or with the |-y| argument, the + a. If Vim was started as |evim| or |eview| or with the |-y| argument, the script $VIMRUNTIME/evim.vim will be loaded. *system-vimrc* b. For Unix, MS-Windows, VMS, Macintosh and Amiga the system vimrc file @@ -852,15 +855,16 @@ accordingly. Vim proceeds in this order: I The environment variable VIMINIT (see also |compatible-default|) (*) The value of $VIMINIT is used as an Ex command line. II The user vimrc file(s): - "$HOME/.vimrc" (for Unix) (*) - "$HOME/.vim/vimrc" (for Unix) (*) - "s:.vimrc" (for Amiga) (*) - "home:.vimrc" (for Amiga) (*) - "home:vimfiles:vimrc" (for Amiga) (*) - "$VIM/.vimrc" (for Amiga) (*) - "$HOME/_vimrc" (for Win32) (*) - "$HOME/vimfiles/vimrc" (for Win32) (*) - "$VIM/_vimrc" (for Win32) (*) + "$HOME/.vimrc" (for Unix) (*) + "$HOME/.vim/vimrc" (for Unix) (*) + "$HOME/.config/vim/vimrc" (for Unix) (*) + "s:.vimrc" (for Amiga) (*) + "home:.vimrc" (for Amiga) (*) + "home:vimfiles:vimrc" (for Amiga) (*) + "$VIM/.vimrc" (for Amiga) (*) + "$HOME/_vimrc" (for Win32) (*) + "$HOME/vimfiles/vimrc" (for Win32) (*) + "$VIM/_vimrc" (for Win32) (*) "$HOME/config/settings/vim/vimrc" (for Haiku) (*) Note: For Unix and Amiga, when ".vimrc" does not exist, @@ -930,7 +934,7 @@ accordingly. Vim proceeds in this order: This means that Vim will figure out the values of 'shellpipe' and 'shellredir' for you, unless you have set them yourself. -6. Set 'updatecount' to zero, if "-n" command argument used +6. Set 'updatecount' to zero, if "-n" command argument used. 7. Set binary options If the "-b" flag was given to Vim, the options for binary editing will @@ -974,7 +978,7 @@ Some hints on using initializations ~ Standard setup: Create a vimrc file to set the default settings and mappings for all your edit -sessions. Put it in a place so that it will be found by 3b: +sessions. Put it in a place so that it will be found by 3b.: ~/.vimrc (Unix) s:.vimrc (Amiga) $VIM\_vimrc (Win32) @@ -1084,15 +1088,53 @@ defaults.vim from your .vimrc, first unlet skip_defaults_vim, as in the example above. + *xdg-base-dir* *$XDG_CONFIG_HOME* +XDG Base Directory Specification ~ + +The XDG Base Directory Specification aims to define a standard location for +configuration files used by applications. This is mainly done to prevent +the legacy behavior of dumping everything into the users home directory. +The specification can be found online at +https://specifications.freedesktop.org/basedir-spec/latest/ + +The location of this standard configuration directory is configurable by the +user, using environment variable but should also give fallback in case those +variables weren't set. + +This is not an exhaustive list of those directories: + Environment var default location Description ~ + `$XDG_CACHE_HOME` $HOME/.cache Ephemeral data files + `$XDG_CONFIG_HOME` $HOME/.config Configuration files + `$XDG_DATA_HOME` $HOME/.local/share Persistent data files + `$XDG_STATE_HOME` $HOME/.local/state State data files + +Vim will only care of the `$XDG_CONFIG_HOME` directory, the others are not +(yet) used for its various configuration and state files. + + *xdg-vimrc* +Vim, on Unix systems, will look at `$XDG_CONFIG_HOME/vim/vimrc` for its +configuration (see |vimrc|) but it will source it only if no other +initialization file is found in `$HOME` or `$HOME/.vim` (thus making this +feature backward compatible). However, if you want to migrate to use +`$XDG_CONFIG_HOME/vim/` directory, you will have to move away your `~/.vimrc` +and `~/.vim/vimrc` file. + + *xdg-runtime* +When the |xdg-vimrc| is used the |'runtimepath'| will be modified accordingly +to respect the |xdg-base-dir|: > + + "$XDG_CONFIG_HOME/vim,$VIMRUNTIME,/after,$XDG_CONFIG_HOME/vim/after" +< + Avoiding trojan horses ~ *trojan-horse* While reading the "vimrc" or the "exrc" file in the current directory, some commands can be disabled for security reasons by setting the 'secure' option. -This is always done when executing the command from a tags file. Otherwise it -would be possible that you accidentally use a vimrc or tags file that somebody -else created and contains nasty commands. The disabled commands are the ones -that start a shell, the ones that write to a file, and ":autocmd". The ":map" -commands are echoed, so you can see which keys are being mapped. +This is always done when executing the command from a tags file. Otherwise, +it would be possible that you accidentally use a vimrc or tags file that +somebody else created and contains nasty commands. The disabled commands are +the ones that start a shell, the ones that write to a file, and ":autocmd". +The ":map" commands are echoed, so you can see which keys are being mapped. If you want Vim to execute all commands in a local vimrc file, you can reset the 'secure' option in the EXINIT or VIMINIT environment variable or in the global "exrc" or "vimrc" file. This is not possible in "vimrc" or @@ -1249,9 +1291,9 @@ continue if you make it the foreground job again. On other systems, CTRL-Z will start a new shell. This is the same as the ":sh" command. Vim will continue if you exit from the shell. -In X-windows the selection is disowned when Vim suspends. this means you -can't paste it in another application (since Vim is going to sleep an attempt -to get the selection would make the program hang). +In the X Window System environment, the selection is disowned when Vim +suspends. This means you can't paste it in another application (since Vim is +going to sleep, an attempt to get the selection would make the program hang). ============================================================================== 7. Exiting *exiting* @@ -1296,7 +1338,7 @@ will be set to the same values. The options 'columns', 'endofline', dependent. Note that the options 'binary', 'paste' and 'readonly' are included, this might not always be what you want. -When special keys are used in mappings, The 'cpoptions' option will be +When special keys are used in mappings, the 'cpoptions' option will be temporarily set to its Vim default, to avoid the mappings to be misinterpreted. This makes the file incompatible with Vi, but makes sure it can be used with different terminals. @@ -1357,8 +1399,8 @@ All this is {not available when compiled without the |+mksession| feature}. *:mks* *:mksession* :mks[ession][!] [file] Write a Vim script that restores the current editing session. - When [!] is included an existing file is overwritten. - When [file] is omitted "Session.vim" is used. + When [!] is included, an existing file is overwritten. + When [file] is omitted, "Session.vim" is used. The output of ":mksession" is like ":mkvimrc", but additional commands are added to the file. Which ones depends on the 'sessionoptions' option. The @@ -1370,16 +1412,16 @@ resulting file, when executed with a ":source" command: 3. Closes all windows in the current tab page, except the current one; closes all tab pages except the current one (this results in currently loaded buffers to be unloaded, some may become hidden if 'hidden' is set or - otherwise specified); wipes out the current buffer, if it is empty - and unnamed. -4. Restores the current directory if 'sessionoptions' contains "curdir", or - sets the current directory to where the Session file is if 'sessionoptions' - contains "sesdir". + otherwise specified); wipes out the current buffer, if it is empty and + unnamed. +4. Restores the current directory, if 'sessionoptions' contains "curdir", or + sets the current directory to where the Session file is, if + 'sessionoptions' contains "sesdir". 5. Restores GUI Vim window position, if 'sessionoptions' contains "winpos". 6. Restores screen size, if 'sessionoptions' contains "resize". 7. Reloads the buffer list, with the last cursor positions. If 'sessionoptions' contains "buffers" then all buffers are restored, - including hidden and unloaded buffers. Otherwise only buffers in windows + including hidden and unloaded buffers. Otherwise, only buffers in windows are restored. 8. Restores all windows with the same layout. If 'sessionoptions' contains "help", help windows are restored. If 'sessionoptions' contains "blank", @@ -1406,14 +1448,14 @@ A session includes all tab pages, unless "tabpages" was removed from The |SessionLoadPost| autocmd event is triggered after a session file is loaded/sourced. *SessionLoad-variable* -While the session file is loading the SessionLoad global variable is set to 1. -Plugins can use this to postpone some work until the SessionLoadPost event is -triggered. +While the session file is loading, the SessionLoad global variable is set to +1. Plugins can use this to postpone some work until the SessionLoadPost event +is triggered. *:mkvie* *:mkview* :mkvie[w][!] [file] Write a Vim script that restores the contents of the current window. - When [!] is included an existing file is overwritten. + When [!] is included, an existing file is overwritten. When [file] is omitted or is a number from 1 to 9, a name is generated and 'viewdir' prepended. When the last path part of 'viewdir' does not exist, this @@ -1428,14 +1470,13 @@ triggered. The output of ":mkview" contains these items: 1. The argument list used in the window. When the global argument list is - used it is reset to the global list. + used, it is reset to the global list. The index in the argument list is also restored. 2. The file being edited in the window. If there is no file, the window is made empty. -3. Restore mappings, abbreviations and options local to the window if - 'viewoptions' contains "options" or "localoptions". For the options it - restores only values that are local to the current buffer and values local - to the window. +3. Restore mappings, abbreviations and options local to the window, if + 'viewoptions' contains "options" or "localoptions". Only option values + that are local to the current buffer and the current window are restored. When storing the view as part of a session and "options" is in 'sessionoptions', global values for local options will be stored too. 4. Restore folds when using manual folding and 'viewoptions' contains @@ -1469,7 +1510,7 @@ Note that Views and Sessions are not perfect: The combination of ":mkview" and ":loadview" can be used to store up to ten different views of a file. These are remembered in the directory specified with the 'viewdir' option. The views are stored using the file name. If a -file is renamed or accessed through a (symbolic) link the view will not be +file is renamed or accessed through a (symbolic) link, the view will not be found. You might want to clean up your 'viewdir' directory now and then. @@ -1542,12 +1583,13 @@ always kept. This is used for: - The search string history. - The input-line history. - Contents of non-empty registers. -- The jump list -- File marks +- The jump list. +- File marks. + The timestamp feature was added before Vim 8.0. Older versions of Vim, starting with 7.4.1131, will keep the items with timestamp, but not use them. -Thus when using both an older and a newer version of Vim the most recent data -will be kept. +Thus, when using both an older and a newer version of Vim, the most recent +data will be kept. Notes for Unix: - The file protection for the viminfo file will be set to prevent other users @@ -1559,7 +1601,7 @@ Notes for Unix: allow just anybody to read and write your viminfo file! - Vim will not overwrite a viminfo file that is not writable by the current "real" user. This helps for when you did "su" to become root, but your - $HOME is still set to a normal user's home directory. Otherwise Vim would + $HOME is still set to a normal user's home directory. Otherwise, Vim would create a viminfo file owned by root that nobody else can read. - The viminfo file cannot be a symbolic link. This is to avoid security issues. @@ -1591,11 +1633,11 @@ using this command: > vim -c "normal '0" -In a csh compatible shell you could make an alias for it: > +In a C shell descendant, you could make an alias for it: > alias lvim vim -c '"'normal "'"0'"' -For a bash-like shell: > +For a Bash-like shell: > alias lvim='vim -c "normal '\''0"' @@ -1640,14 +1682,14 @@ MANUALLY READING AND WRITING *viminfo-read-write* Two commands can be used to read and write the viminfo file manually. This can be used to exchange registers between two running Vim programs: First type ":wv" in one and then ":rv" in the other. Note that if the register -already contained something, then ":rv!" would be required. Also note -however that this means everything will be overwritten with information from +already contained something, then ":rv!" would be required. Also note, +however, that this means everything will be overwritten with information from the first Vim, including the command line history, etc. The viminfo file itself can be edited by hand too, although we suggest you start with an existing one to get the format right. It is reasonably self-explanatory once you're in there. This can be useful in order to -create a second file, say "~/.my_viminfo" which could contain certain +create a second file, say "~/.my_viminfo", which could contain certain settings that you always want when you first start Vim. For example, you can preload registers with particular data, or put certain commands in the command line history. A line in your .vimrc file like > @@ -1671,7 +1713,7 @@ most of the information will be restored). |viminfo-file-name| above). If [!] is given, then any information that is already set (registers, marks, |v:oldfiles|, etc.) - will be overwritten + will be overwritten. *:wv* *:wviminfo* *E137* *E138* *E574* *E886* *E929* :wv[iminfo][!] [file] Write to viminfo file [file] (default: see @@ -1683,10 +1725,10 @@ most of the information will be restored). the old information is not read first, only the internal info is written. If 'viminfo' is empty, marks for up to 100 files will be written. - When you get error "E929: Too many viminfo temp files" - check that no old temp files were left behind (e.g. - ~/.viminf*) and that you can write in the directory of - the .viminfo file. + When you get error "E929: Too many viminfo temp + files", check that no old temp files were left behind + (e.g. ~/.viminf*) and that you can write in the + directory of the .viminfo file. *:ol* *:oldfiles* :ol[dfiles] List the files that have marks stored in the viminfo @@ -1704,7 +1746,7 @@ most of the information will be restored). the list is edited. If you get the |press-enter| prompt you can press "q" and still get the prompt to enter a file number. - Use ! to abandon a modified buffer. |abandon| + Use [!] to abandon a modified buffer. |abandon| {not when compiled with tiny features} vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt index f19273ff6b..3e6a7e0267 100644 --- a/runtime/doc/syntax.txt +++ b/runtime/doc/syntax.txt @@ -1,4 +1,4 @@ -*syntax.txt* For Vim version 9.1. Last change: 2024 Feb 05 +*syntax.txt* For Vim version 9.1. Last change: 2024 Apr 13 VIM REFERENCE MANUAL by Bram Moolenaar @@ -1331,12 +1331,15 @@ Stack Overflow - https://stackoverflow.com/questions/12407800/which-comment-style-should-i-use-in-batch-files -To allow the use of the :: idiom for comments in the Windows Command -Interpreter or working with MS-DOS bat files, set the -dosbatch_colons_comment variable to anything: > +To allow the use of the :: idiom for comments in command blocks with the +Windows Command Interpreter set the dosbatch_colons_comment variable to +anything: > :let dosbatch_colons_comment = 1 +If this variable is set then a :: comment that is the last line in a command +block will be highlighted as an error. + There is an option that 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: > @@ -2233,10 +2236,19 @@ MARKDOWN *ft-markdown-syntax* If you have long regions there might be wrong highlighting. At the cost of slowing down displaying, you can have the engine look further back to sync on -the start of a region, for example 500 lines: > +the start of a region, for example 500 lines (default is 50): > :let g:markdown_minlines = 500 +If you want to enable fenced code block syntax highlighting in your markdown +documents you can enable like this: > + + :let g:markdown_fenced_languages = ['html', 'python', 'bash=sh'] + +To disable markdown syntax concealing add the following to your vimrc: > + + :let g:markdown_syntax_conceal = 0 + MATHEMATICA *mma.vim* *ft-mma-syntax* *ft-mathematica-syntax* @@ -2455,6 +2467,95 @@ by the camlp4 preprocessor. Setting the variable > prevents highlighting of "end" as error, which is useful when sources contain very long structures that Vim does not synchronize anymore. +PANDOC *ft-pandoc-syntax* + +By default, markdown files will be detected as filetype "markdown". +Alternatively, you may want them to be detected as filetype "pandoc" instead. +To do so, set the following: > + + :let g:markdown_md = 'pandoc' + +The pandoc syntax plugin uses |conceal| for pretty highlighting. Default is 1 > + + :let g:pandoc#syntax#conceal#use = 1 + +To specify elements that should not be concealed, set the following variable: > + + :let g:pandoc#syntax#conceal#blacklist = [] + +This is a list of the rules wich can be used here: + + - titleblock + - image + - block + - subscript + - superscript + - strikeout + - atx + - codeblock_start + - codeblock_delim + - footnote + - definition + - list + - newline + - dashes + - ellipses + - quotes + - inlinecode + - inlinemath + +You can customize the way concealing works. For example, if you prefer to mark +footnotes with the `*` symbol: > + + :let g:pandoc#syntax#conceal#cchar_overrides = {"footnote" : "*"} + +To conceal the urls in links, use: > + + :let g:pandoc#syntax#conceal#urls = 1 + +Prevent highlighting specific codeblock types so that they remain Normal. +Codeblock types include "definition" for codeblocks inside definition blocks +and "delimited" for delimited codeblocks. Default = [] > + + :let g:pandoc#syntax#codeblocks#ignore = ['definition'] + +Use embedded highlighting for delimited codeblocks where a language is +specified. Default = 1 > + + :let g:pandoc#syntax#codeblocks#embeds#use = 1 + +For specify what languages and using what syntax files to highlight embeds. This is a +list of language names. When the language pandoc and vim use don't match, you +can use the "PANDOC=VIM" syntax. For example: > + + :let g:pandoc#syntax#codeblocks#embeds#langs = ["ruby", "bash=sh"] + +To use italics and strong in emphases. Default = 1 > + + :let g:pandoc#syntax#style#emphases = 1 + +"0" will add "block" to g:pandoc#syntax#conceal#blacklist, because otherwise +you couldn't tell where the styles are applied. + +To add underline subscript, superscript and strikeout text styles. Default = 1 > + + :let g:pandoc#syntax#style#underline_special = 1 + +Detect and highlight definition lists. Disabling this can improve performance. +Default = 1 (i.e., enabled by default) > + + :let g:pandoc#syntax#style#use_definition_lists = 1 + +The pandoc syntax script also comes with the following commands: > + + :PandocHighlight LANG + +Enables embedded highlighting for language LANG in codeblocks. Uses the +syntax for items in g:pandoc#syntax#codeblocks#embeds#langs. > + + :PandocUnhighlight LANG + +Disables embedded highlighting for language LANG in codeblocks. PAPP *papp.vim* *ft-papp-syntax* @@ -3663,12 +3764,15 @@ 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 =~ 'h' : fold heredocs + g:vimsyn_folding =~ 'H' : fold Vim9-script legacy headers g:vimsyn_folding =~ 'l' : fold lua script 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 +let g:vimsyn_folding = 'acfhlmpPrt' < *g:vimsyn_noerror* Not all error highlighting that syntax/vim.vim does may be correct; Vim script @@ -5484,6 +5588,9 @@ MessageWindow Messages popup window used by `:echowindow`. If not defined |hl-WarningMsg| is used. *hl-ModeMsg* ModeMsg 'showmode' message (e.g., "-- INSERT --"). + *hl-MsgArea* +MsgArea Command-line area, also used for outputting messages, see also + 'cmdheight' *hl-MoreMsg* MoreMsg |more-prompt| *hl-NonText* diff --git a/runtime/doc/tabpage.txt b/runtime/doc/tabpage.txt index a98fe956f1..a922604c81 100644 --- a/runtime/doc/tabpage.txt +++ b/runtime/doc/tabpage.txt @@ -1,4 +1,4 @@ -*tabpage.txt* For Vim version 9.1. Last change: 2022 Feb 02 +*tabpage.txt* For Vim version 9.1. Last change: 2024 Mar 25 VIM REFERENCE MANUAL by Bram Moolenaar @@ -196,7 +196,7 @@ gt *i_CTRL-* *i_* :1tabnext " go to the first tab page :$tabnext " go to the last tab page :tabnext $ " as above - :tabnext # " go to the last accessed tab page + :tabnext # " go to the last accessed tab page :tabnext - " go to the previous tab page :tabnext -1 " as above :tabnext + " go to the next tab page @@ -248,13 +248,12 @@ REORDERING TAB PAGES: Move the current tab page to after tab page N. Use zero to make the current tab page the first one. N is counted before the move, thus if the second tab is the current one, - `:tabmove 1` and `:tabmove 2` have no effect. + `:tabmove 1` and `:tabmove 2` have no effect. Without N the tab page is made the last one. > :.tabmove " do nothing :-tabmove " move the tab page to the left :+tabmove " move the tab page to the right - :0tabmove " move the tab page to the beginning of the tab - " list + :0tabmove " move the tab page to the first :tabmove 0 " as above :tabmove " move the tab page to the last :$tabmove " as above diff --git a/runtime/doc/tags b/runtime/doc/tags index 1a41413288..855eaf4084 100644 --- a/runtime/doc/tags +++ b/runtime/doc/tags @@ -12,6 +12,7 @@ $VIM starting.txt /*$VIM* $VIM-use version5.txt /*$VIM-use* $VIMRUNTIME starting.txt /*$VIMRUNTIME* $VIM_POSIX vi_diff.txt /*$VIM_POSIX* +$XDG_CONFIG_HOME starting.txt /*$XDG_CONFIG_HOME* $quote eval.txt /*$quote* % motion.txt /*%* %:. cmdline.txt /*%:.* @@ -1175,6 +1176,7 @@ $quote eval.txt /*$quote* 't_vi' term.txt /*'t_vi'* 't_vs' term.txt /*'t_vs'* 't_xn' term.txt /*'t_xn'* +'t_xo' term.txt /*'t_xo'* 't_xs' term.txt /*'t_xs'* 'ta' options.txt /*'ta'* 'tabline' options.txt /*'tabline'* @@ -1314,6 +1316,7 @@ $quote eval.txt /*$quote* 'winaltkeys' options.txt /*'winaltkeys'* 'wincolor' options.txt /*'wincolor'* 'window' options.txt /*'window'* +'winfixbuf' options.txt /*'winfixbuf'* 'winfixheight' options.txt /*'winfixheight'* 'winfixwidth' options.txt /*'winfixwidth'* 'winheight' options.txt /*'winheight'* @@ -4571,7 +4574,23 @@ E1409 vim9class.txt /*E1409* E141 message.txt /*E141* E1410 vim9class.txt /*E1410* E1411 vim9class.txt /*E1411* +E1412 vim9class.txt /*E1412* +E1413 vim9class.txt /*E1413* +E1414 vim9class.txt /*E1414* +E1415 vim9class.txt /*E1415* +E1416 vim9class.txt /*E1416* +E1417 vim9class.txt /*E1417* +E1418 vim9class.txt /*E1418* +E1419 vim9class.txt /*E1419* E142 message.txt /*E142* +E1420 vim9class.txt /*E1420* +E1421 vim9class.txt /*E1421* +E1422 vim9class.txt /*E1422* +E1423 vim9class.txt /*E1423* +E1424 vim9class.txt /*E1424* +E1425 vim9class.txt /*E1425* +E1426 vim9class.txt /*E1426* +E1429 vim9class.txt /*E1429* E143 autocmd.txt /*E143* E144 various.txt /*E144* E145 starting.txt /*E145* @@ -4595,6 +4614,7 @@ E151 helphelp.txt /*E151* E1510 change.txt /*E1510* E1511 options.txt /*E1511* E1512 options.txt /*E1512* +E1513 message.txt /*E1513* E152 helphelp.txt /*E152* E153 helphelp.txt /*E153* E154 helphelp.txt /*E154* @@ -5772,6 +5792,7 @@ Select-mode-mapping visual.txt /*Select-mode-mapping* Session starting.txt /*Session* SessionLoad-variable starting.txt /*SessionLoad-variable* SessionLoadPost autocmd.txt /*SessionLoadPost* +SessionWritePost autocmd.txt /*SessionWritePost* ShellCmdPost autocmd.txt /*ShellCmdPost* ShellFilterPost autocmd.txt /*ShellFilterPost* SigUSR1 autocmd.txt /*SigUSR1* @@ -6067,6 +6088,7 @@ added-7.4 version7.txt /*added-7.4* added-8.1 version8.txt /*added-8.1* added-8.2 version8.txt /*added-8.2* added-9.1 version9.txt /*added-9.1* +added-9.2 version9.txt /*added-9.2* added-BeOS version5.txt /*added-BeOS* added-Mac version5.txt /*added-Mac* added-VMS version5.txt /*added-VMS* @@ -6220,6 +6242,7 @@ binary-number eval.txt /*binary-number* bitwise-function usr_41.txt /*bitwise-function* bitwise-shift eval.txt /*bitwise-shift* blob eval.txt /*blob* +blob-concatenation eval.txt /*blob-concatenation* blob-functions usr_41.txt /*blob-functions* blob-identity eval.txt /*blob-identity* blob-index eval.txt /*blob-index* @@ -6268,12 +6291,14 @@ bug-fixes-7 version7.txt /*bug-fixes-7* bug-fixes-8 version8.txt /*bug-fixes-8* bug-fixes-9 version9.txt /*bug-fixes-9* bug-fixes-9.1 version9.txt /*bug-fixes-9.1* +bug-fixes-9.2 version9.txt /*bug-fixes-9.2* bug-reports intro.txt /*bug-reports* bugreport.vim intro.txt /*bugreport.vim* bugs intro.txt /*bugs* builtin-function-details builtin.txt /*builtin-function-details* builtin-function-list builtin.txt /*builtin-function-list* builtin-functions builtin.txt /*builtin-functions* +builtin-object-methods vim9class.txt /*builtin-object-methods* builtin-terms term.txt /*builtin-terms* builtin-tools gui.txt /*builtin-tools* builtin.txt builtin.txt /*builtin.txt* @@ -6452,6 +6477,7 @@ changed-7.4 version7.txt /*changed-7.4* changed-8.1 version8.txt /*changed-8.1* changed-8.2 version8.txt /*changed-8.2* changed-9.1 version9.txt /*changed-9.1* +changed-9.2 version9.txt /*changed-9.2* changelist motion.txt /*changelist* changelog.vim syntax.txt /*changelog.vim* changenr() builtin.txt /*changenr()* @@ -6593,6 +6619,7 @@ compile-changes-6 version6.txt /*compile-changes-6* compile-changes-7 version7.txt /*compile-changes-7* compile-changes-8 version8.txt /*compile-changes-8* compile-changes-9 version9.txt /*compile-changes-9* +compile-changes-9.2 version9.txt /*compile-changes-9.2* compiler-compaqada ft_ada.txt /*compiler-compaqada* compiler-decada ft_ada.txt /*compiler-decada* compiler-dotnet quickfix.txt /*compiler-dotnet* @@ -6600,6 +6627,7 @@ compiler-gcc quickfix.txt /*compiler-gcc* compiler-gnat ft_ada.txt /*compiler-gnat* compiler-hpada ft_ada.txt /*compiler-hpada* compiler-manx quickfix.txt /*compiler-manx* +compiler-pandoc quickfix.txt /*compiler-pandoc* compiler-perl quickfix.txt /*compiler-perl* compiler-pyunit quickfix.txt /*compiler-pyunit* compiler-select quickfix.txt /*compiler-select* @@ -6962,6 +6990,12 @@ encryption editing.txt /*encryption* end intro.txt /*end* end-of-file pattern.txt /*end-of-file* enlightened-terminal syntax.txt /*enlightened-terminal* +enum vim9class.txt /*enum* +enum-constructor vim9class.txt /*enum-constructor* +enum-name vim9class.txt /*enum-name* +enum-ordinal vim9class.txt /*enum-ordinal* +enum-values vim9class.txt /*enum-values* +enumvalue vim9class.txt /*enumvalue* environ() builtin.txt /*environ()* eol-and-eof editing.txt /*eol-and-eof* erlang.vim syntax.txt /*erlang.vim* @@ -7290,6 +7324,7 @@ ft-ada-syntax ft_ada.txt /*ft-ada-syntax* ft-ada-variables ft_ada.txt /*ft-ada-variables* ft-ant-syntax syntax.txt /*ft-ant-syntax* ft-apache-syntax syntax.txt /*ft-apache-syntax* +ft-asciidoc-plugin filetype.txt /*ft-asciidoc-plugin* ft-asm-syntax syntax.txt /*ft-asm-syntax* ft-asm68k-syntax syntax.txt /*ft-asm68k-syntax* ft-asmh8300-syntax syntax.txt /*ft-asmh8300-syntax* @@ -7391,6 +7426,7 @@ ft-nasm-syntax syntax.txt /*ft-nasm-syntax* ft-ncf-syntax syntax.txt /*ft-ncf-syntax* ft-nroff-syntax syntax.txt /*ft-nroff-syntax* ft-ocaml-syntax syntax.txt /*ft-ocaml-syntax* +ft-pandoc-syntax syntax.txt /*ft-pandoc-syntax* ft-papp-syntax syntax.txt /*ft-papp-syntax* ft-pascal-syntax syntax.txt /*ft-pascal-syntax* ft-pdf-plugin filetype.txt /*ft-pdf-plugin* @@ -7458,6 +7494,7 @@ ft-xhtml-omni insert.txt /*ft-xhtml-omni* ft-xml-omni insert.txt /*ft-xml-omni* ft-xml-syntax syntax.txt /*ft-xml-syntax* ft-xpm-syntax syntax.txt /*ft-xpm-syntax* +ft-yaml-indent indent.txt /*ft-yaml-indent* ft-yaml-syntax syntax.txt /*ft-yaml-syntax* ft-zimbu-plugin filetype.txt /*ft-zimbu-plugin* ft-zsh-syntax syntax.txt /*ft-zsh-syntax* @@ -7856,6 +7893,8 @@ getqflist() builtin.txt /*getqflist()* getqflist-examples quickfix.txt /*getqflist-examples* getreg() builtin.txt /*getreg()* getreginfo() builtin.txt /*getreginfo()* +getregion() builtin.txt /*getregion()* +getregion-notes builtin.txt /*getregion-notes* getregtype() builtin.txt /*getregtype()* getscript pi_getscript.txt /*getscript* getscript-autoinstall pi_getscript.txt /*getscript-autoinstall* @@ -8120,6 +8159,7 @@ hl-Menu syntax.txt /*hl-Menu* hl-MessageWindow syntax.txt /*hl-MessageWindow* hl-ModeMsg syntax.txt /*hl-ModeMsg* hl-MoreMsg syntax.txt /*hl-MoreMsg* +hl-MsgArea syntax.txt /*hl-MsgArea* hl-NonText syntax.txt /*hl-NonText* hl-Normal syntax.txt /*hl-Normal* hl-Pmenu syntax.txt /*hl-Pmenu* @@ -8348,6 +8388,7 @@ improvements-6 version6.txt /*improvements-6* improvements-7 version7.txt /*improvements-7* improvements-8 version8.txt /*improvements-8* improvements-9 version9.txt /*improvements-9* +improvements-9.2 version9.txt /*improvements-9.2* in_bot channel.txt /*in_bot* in_buf channel.txt /*in_buf* in_io-buffer channel.txt /*in_io-buffer* @@ -8364,6 +8405,7 @@ incompatible-6 version6.txt /*incompatible-6* incompatible-7 version7.txt /*incompatible-7* incompatible-8 version8.txt /*incompatible-8* incompatible-9 version9.txt /*incompatible-9* +incompatible-9.2 version9.txt /*incompatible-9.2* indent() builtin.txt /*indent()* indent-expression indent.txt /*indent-expression* indent.txt indent.txt /*indent.txt* @@ -8768,6 +8810,7 @@ masm.vim syntax.txt /*masm.vim* match() builtin.txt /*match()* match-highlight pattern.txt /*match-highlight* match-parens tips.txt /*match-parens* +match-pattern builtin.txt /*match-pattern* matchadd() builtin.txt /*matchadd()* matchaddpos() builtin.txt /*matchaddpos()* matcharg() builtin.txt /*matcharg()* @@ -9221,6 +9264,7 @@ new-options-5.2 version5.txt /*new-options-5.2* new-options-5.4 version5.txt /*new-options-5.4* new-other-8.2 version8.txt /*new-other-8.2* new-other-9.1 version9.txt /*new-other-9.1* +new-other-9.2 version9.txt /*new-other-9.2* new-perl-python version5.txt /*new-perl-python* new-persistent-undo version7.txt /*new-persistent-undo* new-plugins version6.txt /*new-plugins* @@ -9303,9 +9347,12 @@ o_object-select motion.txt /*o_object-select* o_v motion.txt /*o_v* object vim9class.txt /*object* object-const-variable vim9class.txt /*object-const-variable* +object-empty() vim9class.txt /*object-empty()* object-final-variable vim9class.txt /*object-final-variable* +object-len() vim9class.txt /*object-len()* object-motions motion.txt /*object-motions* object-select motion.txt /*object-select* +object-string() vim9class.txt /*object-string()* objects index.txt /*objects* obtaining-exted netbeans.txt /*obtaining-exted* ocaml.vim syntax.txt /*ocaml.vim* @@ -9392,8 +9439,10 @@ patches-8.1 version8.txt /*patches-8.1* patches-8.2 version8.txt /*patches-8.2* patches-9 version9.txt /*patches-9* patches-9.1 version9.txt /*patches-9.1* +patches-9.2 version9.txt /*patches-9.2* patches-after-8.2 version9.txt /*patches-after-8.2* patches-after-9.0 version9.txt /*patches-after-9.0* +patches-after-9.1 version9.txt /*patches-after-9.1* pathshorten() builtin.txt /*pathshorten()* pattern pattern.txt /*pattern* pattern-atoms pattern.txt /*pattern-atoms* @@ -9679,6 +9728,7 @@ quickfix-functions usr_41.txt /*quickfix-functions* quickfix-gcc quickfix.txt /*quickfix-gcc* quickfix-index quickfix.txt /*quickfix-index* quickfix-manx quickfix.txt /*quickfix-manx* +quickfix-pandoc quickfix.txt /*quickfix-pandoc* quickfix-parse quickfix.txt /*quickfix-parse* quickfix-perl quickfix.txt /*quickfix-perl* quickfix-size quickfix.txt /*quickfix-size* @@ -10433,6 +10483,8 @@ t_dl term.txt /*t_dl* t_ds term.txt /*t_ds* t_ed version4.txt /*t_ed* t_el version4.txt /*t_el* +t_enum-variable eval.txt /*t_enum-variable* +t_enumvalue-variable eval.txt /*t_enumvalue-variable* t_f1 version4.txt /*t_f1* t_f10 version4.txt /*t_f10* t_f2 version4.txt /*t_f2* @@ -10522,6 +10574,7 @@ t_ve term.txt /*t_ve* t_vi term.txt /*t_vi* t_vs term.txt /*t_vs* t_xn term.txt /*t_xn* +t_xo term.txt /*t_xo* t_xs term.txt /*t_xs* tab intro.txt /*tab* tab-page tabpage.txt /*tab-page* @@ -10686,6 +10739,7 @@ termdebug_winbar terminal.txt /*termdebug_winbar* terminal terminal.txt /*terminal* terminal-api terminal.txt /*terminal-api* terminal-autoshelldir terminal.txt /*terminal-autoshelldir* +terminal-bufname terminal.txt /*terminal-bufname* terminal-client-server terminal.txt /*terminal-client-server* terminal-close terminal.txt /*terminal-close* terminal-colors os_unix.txt /*terminal-colors* @@ -11006,6 +11060,8 @@ v:t_bool eval.txt /*v:t_bool* v:t_channel eval.txt /*v:t_channel* v:t_class eval.txt /*v:t_class* v:t_dict eval.txt /*v:t_dict* +v:t_enum eval.txt /*v:t_enum* +v:t_enumvalue eval.txt /*v:t_enumvalue* v:t_float eval.txt /*v:t_float* v:t_func eval.txt /*v:t_func* v:t_job eval.txt /*v:t_job* @@ -11183,6 +11239,7 @@ version-8.1 version8.txt /*version-8.1* version-8.2 version8.txt /*version-8.2* version-9.0 version9.txt /*version-9.0* version-9.1 version9.txt /*version-9.1* +version-9.2 version9.txt /*version-9.2* version-variable eval.txt /*version-variable* version4.txt version4.txt /*version4.txt* version5.txt version5.txt /*version5.txt* @@ -11199,6 +11256,7 @@ version8.2 version8.txt /*version8.2* version8.txt version8.txt /*version8.txt* version9.0 version9.txt /*version9.0* version9.1 version9.txt /*version9.1* +version9.2 version9.txt /*version9.2* version9.txt version9.txt /*version9.txt* versionlong-variable eval.txt /*versionlong-variable* vi intro.txt /*vi* @@ -11218,6 +11276,7 @@ vim-8.2 version8.txt /*vim-8.2* vim-9 version9.txt /*vim-9* vim-9.0 version9.txt /*vim-9.0* vim-9.1 version9.txt /*vim-9.1* +vim-9.2 version9.txt /*vim-9.2* vim-additions vi_diff.txt /*vim-additions* vim-announce intro.txt /*vim-announce* vim-arguments starting.txt /*vim-arguments* @@ -11358,7 +11417,6 @@ vms-problems os_vms.txt /*vms-problems* vms-started os_vms.txt /*vms-started* vms-usage os_vms.txt /*vms-usage* vote-for-features sponsor.txt /*vote-for-features* -votes-counted sponsor.txt /*votes-counted* votes-for-changes todo.txt /*votes-for-changes* vreplace-mode insert.txt /*vreplace-mode* vt100-cursor-keys term.txt /*vt100-cursor-keys* @@ -11485,6 +11543,9 @@ x11-clientserver remote.txt /*x11-clientserver* x11-cut-buffer gui_x11.txt /*x11-cut-buffer* x11-selection gui_x11.txt /*x11-selection* xattr editing.txt /*xattr* +xdg-base-dir starting.txt /*xdg-base-dir* +xdg-runtime starting.txt /*xdg-runtime* +xdg-vimrc starting.txt /*xdg-vimrc* xf86conf.vim syntax.txt /*xf86conf.vim* xfontset mbyte.txt /*xfontset* xfree-xterm syntax.txt /*xfree-xterm* diff --git a/runtime/doc/tagsrch.txt b/runtime/doc/tagsrch.txt index aa7b9dd48d..d3d549ab2e 100644 --- a/runtime/doc/tagsrch.txt +++ b/runtime/doc/tagsrch.txt @@ -1,4 +1,4 @@ -*tagsrch.txt* For Vim version 9.1. Last change: 2023 Feb 13 +*tagsrch.txt* For Vim version 9.1. Last change: 2024 Mar 16 VIM REFERENCE MANUAL by Bram Moolenaar @@ -407,19 +407,24 @@ 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 ------------------------------------------------------------------------------ +is added to the command and on the 'autowrite' and 'winfixbuf' options: + + tag in file winfixbuf autowrite ~ +current file changed ! option option action ~ + ----------------------------------------------------------------------------- + yes x x off x goto tag + no no x off x read other file, goto tag + no yes yes off x abandon current file, + read other file, goto tag + no yes no off on write current file, + read other file, goto tag + no yes no off off fail + yes x yes x x goto tag + no no no on x fail + no yes no on x fail + no yes no on on fail + no yes no on 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 @@ -435,6 +440,8 @@ current file changed ! option action ~ 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. +- If the tag is in another file and the window includes 'winfixbuf', the + command will fail. If the tag is in the same file then it may succeed. *tag-security* Note that Vim forbids some commands, for security reasons. This works like diff --git a/runtime/doc/term.txt b/runtime/doc/term.txt index 8154ec596e..1256d750d2 100644 --- a/runtime/doc/term.txt +++ b/runtime/doc/term.txt @@ -1,4 +1,4 @@ -*term.txt* For Vim version 9.1. Last change: 2024 Jan 15 +*term.txt* For Vim version 9.1. Last change: 2024 Apr 14 VIM REFERENCE MANUAL by Bram Moolenaar @@ -345,7 +345,7 @@ versions (and will then also end up in terminfo/termcap). *xterm-kitty* *kitty-terminal* The Kitty terminal is a special case. Mainly because it works differently -from most other terminals, but also because, instead of trying the fit in and +from most other terminals, but also because, instead of trying to fit in and make it behave like other terminals by default, it dictates how applications need to work when using Kitty. This makes it very difficult for Vim to work in a Kitty terminal. Some exceptions have been hard coded, but it is not at @@ -382,7 +382,7 @@ 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', 't_xn' represent flags in the +The options 't_da', 't_db', 't_ms', 't_xs', 't_xn', 't_xo' 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 @@ -441,6 +441,11 @@ OUTPUT CODES *terminal-output-codes* *t_xn* *'t_xn'* t_xn if non-empty, writing a character at the last screen cell does not cause scrolling + *t_xo* *'t_xo'* + t_xo if non-empty, terminal uses xon/xoff handshaking, mapping + CTRL-S will not be possible then, since it is used for flow + control (used by vt420 terminal). Setting this flag has only + an effect when starting Vim. t_ZH italics mode *t_ZH* *'t_ZH'* t_ZR italics end *t_ZR* *'t_ZR'* diff --git a/runtime/doc/terminal.txt b/runtime/doc/terminal.txt index c5331fa857..c99b882cf9 100644 --- a/runtime/doc/terminal.txt +++ b/runtime/doc/terminal.txt @@ -1,4 +1,4 @@ -*terminal.txt* For Vim version 9.1. Last change: 2023 Nov 08 +*terminal.txt* For Vim version 9.1. Last change: 2024 Mar 17 VIM REFERENCE MANUAL by Bram Moolenaar @@ -208,6 +208,7 @@ Command syntax ~ [command]. Use `:execute` if you must have a Vim command following in the same line. + *terminal-bufname* A new buffer will be created, using [command] or 'shell' as the name, prefixed with a "!". If a buffer by this name already exists a number is added in @@ -302,6 +303,12 @@ current window into a terminal window. If there are unsaved changes this fails, use ! to force, as usual. *terminal-close* +When the terminal job finishes and no [command] was given (e.g. the 'shell' +command was executed), the terminal window will be closed by default (unless +the buffer in next window receiving the space has the 'nobuflisted' option set, +in which case the terminal window would not be closed automatically, but a new +empty buffer would be opened in that window). + When the terminal window is closed, e.g. when the shell exits and "++close" argument was used, and this is the last normal Vim window, then Vim will exit. This is like using |:quit| in a normal window. Help and preview windows are @@ -1024,17 +1031,17 @@ This can be used to pass the current directory from a shell to Vim. Put this in your .vimrc: > def g:Tapi_lcd(_, path: string) if isdirectory(path) - execute 'silent lcd ' .. fnameescape(path) - endif + execute 'silent lcd ' .. fnameescape(path) + endif enddef < And, in a bash init file: > - if [[ -n "$VIM_TERMINAL" ]]; then - PROMPT_COMMAND='_vim_sync_PWD' - function _vim_sync_PWD() { - printf '\033]51;["call", "Tapi_lcd", "%q"]\007' "$PWD" - } - fi + if [[ -n "$VIM_TERMINAL" ]]; then + PROMPT_COMMAND='_vim_sync_PWD' + function _vim_sync_PWD() { + printf '\033]51;["call", "Tapi_lcd", "%q"]\007' "$PWD" + } + fi < Or, for zsh: > if [[ -n "$VIM_TERMINAL" ]]; then @@ -1402,8 +1409,8 @@ Other commands ~ *:Asm* jump to the window with the disassembly, create it if there isn't one *:Var* jump to the window with the local and argument variables, - create it if there isn't one. This window updates whenever the - program is stopped + create it if there isn't one. This window updates whenever the + program is stopped Events ~ *termdebug-events* diff --git a/runtime/doc/testing.txt b/runtime/doc/testing.txt index 442285dc86..9b9f60b667 100644 --- a/runtime/doc/testing.txt +++ b/runtime/doc/testing.txt @@ -1,4 +1,4 @@ -*testing.txt* For Vim version 9.1. Last change: 2024 Jan 23 +*testing.txt* For Vim version 9.1. Last change: 2024 Apr 07 VIM REFERENCE MANUAL by Bram Moolenaar @@ -235,7 +235,7 @@ test_mswin_event({event}, {args}) *test_mswin_event()* "mouse" mouse event. "key" keyboard event. "set_keycode_trans_strategy" - Change the key transation method + Change the key translation method. "mouse": Inject either a mouse button click, or a mouse move, event. @@ -294,7 +294,8 @@ test_mswin_event({event}, {args}) *test_mswin_event()* "set_keycode_trans_strategy": |w32-experimental-keycode-trans-strategy| - Switch the keycode translation method. The supported methods are: + Switch the keycode translation method. The supported methods + are: experimental: The method used after Patch v8.2.4807 using ToUnicode() Win API call. classic: The method used pre Patch v8.2.4807 @@ -437,8 +438,8 @@ test_settime({expr}) *test_settime()* GetTime()->test_settime() -test_srand_seed([seed]) *test_srand_seed()* - When [seed] is given this sets the seed value used by +test_srand_seed([{seed}]) *test_srand_seed()* + When {seed} is given this sets the seed value used by `srand()`. When omitted the test seed is removed. diff --git a/runtime/doc/todo.txt b/runtime/doc/todo.txt index 953ae47820..8712008cfe 100644 --- a/runtime/doc/todo.txt +++ b/runtime/doc/todo.txt @@ -1,4 +1,4 @@ -*todo.txt* For Vim version 9.1. Last change: 2024 Feb 01 +*todo.txt* For Vim version 9.1. Last change: 2024 Mar 28 VIM REFERENCE MANUAL by Bram Moolenaar @@ -132,7 +132,6 @@ Further Vim9 improvements: Possibly issue #11981 can be fixed at the same time (has two examples). - Forward declaration of a class? E.g. for Clone() function. Email lifepillar 2023 Mar 26 - - object empty(), len() - can class define a method to be used for them? - When "Meta" is a class, is "const MetaAlias = Meta" allowed? It should either work or given an error. Possibly give an error now and implement it later (using a typedef). #12006 @@ -145,7 +144,6 @@ Further Vim9 improvements: - More efficient way for interface member index than iterating over list? - a variant of type() that returns a different type for each class? list and list should also differ. -- implement :enum - Promise class, could be used to wait on a popup close callback? - class local to a function - Use Vim9 for more runtime files. diff --git a/runtime/doc/uganda.rux b/runtime/doc/uganda.rux new file mode 100644 index 0000000000..783c6d5ddd --- /dev/null +++ b/runtime/doc/uganda.rux @@ -0,0 +1,340 @@ +*uganda.txt* для Vim version 9.1 редакция от 02 марта 2022 г. + + + СПРАВОЧНИК ПО РЕДАКТОРУ VIM + автор Брам Моленар + + + *uganda* *Uganda* *copying* *copyright* *license* +КРАТКОЕ ОПИСАНИЕ + *iccf* *ICCF* +Редактор Vim является благотворительным программным обеспечением. +Использование и копирование программы Vim не ограничено, однако +рекомендуется сделать добровольное пожертвование для нуждающихся детей в +Уганде. Ознакомьтесь с разделом |kcc| далее в этом документе или посетите +веб-сайт организации ICCF, доступный по указанным ниже адресам: + + https://iccf-holland.org/ + https://www.vim.org/iccf/ + https://www.iccf.nl/ + +Также возможно оказание финансовой помощи для разработки программы Vim. +Люди, пожертвовавшие на развитие программы, получают право голосовать за +внедрение в редактор функциональных возможностей. См. раздел |sponsor|. +В любом случае деньги направляются в Уганду. + +Документация, поставляемая в составе программы Vim, распространяется на +условиях лицензии на Открытые публикации, см. раздел |manual-copyright|. + +=== начало лицензии === + +ЛИЦЕНЗИЯ VIM + +I) Неизменённые копии программы Vim могут распространяться без ограничения + при условии включения данного текста лицензии. Распространение + неизменённых копий отдельных частей программы Vim также возможно при + соблюдении условия о включении данного текста лицензии. Подобным образом + разрешается добавлять исполняемые файлы, скомпилированные из + неизменённого исходного кода программы Vim, а также собственные примеры + использования и командные файлы редактора Vim. + +II) Изменённую (или дополненную) версию программы Vim, включающую + исполняемые файлы и/или исходный код, допускается распространять при + соблюдении следующих четырёх условий: + 1) Текст настоящей лицензии должен включаться в состав распространяемой + версии программы Vim без изменений. + 2) Изменённая версия программы Vim должна распространяться одним из + следующих пяти способов: + a) При внесении изменений в программу Vim, в дистрибутиве должны + быть явно указаны контактные данные лица, внёсшего эти изменения. + Ответственному разработчику по его запросу (в любой форме) должна + быть безвозмездно предоставлена копия распространяемой изменённой + версии программы Vim, включая её исходный код. Ответственный + разработчик оставляет за собой право включать сделанные изменения + в официальную версию программы Vim. Конкретные действия + ответственного разработчика, относительно переданных изменений, а + также лицензионные условия, на основании которых будет + осуществляться их распространение, могут быть дополнительно + согласованы. Если согласование не проводилось, сделанные изменения + будут распространяться на условиях настоящей лицензии или более + поздней её версии. Лица, в данное время являющиеся ответственными + за рабзработку, указаны в перечне по следующему адресу: + https://github.com/orgs/vim/people. В случае изменения этой + информации, актуальные данные будут опубликованы на + соответствующих ресурсах (вероятнее всего по интернет‐адресам + vim.sf.net, www.vim.org и/или comp.editors). В случае полной + невозможности установить контакт с ответственным разработчиком, + обязательства по отправке изменений утрачивают силу. После + передачи подтверждения о получении изменений от ответственного + разработчика, необходимость в повторной отправке копии изменённой + программы Vim неприменима. + b) Если лицом получена изменённая версия программа Vim, + распространяющаяся на условиях, указанных в ч. II) п. 2) пп. а) + допускается дальнейшее её распространение этим лицом без внесения + изменений и согласно ч. I) настоящей лицензии. В случае внесения + дополнительных изменений, на эти изменения будут распространяться + условия, указанные в ч. II) п. 2) пп. a). + c) Каждая копия распространяемой изменённой версии программы Vim + должна включать информацию обо всех произведённых изменениях, + включая исходный код. Эта информация может быть представлена в + виде построчного сравнения файлов. Выбор лицензии, по условиям + которой будет распространяться добавленный код, остаётся за + автором этих изменений. Изменения и лицензия на эти изменения не + должны запрещать другим лицам внесение своих собственных + изменений в официальную версию программы Vim. + d) Изменённая версия программы Vim, содержащая изменения в + соответствии с ч. II) п. 2 пп. c), может распространяться без + исходного кода для этих изменений, при соблюдении следующих трёх + условий: + - Лицензия, применяемая к внесённым изменениям, предоставляет + ответственному разработчику программы Vim возможность + безвозмездного и неограниченного распространения этих изменений, + а также право на безвозмездное и неограниченное включение этих + изменений в официальную версию программы Vim. + - Изменения должны сохраняться не менее трёх лет со времени + распространения соответствующей изменённой версии программы Vim. + В течение этого периода по запросу ответственного разработчика + или другого пользователя изменённой версии программы Vim + (в любой форме) необходимо предоставить исходный код данных + изменений. + - В дистрибутиве изменённой версии программы Vim должны быть явно + указаны контактные данные лица, внёсшего эти изменения. + Контактные данные должны сохранять актуальность в течение + не менее трёх лет со времени последнего распространения + соответствующей изменённой версии программы Vim или как можно + дольше. + e) Если к изменениям, внесённым в программу Vim, применимы условия + лицензии GNU General Public License (GNU GPL), допускается + распространение изменённой версия программы Vim на условиях + лицензии GNU GPL версии 2 или любой более поздней версии этой + лицензии. + 3) Необходимо добавить соответствующую информацию, которая должна быть + выведена в результате выполнения команды ":version" в программе Vim, + а также на экране приветствия программы Vim, чтобы пользователь + изменённой версии программы Vim имел возможность определить, что он + пользуется изменённой версией. При распространении на условиях, + указанных в ч. II) п. 2) пп. e) такую информацию требуется добавлять + только в том случае, когда она не противоречит лицензии, + распространяющейся на эти изменения. + 4) Контактная информация, которая указывается по требованию ч. II) п. 2) + пп. a) и ч. II) п. 2) пп. d) не должна удаляться или изменяться никем + другим, кроме лица, указавшего данную контактную информацию. + +III) При распространении изменённой версии программы Vim рекомендуется + пользоваться лицензией Vim для произведённых изменений и обеспечить + доступ к этим изменениям ответственного разработчика, включая исходный + код изменений. Предпочтительным способом предоставления доступа к + произведённым изменениям является отправка этих изменений по + электронной почте или загрузка файлов на сервер с отправкой URL-адреса + по электронной почте. Если количество изменений незначительно + (например, изменения в файле Makefile) достаточно будет отправить по + электронной почте файл построчного сравнения. Изменения или URL-адреса + должны быть отправлены на адрес электронной почты maintainer@vim.org + +IV) Не допускается удаление настоящей лицензия из дистрибутива исходного + кода программы Vim, его отдельных частей или изменённой версии. + Допускается использование настоящей лицензию для предыдущих изменённых + выпусков программы Vim, взамен тех лицензий, с которыми они + распространялись. + +=== конец лицензии === + +Примечание. + +- Если вам нравится программа Vim, дочитайте до конца и подумайте над + оказанием помощи нуждающимся детям в Уганде. + +- При наличии желания поддержать дальнейшую разработку программы Vim, + рассмотрите возможность оказания финансовой поддержки (см. раздел + |sponsor|). В любом случае деньги отправляются в Уганду. + +- Ричард Столлман (Richard Stallman) подтвердил, что лицензия Vim совместима + с лицензией GNU GPL. С момента его последней проверки были внесены + незначительные изменения, но они не должны оказать на это никакого влияния. + +- Если сборка программы Vim осуществляется с использованием библиотеки, на + которую распространяется лицензия GNU GPL, дальнейшее распространение + программы может осуществляться только на условиях лицензии GNU GPL. Даже + если в саму программу Vim не было внесено никаких изменений. + +- Если были внесены изменения, на которые распространяется лицензия GNU GPL, + все дальнейшие изменения также должны добавляться на условиях лицензии + GNU GPL или другой совместимой лицензии. + +- При распространении изменённой версии программы Vim, своё имя и контактную + информацию можно добавлять с помощью аргумента конфигурации + "--with-modified-by" или директивы define MODIFIED_BY. + +============================================================================== +Детский центр в Кибаале *kcc* *Kibaale* *charity* + +Детский центр в Кибаале (Kibaale Children's Centre, KCC) находится в гор. +Кибаал. Это небольшой городок в восточной Африке на юге Уганды недалеко от +Танзании на территории округа Ракаи. Большая часть населения занимается +земледелием. Несмотря на бедность жителей, здесь обычно бывает достаточно +пищи. Однако по числу заболевших СПИД этот округ превосходит любую другую +точку планеты. Существует мнение, что именно отсюда началось распространение +этой смертельной болезни. По некоторым оценкам в прошлом от 10 до 30 +процентов жителей Уганды были заражены ВИЧ. Высокая смертность родителей +стала причиной появления большого количества сирот. При населении округа +в 350 000 человек, 60 000 детей потеряло одного или обоих родителей. Однако +даже несомненные успехи в уменьшении масштабов распространения СПИД +не могут привести к полному исчезновению проблем. + +Дети очень нуждаются в помощи. Организация KCC прилагает все усилия для +предоставления нуждающимся пищи, медицинской помощи и образования. Пища и +медицинская помощь предоставляются для поддержания здоровья, а образование +даёт возможность позаботиться о себе в будущем. Организация KCC работает на +базе христианской миссии, но помощь оказывается всем детям независимо от их +приверженности к какой-либо религии. + +В данном случае ключом к решению проблем является возможность получения +образования. В последнее время при правлении президента Иди Амина (Idi Amin +Dada Oumee), а также в ходе последовавших гражданских войн, этой проблеме не +уделялось достаточно внимания. Однако сейчас после стабилизации деятельности +правительства детям и их родителям нужно учиться жить и заботиться самим о +себе, избегая при этом риска заражения инфекционными заболеваниями. Поэтому +наряду с оказанием помощи больным и голодающим, основной целью миссии +является предупреждение заболеваемости и прививание навыков по употреблению +здоровой пищи. + +Большинство сирот проживают у близких родственников, воспитываются дядями +или старшими сёстрами. Вследствие больших размеров семей и низких доходов +(если таковые имеются), большим везением для ребёнка будет обеспечение +здоровым питанием. Про одежду, медицинскую помощь и школьное обучение +говорить уже не приходится. Для оказания помощи таким нуждающимся детям была +организована программа оказания финансовой помощи. Она позволяет взять +ребёнка на финансовое обеспечение. За несколько долларов в месяц организация +KCC обеспечит его необходимыми предметами обихода, будет следить за его +здоровьем, организует школьное обучение, а также сделает всё необходимое для +ребёнка и семьи, которая поддерживает его развитие. + +Помимо непосредственного оказания помощи ребёнку, необходимо также проводить +комплексное развитие среды, в которой живут дети. С этой целью организация +KCC предоставляет школам помощь по улучшению методов обучения. На базе +центра имеется показательная школа, в которой организуется обучение для +учителей. Также проводится обучение медицинских работников, прививаются +санитарно-гигиенические нормы, пропагандируется постройка туалетов +надлежащей конструкции в местах проживания. Также лично мною была оказана +помощь в постройке производственного объекта по созданию железобетонных плит, +которые применяются при постройке туалетов и продаются по сниженным ценам. + +На балансе проекта содержится клиника, в которой предоставляется медицинская +помощь детям и их семьям. В 2020 году было открыто родильное отделение и +пункт круглосуточного оказания медицинской помощи. При необходимости +осуществляется доставка в больницу. Проводятся программы иммунизации +населения, и предоставляется помощь при вспышках эпидемии (случаются вспышки +кори и холеры). + *donate* +С лета 1994 года до лета 1995 года мне целый год довелось провести в центре, +работая там в качестве волонтёра. Я помогал в расширении центра и трудился в +сфере водоснабжения и санитарно-гигиенического контроля. Там я убедился в +эффективности той помощи, которую оказывает организация KCC. По возвращении +в Нидерланды утвердилось желание продолжить поддержку организации KCC. +С этой целью я провожу сбор средств и организую программу оказания +финансовой помощи. Поэтому предлагаю вам рассмотреть одну из следующих +возможностей: + +1. Предоставить финансовую помощь ребёнку в начальной школе — 17 евро в + месяц (или больше). +2. Предоставить финансовую помощь ребёнку в средней школе — 25 евро в месяц + (или больше). +3. Предоставить финансовую помощь клинике — любая сумма раз в месяц или + в квартал. +4. Единовременное пожертвование. + +По сравнению с другими программами оказания финансовой поддержки детям, +указанные выше суммы выглядят весьма скромно. Причина столь небольшого +размера пожертвований заключается в том, что деньги направляются +непосредственно в центр. На администрацию тратиться менее 5 %, что стало +возможным благодаря малым размерам организации и привлечению волонтёров. +Если вы предполагаете взять на финансовое обеспечение ребёнка, то важно +понимать, что регулярное оказание помощи должно осуществляться на протяжении +не менее одного года. + +Я понимаю, что вам нужны гарантии поступления средств по адресу. Прежде +всего, я готов предоставить свои личные гарантии, как автор программы Vim. +Я доверяю людям, работающим в этом центре, и знаю их лично. Кроме того, +финансирование и инспектирование центра осуществлялось совместно с такими +общеизвестными благотворительными организациями, как «World Vision», +«Save the Children», а теперь центр находится на попечении организации +«Pacific Academy Outreach Society». Посещение центра осуществляется (за свой +собственный счёт) примерно раз в год для проверки хода выполнения текущих +задач. Я сам неоднократно посещал этот центр, начиная с 1993 года. Отчёты о +посещениях размещаются на веб-сайте организации ICCF. + +Если у вас остались вопросы, можете задать их по электронной почте +. + +Адрес центра: + Kibaale Children's Centre + p.o. box 1658 + Masaka, Uganda, East Africa + +Перечисление средств *iccf-donations* + +Самая свежая информация доступна на веб-сайте организации ICCF! +См. раздел |iccf|. + + + США + Можно использовать методы, перечисленные ниже. Если + требуется отправить чек, то отправьте его нашему партнёру в + Канаде, адрес: https://www.kuwasha.net/ + + Канада + Свяжитесь с командой Kuwasha в гор. Сарри, Канада. Они + могут оказать содействие благотворителям из Канады для + помощи детям в гор. Кибаале. Команда Kuwasha переводит 100% + средств, поступивших в пользу проекта в Уганде. + Единовременное пожертвование может быть отправлено им + напрямую. При этом прошу отправлять мне сообщение, для учёта + информации о количестве средств, пожертвованных благодаря + программе Vim. + На их веб-сайте также можно ознакомиться с информацией по + оказанию финансовой поддержки https://www.kuwasha.net/ + При отправке пожертвований через Kuwasha вы получите + налоговое уведомление, которое можно будет подать вместе с + налоговой декларацией. + + Нидерланды + Перевод на счёт «Stichting ICCF Holland», Amersfoort. Можно + будет получить налоговый вычет, если вы проживаете в + Нидерландах. Банк ING, IBAN: NL95 INGB 0004 5487 74 + + Германия + Можно сделать пожертвование, дающее право на налоговый + вычет. Ознакомьтесь с последней информацией на веб-сайте + организации ICCF + https://iccf-holland.org/germany.html + + Европа + Банковский перевод. См. далее рубрику «Другие варианты», + где указан код Swift и номер IBAN. + Любые другие платёжные методы также должны работать. + Проконсультируйтесь по вопросу отправки средств на + благотворительные цели. + + Банковская карта + Можно воспользоваться платёжной системой PayPal для + отправки денег с банковской карты. Это наиболее + распространённая и чрезвычайно простая в использовании + платёжная система на основе сети Интернет. Больше информации + можно найти по адресу + https://www.paypal.com/en_US/mrb/pal=XAC62PML3GF8Q + Адрес электронной почты для обсуждения вопросов по + отправке средств + Bram@iccf-holland.org + + Другие варианты + Средства можно отправить на указанный ниже счёт. + Банк ING. IBAN: NL95 INGB 0004 5487 74 + Код SWIFT: INGBNL2A + на имя «stichting ICCF Holland», Amersfoort + Чеки не принимаются. + +============================================================================= +© Казорин Сергей, перевод на русский язык, 2022, +© Restorer, редакторская правка, 2022, + + vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/usr_41.txt b/runtime/doc/usr_41.txt index 9b033d89da..71dc01782b 100644 --- a/runtime/doc/usr_41.txt +++ b/runtime/doc/usr_41.txt @@ -1,4 +1,4 @@ -*usr_41.txt* For Vim version 9.1. Last change: 2024 Feb 01 +*usr_41.txt* For Vim version 9.1. Last change: 2024 Feb 25 VIM USER MANUAL - by Bram Moolenaar @@ -69,7 +69,7 @@ The output of the example code is: In the first line the `vim9script` command makes clear this is a new, |Vim9| script file. That matters for how the rest of the file is used. It is -recommended to put it in the very fist line, before any comments. +recommended to put it in the very first line, before any comments. *vim9-declarations* The `var i = 1` command declares the "i" variable and initializes it. The generic form is: > @@ -929,6 +929,7 @@ Cursor and mark position: *cursor-functions* *mark-functions* Working with text in the current buffer: *text-functions* getline() get a line or list of lines from the buffer + getregion() get a region of text 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 diff --git a/runtime/doc/usr_51.txt b/runtime/doc/usr_51.txt index f2b5e13b72..b0bf792243 100644 --- a/runtime/doc/usr_51.txt +++ b/runtime/doc/usr_51.txt @@ -1,4 +1,4 @@ -*usr_51.txt* For Vim version 9.1. Last change: 2022 Jun 03 +*usr_51.txt* For Vim version 9.1. Last change: 2024 Apr 04 VIM USER MANUAL - by Bram Moolenaar @@ -649,13 +649,9 @@ When you write a compiler file and put it in your personal runtime directory 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: > +":compiler". Vim defines the ":CompilerSet" user command for this. This is +an example: > - if exists(":CompilerSet") != 2 - command -nargs=* CompilerSet setlocal - endif CompilerSet errorformat& " use the default 'errorformat' CompilerSet makeprg=nmake diff --git a/runtime/doc/version9.txt b/runtime/doc/version9.txt index 697fd79844..c2779236ce 100644 --- a/runtime/doc/version9.txt +++ b/runtime/doc/version9.txt @@ -1,4 +1,4 @@ -*version9.txt* For Vim version 9.1. Last change: 2024 Jan 05 +*version9.txt* For Vim version 9.1. Last change: 2024 Apr 14 VIM REFERENCE MANUAL by Bram Moolenaar @@ -41535,4 +41535,101 @@ Patch 9.0.2190 Problem: proto files need update Solution: re-generate them +============================================================================== +VERSION 9.2 *version-9.2* *version9.2* *vim-9.2* + +This section is about improvements made between version 9.1 and 9.2 +and is a work in progress. + +Support for Wayland UI. + +Support for the XDG Desktop Specification |xdg-base-dir| + +Vim9 script +----------- +Add support for internal builtin functions with vim9 objects, see +|builtin-object-methods| + +Enum support for Vim9 script |:enum| + +Other improvements *new-other-9.2* +------------------ + +Changed *changed-9.2* +------- + +- use 'smoothscroll' logic for CTRL-F and CTRL-B for pagewise scrolling +- use 'smoothscroll' logic for CTRL-D and CTRL-U for half-pagewise scrolling + +Added *added-9.2* +----- + +Various syntax, indent and other plugins were added. + +Functions: ~ + +|diff()| diff two Lists of strings +|foreach()| apply function to List items +|matchbufline()| all the matches of a pattern in a buffer +|matchstrlist()| all the matches of a pattern in a List of strings +|getregion()| get a region of text from a buffer + + +Autocommands: ~ + +|SessionWritePost| after writing the session file |:mksession| +|TermResponseAll| after the terminal response to |t_RV| and others is + received +|WinNewPre| before creating a new window + + +Highlighting: ~ + +|hl-MsgArea| highlighting of the Command-line and messages area. + +Commands: ~ + + +Options: ~ + +'winfixbuf' Keep buffer focused in a window +'t_xo' Terminal uses XON/XOFF handshaking (e.g. vt420). + +============================================================================== +INCOMPATIBLE CHANGES *incompatible-9.2* + +Improved/Different MS-Windows mapping support +|w32-experimental-keycode-trans-strategy| + +============================================================================== +IMPROVEMENTS *improvements-9.2* + +Support for command-line completion of 'keymap' option values. + +Support for compiling all the methods in a Vim9 class using |:defcompile|. + +Support for alternate font highlighting using |t_CF| terminal code. + +Support for Super key mappings in GTK using . + +Improved visual highlighting. + +Python3 support in OpenVMS. + +============================================================================== +COMPILE TIME CHANGES *compile-changes-9.2* + +Support for building with Ruby 3.3. + +Support for building Vim 9 in z/OS (MVS). + +============================================================================== +PATCHES *patches-9.2* *bug-fixes-9.2* + *patches-after-9.1* + +The list of patches that got included since 9.1.0. This includes all the new +features, but does not include runtime file changes (syntax, indent, ftplugin, +documentation, etc.) + + vim:tw=78:ts=8:noet:ft=help:norl:fdm=manual: diff --git a/runtime/doc/vim9.txt b/runtime/doc/vim9.txt index 0f5884b65c..7a49aa0826 100644 --- a/runtime/doc/vim9.txt +++ b/runtime/doc/vim9.txt @@ -1,4 +1,4 @@ -*vim9.txt* For Vim version 9.1. Last change: 2024 Jan 12 +*vim9.txt* For Vim version 9.1. Last change: 2024 Apr 13 VIM REFERENCE MANUAL by Bram Moolenaar @@ -641,6 +641,14 @@ No command can follow the "{", only a comment can be used there. The block can also be used for defining a user command. Inside the block Vim9 syntax will be used. +This is an example of using here-docs: > + com SomeCommand { + g:someVar =<< trim eval END + ccc + ddd + END + } + If the statements include a dictionary, its closing bracket must not be written at the start of a line. Otherwise, it would be parsed as the end of the block. This does not work: > @@ -1513,7 +1521,6 @@ Custom types can be defined with `:type`: > :type MyList list Custom types must start with a capital letter, to avoid name clashes with builtin types added later, similarly to user functions. -{not implemented yet} And classes and interfaces can be used as types: > :class MyClass @@ -2024,7 +2031,7 @@ Note that this does not work for variables, only for functions. *import-legacy* *legacy-import* `:import` can also be used in legacy Vim script. The imported namespace still becomes script-local, even when the "s:" prefix is not given. For example: > - import "myfile.vim" + import "myfile.vim" call s:myfile.MyFunc() And using the "as name" form: > diff --git a/runtime/doc/vim9class.txt b/runtime/doc/vim9class.txt index ba821c1b29..ef96aa9076 100644 --- a/runtime/doc/vim9class.txt +++ b/runtime/doc/vim9class.txt @@ -1,4 +1,4 @@ -*vim9class.txt* For Vim version 9.1. Last change: 2024 Jan 12 +*vim9class.txt* For Vim version 9.1. Last change: 2024 Apr 13 VIM REFERENCE MANUAL by Bram Moolenaar @@ -328,10 +328,27 @@ variables but they have no access to the object variables, they cannot use the enddef endclass -Inside the class the class method can be called by name directly, outside the -class the class name must be prefixed: `OtherThing.ClearTotalSize()`. To use -a class method from a parent class in a child class, the class name must be -prefixed. +Inside the class, the class method can be called by name directly, outside the +class, the class name must be prefixed: `OtherThing.ClearTotalSize()`. Also, +the name prefix must be used for public class methods in the special contexts +of class variable initializers and of lambda expressions and nested functions: +> + class OtherThing + static var name: string = OtherThing.GiveName() + + static def GiveName(): string + def DoGiveName(): string + return OtherThing.NameAny() + enddef + + return DoGiveName() + enddef + + static def NameAny(): string + return "any" + enddef + endclass +< Just like object methods the access can be made protected by using an underscore as the first character in the method name: > @@ -576,7 +593,7 @@ A class is defined between `:class` and `:endclass`. The whole class is defined in one script file. It is not possible to add to a class later. A class can only be defined in a |Vim9| script file. *E1316* -A class cannot be defined inside a function. +A class cannot be defined inside a function. *E1429* It is possible to define more than one class in a script file. Although it usually is better to export only one main class. It can be useful to define @@ -710,6 +727,32 @@ The initialization isn't needed, the list is empty by default. *E1330* Some types cannot be used, such as "void", "null" and "v:none". +Builtin Object Methods ~ + *builtin-object-methods* +Some of the builtin functions like |empty()|, |len()| and |string()| can be +used with an object. An object can implement a method with the same name as +these builtin functions to return an object-specific value. + + *E1412* +The following builtin methods are supported: + *object-empty()* + empty() Invoked by the |empty()| function to check whether an object is + empty. If this method is missing, then true is returned. This + method should not accept any arguments and must return a boolean. + *object-len()* + len() Invoked by the |len()| function to return the length of an + object. If this method is missing in the class, then an error is + given and zero is returned. This method should not accept any + arguments and must return a number. + *object-string()* + string() Invoked by the |string()| function to get a textual + representation of an object. Also used by the |:echo| command + for an object. If this method is missing in the class, then a + built-in default textual representation is used. This method + should not accept any arguments and must return a string. + + *E1413* +A class method cannot be used as a builtin method. Defining an interface ~ *Interface* *:interface* *:endinterface* @@ -878,19 +921,125 @@ aliased: > 8. Enum *Vim9-enum* *:enum* *:endenum* -{not implemented yet} - + *enum* *E1418* *E1419* *E1420* An enum is a type that can have one of a list of values. Example: > - :enum Color - White - Red - Green - Blue - Black - :endenum + :enum Color + White, + Red, + Green, Blue, Black + :endenum +< + *enumvalue* *E1422* +The enum values are separated by commas. More than one enum value can be +listed in a single line. The final enum value should not be followed by a +comma. + +An enum value is accessed using the enum name followed by the value name: > + + var a: Color = Color.Blue +< +Enums are treated as classes, where each enum value is essentially an instance +of that class. Unlike typical object instantiation with the |new()| method, +enum instances cannot be created this way. + +An enum can only be defined in a |Vim9| script file. *E1414* +An enum cannot be defined inside a function. + + *E1415* +An enum name must start with an uppercase letter. The name of an enum value +in an enum can start with an upper or lowercase letter. + + *E1416* +An enum can implement an interface but cannot extend a class: > + enum MyEnum implements MyIntf + Value1, + Value2 + def SomeMethod() + enddef + endenum +< + *enum-constructor* +The enum value objects in an enum are constructed like any other objects using +the |new()| method. Arguments can be passed to the enum constructor by +specifying them after the enum value name, just like calling a function. The +default constructor doesn't have any arguments. + + *E1417* +An enum can contain class variables, class methods, object variables and +object methods. The methods in an enum cannot be |:abstract| methods. + +The following example shows an enum with object variables and methods: > + + vim9script + enum Planet + Earth(1, false), + Jupiter(95, true), + Saturn(146, true) + + var moons: number + var has_rings: bool + def GetMoons(): number + return this.moons + enddef + endenum + echo Planet.Jupiter.GetMoons() + echo Planet.Earth.has_rings +< + *E1421* *E1423* *E1424* *E1425* +Enums and their values are immutable. They cannot be utilized as numerical or +string types. Enum values can declare mutable instance variables. + + *enum-name* +Each enum value object has a "name" instance variable which contains the name +of the enum value. This is a readonly variable. + + *enum-ordinal* *E1426* +Each enum value has an associated ordinal number starting with 0. The ordinal +number of an enum value can be accessed using the "ordinal" instance variable. +This is a readonly variable. Note that if the ordering of the enum values in +an enum is changed, then their ordinal values will also change. + + *enum-values* +All the values in an enum can be accessed using the "values" class variable +which is a List of the enum objects. This is a readonly variable. + +Example: > + enum Planet + Mercury, + Venus, + Earth + endenum + + echo Planet.Mercury + echo Planet.Venus.name + echo Planet.Venus.ordinal + for p in Planet.values + # ... + endfor +< +An enum is a class with class variables for the enum value objects and object +variables for the enum value name and the enum value ordinal: > + + enum Planet + Mercury, + Venus + endenum +< +The above enum definition is equivalent to the following class definition: > + + class Planet + public static final Mercury: Planet = Planet.new('Mercury', 0) + public static final Venus: Planet = Planet.new('Venus', 1) + + public static const values: list = [Planet.Mercury, Planet.Venus] + + public const name: string + public const ordinal: number + endclass +< ============================================================================== 9. Rationale diff --git a/runtime/doc/windows.txt b/runtime/doc/windows.txt index 8064748752..e264e51170 100644 --- a/runtime/doc/windows.txt +++ b/runtime/doc/windows.txt @@ -1,4 +1,4 @@ -*windows.txt* For Vim version 9.1. Last change: 2022 Nov 27 +*windows.txt* For Vim version 9.1. Last change: 2024 Feb 20 VIM REFERENCE MANUAL by Bram Moolenaar @@ -519,35 +519,33 @@ 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. + width of the screen. This works like `:topleft split`, except + it is applied to the current window and no new window is + created. *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. + full width of the screen. This works like `:botright split`, + except it is applied to the current window and no new window + is created. *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. + full height of the screen. This works like + `:vert topleft split`, except it is applied to the current + window and no new window is created. *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. + height of the screen. This works like `:vert botright split`, + except it is applied to the current window and no new window + is created. *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. + This works like `:tab split`, except the previous window is + closed. 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. diff --git a/runtime/filetype.vim b/runtime/filetype.vim index 17fe86d7b4..4a877f7f84 100644 --- a/runtime/filetype.vim +++ b/runtime/filetype.vim @@ -101,6 +101,9 @@ au BufNewFile,BufRead build.xml setf ant " Arduino au BufNewFile,BufRead *.ino,*.pde setf arduino +" Ash of busybox +au BufNewFile,BufRead .ash_history setf sh + " Apache config file au BufNewFile,BufRead .htaccess,*/etc/httpd/*.conf setf apache au BufNewFile,BufRead */etc/apache2/sites-*/*.com setf apache @@ -280,6 +283,9 @@ endif " Busted (Lua unit testing framework - configuration files) au BufNewFile,BufRead .busted setf lua +" Bundle config +au BufNewFile,BufRead */.bundle/config setf yaml + " C or lpc au BufNewFile,BufRead *.c call dist#ft#FTlpc() au BufNewFile,BufRead *.lpc,*.ulpc setf lpc @@ -293,17 +299,24 @@ au BufNewFile,BufRead calendar setf calendar " Cap'n Proto au BufNewFile,BufRead *.capnp setf capnp +" Cgdb config file +au BufNewFile,BufRead cgdbrc setf cgdbrc + " C# au BufNewFile,BufRead *.cs,*.csx setf cs " CSDL au BufNewFile,BufRead *.csdl setf csdl +" Ctags +au BufNewFile,BufRead *.ctags setf conf + " Cabal au BufNewFile,BufRead *.cabal setf cabal -" Cdrdao TOC -au BufNewFile,BufRead *.toc setf cdrtoc +" Cdrdao TOC or LaTeX \tableofcontents files +au BufNewFile,BufRead *.toc + \ if getline(1) =~# '\\contentsline' |setf tex|else|setf cdrtoc|endif " Cdrdao config au BufNewFile,BufRead */etc/cdrdao.conf,*/etc/defaults/cdrdao,*/etc/default/cdrdao,.cdrdao setf cdrdaoconf @@ -317,6 +330,9 @@ au BufRead,BufNewFile *.chai setf chaiscript " Chatito au BufNewFile,BufRead *.chatito setf chatito +" Chktex +au BufRead,BufNewFile .chktexrc setf conf + " Chuck au BufNewFile,BufRead *.ck setf chuck @@ -409,6 +425,9 @@ au BufNewFile,BufRead .clang-format setf yaml " Clang-tidy au BufNewFile,BufRead .clang-tidy setf yaml +" Matplotlib +au BufNewFile,BufRead *.mplstyle,matplotlibrc setf yaml + " Clean au BufNewFile,BufRead *.dcl,*.icl setf clean @@ -418,6 +437,9 @@ au BufNewFile,BufRead *.eni setf cl " Clever or dtd au BufNewFile,BufRead *.ent call dist#ft#FTent() +" Cling +au BufNewFile,BufRead .cling_history setf cpp + " Clipper, FoxPro, ABB RAPID or eviews au BufNewFile,BufRead *.prg\c call dist#ft#FTprg() @@ -427,6 +449,9 @@ au BufNewFile,BufRead *.clj,*.cljs,*.cljx,*.cljc setf clojure " Cmake au BufNewFile,BufRead CMakeLists.txt,*.cmake,*.cmake.in setf cmake +" CmakeCache +autocmd BufRead,BufNewFile CMakeCache.txt setf cmakecache + " Cmusrc au BufNewFile,BufRead */.cmus/{autosave,rc,command-history,*.theme} setf cmusrc au BufNewFile,BufRead */cmus/{rc,*.theme} setf cmusrc @@ -504,6 +529,13 @@ endif au BufNewFile,BufRead *s6*/\(up\|down\|run\|finish\) setf execline au BufNewFile,BufRead s6-* setf execline +" Fontconfig config files +au BufNewFile,BufRead fonts.conf setf xml + +" Libreoffice config files +au BufNewFile,BufRead *.xcu,*.xlb,*.xlc,*.xba setf xml +au BufNewFile,BufRead psprint.conf,sofficerc setf dosini + " Lynx config files au BufNewFile,BufRead lynx.cfg setf lynx @@ -514,6 +546,25 @@ au BufNewFile,BufRead *.lrc setf lyrics au BufNewFile,BufRead *.quake,cm3.cfg setf m3quake au BufNewFile,BufRead m3makefile,m3overrides setf m3build +" XDG mimeapps.list +au BufNewFile,BufRead mimeapps.list setf dosini + +" Many tools written in Python use dosini as their config +" like setuptools, pudb, coverage, pypi, gitlint, oelint-adv, pylint, bpython, mypy +" (must be before *.cfg) +au BufNewFile,BufRead pip.conf,setup.cfg,pudb.cfg,.coveragerc,.pypirc,.gitlint,.oelint.cfg setf dosini +au BufNewFile,BufRead {.,}pylintrc,*/bpython/config,*/mypy/config setf dosini + +" Many tools written in Python use toml as their config, like black +au BufNewFile,BufRead .black setf toml +au BufNewFile,BufRead black + \ if getline(1) =~ 'tool.back' + \| setf toml + \| endif + +" LXQt's programs use dosini as their config +au BufNewFile,BufRead */{lxqt,screengrab}/*.conf setf dosini + " Quake au BufNewFile,BufRead *baseq[2-3]/*.cfg,*id1/*.cfg setf quake au BufNewFile,BufRead *quake[1-3]/*.cfg setf quake @@ -521,6 +572,14 @@ au BufNewFile,BufRead *quake[1-3]/*.cfg setf quake " Quake C au BufNewFile,BufRead *.qc setf c +" LaTeX packages use LaTeX as their configuration, such as: +" ~/.texlive/texmf-config/tex/latex/hyperref/hyperref.cfg +" ~/.texlive/texmf-config/tex/latex/docstrip/docstrip.cfg +au BufNewFile,BufRead */tex/latex/**.cfg setf tex + +" Wakatime config +au BufNewFile,BufRead .wakatime.cfg setf dosini + " Configure files au BufNewFile,BufRead *.cfg\c call dist#ft#FTcfg() @@ -534,6 +593,9 @@ au BufNewFile,BufRead *.csp,*.fdr setf csp au BufNewFile,BufRead *.pld setf cupl au BufNewFile,BufRead *.si setf cuplsim +" Dafny +au BufNewFile,BufRead *.dfy setf dafny + " Dart au BufRead,BufNewfile *.dart,*.drt setf dart @@ -646,8 +708,11 @@ au BufNewFile,BufRead *.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 +" DTS/DSTI/DTSO (device tree files) +au BufNewFile,BufRead *.dts,*.dtsi,*.dtso,*.its,*.keymap setf dts + +" Earthfile +au BufNewFile,BufRead Earthfile setf earthfile " EDIF (*.edf,*.edif,*.edn,*.edo) or edn au BufNewFile,BufRead *.ed\(f\|if\|o\) setf edif @@ -727,6 +792,9 @@ au BufNewFile,BufRead *.fir setf firrtl " Fish shell au BufNewFile,BufRead *.fish setf fish +" Flatpak config +au BufNewFile,BufRead */flatpak/repo/config setf dosini + " FlexWiki - disabled, because it has side effects when a .wiki file " is not actually FlexWiki "au BufNewFile,BufRead *.wiki setf flexwiki @@ -859,7 +927,7 @@ au BufNewFile,BufRead *.gts setf typescript.glimmer au BufNewFile,BufRead *.gjs setf javascript.glimmer " Gnuplot scripts -au BufNewFile,BufRead *.gpi,.gnuplot setf gnuplot +au BufNewFile,BufRead *.gpi,*.gnuplot,.gnuplot_history setf gnuplot " Go (Google) au BufNewFile,BufRead *.go setf go @@ -910,11 +978,7 @@ au BufNewFile,BufRead *.hs,*.hsc,*.hs-boot,*.hsig setf haskell au BufNewFile,BufRead *.lhs setf lhaskell au BufNewFile,BufRead *.chs setf chaskell au BufNewFile,BufRead cabal.project setf cabalproject -au BufNewFile,BufRead $HOME/.cabal/config setf cabalconfig -if exists('$XDG_CONFIG_HOME') - au BufNewFile,BufRead $XDG_CONFIG_HOME/cabal/config setf cabalconfig -endif -au BufNewFile,BufRead $HOME/.config/cabal/config setf cabalconfig +au BufNewFile,BufRead */{.,}cabal/config setf cabalconfig au BufNewFile,BufRead cabal.config setf cabalconfig au BufNewFile,BufRead *.persistentmodels setf haskellpersistent @@ -935,7 +999,7 @@ au BufNewFile,BufRead *.vc,*.ev,*.sum,*.errsum setf hercules au BufRead,BufNewFile *.heex setf heex " HEX (Intel) -au BufNewFile,BufRead *.hex,*.h32 setf hex +au BufNewFile,BufRead *.hex,*.ihex,*.int,*.ihe,*.ihx,*.mcs,*.h32,*.h80,*.h86,*.a43,*.a90 setf hex " Hjson au BufNewFile,BufRead *.hjson setf hjson @@ -952,6 +1016,9 @@ au BufRead,BufNewFile *.hoon setf hoon " Tilde (must be before HTML) au BufNewFile,BufRead *.t.html setf tilde +" Translate shell +au BufNewFile,BufRead init.trans,*/etc/translate-shell,.trans setf clojure + " HTML (.shtml and .stm for server side) au BufNewFile,BufRead *.html,*.htm,*.shtml,*.stm call dist#ft#FThtml() au BufNewFile,BufRead *.cshtml setf html @@ -1059,6 +1126,7 @@ au BufNewFile,BufRead *.jj,*.jjt setf javacc " JavaScript, ECMAScript, ES module script, CommonJS script au BufNewFile,BufRead *.js,*.jsm,*.javascript,*.es,*.mjs,*.cjs setf javascript +au BufNewFile,BufRead .node_repl_history setf javascript " JavaScript with React au BufNewFile,BufRead *.jsx setf javascriptreact @@ -1092,15 +1160,18 @@ au BufNewFile,BufRead *.json-patch setf json " Geojson is also json au BufNewFile,BufRead *.geojson setf json -" Jupyter Notebook is also json -au BufNewFile,BufRead *.ipynb setf json +" Jupyter Notebook and jupyterlab config is also json +au BufNewFile,BufRead *.ipynb,*.jupyterlab-settings setf json + +" Sublime config +au BufNewFile,BufRead *.sublime-project,*.sublime-settings,*.sublime-workspace setf json " Other files that look like json au BufNewFile,BufRead .prettierrc,.firebaserc,.stylelintrc setf json " JSONC (JSON with comments) au BufNewFile,BufRead *.jsonc,.babelrc,.eslintrc,.jsfmtrc setf jsonc -au BufNewFile,BufRead .jshintrc,.hintrc,.swrc,[jt]sconfig*.json setf jsonc +au BufNewFile,BufRead .jshintrc,.jscsrc,.vsconfig,.hintrc,.swrc,[jt]sconfig*.json setf jsonc " JSON au BufNewFile,BufRead *.json,*.jsonp,*.webmanifest setf json @@ -1141,7 +1212,7 @@ au BufNewFile,BufRead *.kt,*.ktm,*.kts setf kotlin au BufNewFile,BufRead *.ks setf kscript " Kconfig -au BufNewFile,BufRead Kconfig,Kconfig.debug setf kconfig +au BufNewFile,BufRead Kconfig,Kconfig.debug,Config.in setf kconfig " Lace (ISE) au BufNewFile,BufRead *.ace,*.ACE setf lace @@ -1164,8 +1235,11 @@ au BufNewFile,BufRead *.sig call dist#ft#FTsig() " LDAP LDIF au BufNewFile,BufRead *.ldif setf ldif +" Luadoc, Ldoc (must be before *.ld) +au BufNewFile,BufRead config.ld setf lua + " Ld loader -au BufNewFile,BufRead *.ld setf ld +au BufNewFile,BufRead *.ld,*/ldscripts/* setf ld " Lean au BufNewFile,BufRead *.lean setf lean @@ -1200,9 +1274,9 @@ au BufNewFile,BufRead *.ly,*.ily setf lilypond " Lisp (*.el = ELisp, *.cl = Common Lisp) " *.jl was removed, it's also used for Julia, better skip than guess wrong. if has("fname_case") - au BufNewFile,BufRead *.lsp,*.lisp,*.asd,*.el,*.cl,*.L,.emacs,.sawfishrc setf lisp + au BufNewFile,BufRead *.lsp,*.lisp,*.asd,*.el,*.cl,*.L,.emacs,.sawfishrc,*.stsg,*/supertux2/config setf lisp else - au BufNewFile,BufRead *.lsp,*.lisp,*.asd,*.el,*.cl,.emacs,.sawfishrc setf lisp + au BufNewFile,BufRead *.lsp,*.lisp,*.asd,*.el,*.cl,.emacs,.sawfishrc,*.stsg,*/supertux2/config setf lisp endif " SBCL implementation of Common Lisp @@ -1233,13 +1307,17 @@ au BufNewFile,BufRead */etc/login.defs setf logindefs au BufNewFile,BufRead *.lgt setf logtalk " LOTOS -au BufNewFile,BufRead *.lot,*.lotos setf lotos +au BufNewFile,BufRead *.lotos setf lotos + +" LOTOS or LaTeX \listoftables files +au BufNewFile,BufRead *.lot + \ if getline(1) =~# '\\contentsline' |setf tex|else|setf lotos|endif " Lout (also: *.lt) au BufNewFile,BufRead *.lou,*.lout setf lout -" Lua -au BufNewFile,BufRead *.lua setf lua +" Lua, Texlua +au BufNewFile,BufRead *.lua,*.tlu,.lua_history setf lua " Luau au BufNewFile,BufRead *.luau setf luau @@ -1251,7 +1329,7 @@ au BufNewFile,BufRead .luaurc setf jsonc au BufNewFile,BufRead .luacheckrc setf lua " Luarocks -au BufNewFile,BufRead *.rockspec setf lua +au BufNewFile,BufRead *.rockspec,rock_manifest setf lua " Linden Scripting Language (Second Life) au BufNewFile,BufRead *.lsl call dist#ft#FTlsl() @@ -1262,6 +1340,7 @@ au BufNewFile,BufRead *.lss setf lss " M4 au BufNewFile,BufRead *.m4 \ if expand("") !~? 'html.m4$\|fvwm2rc' | setf m4 | endif +au BufNewFile,BufRead .m4_history setf m4 " MaGic Point au BufNewFile,BufRead *.mgp setf mgp @@ -1297,7 +1376,12 @@ au BufNewFile,BufRead *.mv,*.mpl,*.mws setf maple au BufNewFile,BufRead *.map setf map " Markdown -au BufNewFile,BufRead *.markdown,*.mdown,*.mkd,*.mkdn,*.mdwn,*.md setf markdown +au BufNewFile,BufRead *.markdown,*.mdown,*.mkd,*.mkdn,*.mdwn,*.md + \ if exists("g:filetype_md") | + \ exe "setf " . g:filetype_md | + \ else | + \ setf markdown | + \ endif " Mason au BufNewFile,BufRead *.mason,*.mhtml,*.comp setf mason @@ -1311,6 +1395,9 @@ au BufNewFile,BufRead *.nb setf mma " Maya Extension Language au BufNewFile,BufRead *.mel setf mel +" mbsync +au BufNewFile,BufRead .mbsyncrc setf conf + " Mercurial (hg) commit file au BufNewFile,BufRead hg-editor-*.txt setf hgcommit @@ -1343,6 +1430,9 @@ au BufNewFile,BufRead *.mix,*.mixal setf mix " MMIX or VMS makefile au BufNewFile,BufRead *.mms call dist#ft#FTmms() +" msmtp +au BufNewFile,BufRead .msmtprc setf msmtp + " Symbian meta-makefile definition (MMP) au BufNewFile,BufRead *.mmp setf mmp @@ -1386,7 +1476,7 @@ au BufNewFile,BufRead mrxvtrc,.mrxvtrc setf mrxvtrc au BufNewFile,BufRead *.msql setf msql " Mysql -au BufNewFile,BufRead *.mysql setf mysql +au BufNewFile,BufRead *.mysql,.mysql_history setf mysql " Tcl Shell RC file au BufNewFile,BufRead tclsh.rc setf tcl @@ -1432,6 +1522,9 @@ au BufNewFile,BufRead Neomuttrc setf neomuttrc " Netrc au BufNewFile,BufRead .netrc setf netrc +" Neofetch +au BufNewFile,BufRead */neofetch/config.conf setf sh + " Nginx au BufNewFile,BufRead *.nginx,nginx*.conf,*nginx.conf,*/etc/nginx/*,*/usr/local/nginx/conf/*,*/nginx/*.conf setf nginx @@ -1467,6 +1560,9 @@ au BufNewFile,BufRead *.mm call dist#ft#FTmm() " Not Quite C au BufNewFile,BufRead *.nqc setf nqc +" notmuch +au BufNewFile,BufRead .notmuch-config setf dosini + " NSE - Nmap Script Engine - uses Lua syntax au BufNewFile,BufRead *.nse setf lua @@ -1489,7 +1585,7 @@ au BufNewFile,BufRead *.ml,*.mli,*.mll,*.mly,.ocamlinit,*.mlt,*.mlp,*.mlip,*.mli au BufNewFile,BufRead *.occ setf occam " Octave -au BufNewFile,BufRead octave.conf,.octaverc,octaverc setf octave +au BufNewFile,BufRead octave.conf,.octaverc,octaverc,*/octave/history setf octave " Odin au BufNewFile,BufRead *.odin setf odin @@ -1522,9 +1618,10 @@ au BufNewFile,BufRead *.org,*.org_archive setf org au BufNewFile,BufRead pf.conf setf pf " ini style config files, using # comments -au BufNewFile,BufRead */etc/pacman.conf,mpv.conf setf confini +au BufNewFile,BufRead pacman.conf,mpv.conf setf confini au BufNewFile,BufRead */.aws/config,*/.aws/credentials setf confini au BufNewFile,BufRead *.nmconnection setf confini +au BufNewFile,BufRead paru.conf setf confini " Pacman hooks au BufNewFile,BufRead *.hook @@ -1532,6 +1629,9 @@ au BufNewFile,BufRead *.hook \ setf confini | \ endif +" Pacman makepkg +au BufNewFile,BufRead {.,}makepkg.conf setf sh + " Pacman log au BufNewFile,BufRead pacman.log setf pacmanlog @@ -1553,8 +1653,16 @@ au BufNewFile,BufRead *.pas setf pascal " Pascal or Puppet manifest au BufNewFile,BufRead *.pp call dist#ft#FTpp() -" Delphi or Lazarus program file -au BufNewFile,BufRead *.dpr,*.lpr setf pascal +" Delphi +au BufNewFile,BufRead *.dpr setf pascal + +" Xilinx labtools project file or Lazarus program file +au BufNewFile,BufRead *.lpr + \ if getline(1) =~# " +" Language: asciidoc +" Maintainer: Luca Saccarola +" Last Change: 2024 Jan 16 + +if exists("b:did_ftplugin") + finish +endif +let b:did_ftplugin = 1 + +if exists('b:undo_ftplugin') + let b:undo_ftplugin .= "|setl cms< com< fo< flp< inex< efm< cfu< fde< fdm<" +else + let b:undo_ftplugin = "setl cms< com< fo< flp< inex< efm< cfu< fde< fdm<" +endif + +" gf to open include::file.ext[] and link:file.ext[] files +setlocal includeexpr=substitute(v:fname,'\\(link:\\\|include::\\)\\(.\\{-}\\)\\[.*','\\2','g') + +setlocal comments= +setlocal commentstring=//\ %s + +setlocal formatoptions+=cqn +setlocal formatlistpat=^\\s*[\\[({]\\?\\([0-9]\\+ +setlocal formatlistpat+=\\\|[a-zA-Z]\\)[\\]:.)}]\\s\\+ +setlocal formatlistpat+=\\\|^\\s*-\\s\\+ +setlocal formatlistpat+=\\\|^\\s*[*]\\+\\s\\+ +setlocal formatlistpat+=\\\|^\\s*[.]\\+\\s\\+ + +function AsciidocFold() + let line = getline(v:lnum) + + if (v:lnum == 1) && (line =~ '^----*$') + return ">1" + endif + + let nested = get(g:, "asciidoc_foldnested", 1) + + " Regular headers + let depth = match(line, '\(^=\+\)\@<=\( .*$\)\@=') + + " Do not fold nested regular headers + if depth > 1 && !nested + let depth = 1 + endif + + if depth > 0 + " fold all sections under title + if depth > 1 && !get(g:, "asciidoc_fold_under_title", 1) + let depth -= 1 + endif + " check syntax, it should be asciidocTitle or asciidocH + let syncode = synstack(v:lnum, 1) + if len(syncode) > 0 && synIDattr(syncode[0], 'name') =~ 'asciidoc\%(H[1-6]\)\|Title' + return ">" . depth + endif + endif + + return "=" +endfunction + +if has("folding") && get(g:, 'asciidoc_folding', 0) + setlocal foldexpr=AsciidocFold() + setlocal foldmethod=expr + let b:undo_ftplugin .= "|setl foldexpr< foldmethod< foldtext<" +endif diff --git a/runtime/ftplugin/asm.vim b/runtime/ftplugin/asm.vim index f6a92d57d7..0ae1610394 100644 --- a/runtime/ftplugin/asm.vim +++ b/runtime/ftplugin/asm.vim @@ -1,13 +1,23 @@ " Vim filetype plugin file " Language: asm " Maintainer: Colin Caine -" Last Change: 23 May 2020 +" Last Change: 2020 May 23 " 2023 Aug 28 by Vim Project (undo_ftplugin) +" 2024 Apr 09 by Vim Project (add Matchit support) if exists("b:did_ftplugin") | finish | endif let b:did_ftplugin = 1 +setl include=^\\s*%\\s*include setl comments=:;,s1:/*,mb:*,ex:*/,:// setl commentstring=;%s -let b:undo_ftplugin = "setl commentstring< comments<" +let b:undo_ftplugin = "setl commentstring< comments< include<" + +" Matchit support +if !exists('b:match_words') + let b:match_skip = 's:comment\|string\|character\|special' + let b:match_words = '^\s*%\s*if\%(\|num\|idn\|nidn\)\>:^\s*%\s*elif\>:^\s*%\s*else\>:^\s*%\s*endif\>,^\s*%\s*macro\>:^\s*%\s*endmacro\>,^\s*%\s*rep\>:^\s*%\s*endrep\>' + let b:match_ignorecase = 1 + let b:undo_ftplugin ..= " | unlet! b:match_ignorecase b:match_words b:match_skip" +endif diff --git a/runtime/ftplugin/bp.vim b/runtime/ftplugin/bp.vim new file mode 100644 index 0000000000..cb925cb0ec --- /dev/null +++ b/runtime/ftplugin/bp.vim @@ -0,0 +1,14 @@ +" Blueprint build system filetype plugin file +" Language: Blueprint +" Maintainer: Bruno BELANYI +" Latest Revision: 2024-04-10 + +if exists("b:did_ftplugin") + finish +endif +let b:did_ftplugin = 1 + +setlocal comments=b:# +setlocal commentstring=#\ %s + +let b:undo_ftplugin = "setlocal comments< commentstring<" diff --git a/runtime/ftplugin/cgdbrc.vim b/runtime/ftplugin/cgdbrc.vim new file mode 100644 index 0000000000..46cf135c5c --- /dev/null +++ b/runtime/ftplugin/cgdbrc.vim @@ -0,0 +1,21 @@ +" Vim filetype plugin file +" Language: cgdbrc +" Maintainer: Wu, Zhenyu +" Documentation: https://cgdb.github.io/docs/Configuring-CGDB.html +" Latest Revision: 2024-04-09 + +if exists('b:did_ftplugin') + finish +endif +let b:did_ftplugin = 1 + +let s:save_cpoptions = &cpoptions +set cpoptions&vim + +let b:undo_ftplugin = 'setl com< cms<' + +setlocal commentstring=#%s +setlocal comments=:# + +let &cpoptions = s:save_cpoptions +unlet s:save_cpoptions diff --git a/runtime/ftplugin/deb822sources.vim b/runtime/ftplugin/deb822sources.vim new file mode 100644 index 0000000000..4936f42bf9 --- /dev/null +++ b/runtime/ftplugin/deb822sources.vim @@ -0,0 +1,16 @@ +" Language: Debian sources.list +" Maintainer: Debian Vim Maintainers +" Last Change: 2024 Mar 20 +" License: Vim License +" URL: https://salsa.debian.org/vim-team/vim-debian/blob/main/ftplugin/deb822sources.vim + +if exists('b:did_ftplugin') + finish +endif +let b:did_ftplugin=1 + +setlocal comments=:# +setlocal commentstring=#%s +setlocal formatoptions-=t + +let b:undo_ftplugin = 'setlocal comments< commentstring< formatoptions<' diff --git a/runtime/ftplugin/dts.vim b/runtime/ftplugin/dts.vim new file mode 100644 index 0000000000..42e38338b7 --- /dev/null +++ b/runtime/ftplugin/dts.vim @@ -0,0 +1,16 @@ +" Vim filetype plugin file +" Language: dts/dtsi (device tree files) +" Maintainer: Wu, Zhenyu +" Latest Revision: 2024 Apr 12 + +if exists('b:did_ftplugin') + finish +endif +let b:did_ftplugin = 1 + +let b:undo_ftplugin = 'setl inc< cms< com<' + +setlocal include=^\\%(#include\\\|/include/\\) +" same as C +setlocal commentstring& +setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,:///,:// diff --git a/runtime/ftplugin/gdb.vim b/runtime/ftplugin/gdb.vim index 2473b13af0..7c10633be4 100644 --- a/runtime/ftplugin/gdb.vim +++ b/runtime/ftplugin/gdb.vim @@ -1,12 +1,20 @@ " Vim filetype plugin file " Language: gdb " Maintainer: Michaël Peeters -" Last Changed: 26 Oct 2017 +" Last Changed: 2017-10-26 +" 2024-04-10: - add Matchit support (by Vim Project) if exists("b:did_ftplugin") | finish | endif let b:did_ftplugin = 1 setlocal commentstring=#%s +setlocal include=^\\s*source " Undo the stuff we changed. -let b:undo_ftplugin = "setlocal cms<" +let b:undo_ftplugin = "setlocal cms< include<" + +" Matchit support +if !exists('b:match_words') + let b:match_words = '\<\%(if\|while\|define\|document\)\>:\:\' + let b:undo_ftplugin ..= " | unlet! b:match_words" +endif diff --git a/runtime/ftplugin/java.vim b/runtime/ftplugin/java.vim index bb7e7cd72c..095e733715 100644 --- a/runtime/ftplugin/java.vim +++ b/runtime/ftplugin/java.vim @@ -1,10 +1,9 @@ " Vim filetype plugin file " Language: Java -" -" This runtime file is looking for a new maintainer. -" -" Former maintainer: Dan Sharp -" Last Change: 2012 Mar 11 +" Maintainer: Aliaksei Budavei <0x000c70 AT gmail DOT com> +" Former Maintainer: Dan Sharp +" Repository: https://github.com/zzzyxwvut/java-vim.git +" Last Change: 2024 Apr 13 " 2024 Jan 14 by Vim Project (browsefilter) if exists("b:did_ftplugin") | finish | endif diff --git a/runtime/ftplugin/kconfig.vim b/runtime/ftplugin/kconfig.vim index 940ba7427f..767490701b 100644 --- a/runtime/ftplugin/kconfig.vim +++ b/runtime/ftplugin/kconfig.vim @@ -1,9 +1,9 @@ " Vim filetype plugin file " Vim syntax file -" Maintainer: Christian Brabandt -" Previous Maintainer: Nikolai Weibull -" Latest Revision: 2015-05-29 -" License: Vim (see :h license) +" Maintainer: Christian Brabandt +" Previous Maintainer: Nikolai Weibull +" Latest Revision: 2024-04-12 +" License: Vim (see :h license) " Repository: https://github.com/chrisbra/vim-kconfig if exists("b:did_ftplugin") @@ -11,17 +11,12 @@ if exists("b:did_ftplugin") endif let b:did_ftplugin = 1 -let s:cpo_save = &cpo -set cpo&vim - -let b:undo_ftplugin = "setl com< cms< fo<" +let b:undo_ftplugin = "setl inc< com< cms< fo<" +setlocal include=source\\s\\+ setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql " For matchit.vim if exists("loaded_matchit") let b:match_words = '^\:\,^\:\,^\:\' endif - -let &cpo = s:cpo_save -unlet s:cpo_save diff --git a/runtime/ftplugin/r.vim b/runtime/ftplugin/r.vim index f3b4960b7f..6b07744c4a 100644 --- a/runtime/ftplugin/r.vim +++ b/runtime/ftplugin/r.vim @@ -1,9 +1,9 @@ " Vim filetype plugin file -" Language: R -" Maintainer: Jakson Alves de Aquino -" Homepage: https://github.com/jalvesaq/R-Vim-runtime -" Last Change: Sun Apr 24, 2022 09:14AM -" 2024 Jan 14 by Vim Project (browsefilter) +" Language: R +" Maintainer: This runtime file is looking for a new maintainer. +" Former Maintainer: Jakson Alves de Aquino +" Former Repository: https://github.com/jalvesaq/R-Vim-runtime +" Last Change: 2024 Feb 28 by Vim Project " Only do this when not yet done for this buffer if exists("b:did_ftplugin") @@ -23,7 +23,7 @@ setlocal comments=:#',:###,:##,:# if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter") let b:browsefilter = "R Source Files (*.R)\t*.R\n" . - \ "Files that include R (*.Rnw *.Rd *.Rmd *.Rrst *.qmd)\t*.Rnw;*.Rd;*.Rmd;*.Rrst;*.qmd\n" + \ "Files that include R (*.Rnw, *.Rd, *.Rmd, *.Rrst, *.qmd)\t*.Rnw;*.Rd;*.Rmd;*.Rrst;*.qmd\n" if has("win32") let b:browsefilter .= "All Files (*.*)\t*\n" else diff --git a/runtime/ftplugin/requirements.vim b/runtime/ftplugin/requirements.vim new file mode 100644 index 0000000000..fcfc1ac269 --- /dev/null +++ b/runtime/ftplugin/requirements.vim @@ -0,0 +1,43 @@ +" the Requirements File Format syntax support for Vim +" Version: 1.8.0 +" Author: raimon +" Upstream: https://github.com/raimon49/requirements.txt.vim +" License: MIT LICENSE +" The MIT License (MIT) +" +" Copyright (c) 2015 raimon +" +" 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. +if exists("b:did_ftplugin") + finish +endif +let b:did_ftplugin = 1 + +let s:save_cpoptions = &cpoptions +set cpoptions&vim + +let b:undo_ftplugin = "setl iskeyword< commentstring<" +" pip options contain "-" +setlocal iskeyword+=- +setlocal commentstring=#\ %s +compiler pip_compile + +let &cpoptions = s:save_cpoptions +unlet s:save_cpoptions +" vim: et sw=4 ts=4 sts=4: diff --git a/runtime/ftplugin/rhelp.vim b/runtime/ftplugin/rhelp.vim index c912f0cee8..0fa1e56573 100644 --- a/runtime/ftplugin/rhelp.vim +++ b/runtime/ftplugin/rhelp.vim @@ -1,9 +1,9 @@ " Vim filetype plugin file -" Language: R help file -" Maintainer: Jakson Alves de Aquino -" Homepage: https://github.com/jalvesaq/R-Vim-runtime -" Last Change: Sun Apr 24, 2022 09:12AM -" 2024 Jan 14 by Vim Project (browsefilter) +" Language: R help file +" Maintainer: This runtime file is looking for a new maintainer. +" Former Maintainer: Jakson Alves de Aquino +" Former Repository: https://github.com/jalvesaq/R-Vim-runtime +" Last Change: 2024 Feb 28 by Vim Project " Only do this when not yet done for this buffer if exists("b:did_ftplugin") @@ -19,7 +19,7 @@ set cpo&vim setlocal iskeyword=@,48-57,_,. if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter") - let b:browsefilter = "R Source Files (*.R *.Rnw *.Rd *.Rmd *.Rrst *.qmd)\t*.R;*.Rnw;*.Rd;*.Rmd;*.Rrst;*.qmd\n" + let b:browsefilter = "R Source Files (*.R, *.Rnw, *.Rd, *.Rmd, *.Rrst, *.qmd)\t*.R;*.Rnw;*.Rd;*.Rmd;*.Rrst;*.qmd\n" if has("win32") let b:browsefilter .= "All Files (*.*)\t*\n" else diff --git a/runtime/ftplugin/rmd.vim b/runtime/ftplugin/rmd.vim index 545aef2f31..a537017aad 100644 --- a/runtime/ftplugin/rmd.vim +++ b/runtime/ftplugin/rmd.vim @@ -1,9 +1,9 @@ " Vim filetype plugin file -" Language: R Markdown file -" Maintainer: Jakson Alves de Aquino -" Homepage: https://github.com/jalvesaq/R-Vim-runtime -" Last Change: Mon May 29, 2023 06:31AM -" 2024 Jan 14 by Vim Project (browsefilter) +" Language: R Markdown file +" Maintainer: This runtime file is looking for a new maintainer. +" Former Maintainer: Jakson Alves de Aquino +" Former Repository: https://github.com/jalvesaq/R-Vim-runtime +" Last Change: 2024 Feb 28 by Vim Project " Original work by Alex Zvoleff (adjusted from R help for rmd by Michel Kuhlmann) " Only do this when not yet done for this buffer @@ -65,7 +65,7 @@ runtime ftplugin/pandoc.vim let b:did_ftplugin = 1 if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter") - let b:browsefilter = "R Source Files (*.R *.Rnw *.Rd *.Rmd *.Rrst *.qmd)\t*.R;*.Rnw;*.Rd;*.Rmd;*.Rrst;*.qmd\n" + let b:browsefilter = "R Source Files (*.R, *.Rnw, *.Rd, *.Rmd, *.Rrst, *.qmd)\t*.R;*.Rnw;*.Rd;*.Rmd;*.Rrst;*.qmd\n" if has("win32") let b:browsefilter .= "All Files (*.*)\t*\n" else diff --git a/runtime/ftplugin/rnoweb.vim b/runtime/ftplugin/rnoweb.vim index a7c151cfa5..8dfdf1e80f 100644 --- a/runtime/ftplugin/rnoweb.vim +++ b/runtime/ftplugin/rnoweb.vim @@ -1,9 +1,9 @@ " Vim filetype plugin file -" Language: Rnoweb -" Maintainer: Jakson Alves de Aquino -" Homepage: https://github.com/jalvesaq/R-Vim-runtime -" Last Change: Mon Feb 27, 2023 07:16PM -" 2024 Jan 14 by Vim Project (browsefilter) +" Language: Rnoweb +" Maintainer: This runtime file is looking for a new maintainer. +" Former Maintainer: Jakson Alves de Aquino +" Former Repository: https://github.com/jalvesaq/R-Vim-runtime +" Last Change: 2024 Feb 28 by Vim Project " Only do this when not yet done for this buffer if exists("b:did_ftplugin") @@ -26,7 +26,7 @@ setlocal suffixesadd=.bib,.tex setlocal comments=b:%,b:#,b:##,b:###,b:#' if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter") - let b:browsefilter = "R Source Files (*.R *.Rnw *.Rd *.Rmd *.Rrst *.qmd)\t*.R;*.Rnw;*.Rd;*.Rmd;*.Rrst;*.qmd\n" + let b:browsefilter = "R Source Files (*.R, *.Rnw, *.Rd, *.Rmd, *.Rrst, *.qmd)\t*.R;*.Rnw;*.Rd;*.Rmd;*.Rrst;*.qmd\n" if has("win32") let b:browsefilter .= "All Files (*.*)\t*\n" else diff --git a/runtime/ftplugin/roc.vim b/runtime/ftplugin/roc.vim new file mode 100644 index 0000000000..c66510874d --- /dev/null +++ b/runtime/ftplugin/roc.vim @@ -0,0 +1,14 @@ +" Roc filetype plugin file +" Language: Roc +" Maintainer: nat-418 <93013864+nat-418@users.noreply.github.com> +" Latest Revision: 2024-04-5 + +if exists("b:did_ftplugin") + finish +endif +let b:did_ftplugin = 1 + +setlocal comments=:##,:# +setlocal commentstring=#\ %s + +let b:undo_ftplugin = "setl com< cms<" diff --git a/runtime/ftplugin/rrst.vim b/runtime/ftplugin/rrst.vim index 7da2c4b74b..d088f98224 100644 --- a/runtime/ftplugin/rrst.vim +++ b/runtime/ftplugin/rrst.vim @@ -1,9 +1,9 @@ " Vim filetype plugin file -" Language: reStructuredText documentation format with R code -" Maintainer: Jakson Alves de Aquino -" Homepage: https://github.com/jalvesaq/R-Vim-runtime -" Last Change: Mon Feb 27, 2023 07:16PM -" 2024 Jan 14 by Vim Project (browsefilter) +" Language: reStructuredText documentation format with R code +" Maintainer: This runtime file is looking for a new maintainer. +" Former Maintainer: Jakson Alves de Aquino +" Former Repository: https://github.com/jalvesaq/R-Vim-runtime +" Last Change: 2024 Feb 28 by Vim Project " Original work by Alex Zvoleff " Only do this when not yet done for this buffer @@ -39,7 +39,7 @@ if !exists("g:rrst_dynamic_comments") || (exists("g:rrst_dynamic_comments") && g endif if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter") - let b:browsefilter = "R Source Files (*.R *.Rnw *.Rd *.Rmd *.Rrst *.qmd)\t*.R;*.Rnw;*.Rd;*.Rmd;*.Rrst;*.qmd\n" + let b:browsefilter = "R Source Files (*.R, *.Rnw, *.Rd, *.Rmd, *.Rrst, *.qmd)\t*.R;*.Rnw;*.Rd;*.Rmd;*.Rrst;*.qmd\n" if has("win32") let b:browsefilter .= "All Files (*.*)\t*\n" else diff --git a/runtime/ftplugin/rust.vim b/runtime/ftplugin/rust.vim index 7f1a86ea95..fb15b444d0 100644 --- a/runtime/ftplugin/rust.vim +++ b/runtime/ftplugin/rust.vim @@ -1,7 +1,7 @@ " Language: Rust " Description: Vim ftplugin for Rust " Maintainer: Chris Morgan -" Last Change: 2023-09-11 +" Last Change: 2024-03-17 " For bugs, patches and license go to https://github.com/rust-lang/rust.vim if exists("b:did_ftplugin") @@ -94,14 +94,15 @@ if has('conceal') && get(g:, 'rust_conceal', 0) endif " Motion Commands {{{1 - -" Bind motion commands to support hanging indents -nnoremap [[ :call rust#Jump('n', 'Back') -nnoremap ]] :call rust#Jump('n', 'Forward') -xnoremap [[ :call rust#Jump('v', 'Back') -xnoremap ]] :call rust#Jump('v', 'Forward') -onoremap [[ :call rust#Jump('o', 'Back') -onoremap ]] :call rust#Jump('o', 'Forward') +if !exists("g:no_plugin_maps") && !exists("g:no_rust_maps") + " Bind motion commands to support hanging indents + nnoremap [[ :call rust#Jump('n', 'Back') + nnoremap ]] :call rust#Jump('n', 'Forward') + xnoremap [[ :call rust#Jump('v', 'Back') + xnoremap ]] :call rust#Jump('v', 'Forward') + onoremap [[ :call rust#Jump('o', 'Back') + onoremap ]] :call rust#Jump('o', 'Forward') +endif " Commands {{{1 @@ -176,12 +177,12 @@ let b:undo_ftplugin = " \|delcommand -buffer RustInfoToClipboard \|delcommand -buffer RustInfoToFile \|delcommand -buffer RustTest - \|nunmap [[ - \|nunmap ]] - \|xunmap [[ - \|xunmap ]] - \|ounmap [[ - \|ounmap ]] + \|silent! nunmap [[ + \|silent! nunmap ]] + \|silent! xunmap [[ + \|silent! xunmap ]] + \|silent! ounmap [[ + \|silent! ounmap ]] \|setlocal matchpairs-=<:> \|unlet b:match_skip \" diff --git a/runtime/ftplugin/sh.vim b/runtime/ftplugin/sh.vim index fccfe4be91..6d2093bf83 100644 --- a/runtime/ftplugin/sh.vim +++ b/runtime/ftplugin/sh.vim @@ -4,7 +4,7 @@ " Previous Maintainer: Dan Sharp " Contributor: Enno Nagel " Eisuke Kawashima -" Last Change: 2024 Jan 14 +" Last Change: 2024 Feb 27 if exists("b:did_ftplugin") finish @@ -14,7 +14,7 @@ let b:did_ftplugin = 1 let s:save_cpo = &cpo set cpo-=C -setlocal comments=:# +setlocal comments=b:# setlocal commentstring=#\ %s setlocal formatoptions-=t formatoptions+=croql diff --git a/runtime/ftplugin/vim.vim b/runtime/ftplugin/vim.vim index 575af7405c..67f360bf38 100644 --- a/runtime/ftplugin/vim.vim +++ b/runtime/ftplugin/vim.vim @@ -1,7 +1,7 @@ " Vim filetype plugin -" Language: Vim -" Maintainer: The Vim Project -" Last Change: 2023 Aug 10 +" Language: Vim +" Maintainer: Doug Kearns +" Last Change: 2024 Apr 13 " Former Maintainer: Bram Moolenaar " Only do this when not done yet for this buffer @@ -50,7 +50,7 @@ setlocal isk+=# setlocal keywordprg=:help " Comments starts with # in Vim9 script. We have to guess which one to use. -if "\n" .. getline(1, 10)->join("\n") =~# '\n\s*vim9\%[script]\>' +if "\n" .. getline(1, 32)->join("\n") =~# '\n\s*vim9\%[script]\>' setlocal commentstring=#%s else setlocal commentstring=\"%s diff --git a/runtime/ftplugin/yaml.vim b/runtime/ftplugin/yaml.vim index db7cbd7ddb..8bfc45e4c8 100644 --- a/runtime/ftplugin/yaml.vim +++ b/runtime/ftplugin/yaml.vim @@ -16,6 +16,13 @@ let b:undo_ftplugin = "setl com< cms< et< fo<" setlocal comments=:# commentstring=#\ %s expandtab setlocal formatoptions-=t formatoptions+=croql +" rime input method engine uses `*.custom.yaml` as its config files +if expand('%:r:e') ==# 'custom' + compiler rime_deployer + setlocal include=__include:\\s* + let b:undo_ftplugin ..= " inc<" +endif + if !exists("g:yaml_recommended_style") || g:yaml_recommended_style != 0 let b:undo_ftplugin ..= " sw< sts<" setlocal shiftwidth=2 softtabstop=2 diff --git a/runtime/ftplugin/zathurarc.vim b/runtime/ftplugin/zathurarc.vim new file mode 100644 index 0000000000..259fb137a1 --- /dev/null +++ b/runtime/ftplugin/zathurarc.vim @@ -0,0 +1,22 @@ +" Vim filetype plugin file +" Language: Zathurarc +" Maintainer: Wu, Zhenyu +" Documentation: https://pwmt.org/projects/zathura/documentation/ +" Upstream: https://github.com/Freed-Wu/zathurarc.vim +" Latest Revision: 2024-04-02 + +if exists('b:did_ftplugin') + finish +endif +let b:did_ftplugin = 1 + +let s:save_cpoptions = &cpoptions +set cpoptions&vim + +let b:undo_ftplugin = 'setlocal comments< commentstring< include<' +setlocal comments=:# +setlocal commentstring=#\ %s +setlocal include=^\sinclude + +let &cpoptions = s:save_cpoptions +unlet s:save_cpoptions diff --git a/runtime/indent/Make_mvc.mak b/runtime/indent/Make_mvc.mak new file mode 100644 index 0000000000..0f73d7fa79 --- /dev/null +++ b/runtime/indent/Make_mvc.mak @@ -0,0 +1,21 @@ +# Makefile for running indent tests on OS Windows. +# Made on the base of a indent/Makefile. +# Restorer, 13.03.2024 + +.SUFFIXES: + +VIM = vim.exe +VIMRUNTIME = .. + +# Run the tests that didn't run yet or failed previously. +# If a test succeeds a testdir\*.out file will be written. +# If a test fails a testdir\*.fail file will be written. +test : + @ set "VIMRUNTIME=$(VIMRUNTIME)" + $(VIM) --clean --not-a-term -u testdir\runtest.vim + + +clean testclean : + @ if exist testdir\*.fail del /q testdir\*.fail + @ if exist testdir\*.out del /q testdir\*.out + diff --git a/runtime/indent/Makefile b/runtime/indent/Makefile index f6c44736d2..66ded80928 100644 --- a/runtime/indent/Makefile +++ b/runtime/indent/Makefile @@ -1,5 +1,8 @@ # Portable Makefile for running indent tests. +.SUFFIXES: +.PHONY: test clean testclean + VIM = vim VIMRUNTIME = .. diff --git a/runtime/indent/asm.vim b/runtime/indent/asm.vim new file mode 100644 index 0000000000..7f848c7b5f --- /dev/null +++ b/runtime/indent/asm.vim @@ -0,0 +1,28 @@ +" Vim indent file +" Language: asm +" Maintainer: Philip Jones +" Upstream: https://github.com/philj56/vim-asm-indent +" Latest Revision: 2017-07-01 + +if exists("b:did_indent") + finish +endif +let b:did_indent = 1 + +setlocal indentexpr=s:getAsmIndent() +setlocal indentkeys=<:>,!^F,o,O + +let b:undo_ftplugin .= "indentexpr< indentkeys<" + +function! s:getAsmIndent() + let line = getline(v:lnum) + let ind = shiftwidth() + + " If the line is a label (starts with ':' terminated keyword), + " then don't indent + if line =~ '^\s*\k\+:' + let ind = 0 + endif + + return ind +endfunction diff --git a/runtime/indent/json5.vim b/runtime/indent/json5.vim new file mode 100644 index 0000000000..5977a4b912 --- /dev/null +++ b/runtime/indent/json5.vim @@ -0,0 +1,11 @@ +" Vim indent file +" Language: JSON5 +" Maintainer: The Vim Project +" Last Change: 2024-03-26 + +if exists("b:did_indent") + finish +endif + +" Same as jsonc indenting for now +runtime! indent/jsonc.vim diff --git a/runtime/indent/r.vim b/runtime/indent/r.vim index f7956e4fe0..339c46b172 100644 --- a/runtime/indent/r.vim +++ b/runtime/indent/r.vim @@ -1,8 +1,10 @@ " Vim indent file " Language: R -" Author: Jakson Alves de Aquino -" Homepage: https://github.com/jalvesaq/R-Vim-runtime -" Last Change: Sun Oct 08, 2023 10:45AM +" Maintainer: This runtime file is looking for a new maintainer. +" Former Maintainer: Jakson Alves de Aquino +" Former Repository: https://github.com/jalvesaq/R-Vim-runtime +" Last Change: 2023 Oct 08 10:45AM +" 2024 Feb 19 by Vim Project (announce adoption) " Only load this indent file when no other was loaded. diff --git a/runtime/indent/rhelp.vim b/runtime/indent/rhelp.vim index 334802ab78..97820ae148 100644 --- a/runtime/indent/rhelp.vim +++ b/runtime/indent/rhelp.vim @@ -1,8 +1,10 @@ " Vim indent file " Language: R Documentation (Help), *.Rd -" Author: Jakson Alves de Aquino -" Homepage: https://github.com/jalvesaq/R-Vim-runtime -" Last Change: Mon Feb 27, 2023 07:01PM +" Maintainer: This runtime file is looking for a new maintainer. +" Former Maintainer: Jakson Alves de Aquino +" Former Repository: https://github.com/jalvesaq/R-Vim-runtime +" Last Change: 2023 Feb 27 07:01PM +" 2024 Feb 19 by Vim Project (announce adoption) " Only load this indent file when no other was loaded. diff --git a/runtime/indent/rmd.vim b/runtime/indent/rmd.vim index a043b0c994..f2d34a3f32 100644 --- a/runtime/indent/rmd.vim +++ b/runtime/indent/rmd.vim @@ -1,8 +1,10 @@ " Vim indent file " Language: Rmd -" Author: Jakson Alves de Aquino -" Homepage: https://github.com/jalvesaq/R-Vim-runtime -" Last Change: Wed Nov 09, 2022 09:44PM +" Maintainer: This runtime file is looking for a new maintainer. +" Former Maintainer: Jakson Alves de Aquino +" Former Repository: https://github.com/jalvesaq/R-Vim-runtime +" Last Change: 2022 Nov 09 09:44PM +" 2024 Feb 19 by Vim Project (announce adoption) " Only load this indent file when no other was loaded. diff --git a/runtime/indent/rnoweb.vim b/runtime/indent/rnoweb.vim index 668cdb7ddd..1bdf7f3b12 100644 --- a/runtime/indent/rnoweb.vim +++ b/runtime/indent/rnoweb.vim @@ -1,8 +1,10 @@ " Vim indent file " Language: Rnoweb -" Author: Jakson Alves de Aquino -" Homepage: https://github.com/jalvesaq/R-Vim-runtime -" Last Change: Mon Feb 27, 2023 07:17PM +" Maintainer: This runtime file is looking for a new maintainer. +" Former Maintainer: Jakson Alves de Aquino +" Former Repository: https://github.com/jalvesaq/R-Vim-runtime +" Last Change: 2024 Feb 27 07:17PM +" 2024 Feb 19 by Vim Project (announce adoption) " Only load this indent file when no other was loaded. diff --git a/runtime/indent/rrst.vim b/runtime/indent/rrst.vim index 585c5e6654..73c8b04611 100644 --- a/runtime/indent/rrst.vim +++ b/runtime/indent/rrst.vim @@ -1,8 +1,10 @@ " Vim indent file " Language: Rrst -" Author: Jakson Alves de Aquino -" Homepage: https://github.com/jalvesaq/R-Vim-runtime -" Last Change: Feb 25, 2023 +" Maintainer: This runtime file is looking for a new maintainer. +" Former Maintainer: Jakson Alves de Aquino +" Former Repository: https://github.com/jalvesaq/R-Vim-runtime +" Last Change: 2023 Feb 25 +" 2024 Feb 19 by Vim Project (announce adoption) " Only load this indent file when no other was loaded. diff --git a/runtime/indent/testdir/runtest.vim b/runtime/indent/testdir/runtest.vim index 882a140a8d..dde8c5c47b 100644 --- a/runtime/indent/testdir/runtest.vim +++ b/runtime/indent/testdir/runtest.vim @@ -2,7 +2,7 @@ " " Current directory must be runtime/indent. -" Only do this with the +eval feature +" Only do this with the +eval feature. if 1 set nocp @@ -18,7 +18,7 @@ au! SwapExists * call HandleSwapExists() func HandleSwapExists() " Ignore finding a swap file for the test input and output, the user might be " editing them and that's OK. - if expand('') =~ '.*\.\(in\|out\|fail\|ok\)' + if expand('') =~ '.*\.\%(in\|out\|fail\|ok\)' let v:swapchoice = 'e' endif endfunc @@ -30,19 +30,19 @@ for fname in glob('testdir/*.in', 1, 1) " Execute the test if the .out file does not exist of when the .in file is " newer. let in_time = getftime(fname) - let out_time = getftime(root . '.out') + let out_time = getftime(root .. '.out') if out_time < 0 || in_time > out_time - call delete(root . '.fail') - call delete(root . '.out') + call delete(root .. '.fail') + call delete(root .. '.out') set sw& ts& filetype= - exe 'split ' . fname + exe 'split ' .. fname let did_some = 0 let failed = 0 let end = 1 while 1 - " Indent all the lines between "START_INDENT" and "END_INDENT" + " Indent all the lines between "START_INDENT" and "END_INDENT". exe end let start = search('\') let end = search('\') @@ -63,7 +63,7 @@ for fname in glob('testdir/*.in', 1, 1) exe lnum + 1 let lnum_exe = search('\') exe lnum + 1 - let indent_at = search('\') + let indent_at = search('\') if lnum_exe > 0 && lnum_exe < end && (indent_at <= 0 || lnum_exe < indent_at) exe substitute(getline(lnum_exe), '.*INDENT_EXE', '', '') let lnum = lnum_exe @@ -87,15 +87,15 @@ for fname in glob('testdir/*.in', 1, 1) exe start + 1 if pattern == '' try - exe 'normal =' . (end - 1) . 'G' + exe 'normal =' .. (end - 1) .. 'G' catch - call append(indent_at, 'ERROR: ' . v:exception) + call append(indent_at, 'ERROR: ' .. v:exception) let failed = 1 endtry else let lnum = search(pattern) if lnum <= 0 - call append(indent_at, 'ERROR: pattern not found: ' . pattern) + call append(indent_at, 'ERROR: pattern not found: ' .. pattern) let failed = 1 break endif @@ -109,7 +109,7 @@ for fname in glob('testdir/*.in', 1, 1) try normal == catch - call append(indent_at, 'ERROR: ' . v:exception) + call append(indent_at, 'ERROR: ' .. v:exception) let failed = 1 endtry endif @@ -118,21 +118,21 @@ for fname in glob('testdir/*.in', 1, 1) if !failed " Check the resulting text equals the .ok file. - if getline(1, '$') != readfile(root . '.ok') + if getline(1, '$') != readfile(root .. '.ok') let failed = 1 endif endif if failed let failed_count += 1 - exe 'write ' . root . '.fail' - echoerr 'Test ' . fname . ' FAILED!' + exe 'write ' .. root .. '.fail' + echoerr 'Test ' .. fname .. ' FAILED!' else - exe 'write ' . root . '.out' - echo "Test " . fname . " OK\n" + exe 'write ' .. root .. '.out' + echo "Test " .. fname .. " OK\n" endif - quit! " close the indented file + quit! " Close the indented file. endif endfor @@ -140,7 +140,7 @@ endfor endif if failed_count > 0 - " have make report an error + " Have make report an error. cquit endif qall! diff --git a/runtime/indent/testdir/vim.in b/runtime/indent/testdir/vim.in index c2e149ab37..1ff2d0d000 100644 --- a/runtime/indent/testdir/vim.in +++ b/runtime/indent/testdir/vim.in @@ -946,3 +946,8 @@ Blue Black endenum " END_INDENT + +" START_INDENT +call prop_type_add('indent_after_literal_dict', #{ foo: 'bar' }) +call prop_type_delete('indent_after_literal_dict') +" END_INDENT diff --git a/runtime/indent/testdir/vim.ok b/runtime/indent/testdir/vim.ok index b10e081dd8..fa8869b61f 100644 --- a/runtime/indent/testdir/vim.ok +++ b/runtime/indent/testdir/vim.ok @@ -946,3 +946,8 @@ enum Color Black endenum " END_INDENT + +" START_INDENT +call prop_type_add('indent_after_literal_dict', #{ foo: 'bar' }) +call prop_type_delete('indent_after_literal_dict') +" END_INDENT diff --git a/runtime/indent/yaml.vim b/runtime/indent/yaml.vim index 93fd8ea6f6..e5daf9f219 100644 --- a/runtime/indent/yaml.vim +++ b/runtime/indent/yaml.vim @@ -3,6 +3,7 @@ " Maintainer: Nikolai Pavlov " Last Updates: Lukas Reineke, "lacygoill" " Last Change: 2022 Jun 17 +" 2024 Feb 29 disable mulitline indent by default (The Vim project) " Only load this indent file when no other was loaded. if exists('b:did_indent') @@ -138,11 +139,13 @@ function GetYAMLIndent(lnum) else return indent(prevmapline) endif - elseif prevline =~# '^\s*- ' + elseif get(g:, 'yaml_indent_multiline_scalar', 0) && + \ prevline =~# '^\s*- ' " - List with " multiline scalar return previndent+2 - elseif prevline =~# s:mapkeyregex .. '\v\s*%(%(' .. s:c_ns_tag_property .. + elseif get(g:, 'yaml_indent_multiline_scalar', 0) && + \ prevline =~# s:mapkeyregex .. '\v\s*%(%(' .. s:c_ns_tag_property .. \ '\v|' .. s:c_ns_anchor_property .. \ '\v|' .. s:block_scalar_header .. \ '\v)%(\s+|\s*%(\#.*)?$))*' diff --git a/runtime/macros/less.vim b/runtime/macros/less.vim index 95a4127961..03a0e90941 100644 --- a/runtime/macros/less.vim +++ b/runtime/macros/less.vim @@ -1,6 +1,6 @@ " Vim script to work like "less" " Maintainer: The Vim Project -" Last Change: 2023 Aug 10 +" Last Change: 2024 Feb 15 " Former Maintainer: Bram Moolenaar " Avoid loading this file twice, allow the user to define his own script. @@ -227,67 +227,181 @@ noremap q :q " Switch to editing (switch off less mode) map v :silent call End() fun! s:End() - set ma + set modifiable noreadonly if exists('s:lz') let &lz = s:lz endif - unmap h - unmap H - unmap - unmap - unmap f - unmap - unmap z - unmap - unmap F - unmap d - unmap - unmap - unmap - unmap e - unmap - unmap j - unmap - unmap b - unmap - unmap w - unmap v - unmap u - unmap - unmap k - unmap y - unmap - unmap - unmap - unmap r - unmap - unmap R - unmap g - unmap < - unmap < - unmap G - unmap > - unmap > - unmap % - unmap p - unmap n - unmap N - unmap q - unmap v - unmap / - unmap ? - unmap - unmap - unmap - unmap - unmap - unmap - unmap - unmap - unmap - unmap - unmap - unmap + if !empty(maparg('h')) + unmap h + endif + if !empty(maparg('H')) + unmap H + endif + if !empty(maparg('')) + unmap + endif + if !empty(maparg('')) + unmap + endif + if !empty(maparg('f')) + unmap f + endif + if !empty(maparg('')) + unmap + endif + if !empty(maparg('z')) + unmap z + endif + if !empty(maparg('')) + unmap + endif + if !empty(maparg('F')) + unmap F + endif + if !empty(maparg('d')) + unmap d + endif + if !empty(maparg('')) + unmap + endif + if !empty(maparg('')) + unmap + endif + if !empty(maparg('')) + unmap + endif + if !empty(maparg('e')) + unmap e + endif + if !empty(maparg('')) + unmap + endif + if !empty(maparg('j')) + unmap j + endif + if !empty(maparg('')) + unmap + endif + if !empty(maparg('b')) + unmap b + endif + if !empty(maparg('')) + unmap + endif + if !empty(maparg('w')) + unmap w + endif + if !empty(maparg('v')) + unmap v + endif + if !empty(maparg('u')) + unmap u + endif + if !empty(maparg('')) + unmap + endif + if !empty(maparg('k')) + unmap k + endif + if !empty(maparg('y')) + unmap y + endif + if !empty(maparg('')) + unmap + endif + if !empty(maparg('')) + unmap + endif + if !empty(maparg('')) + unmap + endif + if !empty(maparg('r')) + unmap r + endif + if !empty(maparg('')) + unmap + endif + if !empty(maparg('R')) + unmap R + endif + if !empty(maparg('g')) + unmap g + endif + if !empty(maparg('<')) + unmap < + endif + if !empty(maparg('<')) + unmap < + endif + if !empty(maparg('G')) + unmap G + endif + if !empty(maparg('>')) + unmap > + endif + if !empty(maparg('>')) + unmap > + endif + if !empty(maparg('%')) + unmap % + endif + if !empty(maparg('p')) + unmap p + endif + if !empty(maparg('n')) + unmap n + endif + if !empty(maparg('N')) + unmap N + endif + if !empty(maparg('q')) + unmap q + endif + if !empty(maparg('v')) + unmap v + endif + if !empty(maparg('/')) + unmap / + endif + if !empty(maparg('?')) + unmap ? + endif + if !empty(maparg('')) + unmap + endif + if !empty(maparg('')) + unmap + endif + if !empty(maparg('')) + unmap + endif + if !empty(maparg('')) + unmap + endif + if !empty(maparg('')) + unmap + endif + if !empty(maparg('')) + unmap + endif + if !empty(maparg('')) + unmap + endif + if !empty(maparg('')) + unmap + endif + if !empty(maparg('')) + unmap + endif + if !empty(maparg('')) + unmap + endif + if !empty(maparg('')) + unmap + endif + if !empty(maparg('')) + unmap + endif endfun " vim: sw=2 diff --git a/runtime/mswin.vim b/runtime/mswin.vim index 1c28cadac0..b2a3670eb1 100644 --- a/runtime/mswin.vim +++ b/runtime/mswin.vim @@ -1,7 +1,7 @@ " Set options and add mapping such that Vim behaves a lot like MS-Windows " " Maintainer: The Vim Project -" Last Change: 2023 Aug 10 +" Last Change: 2024 Mar 13 " Former Maintainer: Bram Moolenaar " Bail out if this isn't wanted. @@ -24,6 +24,9 @@ set backspace=indent,eol,start whichwrap+=<,>,[,] " backspace in Visual mode deletes selection vnoremap d +" the better solution would be to use has("clipboard_working"), +" but that may not be available yet while starting up, so let's just check if +" clipboard support has been compiled in and assume it will be working :/ if has("clipboard") " CTRL-X and SHIFT-Del are Cut vnoremap "+x @@ -39,6 +42,23 @@ if has("clipboard") cmap + cmap + +else + " Use the unnamed register when clipboard support not available + + " CTRL-X and SHIFT-Del are Cut + vnoremap x + vnoremap x + + " CTRL-C and CTRL-Insert are Copy + vnoremap y + vnoremap y + + " CTRL-V and SHIFT-Insert are Paste + noremap gP + noremap gP + + inoremap " + inoremap " endif " Pasting blockwise and linewise selections is not possible in Insert and @@ -47,7 +67,7 @@ endif " Uses the paste.vim autoload script. " Use CTRL-G u to have CTRL-Z only undo the paste. -if 1 +if has("clipboard") exe 'inoremap