mirror of
https://github.com/macvim-dev/macvim.git
synced 2026-05-28 00:21:57 +02:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 22d572d0ef |
@@ -29,6 +29,7 @@ environment:
|
||||
# disabled
|
||||
# - FEATURE: TINY
|
||||
# - FEATURE: NORMAL
|
||||
# - FEATURE: BIG
|
||||
|
||||
matrix:
|
||||
fast_finish: true
|
||||
|
||||
+25
-2
@@ -5,11 +5,15 @@ env:
|
||||
freebsd_task:
|
||||
name: FreeBSD
|
||||
matrix:
|
||||
- name: FreeBSD 14.1
|
||||
- name: FreeBSD 13.1
|
||||
freebsd_instance:
|
||||
image_family: freebsd-14-1
|
||||
image_family: freebsd-13-1
|
||||
- name: FreeBSD 12.4
|
||||
freebsd_instance:
|
||||
image_family: freebsd-12-4
|
||||
timeout_in: 20m
|
||||
install_script:
|
||||
- pkg update -f
|
||||
- pkg install -y gettext
|
||||
build_script:
|
||||
- NPROC=$(getconf _NPROCESSORS_ONLN)
|
||||
@@ -21,3 +25,22 @@ freebsd_task:
|
||||
- pw useradd cirrus -m
|
||||
- chown -R cirrus:cirrus .
|
||||
- sudo -u cirrus make test
|
||||
|
||||
macos_task:
|
||||
name: macOS m1
|
||||
macos_instance:
|
||||
image: ghcr.io/cirruslabs/macos-ventura-xcode:latest
|
||||
env:
|
||||
# only run with clang, gcc is not real, it is a link to clang
|
||||
CC: clang
|
||||
timeout_in: 20m
|
||||
install_script:
|
||||
- brew update
|
||||
- brew install gettext libtool
|
||||
build_script:
|
||||
- NPROC=$(getconf _NPROCESSORS_ONLN)
|
||||
- ./configure --with-features=${FEATURES}
|
||||
- make -j${NPROC}
|
||||
test_script:
|
||||
- src/vim --version
|
||||
- make test
|
||||
|
||||
@@ -5,8 +5,6 @@ coverage:
|
||||
default:
|
||||
threshold: 0.05%
|
||||
|
||||
comment: false
|
||||
|
||||
# Files not run by tests
|
||||
ignore:
|
||||
- "src/dosinst.c"
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
service_name: github-actions
|
||||
@@ -9,18 +9,19 @@
|
||||
# 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/hare.vim @selenebun
|
||||
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/typst.vim @gpanders
|
||||
runtime/autoload/tar.vim @cecamp
|
||||
runtime/autoload/vimball.vim @cecamp
|
||||
runtime/autoload/xmlformat.vim @chrisbra
|
||||
runtime/autoload/dist/json.vim @habamax
|
||||
runtime/autoload/zip.vim @cecamp
|
||||
runtime/colors/blue.vim @habamax @romainl @neutaaaaan
|
||||
runtime/colors/darkblue.vim @habamax @romainl @neutaaaaan
|
||||
runtime/colors/default.vim @habamax @romainl @neutaaaaan
|
||||
@@ -28,24 +29,17 @@ runtime/colors/delek.vim @habamax @romainl @neutaaaaan
|
||||
runtime/colors/desert.vim @habamax @romainl @neutaaaaan
|
||||
runtime/colors/elflord.vim @habamax @romainl @neutaaaaan
|
||||
runtime/colors/evening.vim @habamax @romainl @neutaaaaan
|
||||
runtime/colors/habamax.vim @habamax @romainl @neutaaaaan
|
||||
runtime/colors/industry.vim @habamax @romainl @neutaaaaan
|
||||
runtime/colors/koehler.vim @habamax @romainl @neutaaaaan
|
||||
runtime/colors/lunaperche.vim @habamax @romainl @neutaaaaan
|
||||
runtime/colors/morning.vim @habamax @romainl @neutaaaaan
|
||||
runtime/colors/murphy.vim @habamax @romainl @neutaaaaan
|
||||
runtime/colors/pablo.vim @habamax @romainl @neutaaaaan
|
||||
runtime/colors/peachpuff.vim @habamax @romainl @neutaaaaan
|
||||
runtime/colors/quiet.vim @habamax @romainl @neutaaaaan
|
||||
runtime/colors/retrobox.vim @habamax @romainl @neutaaaaan
|
||||
runtime/colors/ron.vim @habamax @romainl @neutaaaaan
|
||||
runtime/colors/shine.vim @habamax @romainl @neutaaaaan
|
||||
runtime/colors/slate.vim @habamax @romainl @neutaaaaan
|
||||
runtime/colors/sorbet.vim @habamax @romainl @neutaaaaan
|
||||
runtime/colors/tools @habamax @romainl @neutaaaaan
|
||||
runtime/colors/torte.vim @habamax @romainl @neutaaaaan
|
||||
runtime/colors/wildcharm.vim @habamax @romainl @neutaaaaan
|
||||
runtime/colors/zaibatsu.vim @habamax @romainl @neutaaaaan
|
||||
runtime/colors/zellner.vim @habamax @romainl @neutaaaaan
|
||||
runtime/compiler/checkstyle.vim @dkearns
|
||||
runtime/compiler/cm3.vim @dkearns
|
||||
@@ -62,17 +56,15 @@ runtime/compiler/eruby.vim @dkearns
|
||||
runtime/compiler/fbc.vim @dkearns
|
||||
runtime/compiler/gawk.vim @dkearns
|
||||
runtime/compiler/gjs.vim @dkearns
|
||||
runtime/compiler/gm2.vim @dkearns
|
||||
runtime/compiler/go.vim @dbarnett
|
||||
runtime/compiler/haml.vim @tpope
|
||||
runtime/compiler/hare.vim @selenebun
|
||||
runtime/compiler/hare.vim @rsaihe
|
||||
runtime/compiler/icon.vim @dkearns
|
||||
runtime/compiler/javac.vim @dkearns
|
||||
runtime/compiler/jest.vim @dkearns
|
||||
runtime/compiler/jjs.vim @dkearns
|
||||
runtime/compiler/jshint.vim @dkearns
|
||||
runtime/compiler/jsonlint.vim @dkearns
|
||||
runtime/compiler/jq.vim @vito-c
|
||||
runtime/compiler/lazbuild.vim @dkearns
|
||||
runtime/compiler/perl.vim @petdance @heptite
|
||||
runtime/compiler/perlcritic.vim @petdance @dkearns
|
||||
@@ -101,44 +93,31 @@ runtime/compiler/tidy.vim @dkearns
|
||||
runtime/compiler/ts-node.vim @dkearns
|
||||
runtime/compiler/tsc.vim @dkearns
|
||||
runtime/compiler/typedoc.vim @dkearns
|
||||
runtime/compiler/typst.vim @gpanders
|
||||
runtime/compiler/xmllint.vim @dkearns
|
||||
runtime/compiler/xo.vim @dkearns
|
||||
runtime/compiler/yamllint.vim @romainl
|
||||
runtime/compiler/zsh.vim @dkearns
|
||||
runtime/doc/ft_hare.txt @selenebun
|
||||
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/antlr4.vim @jiangyinzuo
|
||||
runtime/ftplugin/apache.vim @dubgeiser
|
||||
runtime/ftplugin/arduino.vim @k-takata
|
||||
runtime/ftplugin/astro.vim @romainl
|
||||
runtime/ftplugin/asy.vim @avidseeker
|
||||
runtime/ftplugin/autohotkey.vim @telemachus
|
||||
runtime/ftplugin/apache.vim @dubgeiser
|
||||
runtime/ftplugin/awk.vim @dkearns
|
||||
runtime/ftplugin/basic.vim @dkearns
|
||||
runtime/ftplugin/bst.vim @tpope
|
||||
runtime/ftplugin/cabal.vim @ribru17
|
||||
runtime/ftplugin/cedar.vim @ribru17
|
||||
runtime/ftplugin/cfg.vim @chrisbra
|
||||
runtime/ftplugin/chatito.vim @ObserverOfTime
|
||||
runtime/ftplugin/chicken.vim @evhan
|
||||
runtime/ftplugin/clojure.vim @axvr
|
||||
runtime/ftplugin/cmakecache.vim @ribru17
|
||||
runtime/ftplugin/cs.vim @nickspoons
|
||||
runtime/ftplugin/csh.vim @dkearns
|
||||
runtime/ftplugin/css.vim @dkearns
|
||||
runtime/ftplugin/csv.vim @habamax
|
||||
runtime/ftplugin/cucumber.vim @tpope
|
||||
runtime/ftplugin/cuda.vim @ribru17
|
||||
runtime/ftplugin/dart.vim @ribru17
|
||||
runtime/ftplugin/deb822sources.vim @jamessan
|
||||
runtime/ftplugin/debchangelog.vim @jamessan
|
||||
runtime/ftplugin/debcontrol.vim @jamessan
|
||||
runtime/ftplugin/debsources.vim @jamessan
|
||||
runtime/ftplugin/desktop.vim @e-kwsm
|
||||
runtime/ftplugin/dosbatch.vim @mrdubya
|
||||
runtime/ftplugin/editorconfig.vim @ribru17
|
||||
runtime/ftplugin/eiffel.vim @dkearns
|
||||
runtime/ftplugin/elixir.vim @mhanberg
|
||||
runtime/ftplugin/erlang.vim @hcs42
|
||||
@@ -146,7 +125,6 @@ runtime/ftplugin/eruby.vim @tpope @dkearns
|
||||
runtime/ftplugin/expect.vim @dkearns
|
||||
runtime/ftplugin/fennel.vim @gpanders
|
||||
runtime/ftplugin/fetchmail.vim @dkearns
|
||||
runtime/ftplugin/forth.vim @jkotlinski
|
||||
runtime/ftplugin/fpcmake.vim @dkearns
|
||||
runtime/ftplugin/freebasic.vim @dkearns
|
||||
runtime/ftplugin/fstab.vim @rid9
|
||||
@@ -160,132 +138,83 @@ runtime/ftplugin/gitconfig.vim @tpope
|
||||
runtime/ftplugin/gitignore.vim @ObserverOfTime
|
||||
runtime/ftplugin/gitrebase.vim @tpope
|
||||
runtime/ftplugin/gitsendemail.vim @tpope
|
||||
runtime/ftplugin/go.vim @dbarnett
|
||||
runtime/ftplugin/goaccess.vim @meonkeys
|
||||
runtime/ftplugin/gomod.vim @yu-yk
|
||||
runtime/ftplugin/gprof.vim @dpelle
|
||||
runtime/ftplugin/graphql.vim @ribru17
|
||||
runtime/ftplugin/gyp.vim @ObserverOfTime
|
||||
runtime/ftplugin/go.vim @dbarnett
|
||||
runtime/ftplugin/gprof.vim @dpelle
|
||||
runtime/ftplugin/haml.vim @tpope
|
||||
runtime/ftplugin/hare.vim @selenebun
|
||||
runtime/ftplugin/haredoc.vim @selenebun
|
||||
runtime/ftplugin/heex.vim @cvincent
|
||||
runtime/ftplugin/hare.vim @rsaihe
|
||||
runtime/ftplugin/hgcommit.vim @k-takata
|
||||
runtime/ftplugin/hlsplaylist.vim @avidseeker
|
||||
runtime/ftplugin/hog.vim @wtfbbqhax
|
||||
runtime/ftplugin/html.vim @dkearns
|
||||
runtime/ftplugin/hyprlang.vim @ribru17
|
||||
runtime/ftplugin/i3config.vim @hiqua
|
||||
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/javacc.vim @ribru17
|
||||
runtime/ftplugin/javascript.vim @dkearns
|
||||
runtime/ftplugin/javascriptreact.vim @dkearns
|
||||
runtime/ftplugin/jj.vim @gpanders
|
||||
runtime/ftplugin/json.vim @dbarnett
|
||||
runtime/ftplugin/json5.vim @dkearns
|
||||
runtime/ftplugin/jsonc.vim @izhakjakov
|
||||
runtime/ftplugin/julia.vim @carlobaldassi
|
||||
runtime/ftplugin/jq.vim @vito-c
|
||||
runtime/ftplugin/kconfig.vim @chrisbra
|
||||
runtime/ftplugin/kdl.vim @imsnif @jiangyinzuo
|
||||
runtime/ftplugin/kivy.vim @ribru17
|
||||
runtime/ftplugin/kotlin.vim @udalov
|
||||
runtime/ftplugin/ldapconf.vim @ribru17
|
||||
runtime/ftplugin/less.vim @genoma
|
||||
runtime/ftplugin/lex.vim @ribru17
|
||||
runtime/ftplugin/liquid.vim @tpope
|
||||
runtime/ftplugin/lua.vim @dkearns
|
||||
runtime/ftplugin/lc.vim @ribru17
|
||||
runtime/ftplugin/lynx.vim @dkearns
|
||||
runtime/ftplugin/m3build.vim @dkearns
|
||||
runtime/ftplugin/m3quake.vim @dkearns
|
||||
runtime/ftplugin/markdown.vim @tpope
|
||||
runtime/ftplugin/mediawiki.vim @avidseeker
|
||||
runtime/ftplugin/matlab.vim @cecamp
|
||||
runtime/ftplugin/meson.vim @Liambeguin
|
||||
runtime/ftplugin/modula2.vim @dkearns
|
||||
runtime/ftplugin/modula3.vim @dkearns
|
||||
runtime/ftplugin/mojo.vim @ribru17
|
||||
runtime/ftplugin/nginx.vim @chr4
|
||||
runtime/ftplugin/nim.vim @ribru17
|
||||
runtime/ftplugin/nroff.vim @a-vrma
|
||||
runtime/ftplugin/nsis.vim @k-takata
|
||||
runtime/ftplugin/octave.vim @dkearns
|
||||
runtime/ftplugin/ondir.vim @jparise
|
||||
runtime/ftplugin/openvpn.vim @ObserverOfTime
|
||||
runtime/ftplugin/pascal.vim @dkearns
|
||||
runtime/ftplugin/pbtxt.vim @lakshayg
|
||||
runtime/ftplugin/pdf.vim @tpope
|
||||
runtime/ftplugin/perl.vim @petdance @dkearns
|
||||
runtime/ftplugin/php.vim @dkearns
|
||||
runtime/ftplugin/pod.vim @petdance @dkearns
|
||||
runtime/ftplugin/poefilter.vim @ObserverOfTime
|
||||
runtime/ftplugin/postscr.vim @mrdubya
|
||||
runtime/ftplugin/prisma.vim @ribru17
|
||||
runtime/ftplugin/ps1.vim @heaths
|
||||
runtime/ftplugin/ps1xml.vim @heaths
|
||||
runtime/ftplugin/purescript.vim @ribru17
|
||||
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/rasi.vim @fymyte
|
||||
runtime/ftplugin/readline.vim @dkearns
|
||||
runtime/ftplugin/rescript.vim @ribru17
|
||||
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
|
||||
runtime/ftplugin/sass.vim @tpope
|
||||
runtime/ftplugin/scala.vim @derekwyatt
|
||||
runtime/ftplugin/scheme.vim @evhan
|
||||
runtime/ftplugin/scss.vim @tpope
|
||||
runtime/ftplugin/sdoc.vim @gpanders
|
||||
runtime/ftplugin/sed.vim @dkearns
|
||||
runtime/ftplugin/sh.vim @dkearns
|
||||
runtime/ftplugin/slint.vim @ribru17
|
||||
runtime/ftplugin/snakemake.vim @ribru17
|
||||
runtime/ftplugin/solidity.vim @cothi
|
||||
runtime/ftplugin/solution.vim @dkearns
|
||||
runtime/ftplugin/spec.vim @ignatenkobrain
|
||||
runtime/ftplugin/squirrel.vim @ribru17
|
||||
runtime/ftplugin/ssa.vim @ObserverOfTime
|
||||
runtime/ftplugin/sshdconfig.vim @jiangyinzuo
|
||||
runtime/ftplugin/svelte.vim @igorlfs
|
||||
runtime/ftplugin/swayconfig.vim @jamespeapen
|
||||
runtime/ftplugin/systemverilog.vim @Kocha
|
||||
runtime/ftplugin/swig.vim @jmarrec
|
||||
runtime/ftplugin/tap.vim @petdance
|
||||
runtime/ftplugin/tcsh.vim @dkearns
|
||||
runtime/ftplugin/terraform.vim @JannoTjarks
|
||||
runtime/ftplugin/tf.vim @ribru17
|
||||
runtime/ftplugin/thrift.vim @jiangyinzuo
|
||||
runtime/ftplugin/tidy.vim @dkearns
|
||||
runtime/ftplugin/tmux.vim @ericpruitt
|
||||
runtime/ftplugin/toml.vim @averms
|
||||
runtime/ftplugin/tt2html.vim @petdance
|
||||
runtime/ftplugin/typescript.vim @dkearns
|
||||
runtime/ftplugin/typescriptreact.vim @dkearns
|
||||
runtime/ftplugin/typst.vim @gpanders
|
||||
runtime/ftplugin/unison.vim @chuwy
|
||||
runtime/ftplugin/v.vim @ribru17
|
||||
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
|
||||
runtime/ftplugin/xcompose.vim @ObserverOfTime
|
||||
runtime/ftplugin/xml.vim @chrisbra
|
||||
runtime/ftplugin/xs.vim @petdance
|
||||
runtime/ftplugin/yacc.vim @ribru17
|
||||
runtime/ftplugin/zsh.vim @chrisbra
|
||||
runtime/import/dist/vimhighlight.vim @lacygoill
|
||||
runtime/indent/arduino.vim @k-takata
|
||||
runtime/indent/astro.vim @wuelnerdotexe
|
||||
runtime/indent/basic.vim @dkearns
|
||||
runtime/indent/bst.vim @tpope
|
||||
runtime/indent/cdl.vim @dkearns
|
||||
@@ -310,12 +239,10 @@ runtime/indent/freebasic.vim @dkearns
|
||||
runtime/indent/gdscript.vim @habamax
|
||||
runtime/indent/gitconfig.vim @tpope
|
||||
runtime/indent/gitolite.vim @sitaramc
|
||||
runtime/indent/glsl.vim @gpanders
|
||||
runtime/indent/go.vim @dbarnett
|
||||
runtime/indent/gyp.vim @ObserverOfTime
|
||||
runtime/indent/haml.vim @tpope
|
||||
runtime/indent/hare.vim @selenebun
|
||||
runtime/indent/hog.vim @wtfbbqhax
|
||||
runtime/indent/hare.vim @rsaihe
|
||||
runtime/indent/idlang.vim @dkearns
|
||||
runtime/indent/j.vim @glts
|
||||
runtime/indent/java.vim @xuhdev
|
||||
@@ -323,17 +250,12 @@ runtime/indent/javascript.vim @bounceme
|
||||
runtime/indent/json.vim @elzr
|
||||
runtime/indent/jsonc.vim @izhakjakov
|
||||
runtime/indent/julia.vim @carlobaldassi
|
||||
runtime/indent/kdl.vim @imsnif @jiangyinzuo
|
||||
runtime/indent/kotlin.vim @udalov
|
||||
runtime/indent/krl.vim @KnoP-01
|
||||
runtime/indent/ld.vim @dkearns
|
||||
runtime/indent/less.vim @genoma
|
||||
runtime/indent/liquid.vim @tpope
|
||||
runtime/indent/lua.vim @marcuscf
|
||||
runtime/indent/make.vim @dkearns
|
||||
runtime/indent/meson.vim @Liambeguin
|
||||
runtime/indent/mma.vim @dkearns
|
||||
runtime/indent/mojo.vim @ribru17
|
||||
runtime/indent/nginx.vim @chr4
|
||||
runtime/indent/nsis.vim @k-takata
|
||||
runtime/indent/occam.vim @dkearns
|
||||
@@ -341,56 +263,51 @@ runtime/indent/perl.vim @petdance
|
||||
runtime/indent/php.vim @2072
|
||||
runtime/indent/postscr.vim @mrdubya
|
||||
runtime/indent/prolog.vim @dkearns
|
||||
runtime/indent/proto.vim @Limero
|
||||
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
|
||||
runtime/indent/scheme.vim @evhan
|
||||
runtime/indent/scss.vim @tpope
|
||||
runtime/indent/sh.vim @chrisbra
|
||||
runtime/indent/solidity.vim @cothi
|
||||
runtime/indent/systemverilog.vim @Kocha
|
||||
runtime/indent/tcl.vim @dkearns
|
||||
runtime/indent/tcsh.vim @dkearns
|
||||
runtime/indent/teraterm.vim @k-takata
|
||||
runtime/indent/thrift.vim @jiangyinzuo
|
||||
runtime/indent/typescript.vim @HerringtonDarkholme
|
||||
runtime/indent/typst.vim @gpanders
|
||||
runtime/indent/vroom.vim @dbarnett
|
||||
runtime/indent/wast.vim @rhysd
|
||||
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/comment/ @habamax
|
||||
runtime/pack/dist/opt/matchit/ @chrisbra
|
||||
runtime/pack/dist/opt/nohlsearch/ @habamax
|
||||
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/shared/hgcommitDiff.vim @vegerot
|
||||
runtime/syntax/abaqus.vim @costerwi
|
||||
runtime/syntax/aidl.vim @dpelle
|
||||
runtime/syntax/ant.vim @dkearns
|
||||
runtime/syntax/antlr4.vim @jiangyinzuo
|
||||
runtime/syntax/amiga.vim @cecamp
|
||||
runtime/syntax/arduino.vim @johshoff
|
||||
runtime/syntax/asciidoc.vim @aerostitch
|
||||
runtime/syntax/asm.vim @dkearns
|
||||
runtime/syntax/asmh8300.vim @dkearns
|
||||
runtime/syntax/asterisk.vim @jaunis
|
||||
runtime/syntax/astro.vim @wuelnerdotexe
|
||||
runtime/syntax/asy.vim @avidseeker
|
||||
runtime/syntax/autohotkey.vim @mmikeww
|
||||
runtime/syntax/awk.vim @dkearns
|
||||
runtime/syntax/basic.vim @dkearns
|
||||
@@ -402,21 +319,14 @@ runtime/syntax/cabalconfig.vim @coot
|
||||
runtime/syntax/cabalproject.vim @coot
|
||||
runtime/syntax/cf.vim @ernstvanderlinden
|
||||
runtime/syntax/chatito.vim @ObserverOfTime
|
||||
runtime/syntax/chicken.vim @evhan
|
||||
runtime/syntax/chuck.vim @gacallea
|
||||
runtime/syntax/clojure.vim @axvr
|
||||
runtime/syntax/cs.vim @nickspoons
|
||||
runtime/syntax/csv.vim @habamax
|
||||
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/deb822sources.vim @jamessan
|
||||
runtime/syntax/debchangelog.vim @jamessan
|
||||
runtime/syntax/debcontrol.vim @jamessan
|
||||
runtime/syntax/debcopyright.vim @jamessan
|
||||
runtime/syntax/debsources.vim @jamessan
|
||||
runtime/syntax/dep3patch.vim @jamessan
|
||||
runtime/syntax/dcl.vim @cecamp
|
||||
runtime/syntax/desktop.vim @e-kwsm
|
||||
runtime/syntax/dosbatch.vim @mrdubya
|
||||
runtime/syntax/dosini.vim @xuhdev
|
||||
@@ -426,9 +336,11 @@ 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
|
||||
@@ -446,45 +358,31 @@ runtime/syntax/gitconfig.vim @tpope
|
||||
runtime/syntax/gitignore.vim @ObserverOfTime
|
||||
runtime/syntax/gitolite.vim @sitaramc
|
||||
runtime/syntax/gitrebase.vim @tpope
|
||||
runtime/syntax/glsl.vim @gpanders
|
||||
runtime/syntax/go.vim @bhcleek
|
||||
runtime/syntax/goaccess.vim @meonkeys
|
||||
runtime/syntax/godoc.vim @dbarnett
|
||||
runtime/syntax/gp.vim @KBelabas
|
||||
runtime/syntax/gprof.vim @dpelle
|
||||
runtime/syntax/groff.vim @jmarshall
|
||||
runtime/syntax/gyp.vim @ObserverOfTime
|
||||
runtime/syntax/haml.vim @tpope
|
||||
runtime/syntax/hare.vim @selenebun
|
||||
runtime/syntax/haredoc.vim @selenebun
|
||||
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
|
||||
runtime/syntax/hollywood.vim @sodero
|
||||
runtime/syntax/html.vim @dkearns
|
||||
runtime/syntax/htmlangular.vim @dlvandenberg
|
||||
runtime/syntax/i3config.vim @hiqua
|
||||
runtime/syntax/icon.vim @dkearns
|
||||
runtime/syntax/indent.vim @dkearns
|
||||
runtime/syntax/j.vim @glts
|
||||
runtime/syntax/jargon.vim @h3xx
|
||||
runtime/syntax/java.vim @zzzyxwvut
|
||||
runtime/syntax/java.vim @fleiner
|
||||
runtime/syntax/javascript.vim @fleiner
|
||||
runtime/syntax/jj.vim @gpanders
|
||||
runtime/syntax/json.vim @vito-c
|
||||
runtime/syntax/jsonc.vim @izhakjakov
|
||||
runtime/syntax/julia.vim @carlobaldassi
|
||||
runtime/syntax/jq.vim @vito-c
|
||||
runtime/syntax/kconfig.vim @chrisbra
|
||||
runtime/syntax/kivy.vim @prophittcorey
|
||||
runtime/syntax/kotlin.vim @udalov
|
||||
runtime/syntax/kdl.vim @imsnif @jiangyinzuo
|
||||
runtime/syntax/krl.vim @KnoP-01
|
||||
runtime/syntax/less.vim @genoma
|
||||
runtime/syntax/lex.vim @cecamp
|
||||
runtime/syntax/liquid.vim @tpope
|
||||
runtime/syntax/lua.vim @marcuscf
|
||||
runtime/syntax/lisp.vim @cecamp
|
||||
runtime/syntax/lyrics.vim @ObserverOfTime
|
||||
runtime/syntax/lynx.vim @dkearns
|
||||
runtime/syntax/m3build.vim @dkearns
|
||||
@@ -492,24 +390,19 @@ 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/mediawiki.vim @avidseeker
|
||||
runtime/syntax/meson.vim @Liambeguin
|
||||
runtime/syntax/modula2.vim @dkearns
|
||||
runtime/syntax/modula2/opt/iso.vim @trijezdci
|
||||
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
|
||||
runtime/syntax/nroff.vim @jmarshall
|
||||
runtime/syntax/nsis.vim @k-takata
|
||||
runtime/syntax/ondir.vim @jparise
|
||||
runtime/syntax/openvpn.vim @ObserverOfTime
|
||||
runtime/syntax/pacmanlog.vim @rpigott
|
||||
runtime/syntax/pascal.vim @dkearns
|
||||
runtime/syntax/pbtxt.vim @lakshayg
|
||||
runtime/syntax/pdf.vim @tpope
|
||||
@@ -520,36 +413,34 @@ runtime/syntax/pod.vim @petdance
|
||||
runtime/syntax/poefilter.vim @ObserverOfTime
|
||||
runtime/syntax/postscr.vim @mrdubya
|
||||
runtime/syntax/privoxy.vim @dkearns
|
||||
runtime/syntax/progress.vim @rdnlsmith
|
||||
runtime/syntax/prolog.vim @XVilka
|
||||
runtime/syntax/ps1.vim @heaths
|
||||
runtime/syntax/ps1xml.vim @heaths
|
||||
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
|
||||
runtime/syntax/ratpoison.vim @trapd00r
|
||||
runtime/syntax/rasi.vim @fymyte
|
||||
runtime/syntax/rc.vim @chrisbra
|
||||
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
|
||||
runtime/syntax/scala.vim @derekwyatt
|
||||
runtime/syntax/scheme.vim @evhan
|
||||
runtime/syntax/scss.vim @tpope
|
||||
runtime/syntax/sdoc.vim @gpanders
|
||||
runtime/syntax/sed.vim @dkearns
|
||||
runtime/syntax/shared/debversions.vim @jamessan
|
||||
runtime/syntax/solidity.vim @cothi
|
||||
runtime/syntax/sh.vim @cecamp
|
||||
runtime/syntax/sm.vim @cecamp
|
||||
runtime/syntax/spec.vim @ignatenkobrain
|
||||
runtime/syntax/sqloracle.vim @chrisbra
|
||||
runtime/syntax/squirrel.vim @zenmatic
|
||||
@@ -560,43 +451,40 @@ runtime/syntax/sshdconfig.vim @Jakuje
|
||||
runtime/syntax/sudoers.vim @e-kwsm
|
||||
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/thrift.vim @jiangyinzuo
|
||||
runtime/syntax/tex.vim @cecamp
|
||||
runtime/syntax/tidy.vim @dkearns
|
||||
runtime/syntax/tmux.vim @ericpruitt
|
||||
runtime/syntax/toml.vim @averms
|
||||
runtime/syntax/tt2.vim @petdance
|
||||
runtime/syntax/tt2html.vim @petdance
|
||||
runtime/syntax/tt2js.vim @petdance
|
||||
runtime/syntax/typescript.vim @HerringtonDarkholme @rhysd
|
||||
runtime/syntax/typescriptreact.vim @HerringtonDarkholme @rhysd
|
||||
runtime/syntax/typst.vim @gpanders
|
||||
runtime/syntax/shared/typescriptcommon.vim @HerringtonDarkholme @rhysd
|
||||
runtime/syntax/unison.vim @chuwy
|
||||
runtime/syntax/typescript.vim @HerringtonDarkholme
|
||||
runtime/syntax/typescriptcommon.vim @HerringtonDarkholme
|
||||
runtime/syntax/typescriptreact.vim @HerringtonDarkholme
|
||||
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
|
||||
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/zserio.vim @dpelle
|
||||
runtime/syntax/xxd.vim @cecamp
|
||||
runtime/syntax/yacc.vim @cecamp
|
||||
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
|
||||
@@ -608,7 +496,6 @@ 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
|
||||
@@ -9,7 +9,10 @@ body:
|
||||
value: |
|
||||
Thanks for reporting issues of MacVim!
|
||||
|
||||
If you want to report a security issue, instead of reporting it here publicly, please disclose it using the steps listed at https://github.com/macvim-dev/macvim/security/policy.
|
||||
If you want to report a security issue, instead of reporting it here
|
||||
you can alternatively disclose it on
|
||||
[huntr.dev](https://huntr.dev/bounties/disclose/?utm_campaign=macvim-dev%2Fmacvim&utm_medium=social&utm_source=github&target=https%3A%2F%2Fgithub.com%2Fmacvim-dev%2Fmacvim).
|
||||
They have rewards in the form of money, swag and CVEs.
|
||||
|
||||
To make it easier for us to help you please enter detailed information below.
|
||||
- type: textarea
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
# Security Policy
|
||||
|
||||
**Please do not report security vulnerabilities through public GitHub issues.**
|
||||
|
||||
To report a security vulnerability for MacVim, please either email security@macvim.org, or visit https://github.com/macvim-dev/macvim/security/advisories/new.
|
||||
@@ -1,26 +0,0 @@
|
||||
name: 'screendump'
|
||||
description: "Upload failed screendump tests"
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Upload failed tests
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
# Name of the artifact to upload.
|
||||
name: ${{ github.workflow }}-${{ github.job }}-${{ join(matrix.*, '-') }}-failed-tests
|
||||
|
||||
# A file, directory or wildcard pattern that describes what
|
||||
# to upload.
|
||||
path: |
|
||||
${{ github.workspace }}/runtime/syntax/testdir/failed/*
|
||||
${{ github.workspace }}/src/testdir/failed/*
|
||||
# The desired behavior if no files are found using the
|
||||
# provided path.
|
||||
if-no-files-found: ignore
|
||||
|
||||
# Duration after which artifact will expire in days. 0 means
|
||||
# using repository settings.
|
||||
retention-days: 0
|
||||
|
||||
# If true, an artifact with a matching name will be deleted
|
||||
overwrite: true
|
||||
@@ -1,14 +1,5 @@
|
||||
name: Universal package
|
||||
description: Create universal Homebrew package which contains x86_64 and arm64
|
||||
|
||||
# Instead of using the default binary installed by Homebrew, we need to build our own because third-party libraries are
|
||||
# statically linked in MacVim, and need to be built against MACOSX_DEPLOYMENT_TARGET to ensure the built binary will
|
||||
# work on supported macOS versions. Another reason for building our own custom package is to build a unviersal binary
|
||||
# that has both x86_64 and arm64 arch, as Homebrew's distributed bottles are thin binaries with only one arch.
|
||||
#
|
||||
# We still use Homebrew to manage the library because their formulas are up to date and have correct build instructions
|
||||
# that will work. This way we don't have to manually configuring and building and updating the package info.
|
||||
|
||||
inputs:
|
||||
formula:
|
||||
description: Formura name
|
||||
@@ -20,69 +11,74 @@ runs:
|
||||
using: 'composite'
|
||||
steps:
|
||||
- name: Set up formula
|
||||
id: setup-formula
|
||||
shell: bash
|
||||
run: |
|
||||
echo '::group::Set up formula'
|
||||
set -o pipefail
|
||||
formula=${{ inputs.formula }}
|
||||
|
||||
# Need to make sure we get the latest before patching. Otherwise Homebrew may later try to get the latest
|
||||
# version and stomp what we have here.
|
||||
brew update
|
||||
|
||||
# Patch the official Homebrew formula to explicitly build for min deployment target and a universal binary. We
|
||||
# also need to explicitly use system Clang because Homebrew's bundled clang script tries to inject -march
|
||||
# compiler flags that will cause universal builds to fail as Clang does not like that.
|
||||
# Patch the official Homebrew formula to explicitly build for min deployment target
|
||||
brew cat ${formula} | \
|
||||
sed '/^[[:blank:]]*def install$/a\'$'\n ENV["MACOSX_DEPLOYMENT_TARGET"] = "'${MACOSX_DEPLOYMENT_TARGET}$'"\n' | \
|
||||
sed '/^[[:blank:]]*def install$/a\'$'\n ENV["CC"] = "/usr/bin/clang"\n' | \
|
||||
sed '/^[[:blank:]]*def install$/a\'$'\n ENV["CFLAGS"] = "-arch x86_64 -arch arm64"\n' | \
|
||||
sed '/^[[:blank:]]*def install$/a\'$'\n ENV["LDFLAGS"] = "-arch x86_64 -arch arm64"\n' >${formula}.rb
|
||||
sed '/^[[:blank:]]*def install$/a\'$'\n ENV["MACOSX_DEPLOYMENT_TARGET"] = "'${MACOSX_DEPLOYMENT_TARGET}$'"\n' >${formula}.rb
|
||||
|
||||
# Uninstall the already installed formula because we want to build our own
|
||||
brew uninstall --ignore-dependencies ${formula} || true
|
||||
|
||||
# Extract Xcode version to serve as part of the key for caching
|
||||
xcode_version=$(xcodebuild -version | tail -1 | sed -E 's/Build version (.*)/\1/')
|
||||
echo "xcode_version=$xcode_version" >> $GITHUB_OUTPUT
|
||||
|
||||
# Find Homebrew's install location which could be /usr/local or /opt/homebrew
|
||||
brew_prefix=$(brew --prefix)
|
||||
echo "brew_prefix=$brew_prefix" >> $GITHUB_OUTPUT
|
||||
|
||||
echo '::endgroup::'
|
||||
|
||||
- name: Cache keg
|
||||
id: cache-keg
|
||||
uses: actions/cache@v4
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: ${{ steps.setup-formula.outputs.brew_prefix }}/Cellar/${{ inputs.formula }}
|
||||
key: ${{ inputs.formula }}-homebrew-cache-custom-unified-prefix${{ steps.setup-formula.outputs.brew_prefix }}-xcode${{ steps.setup-formula.outputs.xcode_version }}-${{ hashFiles(format('{0}.rb', inputs.formula)) }}
|
||||
path: /usr/local/Cellar/${{ inputs.formula }}
|
||||
key: ${{ inputs.formula }}-homebrew-cache-patched-unified-${{ hashFiles(format('{0}.rb', inputs.formula)) }}
|
||||
|
||||
- name: Install formula
|
||||
shell: bash
|
||||
env:
|
||||
HOMEBREW_NO_AUTO_UPDATE: '1'
|
||||
run: |
|
||||
echo '::group::Install formula'
|
||||
formula=${{ inputs.formula }}
|
||||
|
||||
# This will be a no-op if formula was cached
|
||||
brew install --quiet --formula -s ./${formula}.rb
|
||||
brew install --formula -s ./${formula}.rb
|
||||
|
||||
# If formula was cached, this step is necessary to relink it to brew prefix (e.g. /usr/local)
|
||||
# If formula was cached, this step is necessary to relink it to /usr/local/
|
||||
brew unlink ${formula} && brew link ${formula}
|
||||
echo '::endgroup::'
|
||||
|
||||
echo '::group::Verify built version'
|
||||
- name: Create universal binaries with arm64 bottle
|
||||
if: steps.cache-keg.outputs.cache-hit != 'true'
|
||||
shell: bash
|
||||
run: |
|
||||
echo '::group::Create universal binaries with arm64 bottle'
|
||||
set -o verbose
|
||||
formula=${{ inputs.formula }}
|
||||
contents=($(IFS=,; for x in ${{ inputs.contents }}; do echo ${x}; done))
|
||||
|
||||
# Manually download and extract a bottle for arm64
|
||||
source /dev/stdin <<<"$(brew info --json ${formula} | \
|
||||
jq -r '.[0] | "bottle_url=\(.bottle.stable.files.arm64_big_sur.url)", "formula_ver=\(.versions.stable)", "formula_rev=\(.revision)"')"
|
||||
if [[ ${formula_rev} -ne 0 ]]; then
|
||||
formula_ver=${formula_ver}_${formula_rev}
|
||||
fi
|
||||
|
||||
workdir=${formula}_download
|
||||
mkdir ${workdir}
|
||||
cd ${workdir}
|
||||
wget --no-verbose --header 'Authorization: Bearer QQ==' -O ${formula}.tar.gz ${bottle_url}
|
||||
tar xf ${formula}.tar.gz
|
||||
|
||||
for content in "${contents[@]}"; do
|
||||
# Print out the archs and verify they are universal fat binary.
|
||||
lipo -info $(brew --prefix)/${content} | grep 'x86_64 arm64'
|
||||
# Just for diagnostics, print out the old archs. This should be a thin binary (x86_64)
|
||||
lipo -info /usr/local/${content}
|
||||
|
||||
# Make sure deployment target is correct. Later macOS versions have a different binary format (just search for
|
||||
# "minos") but for 10.13 we need to look for LC_VERSION_MIN_MACOSX.
|
||||
otool -l $(brew --prefix)/${content} | grep -A 2 LC_VERSION_MIN_MACOSX | tail -1 | grep "${MACOSX_DEPLOYMENT_TARGET}"
|
||||
# Create a universal binary by patching the custom built x86_64 one with the downloaded arm64 one.
|
||||
# Modify the actual binaries in /usr/local/Cellar instead of the symlinks to allow caching to work.
|
||||
lipo -create -output /usr/local/Cellar/${formula}/${formula_ver}/${content} \
|
||||
/usr/local/Cellar/${formula}/${formula_ver}/${content} ./${formula}/${formula_ver}/${content}
|
||||
|
||||
# Print out the new archs and verify they are universal with 2 archs.
|
||||
lipo -info /usr/local/${content} | grep 'x86_64 arm64'
|
||||
done
|
||||
|
||||
echo '::endgroup::'
|
||||
|
||||
@@ -4,5 +4,3 @@ updates:
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "weekly"
|
||||
commit-message:
|
||||
prefix: "CI"
|
||||
|
||||
@@ -1,155 +0,0 @@
|
||||
# list of labels and minimatch globs to match to apply the label.
|
||||
|
||||
CI:
|
||||
- all:
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- '.cirrus.yml'
|
||||
- '.github/dependabot.yml'
|
||||
- '.github/labeler.yml'
|
||||
- '.github/workflows/*'
|
||||
- '.appveyor.yml'
|
||||
- '.codecov.yml'
|
||||
|
||||
documentation:
|
||||
- all:
|
||||
- changed-files:
|
||||
- any-glob-to-all-files:
|
||||
- '*/doc/*'
|
||||
|
||||
translation:
|
||||
- all:
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- 'src/po/*.po'
|
||||
|
||||
if_lua:
|
||||
- all:
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- 'src/if_lua.c'
|
||||
- 'src/proto/if_lua.pro'
|
||||
- 'runtime/doc/if_lua.txt'
|
||||
|
||||
if_mzscheme:
|
||||
- all:
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- 'src/if_mzsch.c'
|
||||
- 'src/if_mzsch.h'
|
||||
- 'src/proto/if_mzsch.pro'
|
||||
- 'runtime/doc/if_mzsch.txt'
|
||||
|
||||
if_perl:
|
||||
- all:
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- 'src/if_perl.xs'
|
||||
- 'src/if_perlsfio.c'
|
||||
- 'src/proto/if_perl.pro'
|
||||
- 'src/proto/if_perlsfio.pro'
|
||||
- 'runtime/doc/if_perl.txt'
|
||||
|
||||
if_python:
|
||||
- all:
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- 'src/if_py_both.h'
|
||||
- 'runtime/doc/if_pyth.txt'
|
||||
- 'src/if_python.c'
|
||||
- 'src/if_python3.c'
|
||||
- 'src/proto/if_python.pro'
|
||||
- 'src/proto/if_python3.pro'
|
||||
|
||||
if_ruby:
|
||||
- all:
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- 'src/if_ruby.c'
|
||||
- 'src/proto/if_ruby.pro'
|
||||
- 'runtime/doc/if_ruby.txt'
|
||||
|
||||
if_tcl:
|
||||
- all:
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- 'src/if_tcl.c'
|
||||
- 'src/proto/if_tcl.pro'
|
||||
- 'runtime/doc/if_tcl.txt'
|
||||
|
||||
installer:
|
||||
- all:
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- 'nsis/**'
|
||||
- 'src/dosinst.*'
|
||||
- 'src/uninstall.c'
|
||||
|
||||
platform-mac:
|
||||
- all:
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- 'src/INSTALLmac.txt'
|
||||
- 'src/os_mac*'
|
||||
- 'src/proto/os_mac*'
|
||||
|
||||
platform-windows:
|
||||
- all:
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- 'nsis/**'
|
||||
- 'src/*.bat'
|
||||
- 'src/*.bmp'
|
||||
- 'src/*.ico'
|
||||
- 'src/GvimExt/*'
|
||||
- 'src/INSTALLpc.txt'
|
||||
- 'src/Make_cyg*.mak'
|
||||
- 'src/Make_ming.mak'
|
||||
- 'src/Make_mvc.mak'
|
||||
- 'src/dosinst.*'
|
||||
- 'src/gui_dwrite.*'
|
||||
- 'src/gui_w32*'
|
||||
- 'src/if_ole.*'
|
||||
- 'src/iid_ole.c'
|
||||
- 'src/os_mswin*'
|
||||
- 'src/os_w32*'
|
||||
- 'src/os_win32.*'
|
||||
- 'src/proto/gui_w32.pro'
|
||||
- 'src/proto/os_mswin.pro'
|
||||
- 'src/proto/os_win32.pro'
|
||||
- 'src/proto/winclip.pro'
|
||||
- 'src/uninstall.c'
|
||||
- 'src/vim.manifest'
|
||||
- 'src/vim.rc'
|
||||
- 'src/vimrun.c'
|
||||
- 'src/winclip.c'
|
||||
- 'src/xpm/**'
|
||||
- 'src/xpm_w32.*'
|
||||
|
||||
runtime:
|
||||
- all:
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- 'runtime/ftplugin'
|
||||
- 'runtime/syntax'
|
||||
- 'runtime/indent'
|
||||
- 'runtime/pack/dist/opt/termdebug/plugin/termdebug.vim'
|
||||
|
||||
termdebug:
|
||||
- all:
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- 'runtime/pack/dist/opt/termdebug/plugin/termdebug.vim'
|
||||
|
||||
plugin-netrw:
|
||||
- all:
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- 'runtime/plugin/netrwPlugin.vim'
|
||||
- 'runtime/autoload/netrw*'
|
||||
|
||||
xxd:
|
||||
- all:
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- 'src/xxd/*'
|
||||
@@ -1,7 +0,0 @@
|
||||
# Customize GitHub release notes generation. This is only used for pre-release builds for now as
|
||||
# main releases have hand-written release notes.
|
||||
changelog:
|
||||
exclude:
|
||||
labels:
|
||||
- dependencies
|
||||
- Non User Facing
|
||||
@@ -20,24 +20,20 @@ env:
|
||||
|
||||
CC: clang
|
||||
|
||||
MAKE_BUILD_ARGS: LINK_AS_NEEDED=yes # In macOS we never over-specify link dependencies and we already check against external deps in smoketest. With LTO, linking takes a while, so we want to avoid using link.sh.
|
||||
|
||||
VERSIONER_PERL_VERSION: '5.30' # macOS default Perl installation uses this to determine which one to use
|
||||
|
||||
vi_cv_path_python: /Library/Frameworks/Python.framework/Versions/2.7/bin/python
|
||||
vi_cv_path_python3: "%s/bin/python3"
|
||||
vi_cv_path_plain_lua: "%s/bin/lua"
|
||||
vi_cv_path_ruby: "%s/opt/ruby/bin/ruby"
|
||||
vi_cv_dll_name_perl: /System/Library/Perl/%s/darwin-thread-multi-2level/CORE/libperl.dylib
|
||||
vi_cv_dll_name_python: /Library/Frameworks/Python.framework/Versions/2.7/Python
|
||||
vi_cv_dll_name_python3: /usr/local/Frameworks/Python.framework/Versions/Current/Python
|
||||
vi_cv_dll_name_python3_arm64: /opt/homebrew/Frameworks/Python.framework/Versions/Current/Python
|
||||
VERSIONER_PERL_VERSION: '5.30'
|
||||
VERSIONER_PYTHON_VERSION: '2.7'
|
||||
vi_cv_path_python: /usr/local/bin/python
|
||||
vi_cv_path_python3: /usr/local/bin/python3
|
||||
vi_cv_path_plain_lua: /usr/local/bin/lua
|
||||
vi_cv_path_ruby: /usr/local/opt/ruby/bin/ruby
|
||||
vi_cv_dll_name_perl: /System/Library/Perl/5.30/darwin-thread-multi-2level/CORE/libperl.dylib
|
||||
vi_cv_dll_name_python: /usr/local/Frameworks/Python.framework/Versions/2.7/Python
|
||||
vi_cv_dll_name_python3: /usr/local/Frameworks/Python.framework/Versions/3.10/Python # Make sure to keep src/MacVim/vimrc synced with the Python version here for the Python DLL detection logic.
|
||||
vi_cv_dll_name_python3_arm64: /opt/homebrew/Frameworks/Python.framework/Versions/3.10/Python
|
||||
vi_cv_dll_name_ruby: /usr/local/opt/ruby/lib/libruby.dylib
|
||||
vi_cv_dll_name_ruby_arm64: /opt/homebrew/opt/ruby/lib/libruby.dylib
|
||||
vi_cv_dll_name_lua: /usr/local/lib/liblua.dylib
|
||||
vi_cv_dll_name_lua_arm64: /opt/homebrew/lib/liblua.dylib
|
||||
|
||||
MACVIM_APP: src/MacVim/build/Release/MacVim.app
|
||||
VIM_BIN: src/MacVim/build/Release/MacVim.app/Contents/MacOS/Vim
|
||||
MACVIM_BIN: src/MacVim/build/Release/MacVim.app/Contents/MacOS/MacVim
|
||||
|
||||
@@ -54,10 +50,8 @@ jobs:
|
||||
matrix:
|
||||
include:
|
||||
# Oldest version of Xcode supported on GitHub Action to test source code backwards compatibility
|
||||
# This version of Xcode can run on macOS 11 where as 13.3 has to run on macOS 12.
|
||||
- os: macos-12
|
||||
xcode: '13.2.1'
|
||||
extra: [vimtags, check-xcodeproj-compat]
|
||||
- os: macos-11
|
||||
xcode: '11.7'
|
||||
|
||||
# Older version of Xcode, and used to publish legacy builds (for macOS 10.9 - 10.12)
|
||||
- os: macos-12
|
||||
@@ -66,22 +60,16 @@ jobs:
|
||||
legacy: true
|
||||
publish_postfix: '_10.9'
|
||||
|
||||
- os: macos-13
|
||||
xcode: '15.2'
|
||||
optimized: true
|
||||
|
||||
# Most up to date OS and Xcode. Used to publish release for the main build.
|
||||
# This runner uses Apple Silicon.
|
||||
- os: macos-14
|
||||
xcode: '15.2'
|
||||
- os: macos-12
|
||||
xcode: '14.1'
|
||||
publish: true
|
||||
optimized: true
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Set up legacy build
|
||||
if: matrix.legacy
|
||||
@@ -94,20 +82,19 @@ jobs:
|
||||
# Later, we pass the --enable-sparkle_1 flag to configure to set the corresponding ifdef.
|
||||
ln -fhs Sparkle_1.framework src/MacVim/Sparkle.framework
|
||||
|
||||
# Sparkle shows a dialog asking if the user wants to check for updates on 2nd launch of
|
||||
# MacVim. On Sparkle 1 this is annoyingly a modal dialog box and interferes with tests.
|
||||
# Just disable it by pre-setting to not check for updates.
|
||||
defaults write org.vim.MacVim SUEnableAutomaticChecks 0
|
||||
|
||||
- name: Set up Xcode
|
||||
if: matrix.xcode != ''
|
||||
run: |
|
||||
sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer
|
||||
xcode-select -p
|
||||
xcodebuild -version
|
||||
|
||||
# Set up, install, and cache gettext library for localization.
|
||||
#
|
||||
# Instead of using the default binary installed by Homebrew, need to build our own because gettext is statically
|
||||
# linked in MacVim, and need to be built against MACOSX_DEPLOYMENT_TARGET to ensure the built binary will work on
|
||||
# supported macOS versions.
|
||||
#
|
||||
# In addition, to support building a universal MacVim, we need an arm64 version of gettext as well in order to
|
||||
# create a universal gettext binary to link against (Homebrew only distributes thin binaries and therefore this
|
||||
# has to be done manually). To do that, we will just pull the bottle directly from Homebrew and patch it in using
|
||||
# lipo. We can't use normal brew commands to get the bottle because brew doesn't natively support cross-compiling
|
||||
# and we are running CI on x86_64 Macs. We also don't need to worry about the min deployment target fix on arm64
|
||||
# because all Apple Silicon Macs have to run on macOS 11+.
|
||||
|
||||
- name: Set up gettext
|
||||
if: matrix.publish
|
||||
uses: ./.github/actions/universal-package
|
||||
@@ -127,52 +114,30 @@ jobs:
|
||||
# Set up remaining packages and tools
|
||||
|
||||
- name: Install packages
|
||||
run: |
|
||||
brew install --quiet 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 --quiet 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
|
||||
env:
|
||||
HOMEBREW_NO_AUTO_UPDATE: 1
|
||||
run: |
|
||||
# We no longer need to install/update Python 3, as it's guaranteed to
|
||||
# be installed on runners. Since we use stable ABI, the exact version
|
||||
# on CI does not matter.
|
||||
brew install python3
|
||||
brew install ruby
|
||||
brew install lua
|
||||
|
||||
brew install --quiet ruby
|
||||
brew install --quiet lua
|
||||
# CI sometimes have custom installed Python instead of using Homebrew. Forcefully re-
|
||||
# link Python, and then check that we are using the Homebrew version. This avoids us
|
||||
# using a mystery Python installation that we don't control.
|
||||
brew unlink python3 && brew link --overwrite python3
|
||||
readlink -f $vi_cv_path_python3 | grep "^$(brew --cellar python3)"
|
||||
|
||||
if [[ -d $(brew --prefix)/Cellar/perl ]]; then
|
||||
if [[ -d /usr/local/Cellar/perl ]]; then
|
||||
# We just use system perl to reduce dependencies
|
||||
brew unlink perl
|
||||
fi
|
||||
|
||||
echo "vi_cv_path_python3=$(printf $vi_cv_path_python3 $(brew --prefix))" >> $GITHUB_ENV
|
||||
echo "vi_cv_path_plain_lua=$(printf $vi_cv_path_plain_lua $(brew --prefix))" >> $GITHUB_ENV
|
||||
echo "vi_cv_path_ruby=$(printf $vi_cv_path_ruby $(brew --prefix))" >> $GITHUB_ENV
|
||||
|
||||
# With Perl, we need to manually specify the version number because the dylib path depends on it.
|
||||
echo "vi_cv_dll_name_perl=$(printf $vi_cv_dll_name_perl $VERSIONER_PERL_VERSION)" >> $GITHUB_ENV
|
||||
|
||||
# New runner images (macos-13) no longer have Python2 installed. We
|
||||
# need to install Python2 manually. Installing from the official
|
||||
# installer is the easiest way as Homebrew no longer ships python@2
|
||||
# and this way does not invole manual building from source. We
|
||||
# mostly only need the headers to build a dynamic build anyway.
|
||||
#
|
||||
# This will be removed in the future as Python2 has been completely
|
||||
# unsupported for years.
|
||||
curl https://www.python.org/ftp/python/2.7.18/python-2.7.18-macosx10.9.pkg -o ~/Downloads/python-2.7.18-macosx10.9.pkg
|
||||
sudo installer -pkg ~/Downloads/python-2.7.18-macosx10.9.pkg -target /
|
||||
- name: Set up Xcode
|
||||
if: matrix.xcode != ''
|
||||
run: |
|
||||
sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer
|
||||
xcode-select -p
|
||||
|
||||
# All set up steps are done. Build and test MacVim below.
|
||||
|
||||
@@ -181,7 +146,6 @@ jobs:
|
||||
set -o verbose
|
||||
|
||||
CONFOPT=(
|
||||
--with-local-dir=$(brew --prefix)
|
||||
--with-features=huge
|
||||
--enable-netbeans
|
||||
--with-tlib=ncurses
|
||||
@@ -194,14 +158,14 @@ jobs:
|
||||
--enable-perlinterp=dynamic
|
||||
--enable-pythoninterp=dynamic
|
||||
--enable-python3interp=dynamic
|
||||
--with-python3-stable-abi=3.9 # macOS and Xcode currently ships 3.9, so we don't want go higher than that.
|
||||
--enable-rubyinterp=dynamic
|
||||
--enable-luainterp=dynamic
|
||||
--with-lua-prefix=$(brew --prefix)
|
||||
--with-lua-prefix=/usr/local
|
||||
--with-macarchs="$MACVIM_ARCHS"
|
||||
)
|
||||
else
|
||||
CONFOPT+=(
|
||||
--with-macarchs=x86_64
|
||||
--disable-sparkle # Disable Sparkle for testing that this flag builds and works
|
||||
)
|
||||
fi
|
||||
@@ -214,16 +178,11 @@ jobs:
|
||||
|
||||
./configure "${CONFOPT[@]}" --enable-fail-if-missing
|
||||
|
||||
sed -i.bak -f ci/config.mk.sed -f ci/config.mk.clang.sed -f ci/config.mk.xcode.sed src/auto/config.mk
|
||||
sed -i.bak -f ci/config.mk.sed -f ci/config.mk.clang.sed src/auto/config.mk
|
||||
if clang --version | grep -qs '^Apple clang version \(1[3-9]\|[2-9]\d\)\.'; then
|
||||
sed -i.bak -f ci/config.mk.clang-12.sed src/auto/config.mk
|
||||
fi
|
||||
|
||||
if ${{ matrix.optimized == true }}; then
|
||||
# Additional optimizations like link-time optimizations that are a bit slower to build.
|
||||
sed -i.bak -f ci/config.mk.optimized.sed src/auto/config.mk
|
||||
fi
|
||||
|
||||
- name: Modify configure result
|
||||
if: matrix.publish
|
||||
run: |
|
||||
@@ -245,50 +204,44 @@ jobs:
|
||||
cat src/auto/config.mk
|
||||
cat src/auto/config.h
|
||||
|
||||
- name: Build
|
||||
# Build Vim first, separately from MacVim, so that we can use it to run
|
||||
# vimtags afterwards to get the most correct help tags before we copy
|
||||
# that into the MacVim bundle.
|
||||
- name: Build Vim
|
||||
env:
|
||||
LC_ALL: C
|
||||
run: |
|
||||
set -o verbose
|
||||
|
||||
NPROC=$(getconf _NPROCESSORS_ONLN)
|
||||
echo "Building Vim with ${NPROC} cores"
|
||||
|
||||
make -C src -j${NPROC} Vim
|
||||
|
||||
# Re-generate Vim help tags, because sometimes the Vim's runtime is not
|
||||
# updated to have the latest tags.
|
||||
- name: Update Vim help tags
|
||||
if: matrix.publish
|
||||
run: make -C runtime/doc vimtags VIMEXE=../../src/vim
|
||||
|
||||
- name: Build MacVim
|
||||
env:
|
||||
LC_ALL: C
|
||||
run: |
|
||||
set -o verbose
|
||||
|
||||
NPROC=$(getconf _NPROCESSORS_ONLN)
|
||||
echo "Building MacVim with ${NPROC} cores"
|
||||
|
||||
set -o verbose
|
||||
make ${MAKE_BUILD_ARGS} -j${NPROC}
|
||||
make -j${NPROC}
|
||||
|
||||
- name: Check version
|
||||
run: |
|
||||
${VIM_BIN} --version
|
||||
${VIM_BIN} -u NONE -i NONE --not-a-term -esNX -V1 -c 'echo "\nprof_nsec:" .. has("prof_nsec") .. "\n"' -c quit
|
||||
${VIM_BIN} -u NONE -i NONE --not-a-term -esNX -V1 -S ci/if_ver-1.vim -c quit
|
||||
${VIM_BIN} -u NONE -i NONE --not-a-term -esNX -V1 -S ci/if_ver-2.vim -c quit
|
||||
|
||||
- name: Smoketest
|
||||
run: |
|
||||
set -o verbose
|
||||
|
||||
# Make sure there isn't any dynamic linkage to third-party dependencies in the built binary, as we should only use
|
||||
# static linkage to avoid dependency hell. Test that all those dylib's are in /usr/lib which is bundled with macOS and not third-party.
|
||||
if otool -L ${VIM_BIN} | grep '\.dylib\s' | grep -v '^\s*/usr/lib/'; then
|
||||
echo 'Found external dynamic linkage!'; false
|
||||
fi
|
||||
|
||||
# Make sure that --disable-sparkle flag will properly exclude all references to Sparkle symbols. This is
|
||||
# necessary because we still use weak linking to Sparkle when that flag is set and so references to Sparkle
|
||||
# wouldn't fail the build (we just remove Sparkle.framework from the built app after the fact).
|
||||
if ${{ matrix.publish == false }}; then
|
||||
# Currently we pass --disable-sparkle flag when publish==false
|
||||
if objdump -t ${MACVIM_BIN} | grep "_SPU\|_SUUpdate"; then
|
||||
echo 'Found references to Sparkle even when using --disable-sparkle'; false
|
||||
fi
|
||||
fi
|
||||
|
||||
# Make sure man pages were bundled
|
||||
man -M `pwd`/${MACVIM_APP}/Contents/man -w mvim
|
||||
|
||||
# Make sure xxd was bundled
|
||||
echo "AB" | ${MACVIM_APP}/Contents/bin/xxd | grep "4142"
|
||||
|
||||
- name: Smoketest (publish)
|
||||
if: matrix.publish
|
||||
run: |
|
||||
set -o verbose
|
||||
@@ -300,21 +253,21 @@ jobs:
|
||||
# Smoketest scripting languages
|
||||
macvim_excmd -c 'lua print("Test")' | grep Test
|
||||
macvim_excmd -c 'perl VIM::Msg("Test")' | grep Test
|
||||
macvim_excmd -c 'py print "Test"' | grep Test
|
||||
macvim_excmd -c 'py3 print("Test")' | grep Test
|
||||
macvim_excmd -c 'ruby puts("Test")' | grep Test
|
||||
|
||||
if [[ "$(uname -m)" == "x86_64" ]]; then
|
||||
macvim_excmd -c 'py print "x86 Test"' | grep Test
|
||||
else
|
||||
# Python2 doesn't work in Apple Silicon, test under Rosetta
|
||||
(VIM_BIN="arch -x86_64 ${VIM_BIN}"; macvim_excmd -c 'py print "rosetta Test"' | grep Test)
|
||||
fi
|
||||
|
||||
# Check that localized messages work by printing ':version' and checking against localized word
|
||||
macvim_excmd -c 'lang es_ES' -c 'version' | grep Enlazado
|
||||
|
||||
# Check that libsodium is working
|
||||
macvim_excmd -c 'set cryptmethod=xchacha20v2'
|
||||
macvim_excmd -c 'set cryptmethod=xchacha20'
|
||||
|
||||
# Make sure there isn't any dynamic linkage to third-party dependencies in the built binary, as we should only use
|
||||
# static linkage to avoid dependency hell. Test that all those dylib's are in /usr/lib which is bundled with macOS and not third-party.
|
||||
if otool -L ${VIM_BIN} | grep '\.dylib\s' | grep -v '^\s*/usr/lib/'; then
|
||||
echo 'Found external dynamic linkage!'; false
|
||||
fi
|
||||
|
||||
# Make sure we are building universal x86_64 / arm64 builds and didn't accidentally create a thin app.
|
||||
check_arch() {
|
||||
@@ -328,47 +281,15 @@ jobs:
|
||||
check_arch "${VIM_BIN}"
|
||||
check_arch "${MACVIM_BIN}"
|
||||
|
||||
- name: Check Vim help tags
|
||||
if: contains(matrix.extra, 'vimtags')
|
||||
run: |
|
||||
# Confirm that we can build the help tags, and they match what's in source.
|
||||
make -C runtime/doc vimtags VIMEXE=../../${VIM_BIN}
|
||||
git diff --exit-code -- runtime/doc/tags
|
||||
|
||||
- name: Check Xcode project compatibility version
|
||||
if: contains(matrix.extra, 'check-xcodeproj-compat')
|
||||
run: |
|
||||
# Confirm that the compatibility version of xcodeproj is correct and not outdated.
|
||||
rm -rf src/MacVim/MacVim_xcode8.xcodeproj
|
||||
make -C src macvim-xcodeproj-compat
|
||||
if ! git diff --exit-code -- src/MacVim/MacVim_xcode8.xcodeproj; then
|
||||
echo 'MacVim_xcode8.xcodeproj is outdated. Run "make -C src macvim-xcodeproj-compat" to re-generate it.'; false
|
||||
fi
|
||||
|
||||
- name: Test MacVim
|
||||
timeout-minutes: 10
|
||||
run: |
|
||||
make ${MAKE_BUILD_ARGS} -C src macvim-tests
|
||||
|
||||
- name: Build Vim test binaries
|
||||
run: |
|
||||
# Build the unit test binaries first. With link-time-optimization they take some time to link. Running them
|
||||
# separately de-couples them from the timeout in tests, and allow us to build in parallel jobs (since tests
|
||||
# can't run in parallel).
|
||||
NPROC=$(getconf _NPROCESSORS_ONLN)
|
||||
|
||||
set -o verbose
|
||||
make ${MAKE_BUILD_ARGS} -j${NPROC} -C src unittesttargets
|
||||
|
||||
- name: Test Vim
|
||||
- name: Test
|
||||
timeout-minutes: 20
|
||||
run: make ${MAKE_BUILD_ARGS} test
|
||||
run: make test
|
||||
|
||||
- name: Test Vim (GUI)
|
||||
- name: Test GUI
|
||||
timeout-minutes: 20
|
||||
run: |
|
||||
make ${MAKE_BUILD_ARGS} -C src/testdir clean
|
||||
make ${MAKE_BUILD_ARGS} -C src testgui
|
||||
make -C src/testdir clean
|
||||
make -C src testgui
|
||||
|
||||
# Creates a DMG package of MacVim. Note that this doesn't create a GitHub release for us, because we would prefer to
|
||||
# do it manually, for two reasons: 1) signing / notarization are currently done out of CI, 2) we want to manually
|
||||
@@ -378,11 +299,7 @@ jobs:
|
||||
run: |
|
||||
# Use the --skip-jenkins flag to skip the prettify osascript calls which could fail due to permission issues in
|
||||
# CI environment.
|
||||
if ${{ matrix.legacy == true }}; then
|
||||
make -C src macvim-dmg-legacy CREATEDMG_FLAGS=--skip-jenkins
|
||||
else
|
||||
make -C src macvim-dmg CREATEDMG_FLAGS=--skip-jenkins
|
||||
fi
|
||||
make -C src macvim-dmg CREATEDMG_FLAGS=--skip-jenkins
|
||||
|
||||
if ${{ matrix.publish_postfix != '' }}; then
|
||||
mv src/MacVim/build/Release/MacVim.dmg src/MacVim/build/Release/MacVim${{ matrix.publish_postfix }}.dmg
|
||||
@@ -390,7 +307,7 @@ jobs:
|
||||
|
||||
- name: Upload MacVim image
|
||||
if: startsWith(github.ref, 'refs/tags/') && matrix.publish
|
||||
uses: actions/upload-artifact@v4
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: MacVim${{ matrix.publish_postfix }}.dmg
|
||||
path: src/MacVim/build/Release/MacVim${{ matrix.publish_postfix }}.dmg
|
||||
|
||||
@@ -44,11 +44,11 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout repository from github
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v3
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v3
|
||||
uses: github/codeql-action/init@v2
|
||||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
# If you wish to specify custom queries, you can do so here or in a config file.
|
||||
@@ -59,7 +59,7 @@ jobs:
|
||||
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
||||
# If this step fails, then you should remove it and run the build manually (see below)
|
||||
- name: Autobuild
|
||||
uses: github/codeql-action/autobuild@v3
|
||||
uses: github/codeql-action/autobuild@v2
|
||||
|
||||
# ℹ️ Command-line programs to run using the OS shell.
|
||||
# 📚 https://git.io/JvXDl
|
||||
@@ -73,4 +73,4 @@ jobs:
|
||||
# make release
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v3
|
||||
uses: github/codeql-action/analyze@v2
|
||||
|
||||
@@ -9,17 +9,18 @@ permissions:
|
||||
|
||||
jobs:
|
||||
scan:
|
||||
runs-on: ubuntu-22.04
|
||||
runs-on: ubuntu-20.04
|
||||
|
||||
env:
|
||||
CC: gcc
|
||||
CFLAGS: -Wno-deprecated-declarations
|
||||
DEBIAN_FRONTEND: noninteractive
|
||||
TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }}
|
||||
|
||||
steps:
|
||||
- name: Checkout repository from github
|
||||
if: env.TOKEN
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Download Coverity
|
||||
if: env.TOKEN
|
||||
@@ -31,15 +32,15 @@ jobs:
|
||||
- name: Install packages
|
||||
if: env.TOKEN
|
||||
run: |
|
||||
sudo apt-get update && sudo apt-get install -y \
|
||||
sudo apt update && sudo apt install -y \
|
||||
autoconf \
|
||||
gettext \
|
||||
libcanberra-dev \
|
||||
libperl-dev \
|
||||
python2-dev \
|
||||
python-dev \
|
||||
python3-dev \
|
||||
liblua5.4-dev \
|
||||
lua5.4 \
|
||||
liblua5.3-dev \
|
||||
lua5.3 \
|
||||
ruby-dev \
|
||||
tcl-dev \
|
||||
libgtk2.0-dev \
|
||||
@@ -63,9 +64,6 @@ jobs:
|
||||
# Append various warning flags to CFLAGS.
|
||||
sed -i -f ci/config.mk.sed src/auto/config.mk
|
||||
sed -i -f ci/config.mk.${CC}.sed src/auto/config.mk
|
||||
# -O2 gives false warning and turns it into an error:
|
||||
# warning: function may return address of local variable [-Wreturn-local-addr]
|
||||
sed -i 's/-O2 \?//' src/auto/config.mk
|
||||
|
||||
- name: Build/scan vim
|
||||
if: env.TOKEN
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
# This workflow will triage pull requests and apply a label based on the
|
||||
# paths that are modified in the pull request.
|
||||
#
|
||||
# To use this workflow, you will need to set up a .github/labeler.yml
|
||||
# file with configuration. For more information, see:
|
||||
# https://github.com/actions/labeler
|
||||
|
||||
name: Labeler
|
||||
on: [pull_request_target]
|
||||
|
||||
jobs:
|
||||
label:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
pull-requests: write
|
||||
|
||||
steps:
|
||||
- uses: actions/labeler@v5
|
||||
with:
|
||||
repo-token: "${{ secrets.GITHUB_TOKEN }}"
|
||||
@@ -10,7 +10,7 @@ jobs:
|
||||
issues: write
|
||||
pull-requests: write
|
||||
steps:
|
||||
- uses: actions/stale@v9
|
||||
- uses: actions/stale@v7
|
||||
with:
|
||||
any-of-labels: "Response Needed"
|
||||
days-before-stale: 45
|
||||
|
||||
+5
-15
@@ -8,8 +8,6 @@ src/auto/gui_gtk_gresources.h
|
||||
src/auto/os_haiku.rdef
|
||||
src/objects/.dirstamp
|
||||
src/objects
|
||||
src/po/big5corr
|
||||
src/po/sjiscorr
|
||||
src/types.vim
|
||||
|
||||
# We do need src/auto/configure.
|
||||
@@ -70,7 +68,6 @@ src/tags
|
||||
/GPATH
|
||||
/GTAGS
|
||||
/GRTAGS
|
||||
nsis/tags
|
||||
|
||||
# Generated by "make test"
|
||||
src/po/*.ck
|
||||
@@ -99,11 +96,11 @@ src/kword_test
|
||||
# From MacVim
|
||||
.*.swp
|
||||
.DS_Store
|
||||
src/MacVim/MacVim*.xcodeproj/*.mode1
|
||||
src/MacVim/MacVim*.xcodeproj/*.mode1v3
|
||||
src/MacVim/MacVim*.xcodeproj/*.pbxuser
|
||||
src/MacVim/MacVim*.xcodeproj/project.xcworkspace
|
||||
src/MacVim/MacVim*.xcodeproj/xcuserdata
|
||||
src/MacVim/MacVim.xcodeproj/*.mode1
|
||||
src/MacVim/MacVim.xcodeproj/*.mode1v3
|
||||
src/MacVim/MacVim.xcodeproj/*.pbxuser
|
||||
src/MacVim/MacVim.xcodeproj/project.xcworkspace
|
||||
src/MacVim/MacVim.xcodeproj/xcuserdata
|
||||
src/MacVim/icons/*.pyc
|
||||
src/MacVim/icons/*.ttf
|
||||
src/MacVim/icons/*.reg
|
||||
@@ -125,7 +122,6 @@ src/MacVim/qlstephen/QuickLookStephen.xcodeproj/*.pbxuser
|
||||
src/MacVim/qlstephen/QuickLookStephen.xcodeproj/xcuserdata
|
||||
src/MacVim/qlstephen/build
|
||||
src/MacVim/build
|
||||
src/MacVim/auto
|
||||
src/MacVim/DerivedData
|
||||
src/TAGS
|
||||
src/Vim
|
||||
@@ -150,12 +146,6 @@ 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-*
|
||||
|
||||
@@ -7,11 +7,9 @@ src/xxd/xxd
|
||||
src/auto/if_perl.c
|
||||
src/auto/gui_gtk_gresources.c
|
||||
src/auto/gui_gtk_gresources.h
|
||||
src/auto/os_haiku.rdef
|
||||
src/objects/.dirstamp
|
||||
src/objects
|
||||
src/po/big5corr
|
||||
src/po/sjiscorr
|
||||
src/tags
|
||||
src/types.vim
|
||||
|
||||
# We do need src/auto/configure.
|
||||
@@ -48,15 +46,12 @@ gvimext.lib
|
||||
gvim.lib
|
||||
runtime/doc/uganda.nsis.txt
|
||||
nsis/icons/*
|
||||
/vim90/
|
||||
.vscode/
|
||||
|
||||
# NetBeans
|
||||
nbproject/*
|
||||
|
||||
# Mac OSX
|
||||
src/xxd/xxd.dSYM
|
||||
.DS_Store
|
||||
|
||||
# All platforms
|
||||
*.rej
|
||||
@@ -67,12 +62,6 @@ src/xxd/xxd.dSYM
|
||||
*.pyc
|
||||
*.log
|
||||
src/po/vim.pot
|
||||
src/tags
|
||||
/tags
|
||||
/GPATH
|
||||
/GTAGS
|
||||
/GRTAGS
|
||||
nsis/tags
|
||||
|
||||
# Generated by "make test"
|
||||
src/po/*.ck
|
||||
@@ -89,18 +78,15 @@ src/testdir/dostmp/*
|
||||
src/testdir/messages
|
||||
src/testdir/viminfo
|
||||
src/testdir/opt_test.vim
|
||||
src/testdir/failed
|
||||
src/testdir/starttime
|
||||
runtime/indent/testdir/*.out
|
||||
runtime/indent/testdir/*.fail
|
||||
src/memfile_test
|
||||
src/json_test
|
||||
src/message_test
|
||||
src/kword_test
|
||||
|
||||
# Generated by "make install"
|
||||
runtime/doc/tags
|
||||
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-*
|
||||
@@ -109,10 +95,5 @@ src/shadow-*
|
||||
src/runtime
|
||||
src/pixmaps
|
||||
|
||||
# other files possibly created by tools
|
||||
# other possible files build by tools
|
||||
src/cscope.out
|
||||
|
||||
# Linter/language server files
|
||||
/.cache/clangd/
|
||||
/.ccls-cache/
|
||||
/compile_commands.json
|
||||
|
||||
+19
-50
@@ -1,12 +1,13 @@
|
||||
# Contributing to Vim
|
||||
|
||||
Patches are welcome in whatever form.
|
||||
Discussions about patches happen on the [vim-dev][0] mailing list.
|
||||
Discussions about patches happen on the vim-dev maillist.
|
||||
If you create a pull request on GitHub it will be
|
||||
forwarded to the vim-dev mailing list. You can also send your patch there
|
||||
directly (but please note, the initial posting is subject to moderation).
|
||||
In that case an attachment with a unified diff format is preferred.
|
||||
Information about the mailing list can be found [on the Vim website][0]
|
||||
forwarded to the vim-dev maillist. You can also send your patch there
|
||||
directly. In that case an attachment with a unified diff format is preferred.
|
||||
Information about the maillist can be found [on the Vim website].
|
||||
|
||||
[on the Vim website]: http://www.vim.org/maillist.php#vim-dev
|
||||
|
||||
A pull request has the advantage that it will trigger the Continuous
|
||||
Integration tests, you will be warned of problems (you can ignore the coverage
|
||||
@@ -21,54 +22,46 @@ Contributions will be distributed with Vim under the Vim license. Providing a
|
||||
change to be included implies that you agree with this and your contribution
|
||||
does not cause us trouble with trademarks or patents. There is no CLA to sign.
|
||||
|
||||
|
||||
# Reporting issues
|
||||
|
||||
We use GitHub issues, but that is not a requirement. Writing to the Vim
|
||||
mailing list is also fine.
|
||||
maillist is also fine.
|
||||
|
||||
Please use the GitHub issues only for actual issues. If you are not 100% sure
|
||||
that your problem is a Vim issue, please first discuss this on the Vim user
|
||||
mailing list. Try reproducing the problem without any of your plugins or settings:
|
||||
maillist. Try reproducing the problem without any of your plugins or settings:
|
||||
|
||||
vim --clean
|
||||
|
||||
If you report an issue, please describe exactly how to reproduce it.
|
||||
For example, don't say "insert some text" but say what you did exactly:
|
||||
`ahere is some text<Esc>`.
|
||||
"ahere is some text<Esc>".
|
||||
Ideally, the steps you list can be used to write a test to verify the problem
|
||||
is fixed.
|
||||
|
||||
Feel free to report even the smallest problem, also typos in the documentation.
|
||||
|
||||
You can find known issues in the todo file: `:help todo`.
|
||||
Or open [the todo file][todo list] on GitHub to see the latest version.
|
||||
You can find known issues in the todo file: ":help todo".
|
||||
Or open [the todo file] on GitHub to see the latest version.
|
||||
|
||||
[the todo file]: https://github.com/vim/vim/blob/master/runtime/doc/todo.txt
|
||||
|
||||
|
||||
# Syntax, indent and other runtime files
|
||||
|
||||
The latest version of these files can be obtained from the repository.
|
||||
They are usually not updated with numbered patches. However, they may
|
||||
or may not work with older Vim releases (since they may contain new features).
|
||||
They are usually not updated with numbered patches.
|
||||
|
||||
If you find a problem with one of these files or have a suggestion for
|
||||
improvement, please first try to contact the maintainer directly.
|
||||
Look in the header of the file for the name, email address, github handle and/or
|
||||
upstream repository. You may also check the [MAINTAINERS][11] file.
|
||||
Look in the header of the file for the name and email address.
|
||||
|
||||
The maintainer will take care of issues and send updates to the Vim project for
|
||||
The maintainer will take care of issues and send updates to Bram for
|
||||
distribution with Vim.
|
||||
|
||||
If the maintainer does not respond, contact the [vim-dev][0] mailing list.
|
||||
If the maintainer does not respond, contact the vim-dev maillist.
|
||||
|
||||
## Contributing new runtime files
|
||||
|
||||
If you want to contribute new runtime files for Vim or Neovim, please create a
|
||||
PR with your changes against this repository here. For new filetypes, do not forget:
|
||||
* to add a new [filetype test][12] (keep it similar to the other filetype tests).
|
||||
* all configuration switches should be documented
|
||||
(check [filetype.txt][13] and/or [syntax.txt][14] for filetype and syntax plugins)
|
||||
* add yourself as Maintainer to the top of file (again, keep the header similar to
|
||||
other runtime files)
|
||||
* add yourself to the [MAINTAINERS][11] file.
|
||||
|
||||
# Translations
|
||||
|
||||
@@ -84,32 +77,8 @@ can be translated:
|
||||
The help files can be translated and made available separately.
|
||||
See https://www.vim.org/translations.php for examples.
|
||||
|
||||
# How do I contribute to the project?
|
||||
|
||||
Please have a look at the following [discussion][6], which should give you some
|
||||
ideas. Please also check the [develop.txt][7] helpfile for the recommended
|
||||
style. Often it's also beneficial to check the surrounding code for the style
|
||||
being used.
|
||||
|
||||
# I have a question
|
||||
|
||||
If you have some question on the style guide, please contact the [vim-dev][0]
|
||||
mailing list. For other questions please use the [Vi Stack Exchange][8] website, the
|
||||
[vim-use][9] mailing list or make use of the [discussion][10] feature here at github.
|
||||
|
||||
[todo list]: https://github.com/vim/vim/blob/master/runtime/doc/todo.txt
|
||||
[0]: http://www.vim.org/maillist.php#vim-dev
|
||||
[1]: https://github.com/vim/vim/blob/master/src/po/README.txt
|
||||
[2]: https://github.com/vim/vim/blob/master/runtime/lang/README.txt
|
||||
[3]: https://github.com/vim/vim/blob/master/runtime/tutor/README.txt
|
||||
[4]: https://github.com/vim/vim/blob/master/runtime/doc/vim.1
|
||||
[5]: https://github.com/vim/vim/blob/master/nsis/lang/english.nsi
|
||||
[6]: https://github.com/vim/vim/discussions/13087
|
||||
[7]: https://github.com/vim/vim/blob/master/runtime/doc/develop.txt
|
||||
[8]: https://vi.stackexchange.com
|
||||
[9]: http://www.vim.org/maillist.php#vim-use
|
||||
[10]: https://github.com/vim/vim/discussions
|
||||
[11]: https://github.com/vim/vim/blob/master/.github/MAINTAINERS
|
||||
[12]: https://github.com/vim/vim/blob/master/src/testdir/test_filetype.vim
|
||||
[13]: https://github.com/vim/vim/blob/master/runtime/doc/filetype.txt
|
||||
[14]: https://github.com/vim/vim/blob/master/runtime/doc/syntax.txt
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
# List of distributed Vim files.
|
||||
# Used by Makefile.
|
||||
|
||||
# Source files for all source archives.
|
||||
# source files for all source archives
|
||||
SRC_ALL = \
|
||||
.cirrus.yml \
|
||||
.coveralls.yml \
|
||||
.gitattributes \
|
||||
.github/MAINTAINERS \
|
||||
.github/CODEOWNERS \
|
||||
.github/ISSUE_TEMPLATE/bug_report.yml \
|
||||
.github/ISSUE_TEMPLATE/feature_request.md \
|
||||
.github/workflows/ci.yml \
|
||||
.github/workflows/codeql-analysis.yml \
|
||||
.github/actions/screendump/action.yml \
|
||||
.github/workflows/coverity.yml \
|
||||
.github/dependabot.yml \
|
||||
.gitignore \
|
||||
@@ -18,10 +18,11 @@ SRC_ALL = \
|
||||
.appveyor.yml \
|
||||
.codecov.yml \
|
||||
ci/appveyor.bat \
|
||||
ci/build-snd-dummy.sh \
|
||||
ci/config.mk*.sed \
|
||||
ci/if_ver*.vim \
|
||||
ci/load-snd-dummy.sh \
|
||||
ci/setup-xvfb.sh \
|
||||
ci/remove_snap.sh \
|
||||
src/Make_all.mak \
|
||||
src/README.md \
|
||||
src/alloc.c \
|
||||
@@ -73,7 +74,6 @@ SRC_ALL = \
|
||||
src/float.c \
|
||||
src/fold.c \
|
||||
src/getchar.c \
|
||||
src/gc.c \
|
||||
src/globals.h \
|
||||
src/gui.c \
|
||||
src/gui.h \
|
||||
@@ -185,7 +185,6 @@ SRC_ALL = \
|
||||
src/testdir/sautest/autoload/*.vim \
|
||||
src/testdir/testluaplugin/lua/testluaplugin/*.lua \
|
||||
src/testdir/check.vim \
|
||||
src/testdir/commondumps.vim \
|
||||
src/testdir/gui_init.vim \
|
||||
src/testdir/gui_preinit.vim \
|
||||
src/testdir/mouse.vim \
|
||||
@@ -199,7 +198,6 @@ SRC_ALL = \
|
||||
src/testdir/summarize.vim \
|
||||
src/testdir/term_util.vim \
|
||||
src/testdir/view_util.vim \
|
||||
src/testdir/viewdumps.vim \
|
||||
src/testdir/test[0-9]*.ok \
|
||||
src/testdir/test77a.ok \
|
||||
src/testdir/test77a.com \
|
||||
@@ -216,17 +214,11 @@ SRC_ALL = \
|
||||
src/testdir/pyxfile/*.py \
|
||||
src/testdir/dumps/*.dump \
|
||||
src/testdir/dumps/*.vim \
|
||||
src/testdir/samples/*.html \
|
||||
src/testdir/samples/*.txt \
|
||||
src/testdir/samples/*.vim \
|
||||
src/testdir/samples/test000 \
|
||||
src/testdir/samples/test.zip \
|
||||
src/testdir/samples/testa.zip \
|
||||
src/testdir/color_ramp.vim \
|
||||
src/testdir/silent.wav \
|
||||
src/testdir/popupbounce.vim \
|
||||
src/testdir/crash/* \
|
||||
src/testdir/ru_RU/LC_MESSAGES/__PACKAGE__.mo \
|
||||
src/proto.h \
|
||||
src/protodef.h \
|
||||
src/proto/alloc.pro \
|
||||
@@ -271,7 +263,6 @@ SRC_ALL = \
|
||||
src/proto/float.pro \
|
||||
src/proto/fold.pro \
|
||||
src/proto/getchar.pro \
|
||||
src/proto/gc.pro \
|
||||
src/proto/gui.pro \
|
||||
src/proto/gui_beval.pro \
|
||||
src/proto/hardcopy.pro \
|
||||
@@ -439,7 +430,7 @@ SRC_ALL = \
|
||||
src/xdiff/xutils.h \
|
||||
|
||||
|
||||
# Source files for Unix-like only.
|
||||
# source files for Unix only
|
||||
SRC_UNIX = \
|
||||
Makefile \
|
||||
Filelist \
|
||||
@@ -505,7 +496,7 @@ SRC_UNIX = \
|
||||
src/which.sh \
|
||||
src/xxd/Makefile \
|
||||
|
||||
# Source files for both MS Windows and Unix-like.
|
||||
# source files for both DOS and Unix
|
||||
SRC_DOS_UNIX = \
|
||||
src/gui_xim.c \
|
||||
src/if_cscope.c \
|
||||
@@ -531,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 \
|
||||
@@ -605,10 +596,9 @@ SRC_DOS = \
|
||||
nsis/gvim_version.nsh \
|
||||
nsis/README.txt \
|
||||
nsis/lang/*.nsi \
|
||||
nsis/lang/README.txt \
|
||||
uninstall.txt \
|
||||
|
||||
# Source files for MS Windows without CR/LF translation (also in the extra archive).
|
||||
# source files for DOS without CR/LF translation (also in the extra archive)
|
||||
SRC_DOS_BIN = \
|
||||
src/tearoff.bmp \
|
||||
src/tools.bmp \
|
||||
@@ -625,10 +615,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 \
|
||||
@@ -642,7 +632,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 \
|
||||
@@ -651,7 +641,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 \
|
||||
@@ -660,7 +650,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 \
|
||||
@@ -674,7 +664,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 \
|
||||
@@ -682,7 +672,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) \
|
||||
@@ -697,7 +687,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 \
|
||||
@@ -709,7 +699,6 @@ RT_ALL = \
|
||||
runtime/doc/*.pl \
|
||||
runtime/doc/*.txt \
|
||||
runtime/doc/Makefile \
|
||||
runtime/doc/Make_all.mak \
|
||||
runtime/doc/doctags.c \
|
||||
runtime/doc/doctags.vim \
|
||||
runtime/doc/test_urls.vim \
|
||||
@@ -721,7 +710,6 @@ RT_ALL = \
|
||||
runtime/ftoff.vim \
|
||||
runtime/gvimrc_example.vim \
|
||||
runtime/import/dist/vimhelp.vim \
|
||||
runtime/import/dist/vimhighlight.vim \
|
||||
runtime/macros/README.txt \
|
||||
runtime/macros/editexisting.vim \
|
||||
runtime/macros/hanoi/click.me \
|
||||
@@ -764,41 +752,25 @@ RT_ALL = \
|
||||
runtime/tutor/tutor.vim \
|
||||
runtime/vimrc_example.vim \
|
||||
runtime/pack/dist/opt/cfilter/plugin/cfilter.vim \
|
||||
runtime/pack/dist/opt/comment/plugin/comment.vim \
|
||||
runtime/pack/dist/opt/comment/doc/comment.txt \
|
||||
runtime/pack/dist/opt/comment/doc/tags \
|
||||
runtime/pack/dist/opt/comment/autoload/comment.vim \
|
||||
runtime/pack/dist/opt/dvorak/plugin/dvorak.vim \
|
||||
runtime/pack/dist/opt/dvorak/dvorak/enable.vim \
|
||||
runtime/pack/dist/opt/dvorak/dvorak/disable.vim \
|
||||
runtime/pack/dist/opt/editexisting/plugin/editexisting.vim \
|
||||
runtime/pack/dist/opt/editorconfig/.editorconfig \
|
||||
runtime/pack/dist/opt/editorconfig/CONTRIBUTORS \
|
||||
runtime/pack/dist/opt/editorconfig/LICENSE* \
|
||||
runtime/pack/dist/opt/editorconfig/mkzip.sh \
|
||||
runtime/pack/dist/opt/editorconfig/README.md \
|
||||
runtime/pack/dist/opt/editorconfig/autoload/*.vim \
|
||||
runtime/pack/dist/opt/editorconfig/autoload/editorconfig_core/*.vim \
|
||||
runtime/pack/dist/opt/editorconfig/doc/tags \
|
||||
runtime/pack/dist/opt/editorconfig/doc/editorconfig.txt \
|
||||
runtime/pack/dist/opt/editorconfig/ftdetect/editorconfig.vim \
|
||||
runtime/pack/dist/opt/editorconfig/plugin/editorconfig.vim \
|
||||
runtime/pack/dist/opt/justify/plugin/justify.vim \
|
||||
runtime/pack/dist/opt/matchit/plugin/matchit.vim \
|
||||
runtime/pack/dist/opt/matchit/doc/matchit.txt \
|
||||
runtime/pack/dist/opt/matchit/doc/tags \
|
||||
runtime/pack/dist/opt/matchit/autoload/*.vim \
|
||||
runtime/pack/dist/opt/nohlsearch/plugin/nohlsearch.vim \
|
||||
runtime/pack/dist/opt/shellmenu/plugin/shellmenu.vim \
|
||||
runtime/pack/dist/opt/swapmouse/plugin/swapmouse.vim \
|
||||
runtime/pack/dist/opt/termdebug/plugin/termdebug.vim \
|
||||
|
||||
# Runtime files for all distributions without CR/LF translation.
|
||||
# runtime files for all distributions without CR-NL translation
|
||||
RT_ALL_BIN = \
|
||||
runtime/doc/tags \
|
||||
runtime/print/*.ps \
|
||||
|
||||
# Runtime script files.
|
||||
# runtime script files
|
||||
RT_SCRIPTS = \
|
||||
runtime/filetype.vim \
|
||||
runtime/scripts.vim \
|
||||
@@ -809,10 +781,9 @@ RT_SCRIPTS = \
|
||||
runtime/makemenu.vim \
|
||||
runtime/autoload/*.vim \
|
||||
runtime/autoload/README.txt \
|
||||
runtime/autoload/cargo/*.vim \
|
||||
runtime/autoload/dist/*.vim \
|
||||
runtime/autoload/rust/*.vim \
|
||||
runtime/autoload/xml/*.vim \
|
||||
runtime/autoload/zig/*.vim \
|
||||
runtime/colors/*.vim \
|
||||
runtime/colors/README.txt \
|
||||
runtime/colors/lists/*.vim \
|
||||
@@ -833,26 +804,10 @@ RT_SCRIPTS = \
|
||||
runtime/plugin/README.txt \
|
||||
runtime/syntax/*.vim \
|
||||
runtime/syntax/README.txt \
|
||||
runtime/syntax/modula2/opt/*.vim \
|
||||
runtime/syntax/shared/*.vim \
|
||||
runtime/syntax/shared/README.txt \
|
||||
runtime/syntax/Makefile \
|
||||
runtime/syntax/testdir/README.txt \
|
||||
runtime/syntax/testdir/runtest.vim \
|
||||
runtime/syntax/testdir/viewdumps.vim \
|
||||
runtime/syntax/testdir/ftplugin/*.* \
|
||||
runtime/syntax/testdir/input/*.* \
|
||||
runtime/syntax/testdir/input/selftestdir/* \
|
||||
runtime/syntax/testdir/input/setup/*.* \
|
||||
runtime/syntax/testdir/dumps/*.dump \
|
||||
runtime/syntax/testdir/dumps/*.vim \
|
||||
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-like runtime.
|
||||
# Unix runtime
|
||||
RT_UNIX = \
|
||||
README_unix.txt \
|
||||
runtime/hi16-action-make.png \
|
||||
@@ -860,7 +815,7 @@ RT_UNIX = \
|
||||
runtime/gvim.desktop \
|
||||
runtime/vim.desktop \
|
||||
|
||||
# Unix-like and MS Windows runtime without CR/LF translation.
|
||||
# Unix and DOS runtime without CR-LF translation
|
||||
RT_UNIX_DOS_BIN = \
|
||||
runtime/vim16x16.gif \
|
||||
runtime/vim16x16.png \
|
||||
@@ -872,10 +827,10 @@ RT_UNIX_DOS_BIN = \
|
||||
runtime/vim48x48.png \
|
||||
runtime/vim48x48.xpm \
|
||||
|
||||
# Runtime not for Unix-like or extra.
|
||||
# runtime not for unix 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 \
|
||||
@@ -883,22 +838,17 @@ RT_AMI_DOS = \
|
||||
runtime/doc/vimtutor.man \
|
||||
runtime/doc/xxd.man \
|
||||
|
||||
# MS Windows runtime (also in the extra archive).
|
||||
# DOS 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 \
|
||||
|
||||
# MS Windows runtime without CR/LF translation (also in the extra archive).
|
||||
# DOS runtime without CR-LF translation (also in the extra archive)
|
||||
RT_DOS_BIN = \
|
||||
runtime/vimlogo.cdr \
|
||||
runtime/vimlogo.eps \
|
||||
runtime/vimlogo.gif \
|
||||
runtime/vimlogo.pdf \
|
||||
runtime/vimlogo.svg \
|
||||
|
||||
# Amiga runtime (also in the extra archive)
|
||||
RT_AMI = \
|
||||
@@ -920,7 +870,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) \
|
||||
@@ -928,46 +878,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 MS Windows binary (also in extra archive).
|
||||
# files for DOS 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) \
|
||||
@@ -976,7 +926,7 @@ BIN_EXTRA = \
|
||||
$(BIN_VMS) \
|
||||
$(BIN_OS2) \
|
||||
|
||||
# All files for extra archive.
|
||||
# all files for extra archive
|
||||
EXTRA = \
|
||||
$(BIN_EXTRA) \
|
||||
$(ROOT_EXTRA) \
|
||||
@@ -985,7 +935,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 \
|
||||
@@ -997,7 +947,6 @@ IN_README_DIR = \
|
||||
README_bindos.txt \
|
||||
README_dos.txt \
|
||||
README_extra.txt \
|
||||
README_haiku.txt \
|
||||
README_mac.txt \
|
||||
README_ole.txt \
|
||||
README_os2.txt \
|
||||
@@ -1005,7 +954,6 @@ IN_README_DIR = \
|
||||
README_src.txt \
|
||||
README_srcdos.txt \
|
||||
README_unix.txt \
|
||||
README_vimlogo.txt \
|
||||
README_vms.txt \
|
||||
README_w32s.txt \
|
||||
Contents \
|
||||
@@ -1016,9 +964,8 @@ 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 \
|
||||
@@ -1034,16 +981,13 @@ 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 \
|
||||
runtime/lang/menu_*.vim \
|
||||
runtime/keymap/README.txt \
|
||||
runtime/keymap/*.vim \
|
||||
runtime/tutor/README.*.txt \
|
||||
runtime/tutor/Makefile \
|
||||
runtime/tutor/Make_all.mak \
|
||||
runtime/tutor/tutor.utf-8 \
|
||||
runtime/tutor/tutor.?? \
|
||||
runtime/tutor/tutor.??.utf-8 \
|
||||
@@ -1071,7 +1015,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 \
|
||||
@@ -1081,7 +1025,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 \
|
||||
@@ -1098,24 +1042,10 @@ LANG_SRC = \
|
||||
src/po/vim.desktop.in \
|
||||
src/po/gvim.desktop.in \
|
||||
src/po/sjiscorr.c \
|
||||
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 \
|
||||
|
||||
# Files in the repository that are deliberately not listed above, and will thus
|
||||
# be excluded from distribution tarballs and the like.
|
||||
# This excludes them from the CI check for unlisted files.
|
||||
IGNORE = \
|
||||
.appveyor.yml \
|
||||
.github/FUNDING.yml \
|
||||
.github/labeler.yml \
|
||||
.github/workflows/label.yml \
|
||||
SECURITY.md \
|
||||
ci/unlisted.make \
|
||||
src/libvterm/CODE-MAP \
|
||||
runtime/syntax/testdir/input/html_html \
|
||||
|
||||
# vim: set ft=make:
|
||||
|
||||
@@ -21,8 +21,8 @@ II) It is allowed to distribute a modified (or extended) version of Vim,
|
||||
maintainer will do with your changes and under what license they
|
||||
will be distributed is negotiable. If there has been no negotiation
|
||||
then this license, or a later version, also applies to your changes.
|
||||
The current maintainers are listed here: https://github.com/orgs/vim/people.
|
||||
If this changes it will be announced in appropriate places (most likely
|
||||
The current maintainer is Bram Moolenaar <Bram@vim.org>. If this
|
||||
changes it will be announced in appropriate places (most likely
|
||||
vim.sf.net, www.vim.org and/or comp.editors). When it is completely
|
||||
impossible to contact the maintainer, the obligation to send him
|
||||
your changes ceases. Once the maintainer has confirmed that he has
|
||||
|
||||
@@ -39,15 +39,14 @@ all install uninstall tools config configure reconfig proto depend lint tags typ
|
||||
@echo "Starting make in the src directory."
|
||||
@echo "If there are problems, cd to the src directory and run make there"
|
||||
cd src && $(MAKE) $@
|
||||
@# When the target is "test" also run the indent and syntax tests.
|
||||
@if test "$@" = "test" -o "$@" = "testtiny"; then \
|
||||
@# When the target is "test" also run the indent tests.
|
||||
@if test "$@" = "test"; then \
|
||||
$(MAKE) indenttest; \
|
||||
$(MAKE) syntaxtest; \
|
||||
fi
|
||||
@# When the target is "clean" also clean for the indent and syntax tests.
|
||||
@# When the target is "clean" also clean for the indent tests.
|
||||
@if test "$@" = "clean" -o "$@" = "distclean" -o "$@" = "testclean"; then \
|
||||
(cd runtime/indent && $(MAKE) clean); \
|
||||
(cd runtime/syntax && $(MAKE) clean); \
|
||||
cd runtime/indent && \
|
||||
$(MAKE) clean; \
|
||||
fi
|
||||
|
||||
# Executable used for running the indent tests.
|
||||
@@ -56,15 +55,7 @@ VIM_FOR_INDENTTEST = ../../src/vim
|
||||
indenttest:
|
||||
cd runtime/indent && \
|
||||
$(MAKE) clean && \
|
||||
$(MAKE) test VIMPROG="$(VIM_FOR_INDENTTEST)"
|
||||
|
||||
# Executable used for running the syntax tests.
|
||||
VIM_FOR_SYNTAXTEST = ../../src/vim
|
||||
|
||||
syntaxtest:
|
||||
cd runtime/syntax && \
|
||||
$(MAKE) clean && \
|
||||
$(MAKE) test VIMPROG="$(VIM_FOR_SYNTAXTEST)"
|
||||
$(MAKE) test VIM="$(VIM_FOR_INDENTTEST)"
|
||||
|
||||
|
||||
#########################################################################
|
||||
@@ -94,7 +85,7 @@ syntaxtest:
|
||||
# Before creating an archive first delete all backup files, *.orig, etc.
|
||||
|
||||
MAJOR = 9
|
||||
MINOR = 1
|
||||
MINOR = 0
|
||||
|
||||
# CHECKLIST for creating a new version:
|
||||
#
|
||||
@@ -249,6 +240,9 @@ VERSION = $(MAJOR)$(MINOR)
|
||||
VDOT = $(MAJOR).$(MINOR)
|
||||
VIMRTDIR = vim$(VERSION)
|
||||
|
||||
# Vim used for conversion from "unix" to "dos"
|
||||
VIM = vim
|
||||
|
||||
# How to include Filelist depends on the version of "make" you have.
|
||||
# If the current choice doesn't work, try the other one.
|
||||
|
||||
@@ -264,7 +258,7 @@ dist:
|
||||
# Copy README files to the top directory.
|
||||
prepare:
|
||||
if test -f runtime/doc/uganda.nsis.txt; then \
|
||||
rm runtime/doc/uganda.nsis.???; fi
|
||||
rm runtime/doc/uganda.nsis.txt; fi
|
||||
for name in $(IN_README_DIR); do \
|
||||
cp READMEdir/"$$name" .; \
|
||||
done
|
||||
@@ -404,8 +398,12 @@ 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 dist/$(COMMENT_SRC) runtime/doc/uganda.nsis.txt \
|
||||
dossrc: dist no_title.vim dist/$(COMMENT_SRC) \
|
||||
runtime/doc/uganda.nsis.txt \
|
||||
nsis/gvim_version.nsh
|
||||
-rm -rf dist/vim$(VERSION)src.zip
|
||||
-rm -rf dist/vim
|
||||
@@ -417,14 +415,16 @@ dossrc: dist dist/$(COMMENT_SRC) runtime/doc/uganda.nsis.txt \
|
||||
$(SRC_DOS_BIN) \
|
||||
$(SRC_AMI_DOS) \
|
||||
$(SRC_DOS_UNIX) \
|
||||
runtime/doc/uganda.nsis.??? \
|
||||
runtime/doc/uganda.nsis.txt \
|
||||
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.???
|
||||
runtime/doc/uganda.nsis.txt: runtime/doc/uganda.txt
|
||||
cd runtime/doc && $(MAKE) uganda.nsis.txt
|
||||
|
||||
nsis/gvim_version.nsh: Makefile
|
||||
@@ -441,7 +441,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
|
||||
dosrt_files: dist prepare no_title.vim
|
||||
-rm -rf dist/vim
|
||||
mkdir dist/vim
|
||||
mkdir dist/vim/$(VIMRTDIR)
|
||||
@@ -497,7 +497,7 @@ dosbin: prepare dosbin_gvim dosbin_w32 dosbin_ole $(DOSBIN_S)
|
||||
-rm $(IN_README_DIR)
|
||||
|
||||
# make Win32 gvim
|
||||
dosbin_gvim: dist dist/$(COMMENT_GVIM)
|
||||
dosbin_gvim: dist no_title.vim dist/$(COMMENT_GVIM)
|
||||
-rm -rf dist/gvim$(VERSION).zip
|
||||
-rm -rf dist/vim
|
||||
mkdir dist/vim
|
||||
@@ -519,7 +519,7 @@ dosbin_gvim: dist dist/$(COMMENT_GVIM)
|
||||
cp gvim.pdb dist/gvim$(VERSION).pdb
|
||||
|
||||
# make Win32 console
|
||||
dosbin_w32: dist dist/$(COMMENT_W32)
|
||||
dosbin_w32: dist no_title.vim dist/$(COMMENT_W32)
|
||||
-rm -rf dist/vim$(VERSION)w32.zip
|
||||
-rm -rf dist/vim
|
||||
mkdir dist/vim
|
||||
@@ -536,7 +536,7 @@ dosbin_w32: dist dist/$(COMMENT_W32)
|
||||
cp vimw32.pdb dist/vim$(VERSION)w32.pdb
|
||||
|
||||
# make Win32 gvim with OLE
|
||||
dosbin_ole: dist dist/$(COMMENT_OLE)
|
||||
dosbin_ole: dist no_title.vim dist/$(COMMENT_OLE)
|
||||
-rm -rf dist/gvim$(VERSION)ole.zip
|
||||
-rm -rf dist/vim
|
||||
mkdir dist/vim
|
||||
|
||||
@@ -7,7 +7,7 @@ Vim - the text editor - for macOS
|
||||
|
||||
- Vim README: [README_vim.md](README_vim.md)
|
||||
|
||||
- [](https://github.com/macvim-dev/macvim/actions/workflows/ci-macvim.yaml)
|
||||
- [](https://github.com/macvim-dev/macvim/actions?query=workflow%3A%22MacVim+GitHub+CI%22)
|
||||
|
||||
- Packaged in [](https://repology.org/metapackage/macvim/versions) [](https://repology.org/metapackage/macvim/versions)
|
||||
|
||||
|
||||
-161
@@ -1,161 +0,0 @@
|
||||
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/tags.
|
||||
* Получить исполняемый файл для ОС 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-dev@vim.org>
|
||||
|
||||
|
||||
ОСНОВНОЙ АВТОР ПРОГРАММЫ
|
||||
|
||||
Большая часть редактора Vim была создана Брамом Моленаром <Bram@vim.org>,
|
||||
см. ":help Bram-Moolenaar"
|
||||
|
||||
Присылайте все прочие комментарии, исправления, цветы и предложения в список
|
||||
рассылки vim-dev:
|
||||
<vim-dev@vim.org>
|
||||
+22
-24
@@ -1,4 +1,4 @@
|
||||
README.txt for version 9.1 of Vim: Vi IMproved.
|
||||
README.txt for version 9.0 of Vim: Vi IMproved.
|
||||
|
||||
|
||||
WHAT IS VIM?
|
||||
@@ -6,9 +6,10 @@ 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
|
||||
@@ -37,7 +38,7 @@ an overview of currently available distributions.
|
||||
|
||||
Some popular places to get the latest Vim:
|
||||
* Check out the git repository from github: https://github.com/vim/vim.
|
||||
* Get the source code as an archive: https://github.com/vim/vim/tags.
|
||||
* Get the source code as an archive: https://github.com/vim/vim/releases.
|
||||
* Get a Windows executable from the vim-win32-installer repository:
|
||||
https://github.com/vim/vim-win32-installer/releases.
|
||||
|
||||
@@ -59,10 +60,9 @@ 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 other README_*.txt files, depending on the distribution you used.
|
||||
There are more 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,14 +92,15 @@ 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 developers to continue working on
|
||||
Vim please send a donation.
|
||||
your appreciation for the work and motivate Bram and others to continue
|
||||
working on Vim please send a donation.
|
||||
|
||||
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!
|
||||
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!
|
||||
|
||||
For the most recent information about sponsoring look on the Vim web site:
|
||||
|
||||
https://www.vim.org/sponsor/
|
||||
|
||||
|
||||
@@ -110,8 +111,6 @@ 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/
|
||||
|
||||
@@ -119,17 +118,16 @@ 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:
|
||||
<vim-dev@vim.org>
|
||||
If nothing else works, report bugs directly:
|
||||
Bram Moolenaar <Bram@vim.org>
|
||||
|
||||
|
||||
MAIN AUTHOR
|
||||
|
||||
Most of Vim was created by Bram Moolenaar <Bram@vim.org>, ":help Bram-Moolenaar"
|
||||
Send any other comments, patches, flowers and suggestions to:
|
||||
|
||||
Send any other comments, patches, flowers and suggestions to the vim-dev
|
||||
mailing list: <vim-dev@vim.org>
|
||||
Bram Moolenaar E-mail: Bram@vim.org
|
||||
|
||||
+48
-47
@@ -1,24 +1,20 @@
|
||||
# [](https://www.vim.org)
|
||||
[](https://www.vim.org)
|
||||
|
||||
[](https://github.com/vim/vim/actions?query=workflow%3A%22GitHub+CI%22)
|
||||
[](https://ci.appveyor.com/project/chrisbra/vim)
|
||||
[](https://cirrus-ci.com/github/vim/vim)
|
||||
[](https://codecov.io/gh/vim/vim?branch=master)
|
||||
[](https://scan.coverity.com/projects/vim)
|
||||
[](https://buildd.debian.org/vim)
|
||||
[](https://repology.org/metapackage/vim)
|
||||
[](https://fossies.org/linux/test/vim-master.tar.gz/codespell.html)
|
||||
[](https://github.com/vim/vim/actions?query=workflow%3A%22GitHub+CI%22) [](https://ci.appveyor.com/project/chrisbra/vim) [](https://cirrus-ci.com/github/vim/vim) [](https://codecov.io/gh/vim/vim?branch=master) [](https://scan.coverity.com/projects/vim) [](https://buildd.debian.org/vim) [](https://repology.org/metapackage/vim) [](https://fossies.org/linux/test/vim-master.tar.gz/codespell.html)
|
||||
|
||||
<sub>For translations of this README see the end.</sub>
|
||||
|
||||
If you find a bug or want to discuss the best way to add a new feature, please
|
||||
[open an issue](https://github.com/vim/vim/issues/new/choose).
|
||||
open an [issue](https://github.com/vim/vim/issues).
|
||||
If you have a question or want to discuss the best way to do something with
|
||||
Vim, you can use [StackExchange](https://vi.stackexchange.com/)
|
||||
or one of the [Maillists](https://www.vim.org/community.php).
|
||||
|
||||
## What is Vim?
|
||||
|
||||
## What is Vim? ##
|
||||
|
||||
Vim is a greatly improved version of the good old UNIX editor
|
||||
[Vi](https://en.wikipedia.org/wiki/Vi_(text_editor)). Many new
|
||||
[Vi](https://en.wikipedia.org/wiki/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)
|
||||
@@ -39,7 +35,7 @@ Amiga DOS, Atari MiNT, BeOS, RISC OS and OS/2. These are no longer maintained.
|
||||
|
||||
For Vim9 script see [README_VIM9](README_VIM9.md).
|
||||
|
||||
## Distribution
|
||||
## Distribution ##
|
||||
|
||||
You can often use your favorite package manager to install Vim. On Mac and
|
||||
Linux a small version of Vim is pre-installed, you still need to install Vim
|
||||
@@ -55,49 +51,52 @@ an overview of currently available distributions.
|
||||
|
||||
Some popular places to get the latest Vim:
|
||||
* Check out the git repository from [GitHub](https://github.com/vim/vim).
|
||||
* Get the source code as an [archive](https://github.com/vim/vim/tags).
|
||||
* Get the source code as an [archive](https://github.com/vim/vim/releases).
|
||||
* Get a Windows executable from the
|
||||
[vim-win32-installer](https://github.com/vim/vim-win32-installer/releases) repository.
|
||||
|
||||
## Compiling
|
||||
|
||||
|
||||
## Compiling ##
|
||||
|
||||
If you obtained a binary distribution you don't need to compile Vim. If you
|
||||
obtained a source distribution, all the stuff for compiling Vim is in the
|
||||
[`src`](./src/) directory. See [`src/INSTALL`](./src/INSTALL) for instructions.
|
||||
[`src`](/src) directory. See [`src/INSTALL`](src/INSTALL) for instructions.
|
||||
|
||||
## Installation
|
||||
|
||||
## Installation ##
|
||||
|
||||
See one of these files for system-specific instructions. Either in the
|
||||
[READMEdir directory](./READMEdir/) (in the repository) or
|
||||
the top directory (if you unpack an archive):
|
||||
|
||||
```
|
||||
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
|
||||
```
|
||||
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 other `README_*.txt` files, depending on the distribution you used.
|
||||
|
||||
## Documentation
|
||||
|
||||
## Documentation ##
|
||||
|
||||
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`](./runtime/doc/help.txt).
|
||||
[`runtime/doc/help.txt`](/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
|
||||
|
||||
## Copying ##
|
||||
|
||||
Vim is Charityware. You can use and copy it as much as you like, but you are
|
||||
encouraged to make a donation to help orphans in Uganda. Please read the file
|
||||
[`runtime/doc/uganda.txt`](./runtime/doc/uganda.txt)
|
||||
[`runtime/doc/uganda.txt`](runtime/doc/uganda.txt)
|
||||
for details (do `:help uganda` inside Vim).
|
||||
|
||||
Summary of the license: There are no restrictions on using or distributing an
|
||||
@@ -106,27 +105,30 @@ text must always be included. For modified versions, a few restrictions apply.
|
||||
The license is GPL compatible, you may compile Vim with GPL libraries and
|
||||
distribute it.
|
||||
|
||||
## Sponsoring
|
||||
|
||||
## Sponsoring ##
|
||||
|
||||
Fixing bugs and adding new features takes a lot of time and effort. To show
|
||||
your appreciation for the work and motivate developers to continue working on
|
||||
Vim please send a donation.
|
||||
your appreciation for the work and motivate Bram and others to continue
|
||||
working on Vim please send a donation.
|
||||
|
||||
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!
|
||||
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!
|
||||
|
||||
For the most recent information about sponsoring look on the Vim web site:
|
||||
https://www.vim.org/sponsor/
|
||||
|
||||
## Contributing
|
||||
|
||||
## Contributing ##
|
||||
|
||||
If you would like to help make Vim better, see the
|
||||
[CONTRIBUTING.md](./CONTRIBUTING.md) file.
|
||||
[CONTRIBUTING.md](/CONTRIBUTING.md) file.
|
||||
|
||||
## Information
|
||||
|
||||
If you are on macOS, you can use [MacVim](https://macvim.org).
|
||||
## Information ##
|
||||
|
||||
If you are on macOS, you can use [Macvim](https://macvim-dev.github.io/macvim/).
|
||||
|
||||
The latest news about Vim can be found on the Vim home page:
|
||||
https://www.vim.org/
|
||||
@@ -139,15 +141,14 @@ 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:
|
||||
`<vim-dev@vim.org>`
|
||||
If nothing else works, report bugs directly:
|
||||
Bram Moolenaar <Bram@vim.org>
|
||||
|
||||
## Main author
|
||||
|
||||
Most of Vim was created by Bram Moolenaar `<Bram@vim.org>`
|
||||
[Bram-Moolenaar](https://vimhelp.org/version9.txt.html#Bram-Moolenaar)
|
||||
## Main author ##
|
||||
|
||||
Send any other comments, patches, flowers and suggestions to the vim-dev mailing list:
|
||||
`<vim-dev@vim.org>`
|
||||
Send any other comments, patches, flowers and suggestions to:
|
||||
Bram Moolenaar <Bram@vim.org>
|
||||
|
||||
This is `README.md` for version 9.1 of Vim: Vi IMproved.
|
||||
|
||||
This is `README.md` for version 9.0 of Vim: Vi IMproved.
|
||||
|
||||
+5
-5
@@ -9,15 +9,15 @@ Vim Vi IMproved. A clone of the UNIX text editor Vi. Very useful
|
||||
messages, shows current file name in window title, on-line
|
||||
help, rectangular cut/paste, etc., etc., etc...
|
||||
|
||||
Version 9.1. Also runs under UNIX, MS-Windows, Mac, etc.
|
||||
vim91rt.tgz contains the documentation and syntax files.
|
||||
vim91bin.tgz contains the binaries.
|
||||
vim91src.tgz contains the sources.
|
||||
Version 9.0. Also runs under UNIX, MS-Windows, Mac, etc.
|
||||
vim90rt.tgz contains the documentation and syntax files.
|
||||
vim90bin.tgz contains the binaries.
|
||||
vim90src.tgz contains the sources.
|
||||
Author: Bram Moolenaar et al.
|
||||
|
||||
|
||||
Xxd Hex dumper and reader. Can be used to view files as hex, edit
|
||||
them and write them back. Can also be used to patch files.
|
||||
|
||||
Version 2023 Oct 25
|
||||
Version 2022 Jan 14
|
||||
Author: Juergen Weigert
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
README_ami.txt for version 9.1 of Vim: Vi IMproved.
|
||||
README_ami.txt for version 9.0 of Vim: Vi IMproved.
|
||||
|
||||
This file explains the installation of Vim on Amiga systems.
|
||||
See README.txt for general information about Vim.
|
||||
@@ -16,8 +16,8 @@ easily upgrade to a new version. For example:
|
||||
You would then unpack the archives like this:
|
||||
|
||||
cd dh0:editors
|
||||
tar xf t:vim91bin.tar
|
||||
tar xf t:vim91rt.tar
|
||||
tar xf t:vim90bin.tar
|
||||
tar xf t:vim90rt.tar
|
||||
|
||||
Set the $VIM environment variable to point to the top directory of your Vim
|
||||
files. For the above example:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
README_amibin.txt for version 9.1 of Vim: Vi IMproved.
|
||||
README_amibin.txt for version 9.0 of Vim: Vi IMproved.
|
||||
|
||||
See "README.txt" for general information about Vim.
|
||||
See "README_ami.txt" for installation instructions for the Amiga.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
README_amisrc.txt for version 9.1 of Vim: Vi IMproved.
|
||||
README_amisrc.txt for version 9.0 of Vim: Vi IMproved.
|
||||
|
||||
See "README.txt" for general information about Vim.
|
||||
See "README_ami.txt" for installation instructions for the Amiga.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
README_bindos.txt for version 9.1 of Vim: Vi IMproved.
|
||||
README_bindos.txt for version 9.0 of Vim: Vi IMproved.
|
||||
|
||||
See "README.txt" for general information about Vim.
|
||||
See "README_dos.txt" for installation instructions for MS-DOS and MS-Windows.
|
||||
@@ -8,9 +8,9 @@ These files are in the runtime archive (vim90rt.zip).
|
||||
There are several binary distributions of Vim for the PC. You would normally
|
||||
pick only one of them, but it's also possible to install several.
|
||||
These ones are available (the version number may differ):
|
||||
vim91w32.zip Windows 95/98/NT/etc. console version
|
||||
gvim91.zip Windows 95/98/NT/etc. GUI version
|
||||
gvim91ole.zip Windows 95/98/NT/etc. GUI version with OLE
|
||||
vim90w32.zip Windows 95/98/NT/etc. console version
|
||||
gvim90.zip Windows 95/98/NT/etc. GUI version
|
||||
gvim90ole.zip Windows 95/98/NT/etc. GUI version with OLE
|
||||
|
||||
You MUST also get the runtime archive (vim91rt.zip).
|
||||
The sources are also available (vim91src.zip).
|
||||
You MUST also get the runtime archive (vim90rt.zip).
|
||||
The sources are also available (vim90src.zip).
|
||||
|
||||
+18
-18
@@ -1,4 +1,4 @@
|
||||
README_dos.txt for version 9.1 of Vim: Vi IMproved.
|
||||
README_dos.txt for version 9.0 of Vim: Vi IMproved.
|
||||
|
||||
This file explains the installation of Vim on MS-Windows systems.
|
||||
See "README.txt" for general information about Vim.
|
||||
@@ -41,19 +41,19 @@ These are the normal steps to install Vim from the .zip archives:
|
||||
located. Check the $VIM setting to see where it points to:
|
||||
set VIM
|
||||
For example, if you have
|
||||
C:\vim\vim91
|
||||
C:\vim\vim90
|
||||
do
|
||||
cd C:\
|
||||
Binary and runtime Vim archives are normally unpacked in the same location,
|
||||
on top of each other.
|
||||
|
||||
2. Unpack the zip archives. This will create a new directory "vim\vim91",
|
||||
2. Unpack the zip archives. This will create a new directory "vim\vim90",
|
||||
in which all the distributed Vim files are placed. Since the directory
|
||||
name includes the version number, it is unlikely that you overwrite
|
||||
existing files.
|
||||
Examples:
|
||||
pkunzip -d gvim91.zip
|
||||
unzip vim91w32.zip
|
||||
pkunzip -d gvim90.zip
|
||||
unzip vim90w32.zip
|
||||
|
||||
You need to unpack the runtime archive and at least one of the binary
|
||||
archives. When using more than one binary version, be careful not to
|
||||
@@ -65,7 +65,7 @@ These are the normal steps to install Vim from the .zip archives:
|
||||
won't move or copy the runtime files.
|
||||
|
||||
3. Change to the new directory:
|
||||
cd vim\vim91
|
||||
cd vim\vim90
|
||||
Run the "install.exe" program. It will ask you a number of questions about
|
||||
how you would like to have your Vim setup. Among these are:
|
||||
- You can tell it to write a "_vimrc" file with your preferences in the
|
||||
@@ -76,8 +76,8 @@ These are the normal steps to install Vim from the .zip archives:
|
||||
console or in a shell. You can select one of the directories in your
|
||||
$PATH. If you skip this, you can add Vim to the search path manually:
|
||||
The simplest is to add a line to your autoexec.bat. Examples:
|
||||
set path=%path%;C:\vim\vim91
|
||||
set path=%path%;D:\editors\vim\vim91
|
||||
set path=%path%;C:\vim\vim90
|
||||
set path=%path%;D:\editors\vim\vim90
|
||||
- Create entries for Vim on the desktop and in the Start menu.
|
||||
|
||||
That's it!
|
||||
@@ -89,8 +89,8 @@ Remarks:
|
||||
won't show a menubar. Then you need to set the $VIM environment variable to
|
||||
point to the top directory of your Vim files. Example:
|
||||
set VIM=C:\editors\vim
|
||||
Vim version 9.1 will look for your vimrc file in $VIM, and for the runtime
|
||||
files in $VIM/vim91. See ":help $VIM" for more information.
|
||||
Vim version 9.0 will look for your vimrc file in $VIM, and for the runtime
|
||||
files in $VIM/vim90. See ":help $VIM" for more information.
|
||||
|
||||
- To avoid confusion between distributed files of different versions and your
|
||||
own modified vim scripts, it is recommended to use this directory layout:
|
||||
@@ -101,14 +101,14 @@ Remarks:
|
||||
C:\vim\vimfiles\ftplugin\*.vim Filetype plugins
|
||||
C:\vim\... Other files you made.
|
||||
Distributed files:
|
||||
C:\vim\vim91\vim.exe The Vim version 9.1 executable.
|
||||
C:\vim\vim91\doc\*.txt The version 9.1 documentation files.
|
||||
C:\vim\vim91\bugreport.vim A Vim version 9.1 script.
|
||||
C:\vim\vim91\... Other version 9.1 distributed files.
|
||||
C:\vim\vim90\vim.exe The Vim version 9.0 executable.
|
||||
C:\vim\vim90\doc\*.txt The version 9.0 documentation files.
|
||||
C:\vim\vim90\bugreport.vim A Vim version 9.0 script.
|
||||
C:\vim\vim90\... Other version 9.0 distributed files.
|
||||
In this case the $VIM environment variable would be set like this:
|
||||
set VIM=C:\vim
|
||||
Then $VIMRUNTIME will automatically be set to "$VIM\vim91". Don't add
|
||||
"vim91" to $VIM, that won't work.
|
||||
Then $VIMRUNTIME will automatically be set to "$VIM\vim90". Don't add
|
||||
"vim90" to $VIM, that won't work.
|
||||
|
||||
- You can put your Vim executable anywhere else. If the executable is not
|
||||
with the other Vim files, you should set $VIM. The simplest is to add a line
|
||||
@@ -132,8 +132,8 @@ Remarks:
|
||||
Select Properties.
|
||||
5. In the Program tab, change the "Cmdline" to add "/c" and the name of the
|
||||
Vim executable. Examples:
|
||||
C:\command.com /c C:\vim\vim91\vim.exe
|
||||
C:\command.com /c D:\editors\vim\vim91\vim.exe
|
||||
C:\command.com /c C:\vim\vim90\vim.exe
|
||||
C:\command.com /c D:\editors\vim\vim90\vim.exe
|
||||
6. Select the font, window size, etc. that you like. If this isn't
|
||||
possible, select "Advanced" in the Program tab, and deselect "MS-DOS
|
||||
mode".
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
README_extra.txt for version 9.1 of Vim: Vi IMproved.
|
||||
README_extra.txt for version 9.0 of Vim: Vi IMproved.
|
||||
|
||||
These extra files of Vim are for special purposes. This README explains what
|
||||
the files are for. For general information about Vim, see the "README.txt"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
README_haiku.txt for version 9.1 of Vim: Vi IMproved.
|
||||
README_haiku.txt for version 9.0 of Vim: Vi IMproved.
|
||||
|
||||
This file explains the installation of Vim on Haiku operating system.
|
||||
See "README.txt" for general information about Vim.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
README_mac.txt for version 9.1 of Vim: Vi IMproved.
|
||||
README_mac.txt for version 9.0 of Vim: Vi IMproved.
|
||||
|
||||
How to install MacVim?
|
||||
========================
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
README_ole.txt for version 9.1 of Vim: Vi IMproved.
|
||||
README_ole.txt for version 9.0 of Vim: Vi IMproved.
|
||||
|
||||
This archive contains gvim.exe with OLE interface.
|
||||
This version of gvim.exe can also load a number of interface dynamically (you
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
README_os2.txt for version 9.1 of Vim: Vi IMproved.
|
||||
README_os2.txt for version 9.0 of Vim: Vi IMproved.
|
||||
|
||||
This file used to explain the installation of Vim on OS/2 systems.
|
||||
However, support for OS/2 has been removed in patch 7.4.1008.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
README_os390.txt for version 9.1 of Vim: Vi IMproved.
|
||||
README_os390.txt for version 9.0 of Vim: Vi IMproved.
|
||||
|
||||
This readme explains how to build Vim on z/OS. Formerly called OS/390.
|
||||
See "README.txt" for general information about Vim.
|
||||
@@ -46,7 +46,7 @@ Change to the vim directory and do:
|
||||
|
||||
$ export CC=cc
|
||||
$ export _CC_CCMODE=1
|
||||
$./configure --with-features=normal --without-x --enable-gui=no
|
||||
$./configure --with-features=big --without-x --enable-gui=no
|
||||
$ cd src
|
||||
$ make
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
README_src.txt for version 9.1 of Vim: Vi IMproved.
|
||||
README_src.txt for version 9.0 of Vim: Vi IMproved.
|
||||
|
||||
The source archive contains the files needed to compile Vim on Unix systems.
|
||||
It is packed for Unix systems (NL line separator).
|
||||
|
||||
For more information, see the README.txt file that comes with the runtime
|
||||
archive (vim-9.1-rt.tar.gz). To be able to run Vim you MUST get the runtime
|
||||
archive (vim-9.0-rt.tar.gz). To be able to run Vim you MUST get the runtime
|
||||
archive too!
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
README_srcdos.txt for version 9.1 of Vim: Vi IMproved.
|
||||
README_srcdos.txt for version 9.0 of Vim: Vi IMproved.
|
||||
|
||||
See "README.txt" for general information about Vim.
|
||||
See "README_dos.txt" for installation instructions for MS-Windows.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
README_unix.txt for version 9.1 of Vim: Vi IMproved.
|
||||
README_unix.txt for version 9.0 of Vim: Vi IMproved.
|
||||
|
||||
This file explains the installation of Vim on Unix systems.
|
||||
See "README.txt" for general information about Vim.
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
The Python project that creates `vimlogo.svg` can be found at
|
||||
`https://github.com/ShayHill/vimlogo`. The Vim license applies.
|
||||
|
||||
`vimlogo.svg` is an effort to remove errors and inadvertent inconsistencies
|
||||
from the original vim logo while maintaining the original design. `vimlogo.svg`
|
||||
is based on the `vimlogo.svg` file (previously?) found at
|
||||
`https://www.vim.org/logos.php`
|
||||
|
||||
As of 2024 Jan 30, `vimlogo.svg` is a separate project from `vimlogo.cdr`,
|
||||
`vimlogo.eps`, `vimlogo.gif`, `vimlogo.pdf`, and `vimlogo.xpm`, all of which
|
||||
are slightly different from each other.
|
||||
@@ -1,4 +1,4 @@
|
||||
README_vms.txt for version 9.1 of Vim: Vi IMproved.
|
||||
README_vms.txt for version 9.0 of Vim: Vi IMproved.
|
||||
|
||||
This file explains the installation of Vim on VMS systems.
|
||||
See "README.txt" in the runtime archive for information about Vim.
|
||||
@@ -19,16 +19,14 @@ src/INSTALLvms.txt.
|
||||
|
||||
To use the binary version, you need one of these archives:
|
||||
|
||||
vim-XX-exe-x86-gui.zip X86_64 GUI/Motif executables
|
||||
vim-XX-exe-x86-term.zip X86_64 console executables
|
||||
vim-XX-exe-ia64-gui.zip IA64 GUI/Motif executables
|
||||
vim-XX-exe-ia64-gtk.zip IA64 GUI/GTK executables
|
||||
vim-XX-exe-ia64-term.zip IA64 console executables
|
||||
vim-XX-exe-ia64-gui.zip IA64 GUI/Motif executables
|
||||
vim-XX-exe-ia64-gtk.zip IA64 GUI/GTK executables
|
||||
vim-XX-exe-ia64-term.zip IA64 console executables
|
||||
vim-XX-exe-axp-gui.zip Alpha GUI/Motif executables
|
||||
vim-XX-exe-axp-gtk.zip Alpha GUI/GTK executables
|
||||
vim-XX-exe-axp-term.zip Alpha console executables
|
||||
vim-XX-exe-axp-term.zip Alpha console executables
|
||||
vim-XX-exe-vax-gui.zip VAX GUI executables
|
||||
vim-XX-exe-vax-term.zip VAX console executables
|
||||
vim-XX-exe-vax-term.zip VAX console executables
|
||||
|
||||
and of course
|
||||
vim-XX-runtime.zip runtime files
|
||||
@@ -36,8 +34,6 @@ and of course
|
||||
The binary archives contain: vim.exe, ctags.exe, xxd.exe files,
|
||||
but there are also prepared "deploy ready" archives:
|
||||
|
||||
vim-XX-x86.zip GUI and console executables with runtime and
|
||||
help files for X86_64 systems
|
||||
vim-XX-ia64.zip GUI and console executables with runtime and
|
||||
help files for IA64 systems
|
||||
vim-XX-axp.zip GUI and console executables with runtime and
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
README_w32s.txt for version 9.1 of Vim: Vi IMproved.
|
||||
README_w32s.txt for version 9.0 of Vim: Vi IMproved.
|
||||
|
||||
This file used to explain the installation of Vim on MS-Windows 3.1 and 3.11
|
||||
systems. However, support for MS-Windows 3.1 and 3.11 has been removed in
|
||||
|
||||
-10
@@ -1,10 +0,0 @@
|
||||
# Security Policy
|
||||
|
||||
## Reporting a vulnerability
|
||||
|
||||
If you want to report a security issue, please privately disclose the issue to the vim-security mailing list
|
||||
vim-security@googlegroups.com
|
||||
|
||||
This is a private list, read only by the maintainers, but anybody can post, after moderation.
|
||||
|
||||
**Please don't publicly disclose the issue until it has been addressed by us.**
|
||||
+5
-22
@@ -1,20 +1,15 @@
|
||||
@echo off
|
||||
:: Batch file for building/testing Vim on AppVeyor
|
||||
set target=%1
|
||||
set "GETTEXT_PATH=c:\gettext64\bin"
|
||||
|
||||
setlocal ENABLEDELAYEDEXPANSION
|
||||
cd %APPVEYOR_BUILD_FOLDER%
|
||||
|
||||
:: Python3
|
||||
set "PYTHON3_VER=311"
|
||||
set "PYTHON3_RELEASE=3.11.1"
|
||||
set "PYTHON3_URL=https://www.python.org/ftp/python/%PYTHON3_RELEASE%/python-%PYTHON3_RELEASE%-amd64.exe"
|
||||
set "PYTHON3_DIR=C:\python%PYTHON3_VER%-x64"
|
||||
|
||||
:: Gettext-tools, iconv and libraries
|
||||
set "GETTEXT64_URL=https://github.com/mlocati/gettext-iconv-windows/releases/download/v0.21-v1.16/gettext0.21-iconv1.16-shared-64.zip"
|
||||
set "GETTEXT64_DIR=c:\gettext64"
|
||||
set PYTHON3_VER=311
|
||||
set PYTHON3_RELEASE=3.11.1
|
||||
set PYTHON3_URL=https://www.python.org/ftp/python/%PYTHON3_RELEASE%/python-%PYTHON3_RELEASE%-amd64.exe
|
||||
set PYTHON3_DIR=C:\python%PYTHON3_VER%-x64
|
||||
|
||||
set "VSWHERE=%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe"
|
||||
|
||||
@@ -48,18 +43,6 @@ if not exist %PYTHON3_DIR% (
|
||||
AssociateFiles=0 Shortcuts=0 Include_doc=0 Include_launcher=0 ^
|
||||
InstallLauncherAllUsers=0
|
||||
)
|
||||
:: GETTEXT
|
||||
if not exist %GETTEXT64_DIR% (
|
||||
mkdir %GETTEXT64_DIR%
|
||||
call :downloadfile %GETTEXT64_URL% downloads\gettext64.zip
|
||||
cmd /c powershell.exe -NoLogo -NoProfile -Command ^
|
||||
Add-Type -AssemblyName 'System.IO.Compression.FileSystem'; ^
|
||||
[System.IO.Compression.ZipFile]::ExtractToDirectory^('downloads\gettext64.zip', ^
|
||||
'%GETTEXT64_DIR%'^)
|
||||
copy /y %GETTEXT64_DIR%\bin\libintl-8.dll C:\projects\vim\src\ || exit 1
|
||||
copy /y %GETTEXT64_DIR%\bin\libiconv-2.dll C:\projects\vim\src\ || exit 1
|
||||
)
|
||||
|
||||
@echo off
|
||||
goto :eof
|
||||
|
||||
@@ -109,7 +92,7 @@ goto :eof
|
||||
@echo on
|
||||
cd src/testdir
|
||||
:: Testing with MSVC gvim
|
||||
path %PYTHON3_DIR%;%GETTEXT_PATH%;%PATH%
|
||||
path %PYTHON3_DIR%;%PATH%
|
||||
nmake -f Make_mvc.mak VIMPROG=..\gvim
|
||||
nmake -f Make_mvc.mak clean
|
||||
:: Testing with MSVC console version
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
set -eu
|
||||
|
||||
LINUX_VERSION=$(uname -r | cut -d. -f1-2)
|
||||
LINUX_ARCHIVE_FILE=v${LINUX_VERSION}.tar.gz
|
||||
LINUX_SOURCE_DIR=linux-${LINUX_VERSION}
|
||||
|
||||
mkdir -p "${TMPDIR}"
|
||||
cd "${TMPDIR}"
|
||||
|
||||
wget -q "https://github.com/torvalds/linux/archive/${LINUX_ARCHIVE_FILE}"
|
||||
|
||||
tar -xf "${LINUX_ARCHIVE_FILE}" "${LINUX_SOURCE_DIR}/sound"
|
||||
cd "${LINUX_SOURCE_DIR}/sound"
|
||||
|
||||
CC=gcc make -C "/lib/modules/$(uname -r)/build" M="${PWD}" CONFIG_SOUND=m CONFIG_SND=m CONFIG_SND_PCM=m CONFIG_SND_DUMMY=m modules
|
||||
|
||||
mkdir -p "${SND_DUMMY_DIR}"
|
||||
cp soundcore.ko core/snd.ko core/snd-pcm.ko drivers/snd-dummy.ko "${SND_DUMMY_DIR}"
|
||||
@@ -1,3 +1,3 @@
|
||||
# Clang 12 (or Apple clang 13) and later makes a warning '-Wcompound-token-split-by-macro' enable by default.
|
||||
/^PERL_CFLAGS_EXTRA[[:blank:]]*=/s/$/ -Wno-error=compound-token-split-by-macro -Wno-compound-token-split-by-macro/
|
||||
/^PERL_CFLAGS_EXTRA[[:blank:]]*=/s/$/ -Wno-error=compound-token-split-by-macro/
|
||||
/^RUBY_CFLAGS_EXTRA[[:blank:]]*=/s/$/ -Wno-error=compound-token-split-by-macro/
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
# Add link-time optimization for even better performance
|
||||
/^CFLAGS[[:blank:]]*=/s/-O2/-O3 -flto/
|
||||
/^LDFLAGS[[:blank:]]*=/s/$/ -flto/
|
||||
+3
-3
@@ -1,3 +1,3 @@
|
||||
/^CFLAGS[[:blank:]]*=/s/$/ -Wall -Wextra -Wshadow -Wstrict-prototypes -Wmissing-prototypes -Werror -Wno-deprecated-declarations/
|
||||
/^PERL_CFLAGS_EXTRA[[:blank:]]*=/s/$/ -Wno-error=unused-function -Wno-shadow/
|
||||
/^RUBY_CFLAGS_EXTRA[[:blank:]]*=/s/$/ -Wno-error=unused-parameter -Wno-strict-prototypes/
|
||||
/^CFLAGS[[:blank:]]*=/s/$/ -Wall -Wextra -Wshadow -Werror/
|
||||
/^PERL_CFLAGS_EXTRA[[:blank:]]*=/s/$/ -Wno-error=unused-function/
|
||||
/^RUBY_CFLAGS_EXTRA[[:blank:]]*=/s/$/ -Wno-error=unused-parameter/
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
/^XCODEFLAGS[[:blank:]]*=/s/$/ GCC_TREAT_WARNINGS_AS_ERRORS="YES" GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS="NO"/
|
||||
@@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
if ! modprobe snd-dummy; then
|
||||
# snd-dummy is contained in linux-modules-extra (if exists)
|
||||
apt-get install -yq --no-install-suggests --no-install-recommends "linux-modules-extra-$(uname -r)"
|
||||
modprobe snd-dummy
|
||||
fi
|
||||
@@ -1,13 +0,0 @@
|
||||
#!/usr/bin/env sh
|
||||
pushd /etc/apt/preferences.d/
|
||||
cat > nosnap.pref <<EOF
|
||||
# To prevent repository packages from triggering the installation of snap,
|
||||
# this file forbids snapd from being installed by APT.
|
||||
|
||||
Package: snapd
|
||||
Pin: release a=*
|
||||
Pin-Priority: -10
|
||||
EOF
|
||||
popd
|
||||
snap remove --purge $(snap list | awk '!/^Name|^core/ {print $1}')
|
||||
apt-get purge -y snapd
|
||||
@@ -1,49 +0,0 @@
|
||||
# vim: ft=make
|
||||
SHELL = /bin/bash
|
||||
|
||||
# List all files that are tracked in git but not listed in Filelist.
|
||||
# Exit code is 2 ("Make encountered an error") if any such files exist.
|
||||
|
||||
# Filelist is a Makefile that defines many variables, so we use Make itself to
|
||||
# query which variables it defines, then expand them all by wrapping each name
|
||||
# in $(...), importing Filelist and using $(eval).
|
||||
|
||||
include Filelist
|
||||
$(eval all_patterns := $(shell \
|
||||
make -f Filelist --question --print-data-base --no-builtin-rules \
|
||||
--no-builtin-variables 2>/dev/null \
|
||||
| sed -nre \
|
||||
'/^# makefile .from \x27Filelist\x27,/ { \
|
||||
n; \
|
||||
s/ = .*//; \
|
||||
T; \
|
||||
s/.*/$$(\0)/; \
|
||||
p; \
|
||||
}'))
|
||||
|
||||
# In Makefile's `prepeare` target, all the IN_README_DIR files are moved from
|
||||
# READMEdir to the root, so add those files in their Git-tracked location:
|
||||
all_patterns := $(all_patterns) \
|
||||
$(foreach readme, $(IN_README_DIR), READMEdir/$(readme))
|
||||
|
||||
# The result 'all_patterns' is a list of patterns (globs), which we expand with
|
||||
# wildcard to get actual filenames. Note this means Filelist can list a file
|
||||
# that does not exist, and it will be omitted at this step.
|
||||
listed_files := $(wildcard $(all_patterns))
|
||||
|
||||
# Default target to actually run the comparison:
|
||||
.PHONY: check
|
||||
check:
|
||||
@# There are too many files to list on the command line, so we write
|
||||
@# that to a temporary file, one per line.
|
||||
$(file > Filelist-listed-files)
|
||||
$(foreach filename, $(listed_files),\
|
||||
$(file >> Filelist-listed-files,$(filename)))
|
||||
@# Compare the sorted lists. Delete that temporary file on both
|
||||
@# success and failure, but exit with diff's exit code.
|
||||
diff -u0 --label files-in-git <(git ls-files | sort) \
|
||||
--label Filelist <(sort --unique Filelist-listed-files); \
|
||||
RV=$$?; \
|
||||
rm Filelist-listed-files; \
|
||||
(($$RV != 0)) && echo "Add files to the right variable in Filelist."; \
|
||||
exit $$RV
|
||||
+23
-54
@@ -1,7 +1,7 @@
|
||||
This builds a one-click install for Vim for MS Windows using the Nullsoft
|
||||
This builds a one-click install for Vim for Win32 using the Nullsoft
|
||||
Installation System (NSIS), available at http://nsis.sourceforge.net/
|
||||
|
||||
To build the installable .exe file:
|
||||
To build the installable .exe:
|
||||
|
||||
1. Unpack three archives:
|
||||
PC sources
|
||||
@@ -16,9 +16,10 @@ To build the installable .exe file:
|
||||
install.exe,
|
||||
uninstall.exe,
|
||||
tee/tee.exe,
|
||||
xxd/xxd.exe
|
||||
xxd/xxd.exe,
|
||||
|
||||
Then execute tools/rename.bat to rename the executables.
|
||||
Then execute tools/rename.bat to rename the executables. (mv command is
|
||||
required.)
|
||||
|
||||
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
|
||||
@@ -27,37 +28,19 @@ To build the installable .exe file:
|
||||
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).
|
||||
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).
|
||||
You can find one in previous Vim versions or in this archive:
|
||||
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=<dir> option to the
|
||||
"makensis.exe" program via the command line.
|
||||
http://www.mossbayeng.com/~ron/vim/diffutils.tar.gz
|
||||
|
||||
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=<dir> option to the "makensis.exe" program via the command line.
|
||||
5 Also put winpty32.dll and winpty-agent.exe in "../.." (above the "vim90"
|
||||
directory). This is required for the terminal window.
|
||||
|
||||
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").
|
||||
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. 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:
|
||||
7. 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
|
||||
@@ -70,39 +53,25 @@ To build the installable .exe file:
|
||||
| libiconv-2.dll
|
||||
| libgcc_s_sjlj-1.dll
|
||||
|
|
||||
+ gettext64/
|
||||
` gettext64/
|
||||
libintl-8.dll
|
||||
libiconv-2.dll
|
||||
|
||||
The default <GETTEXT directory> is "..", however, you can specify another
|
||||
directory by passing /DGETTEXT=<dir> option to "makensis.exe" program via
|
||||
the command line.
|
||||
The default <GETTEXT directory> is "..", however, you can change it by
|
||||
passing /DGETTEXT=... option to the makensis command.
|
||||
|
||||
|
||||
Install NSIS if you didn't do that already.
|
||||
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
|
||||
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
|
||||
|
||||
|
||||
Unpack the images:
|
||||
cd nsis
|
||||
unzip icons.zip or 7z x icons.zip (on Unix-like or MS Windows)
|
||||
WinRar.exe x icons.zip (on MS Windows)
|
||||
unzip icons.zip
|
||||
|
||||
Then build gvim.exe:
|
||||
cd nsis
|
||||
makensis.exe [options] gvim.nsi
|
||||
|
||||
Options (not mandatory):
|
||||
/DVIMSRC=<dir> — directory where location of gvim_ole.exe, vimw32.exe,
|
||||
GvimExt/*, etc.
|
||||
/DVIMRT=<dir> — directory where location of runtime files
|
||||
/DVIMTOOLS=<dir> — directory where location of extra tools: diff.exe,
|
||||
winpty{32|64}.dll, winpty-agent.exe, libsodium.dll
|
||||
/DGETTEXT=<dir> — 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
|
||||
cd nsis
|
||||
makensis gvim.nsi
|
||||
|
||||
+77
-265
@@ -1,6 +1,6 @@
|
||||
# NSIS file to create a self-installing exe for Vim.
|
||||
# It requires NSIS version 3.0 or later.
|
||||
# Last Change: 2024 Mar 20
|
||||
# Last Change: 2014 Nov 5
|
||||
|
||||
Unicode true
|
||||
|
||||
@@ -17,7 +17,7 @@ Unicode true
|
||||
!define VIMRT ".."
|
||||
!endif
|
||||
|
||||
# Location of extra tools: diff.exe, winpty{32|64}.dll, winpty-agent.exe, etc.
|
||||
# Location of extra tools: diff.exe
|
||||
!ifndef VIMTOOLS
|
||||
!define VIMTOOLS ..\..
|
||||
!endif
|
||||
@@ -29,82 +29,40 @@ Unicode true
|
||||
!define GETTEXT ${VIMRT}
|
||||
!endif
|
||||
|
||||
# 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 don't have UPX.
|
||||
# Get it at https://upx.github.io/
|
||||
!define HAVE_UPX
|
||||
|
||||
# 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 next line if you do not want to add Native Language Support
|
||||
!define HAVE_NLS
|
||||
|
||||
# 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
|
||||
# Comment the following line to create an English-only installer:
|
||||
!define HAVE_MULTI_LANG
|
||||
|
||||
# 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
|
||||
# Uncomment the next line if you want to create a 64-bit installer.
|
||||
#!define WIN64
|
||||
|
||||
!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}"
|
||||
|
||||
!if ${WIN64}
|
||||
!ifdef WIN64
|
||||
Name "${PRODUCT} (x64)"
|
||||
!else
|
||||
Name "${PRODUCT}"
|
||||
@@ -117,11 +75,11 @@ ManifestDPIAware true
|
||||
SetDatablockOptimize on
|
||||
RequestExecutionLevel highest
|
||||
|
||||
!if ${HAVE_UPX}
|
||||
!ifdef HAVE_UPX
|
||||
!packhdr temp.dat "upx --best --compress-icons=1 temp.dat"
|
||||
!endif
|
||||
|
||||
!if ${WIN64}
|
||||
!ifdef WIN64
|
||||
!define BIT 64
|
||||
!else
|
||||
!define BIT 32
|
||||
@@ -138,8 +96,6 @@ 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"
|
||||
@@ -157,13 +113,13 @@ RequestExecutionLevel highest
|
||||
|
||||
!define MUI_COMPONENTSPAGE_SMALLDESC
|
||||
!define MUI_LICENSEPAGE_CHECKBOX
|
||||
!define MUI_FINISHPAGE_SHOWREADME
|
||||
!define MUI_FINISHPAGE_SHOWREADME_TEXT $(str_show_readme)
|
||||
!define MUI_FINISHPAGE_SHOWREADME_FUNCTION LaunchApplication
|
||||
!define MUI_FINISHPAGE_RUN
|
||||
!define MUI_FINISHPAGE_RUN_FUNCTION LaunchApplication
|
||||
!define MUI_FINISHPAGE_RUN_TEXT $(str_show_readme)
|
||||
|
||||
# This adds '\Vim' to the user choice automagically. The actual value is
|
||||
# obtained below with CheckOldVim.
|
||||
!if ${WIN64}
|
||||
!ifdef WIN64
|
||||
!define DEFAULT_INSTDIR "$PROGRAMFILES64\Vim"
|
||||
!else
|
||||
!define DEFAULT_INSTDIR "$PROGRAMFILES\Vim"
|
||||
@@ -183,7 +139,7 @@ SilentInstall normal
|
||||
|
||||
# Installer pages
|
||||
!insertmacro MUI_PAGE_WELCOME
|
||||
!insertmacro MUI_PAGE_LICENSE $(page_lic_file)
|
||||
!insertmacro MUI_PAGE_LICENSE "${VIMRT}\doc\uganda.nsis.txt"
|
||||
!insertmacro MUI_PAGE_COMPONENTS
|
||||
Page custom SetCustom ValidateCustom
|
||||
#!define MUI_PAGE_CUSTOMFUNCTION_LEAVE VimFinalCheck
|
||||
@@ -207,15 +163,13 @@ Page custom SetCustom ValidateCustom
|
||||
!include "lang\english.nsi"
|
||||
|
||||
# Include support for other languages:
|
||||
!if ${HAVE_MULTI_LANG}
|
||||
!ifdef 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"
|
||||
@@ -225,7 +179,7 @@ Page custom SetCustom ValidateCustom
|
||||
# Version resources
|
||||
|
||||
VIAddVersionKey /LANG=${LANG_ENGLISH} "ProductName" "Vim"
|
||||
VIAddVersionKey /LANG=${LANG_ENGLISH} "CompanyName" "The Vim Project"
|
||||
VIAddVersionKey /LANG=${LANG_ENGLISH} "CompanyName" "Vim Developers"
|
||||
VIAddVersionKey /LANG=${LANG_ENGLISH} "LegalTrademarks" "Vim"
|
||||
VIAddVersionKey /LANG=${LANG_ENGLISH} "LegalCopyright" "Copyright (C) 1996"
|
||||
VIAddVersionKey /LANG=${LANG_ENGLISH} "FileDescription" "Vi Improved - A Text Editor"
|
||||
@@ -274,28 +228,6 @@ FunctionEnd
|
||||
!insertmacro GetParent ""
|
||||
!insertmacro GetParent "un."
|
||||
|
||||
# Get home directory
|
||||
!macro GetHomeDir un
|
||||
Function ${un}GetHomeDir
|
||||
Push $0
|
||||
Push $1
|
||||
ReadEnvStr $0 "HOME"
|
||||
${If} $0 == ""
|
||||
ReadEnvStr $0 "HOMEDRIVE"
|
||||
ReadEnvStr $1 "HOMEPATH"
|
||||
StrCpy $0 "$0$1"
|
||||
${If} $0 == ""
|
||||
ReadEnvStr $0 "USERPROFILE"
|
||||
${EndIf}
|
||||
${EndIf}
|
||||
Pop $1
|
||||
Exch $0 # put $0 on top of stack, restore $0 to original value
|
||||
FunctionEnd
|
||||
!macroend
|
||||
|
||||
!insertmacro GetHomeDir ""
|
||||
!insertmacro GetHomeDir "un."
|
||||
|
||||
# Check if Vim is already installed.
|
||||
# return: Installed directory. If not found, it will be empty.
|
||||
Function CheckOldVim
|
||||
@@ -365,7 +297,7 @@ FunctionEnd
|
||||
|
||||
Function LaunchApplication
|
||||
SetOutPath $0
|
||||
ShellExecAsUser::ShellExecAsUser "" "$0\gvim.exe" '-R "$0\$(vim_readme_file)"'
|
||||
ShellExecAsUser::ShellExecAsUser "" "$0\gvim.exe" '-R "$0\README.txt"'
|
||||
FunctionEnd
|
||||
|
||||
##########################################################
|
||||
@@ -409,6 +341,9 @@ 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
|
||||
@@ -420,18 +355,9 @@ 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\*.*
|
||||
@@ -440,22 +366,17 @@ Section "$(str_section_exe)" id_section_exe
|
||||
File ${VIMRT}\compiler\*.*
|
||||
|
||||
SetOutPath $0\doc
|
||||
File /x uganda.nsis.txt ${VIMRT}\doc\*.txt
|
||||
File ${VIMRT}\doc\*.txt
|
||||
File ${VIMRT}\doc\tags
|
||||
|
||||
SetOutPath $0\ftplugin
|
||||
File ${VIMRT}\ftplugin\*.*
|
||||
|
||||
SetOutPath $0\indent
|
||||
File ${VIMRT}\indent\README.txt
|
||||
File ${VIMRT}\indent\*.vim
|
||||
|
||||
SetOutPath $0\keymap
|
||||
File ${VIMRT}\keymap\README.txt
|
||||
File ${VIMRT}\keymap\*.vim
|
||||
File ${VIMRT}\indent\*.*
|
||||
|
||||
SetOutPath $0\macros
|
||||
File /r /x *.info ${VIMRT}\macros\*.*
|
||||
File /r ${VIMRT}\macros\*.*
|
||||
|
||||
SetOutPath $0\pack
|
||||
File /r ${VIMRT}\pack\*.*
|
||||
@@ -473,7 +394,7 @@ Section "$(str_section_exe)" id_section_exe
|
||||
File ${VIMSRC}\vim.ico
|
||||
|
||||
SetOutPath $0\syntax
|
||||
File /r /x testdir /x generator /x Makefile ${VIMRT}\syntax\*.*
|
||||
File /r ${VIMRT}\syntax\*.*
|
||||
|
||||
SetOutPath $0\spell
|
||||
File ${VIMRT}\spell\*.txt
|
||||
@@ -485,7 +406,7 @@ Section "$(str_section_exe)" id_section_exe
|
||||
File ${VIMRT}\tools\*.*
|
||||
|
||||
SetOutPath $0\tutor
|
||||
File /x Makefile /x *.info ${VIMRT}\tutor\*.*
|
||||
File ${VIMRT}\tutor\*.*
|
||||
SectionEnd
|
||||
|
||||
##########################################################
|
||||
@@ -599,8 +520,7 @@ SectionGroup $(str_group_plugin) id_group_plugin
|
||||
Section "$(str_section_plugin_home)" id_section_pluginhome
|
||||
SectionIn 1 3
|
||||
|
||||
# use ShellExecAsUser below instead
|
||||
# StrCpy $1 "$1 -create-directories home"
|
||||
StrCpy $1 "$1 -create-directories home"
|
||||
SectionEnd
|
||||
|
||||
Section "$(str_section_plugin_vim)" id_section_pluginvim
|
||||
@@ -611,116 +531,15 @@ SectionGroup $(str_group_plugin) id_group_plugin
|
||||
SectionGroupEnd
|
||||
|
||||
##########################################################
|
||||
!if ${HAVE_NLS}
|
||||
!ifdef 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 /x Makefile ${VIMRT}\lang\*.*
|
||||
File /r ${VIMRT}\lang\*.*
|
||||
SetOutPath $0\keymap
|
||||
File ${VIMRT}\keymap\README.txt
|
||||
File ${VIMRT}\keymap\*.vim
|
||||
SetOutPath $0
|
||||
!insertmacro InstallLib DLL NOTSHARED REBOOT_NOTPROTECTED \
|
||||
"${GETTEXT}\gettext${BIT}\libintl-8.dll" \
|
||||
@@ -728,12 +547,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"
|
||||
# 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 /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
|
||||
|
||||
${If} ${SectionIsSelected} ${id_section_editwith}
|
||||
${If} ${RunningX64}
|
||||
@@ -759,12 +578,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"
|
||||
# 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
|
||||
!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
|
||||
${EndIf}
|
||||
SectionEnd
|
||||
!endif
|
||||
@@ -775,13 +594,6 @@ Section -call_install_exe
|
||||
DetailPrint "$(str_msg_registering)"
|
||||
nsExec::Exec "$0\install.exe $1"
|
||||
Pop $3
|
||||
|
||||
${If} ${SectionIsSelected} ${id_section_pluginhome}
|
||||
ReadEnvStr $3 "COMSPEC"
|
||||
Call GetHomeDir
|
||||
Pop $4
|
||||
ShellExecAsUser::ShellExecAsUser "" "$3" '/c "cd /d "$4" & mkdir vimfiles & cd vimfiles & mkdir colors compiler doc ftdetect ftplugin indent keymap plugin syntax"' SW_HIDE
|
||||
${EndIf}
|
||||
SectionEnd
|
||||
|
||||
##########################################################
|
||||
@@ -805,7 +617,7 @@ Section -post
|
||||
SectionGetSize ${id_section_editwith} $4
|
||||
IntOp $3 $3 + $4
|
||||
${EndIf}
|
||||
!if ${HAVE_NLS}
|
||||
!ifdef HAVE_NLS
|
||||
${If} ${SectionIsSelected} ${id_section_nls}
|
||||
SectionGetSize ${id_section_nls} $4
|
||||
IntOp $3 $3 + $4
|
||||
@@ -835,7 +647,7 @@ Section -post
|
||||
!insertmacro SaveSectionSelection ${id_section_vimrc} "select_vimrc"
|
||||
!insertmacro SaveSectionSelection ${id_section_pluginhome} "select_pluginhome"
|
||||
!insertmacro SaveSectionSelection ${id_section_pluginvim} "select_pluginvim"
|
||||
!if ${HAVE_NLS}
|
||||
!ifdef HAVE_NLS
|
||||
!insertmacro SaveSectionSelection ${id_section_nls} "select_nls"
|
||||
!endif
|
||||
${If} ${RunningX64}
|
||||
@@ -868,7 +680,7 @@ SectionEnd
|
||||
!macroend
|
||||
|
||||
Function .onInit
|
||||
!if ${HAVE_MULTI_LANG}
|
||||
!ifdef HAVE_MULTI_LANG
|
||||
# Select a language (or read from the registry).
|
||||
!insertmacro MUI_LANGDLL_DISPLAY
|
||||
!endif
|
||||
@@ -906,7 +718,7 @@ Function .onInit
|
||||
!insertmacro LoadSectionSelection ${id_section_vimrc} "select_vimrc"
|
||||
!insertmacro LoadSectionSelection ${id_section_pluginhome} "select_pluginhome"
|
||||
!insertmacro LoadSectionSelection ${id_section_pluginvim} "select_pluginvim"
|
||||
!if ${HAVE_NLS}
|
||||
!ifdef HAVE_NLS
|
||||
!insertmacro LoadSectionSelection ${id_section_nls} "select_nls"
|
||||
!endif
|
||||
# Load the default _vimrc settings from the registry (if any).
|
||||
@@ -964,12 +776,12 @@ Function SetCustom
|
||||
|
||||
|
||||
# 1st group - Compatibility
|
||||
${NSD_CreateGroupBox} 0u 0u 296u 44u $(str_msg_compat_title)
|
||||
${NSD_CreateGroupBox} 0 0 100% 32% $(str_msg_compat_title)
|
||||
Pop $3
|
||||
|
||||
${NSD_CreateLabel} 16u 14u 269u 10u $(str_msg_compat_desc)
|
||||
${NSD_CreateLabel} 5% 10% 35% 8% $(str_msg_compat_desc)
|
||||
Pop $3
|
||||
${NSD_CreateDropList} 42u 26u 237u 13u ""
|
||||
${NSD_CreateDropList} 18% 19% 75% 8% ""
|
||||
Pop $vim_nsd_compat
|
||||
${NSD_CB_AddString} $vim_nsd_compat $(str_msg_compat_vi)
|
||||
${NSD_CB_AddString} $vim_nsd_compat $(str_msg_compat_vim)
|
||||
@@ -989,12 +801,12 @@ Function SetCustom
|
||||
|
||||
|
||||
# 2nd group - Key remapping
|
||||
${NSD_CreateGroupBox} 0u 48u 296u 44u $(str_msg_keymap_title)
|
||||
${NSD_CreateGroupBox} 0 35% 100% 31% $(str_msg_keymap_title)
|
||||
Pop $3
|
||||
|
||||
${NSD_CreateLabel} 16u 62u 269u 10u $(str_msg_keymap_desc)
|
||||
${NSD_CreateLabel} 5% 45% 90% 8% $(str_msg_keymap_desc)
|
||||
Pop $3
|
||||
${NSD_CreateDropList} 42u 74u 236u 13u ""
|
||||
${NSD_CreateDropList} 38% 54% 55% 8% ""
|
||||
Pop $vim_nsd_keymap
|
||||
${NSD_CB_AddString} $vim_nsd_keymap $(str_msg_keymap_default)
|
||||
${NSD_CB_AddString} $vim_nsd_keymap $(str_msg_keymap_windows)
|
||||
@@ -1008,12 +820,12 @@ Function SetCustom
|
||||
|
||||
|
||||
# 3rd group - Mouse behavior
|
||||
${NSD_CreateGroupBox} 0u 95u 296u 44u $(str_msg_mouse_title)
|
||||
${NSD_CreateGroupBox} 0 69% 100% 31% $(str_msg_mouse_title)
|
||||
Pop $3
|
||||
|
||||
${NSD_CreateLabel} 16u 108u 269u 10u $(str_msg_mouse_desc)
|
||||
${NSD_CreateLabel} 5% 79% 90% 8% $(str_msg_mouse_desc)
|
||||
Pop $3
|
||||
${NSD_CreateDropList} 42u 121u 237u 13u ""
|
||||
${NSD_CreateDropList} 23% 87% 70% 8% ""
|
||||
Pop $vim_nsd_mouse
|
||||
${NSD_CB_AddString} $vim_nsd_mouse $(str_msg_mouse_default)
|
||||
${NSD_CB_AddString} $vim_nsd_mouse $(str_msg_mouse_windows)
|
||||
@@ -1080,7 +892,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)
|
||||
!if ${HAVE_NLS}
|
||||
!ifdef HAVE_NLS
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${id_section_nls} $(str_desc_nls)
|
||||
!endif
|
||||
!insertmacro MUI_FUNCTION_DESCRIPTION_END
|
||||
@@ -1090,7 +902,7 @@ FunctionEnd
|
||||
# Uninstaller Functions and Sections
|
||||
|
||||
Function un.onInit
|
||||
!if ${HAVE_MULTI_LANG}
|
||||
!ifdef HAVE_MULTI_LANG
|
||||
# Get the language from the registry.
|
||||
!insertmacro MUI_UNGETLANGUAGE
|
||||
!endif
|
||||
@@ -1100,7 +912,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 "vim91" directory is included in it.
|
||||
# created. Thus the "vim61" directory is included in it.
|
||||
StrCpy $0 "$INSTDIR"
|
||||
|
||||
# delete the context menu entry and batch files
|
||||
@@ -1197,7 +1009,6 @@ 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
|
||||
@@ -1207,17 +1018,14 @@ 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 "vim91" directory can't be removed, the
|
||||
# No error message if the "vim62" 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}\_viminfo
|
||||
Delete ${dir}\_viminfo
|
||||
${EndIf}
|
||||
${If} ${DirExists} ${dir}\vimfiles
|
||||
${If} ${FileExists} ${dir}\vimfiles
|
||||
RMDir ${dir}\vimfiles\colors
|
||||
RMDir ${dir}\vimfiles\compiler
|
||||
RMDir ${dir}\vimfiles\doc
|
||||
@@ -1227,9 +1035,6 @@ 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
|
||||
@@ -1237,8 +1042,15 @@ SectionEnd
|
||||
SectionGroup "un.$(str_ungroup_plugin)" id_ungroup_plugin
|
||||
Section /o "un.$(str_unsection_plugin_home)" id_unsection_plugin_home
|
||||
# get the home dir
|
||||
Call un.GetHomeDir
|
||||
Pop $0
|
||||
ReadEnvStr $0 "HOME"
|
||||
${If} $0 == ""
|
||||
ReadEnvStr $0 "HOMEDRIVE"
|
||||
ReadEnvStr $1 "HOMEPATH"
|
||||
StrCpy $0 "$0$1"
|
||||
${If} $0 == ""
|
||||
ReadEnvStr $0 "USERPROFILE"
|
||||
${EndIf}
|
||||
${EndIf}
|
||||
|
||||
${If} $0 != ""
|
||||
!insertmacro RemoveVimfiles $0
|
||||
|
||||
@@ -2,5 +2,5 @@
|
||||
!ifndef __GVIM_VER__NSH__
|
||||
!define __GVIM_VER__NSH__
|
||||
!define VER_MAJOR 9
|
||||
!define VER_MINOR 1
|
||||
!define VER_MINOR 0
|
||||
!endif
|
||||
|
||||
@@ -1,34 +0,0 @@
|
||||
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.
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
# danish.nsi: Danish language strings for gvim NSIS installer.
|
||||
#
|
||||
# Locale ID : 1030
|
||||
# Locale Name : da
|
||||
# fileencoding : UTF-8
|
||||
# Author : scootergrisen
|
||||
|
||||
@@ -15,20 +14,6 @@
|
||||
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
|
||||
##############################################################################
|
||||
|
||||
@@ -17,20 +17,6 @@ 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
|
||||
##############################################################################
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
# english.nsi: English language strings for gvim NSIS installer.
|
||||
#
|
||||
# Locale ID : 1033
|
||||
# Locale Name : en
|
||||
# fileencoding : UTF-8
|
||||
# Author : Guopeng Wen, Ken Takata
|
||||
|
||||
@@ -17,18 +16,6 @@ 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
|
||||
##############################################################################
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
# german.nsi : German language strings for gvim NSIS installer.
|
||||
#
|
||||
# Locale ID : 1031
|
||||
# Locale Name : de
|
||||
# fileencoding : UTF-8
|
||||
# Author : Christian Brabandt, tux
|
||||
|
||||
@@ -17,20 +16,6 @@ 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
|
||||
##############################################################################
|
||||
|
||||
@@ -1,291 +0,0 @@
|
||||
# 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)"
|
||||
|
||||
+88
-100
@@ -5,7 +5,7 @@
|
||||
# Locale ID : 1040
|
||||
# Locale Name : it
|
||||
# fileencoding : UTF-8
|
||||
# Author : Antonio Colombo, bovirus - revision: 12.05.2023
|
||||
# Author : Antonio Colombo
|
||||
|
||||
!insertmacro MUI_LANGUAGE "Italian"
|
||||
|
||||
@@ -17,29 +17,15 @@ 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
|
||||
##############################################################################
|
||||
|
||||
#LangString str_dest_folder ${LANG_ITALIAN} \
|
||||
# "Cartella installazione (il percorso deve finire con $\"vim$\")"
|
||||
# "Cartella d'installazione (il nome deve finire con $\"vim$\")"
|
||||
|
||||
LangString str_show_readme ${LANG_ITALIAN} \
|
||||
"Visualizza file README a fine installazione"
|
||||
"Visualizza README al termine dell'installazione"
|
||||
|
||||
# Install types:
|
||||
LangString str_type_typical ${LANG_ITALIAN} \
|
||||
@@ -57,119 +43,120 @@ LangString str_type_full ${LANG_ITALIAN} \
|
||||
##############################################################################
|
||||
|
||||
LangString str_section_old_ver ${LANG_ITALIAN} \
|
||||
"Disinstalla versioni esistenti"
|
||||
"Disinstalla versione/i esistente/i"
|
||||
LangString str_desc_old_ver ${LANG_ITALIAN} \
|
||||
"Disinstalla versioni esistenti di Vim."
|
||||
"Disinstalla versione/i esistente/i di Vim dal vostro sistema."
|
||||
|
||||
LangString str_section_exe ${LANG_ITALIAN} \
|
||||
"GUI e file supporto Vim"
|
||||
"Vim GUI e file di supporto"
|
||||
LangString str_desc_exe ${LANG_ITALIAN} \
|
||||
"GUI programmi e file di supporto Vim. Questa componente è indispensabile."
|
||||
"Vim GUI programmi e file di supporto. Questa componente è indispensabile."
|
||||
|
||||
LangString str_section_console ${LANG_ITALIAN} \
|
||||
"Console Vim (vim.exe per MS-DOS)"
|
||||
"Vim console (vim.exe per MS-DOS)"
|
||||
LangString str_desc_console ${LANG_ITALIAN} \
|
||||
"Versione console di Vim (vim.exe)."
|
||||
|
||||
LangString str_section_batch ${LANG_ITALIAN} \
|
||||
"Crea file .bat"
|
||||
LangString str_desc_batch ${LANG_ITALIAN} \
|
||||
"Crea file .bat per varianti di Vim nella cartella \
|
||||
"Crea file .bat per varianti di Vim nella directory \
|
||||
di Windows, per utilizzo da riga di comando."
|
||||
|
||||
LangString str_group_icons ${LANG_ITALIAN} \
|
||||
"Crea icone Vim"
|
||||
"Crea icone per Vim"
|
||||
LangString str_desc_icons ${LANG_ITALIAN} \
|
||||
"Crea icone Vim per rendere facile l'accesso."
|
||||
"Crea icone per Vim in vari posti, per rendere facile l'accesso."
|
||||
|
||||
LangString str_section_desktop ${LANG_ITALIAN} \
|
||||
"Icone sul Desktop"
|
||||
"Sul Desktop"
|
||||
LangString str_desc_desktop ${LANG_ITALIAN} \
|
||||
"Crea icone programma gVim sul desktop."
|
||||
"Crea icone per programma gVim sul desktop."
|
||||
|
||||
LangString str_section_start_menu ${LANG_ITALIAN} \
|
||||
"Gruppo programmi menù START"
|
||||
"Nella cartella del menù START"
|
||||
LangString str_desc_start_menu ${LANG_ITALIAN} \
|
||||
"Aggiunge gruppo programmi al menù START."
|
||||
"Aggiungi Vim alle cartelle del menù START."
|
||||
|
||||
#LangString str_section_quick_launch ${LANG_ITALIAN} \
|
||||
# "Barra avvio veloce"
|
||||
# "Nella barra di Avvio Veloce"
|
||||
#LangString str_desc_quick_launch ${LANG_ITALIAN} \
|
||||
# "Aggiunge un collegamento a Vim nella barra di avvio veloce."
|
||||
# "Aggiungi un puntatore a Vim nella barra di Avvio Veloce."
|
||||
|
||||
LangString str_section_edit_with ${LANG_ITALIAN} \
|
||||
"Aggiungi Vim al menù contestuale"
|
||||
"Aggiungi Vim al Menù Contestuale"
|
||||
LangString str_desc_edit_with ${LANG_ITALIAN} \
|
||||
"Aggiunge Vim al menu contestuale $\"Apri con...$\"."
|
||||
"Aggiungi Vim alla lista contestuale $\"Apri con...$\"."
|
||||
|
||||
#LangString str_section_edit_with32 ${LANG_ITALIAN} \
|
||||
# "Versione a 32 bit"
|
||||
# "Versione a 32-bit"
|
||||
#LangString str_desc_edit_with32 ${LANG_ITALIAN} \
|
||||
# "Aggiungi Vim al menu contestuale $\"Apri con...$\" \
|
||||
# per applicazioni a 32 bit."
|
||||
# "Aggiungi Vim alla lista contestuale $\"Apri con...$\" \
|
||||
# per applicazioni a 32-bit."
|
||||
|
||||
#LangString str_section_edit_with64 ${LANG_ITALIAN} \
|
||||
# "Versione a 64 bit"
|
||||
# "Versione a 64-bit"
|
||||
#LangString str_desc_edit_with64 ${LANG_ITALIAN} \
|
||||
# "Aggiunge Vim al menu contestuale $\"Apri con...$\" \
|
||||
# per applicazioni a 64 bit."
|
||||
# "Aggiungi Vim alla lista contestuale $\"Apri con...$\" \
|
||||
# per applicazioni a 64-bit."
|
||||
|
||||
LangString str_section_vim_rc ${LANG_ITALIAN} \
|
||||
"Crea configurazione predefinita"
|
||||
"Crea configurazione di default"
|
||||
LangString str_desc_vim_rc ${LANG_ITALIAN} \
|
||||
"Crea, se non ne esiste già uno, un file configurazione predefinito (_vimrc) ."
|
||||
"Crea un file configurazione di default (_vimrc) se non \
|
||||
ne esiste già uno."
|
||||
|
||||
LangString str_group_plugin ${LANG_ITALIAN} \
|
||||
"Crea cartella plugin"
|
||||
"Crea directory per plugin"
|
||||
LangString str_desc_plugin ${LANG_ITALIAN} \
|
||||
"Crea cartella plugin. I plugin consentono di aggiungere funzionalità \
|
||||
a Vim copiando i relativi file in una di queste cartelle."
|
||||
"Crea directory per plugin. Consentono di aggiungere funzionalità \
|
||||
a Vim mettendo file in una di queste directory."
|
||||
|
||||
LangString str_section_plugin_home ${LANG_ITALIAN} \
|
||||
"Privata"
|
||||
"Private"
|
||||
LangString str_desc_plugin_home ${LANG_ITALIAN} \
|
||||
"Crea cartella plugin nella cartella HOME."
|
||||
"Crea directory per plugin nella directory HOME."
|
||||
|
||||
LangString str_section_plugin_vim ${LANG_ITALIAN} \
|
||||
"Condivisa"
|
||||
"Condivise"
|
||||
LangString str_desc_plugin_vim ${LANG_ITALIAN} \
|
||||
"Crea cartella plugin nella cartella di installazione di Vim \
|
||||
"Crea directory per plugin nella directory di installazione di Vim \
|
||||
per uso da parte di tutti gli utenti di questo sistema."
|
||||
|
||||
LangString str_section_nls ${LANG_ITALIAN} \
|
||||
"Supporto nativo lingua (NLS)"
|
||||
"Supporto Multilingue (NLS)"
|
||||
LangString str_desc_nls ${LANG_ITALIAN} \
|
||||
"Installa i file per il supporto nativo multilingua."
|
||||
"Installa file per supportare messaggi in diverse lingue."
|
||||
|
||||
LangString str_unsection_register ${LANG_ITALIAN} \
|
||||
"Rimuovi Vim dal registro"
|
||||
"Togli Vim dal Registry"
|
||||
LangString str_desc_unregister ${LANG_ITALIAN} \
|
||||
"Rimuove Vim dal registro di configurazione sistema."
|
||||
"Togli Vim dal Registry di configurazione sistema."
|
||||
|
||||
LangString str_unsection_exe ${LANG_ITALIAN} \
|
||||
"Elimina programmi/file di supporto Vim"
|
||||
"Cancella programmi/file di supporto Vim"
|
||||
LangString str_desc_rm_exe ${LANG_ITALIAN} \
|
||||
"Elimina tutti i programmi/file di supporto di Vim."
|
||||
"Cancella tutti i programmi/file di supporto di Vim."
|
||||
|
||||
LangString str_ungroup_plugin ${LANG_ITALIAN} \
|
||||
"Elimina cartelle plugin"
|
||||
"Cancella le directory per plugin"
|
||||
LangString str_desc_rm_plugin ${LANG_ITALIAN} \
|
||||
"Elimina le cartelle plugin se sono vuote."
|
||||
"Cancella le directory per plugin se sono vuote."
|
||||
|
||||
LangString str_unsection_plugin_home ${LANG_ITALIAN} \
|
||||
"Private"
|
||||
LangString str_desc_rm_plugin_home ${LANG_ITALIAN} \
|
||||
"Elimina cartelle plugin nella cartella HOME."
|
||||
"Cancella le directory per plugin dalla directory HOME."
|
||||
|
||||
LangString str_unsection_plugin_vim ${LANG_ITALIAN} \
|
||||
"Condivise"
|
||||
LangString str_desc_rm_plugin_vim ${LANG_ITALIAN} \
|
||||
"Elimina cartelle plugin nella cartella di installazione di Vim."
|
||||
"Cancella le directory per plugin dalla directory di installazione di Vim."
|
||||
|
||||
LangString str_unsection_rootdir ${LANG_ITALIAN} \
|
||||
"Elimina la cartella di installazione di Vim"
|
||||
"Cancella la directory di installazione di Vim"
|
||||
LangString str_desc_rm_rootdir ${LANG_ITALIAN} \
|
||||
"Elimina la cartella di installazione di Vim. Contiene i file di configurazione!"
|
||||
"Cancella la directory di installazione di Vim. Contiene i vostri file di configurazione!"
|
||||
|
||||
|
||||
##############################################################################
|
||||
@@ -177,74 +164,75 @@ LangString str_desc_rm_rootdir ${LANG_ITALIAN} \
|
||||
##############################################################################
|
||||
|
||||
#LangString str_msg_too_many_ver ${LANG_ITALIAN} \
|
||||
# "Rilevate nel sistema $vim_old_ver_count versioni di Vim.$\r$\n\
|
||||
# "Trovate $vim_old_ver_count versioni di Vim sul vostro sistema.$\r$\n\
|
||||
# Questo programma di installazione può gestire solo \
|
||||
# ${VIM_MAX_OLD_VER} versioni.$\r$\n\
|
||||
# Disinstalla qualche versione precedente e ricomincia."
|
||||
# Disinstallate qualche versione precedente e ricominciate."
|
||||
|
||||
#LangString str_msg_invalid_root ${LANG_ITALIAN} \
|
||||
# "Nome cartella di installazione non valida: $vim_install_root!$\r$\n\
|
||||
# "Nome di directory di installazione non valida: $vim_install_root!$\r$\n\
|
||||
# Dovrebbe terminare con $\"vim$\"."
|
||||
|
||||
#LangString str_msg_bin_mismatch ${LANG_ITALIAN} \
|
||||
# "Conflitto nella cartella di installazione!$\r$\n$\r$\n\
|
||||
# La cartella di installazione dev'essere $\"$vim_bin_path$\",$\r$\n\
|
||||
# ma il sistema indica che il percorso è $\"$INSTDIR$\"."
|
||||
# "Conflitto nella directory di installazione!$\r$\n$\r$\n\
|
||||
# Cartella di installazione dev'essere $\"$vim_bin_path$\",$\r$\n\
|
||||
# ma il sistema segnala invece $\"$INSTDIR$\"."
|
||||
|
||||
#LangString str_msg_vim_running ${LANG_ITALIAN} \
|
||||
# "Vim è ancora in esecuzione nel sistema.$\r$\n\
|
||||
# Per continuare chiudi tutte le sessioni attive di Vim."
|
||||
# "Vim ancora in esecuzione sul vostro sistema.$\r$\n\
|
||||
# Chiudete tutte le sessioni attive di Vim per continuare."
|
||||
|
||||
#LangString str_msg_register_ole ${LANG_ITALIAN} \
|
||||
# "Tentativo di registrazione di Vim con OLE. \
|
||||
# Non ci sono messaggi che indicano se l'operazione è riuscita."
|
||||
# Non c'è messaggio che indica se è riuscito o no."
|
||||
|
||||
#LangString str_msg_unreg_ole ${LANG_ITALIAN} \
|
||||
# "Tentativo di rimozione di VIM dal registro via OLE. \
|
||||
# Non ci sono messaggi che indicano se l'operazione è riuscita."
|
||||
# "Tentativo di togliere dal Registry Vim con OLE. \
|
||||
# Non c'è messaggio che indica se è riuscito o no."
|
||||
|
||||
#LangString str_msg_rm_start ${LANG_ITALIAN} \
|
||||
# "Disinstallazione della versione:"
|
||||
# "Disinstallazione della seguente versione:"
|
||||
|
||||
#LangString str_msg_rm_fail ${LANG_ITALIAN} \
|
||||
# "Disinstallazione non riuscita per la versione:"
|
||||
# "Disinstallazione non riuscita per la seguente versione:"
|
||||
|
||||
#LangString str_msg_no_rm_key ${LANG_ITALIAN} \
|
||||
# "Impossibile trovare chiave disinstallazione nel registro."
|
||||
# "Non riesco a trovare chiave di disinstallazione nel Registry."
|
||||
|
||||
#LangString str_msg_no_rm_reg ${LANG_ITALIAN} \
|
||||
# "Impossibile trovare programma disinstallazione nel registro."
|
||||
# "Non riesco a trovare programma disinstallazione nel Registry."
|
||||
|
||||
#LangString str_msg_no_rm_exe ${LANG_ITALIAN} \
|
||||
# "Impossibile trovare programma disinstallazione."
|
||||
# "Non riesco a trovare programma disinstallazione."
|
||||
|
||||
#LangString str_msg_rm_copy_fail ${LANG_ITALIAN} \
|
||||
# "Impossibile copiare il programma disinstallazione in una cartella temporanea."
|
||||
# "Non riesco a copiare programma disinstallazione a una \
|
||||
# directory temporanea."
|
||||
|
||||
#LangString str_msg_rm_run_fail ${LANG_ITALIAN} \
|
||||
# "Impossibile eseguire programma disinstallazione."
|
||||
# "Non riesco a eseguire programma disinstallazione."
|
||||
|
||||
#LangString str_msg_abort_install ${LANG_ITALIAN} \
|
||||
# "Il programma di disinstallazione verrà chiuso senza aver eseguito nessuna modifica."
|
||||
# "Il programma di disinstallazione verrà chiuso senza aver fatto nulla."
|
||||
|
||||
LangString str_msg_install_fail ${LANG_ITALIAN} \
|
||||
"Installazione non riuscita."
|
||||
"Installazione non riuscita. Miglior fortuna alla prossima!"
|
||||
|
||||
LangString str_msg_rm_exe_fail ${LANG_ITALIAN} \
|
||||
"Alcuni file in $0 non sono stati eliminati!$\r$\n\
|
||||
I file vanno rimossi manualmente."
|
||||
"Alcuni file in $0 non sono stati cancellati!$\r$\n\
|
||||
Dovreste cancellarli voi stessi."
|
||||
|
||||
#LangString str_msg_rm_root_fail ${LANG_ITALIAN} \
|
||||
# "AVVISO: impossibile eliminare $\"$vim_install_root$\", non è vuota!"
|
||||
# "AVVISO: Non posso cancellare $\"$vim_install_root$\", non è vuota!"
|
||||
|
||||
LangString str_msg_uninstalling ${LANG_ITALIAN} \
|
||||
"Disinstallazione vecchia versione Vim..."
|
||||
"Sto disinstallando la vecchia versione..."
|
||||
|
||||
LangString str_msg_registering ${LANG_ITALIAN} \
|
||||
"Aggiunta di Vim al registro..."
|
||||
"Sto aggiungendo Vim al Registry..."
|
||||
|
||||
LangString str_msg_unregistering ${LANG_ITALIAN} \
|
||||
"Rimozione di Vim dal registro..."
|
||||
"Sto togliendo Vim dal Registry..."
|
||||
|
||||
|
||||
##############################################################################
|
||||
@@ -254,37 +242,37 @@ LangString str_msg_unregistering ${LANG_ITALIAN} \
|
||||
LangString str_vimrc_page_title ${LANG_ITALIAN} \
|
||||
"Scelta impostazioni _vimrc"
|
||||
LangString str_vimrc_page_subtitle ${LANG_ITALIAN} \
|
||||
"Scelta impostazioni funzionalità aggiuntive, tastiera e mouse."
|
||||
"Scelta impostazioni per funzionalità ulteriori, tastiera e mouse."
|
||||
|
||||
LangString str_msg_compat_title ${LANG_ITALIAN} \
|
||||
" Comportamento come Vi / Vim "
|
||||
" comportamento come Vi / Vim "
|
||||
LangString str_msg_compat_desc ${LANG_ITALIAN} \
|
||||
"&Compatibilità e funzionalità"
|
||||
"&Compatibilità e funzionalità ulteriori"
|
||||
LangString str_msg_compat_vi ${LANG_ITALIAN} \
|
||||
"Compatibile Vi"
|
||||
"Compatibile con Vi"
|
||||
LangString str_msg_compat_vim ${LANG_ITALIAN} \
|
||||
"Vim originale"
|
||||
LangString str_msg_compat_defaults ${LANG_ITALIAN} \
|
||||
"Vim con alcune funzionalità aggiuntive (defaults.vim)"
|
||||
"Vim con alcune funzionalità ulteriori (esecuzione defaults.vim)"
|
||||
LangString str_msg_compat_all ${LANG_ITALIAN} \
|
||||
"Vim con tutte le funzionalità aggiuntive (vimrc_example.vim) (predefinito)"
|
||||
"Vim con tutte le funzionalità ulteriori (esecuzione vimrc_example.vim) (Default)"
|
||||
|
||||
LangString str_msg_keymap_title ${LANG_ITALIAN} \
|
||||
" Mappature tastiera "
|
||||
" Mappature "
|
||||
LangString str_msg_keymap_desc ${LANG_ITALIAN} \
|
||||
"&Rimappa alcuni tasti Windows (Ctrl-V, Ctrl-C, Ctrl-A, Ctrl-S, Ctrl-F, etc.)"
|
||||
"&Rimappatura di alcuni tasti per Windows (Ctrl-V, Ctrl-C, Ctrl-A, Ctrl-S, Ctrl-F, etc.)"
|
||||
LangString str_msg_keymap_default ${LANG_ITALIAN} \
|
||||
"Non rimappare i tasti (predefinito)"
|
||||
"Non effettuare rimappature di tasti (Default)"
|
||||
LangString str_msg_keymap_windows ${LANG_ITALIAN} \
|
||||
"Rimappa solo alcuni tasti"
|
||||
"Rimappare solo alcuni tasti"
|
||||
|
||||
LangString str_msg_mouse_title ${LANG_ITALIAN} \
|
||||
" Mouse "
|
||||
LangString str_msg_mouse_desc ${LANG_ITALIAN} \
|
||||
"&Comportamento pulsanti destro/sinistro"
|
||||
"&Comportamento dei pulsanti destro e sinistro"
|
||||
LangString str_msg_mouse_default ${LANG_ITALIAN} \
|
||||
"Destro: menu popup, Sinistro: modalità visuale (predefinito)"
|
||||
"Destro: popup menu, Sinistro: modalità visuale (Default)"
|
||||
LangString str_msg_mouse_windows ${LANG_ITALIAN} \
|
||||
"Destro: menu popup, Sinistro: selezione modalità (Windows)"
|
||||
"Destro: popup menu, Sinistro: seleziona modalità (Windows)"
|
||||
LangString str_msg_mouse_unix ${LANG_ITALIAN} \
|
||||
"Destro: estensione selezione, Sinistro: modalità visuale (Unix)"
|
||||
"Destro: estende selezione, Sinistro: modalità visuale (Unix)"
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
# japanese.nsi: Japanese language strings for gvim NSIS installer.
|
||||
#
|
||||
# Locale ID : 1041
|
||||
# Locale Name : ja
|
||||
# fileencoding : UTF-8
|
||||
# Author : Ken Takata
|
||||
|
||||
@@ -27,20 +26,6 @@ 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
|
||||
##############################################################################
|
||||
|
||||
+47
-69
@@ -3,7 +3,7 @@
|
||||
# russian.nsi: Russian language strings for gvim NSIS installer.
|
||||
#
|
||||
# Locale ID : 1049
|
||||
# Locale name : ru
|
||||
# Locale name : ru-RU
|
||||
# fileencoding : UTF-8
|
||||
# Author : Restorer
|
||||
|
||||
@@ -17,37 +17,25 @@ 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} \
|
||||
"Полный"
|
||||
"Полная"
|
||||
|
||||
|
||||
##############################################################################
|
||||
@@ -62,61 +50,59 @@ 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-файлов в каталоге Windows для работы с редактором \
|
||||
Vim из командной строки"
|
||||
"Создание командных bat-файлов позволяющих работать с редактором \
|
||||
Vim из командной строки Windows"
|
||||
|
||||
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} \
|
||||
"Создание ярлыков редактора Vim на Рабочем столе"
|
||||
"Создание ярлыков программы Gvim на Рабочем столе"
|
||||
|
||||
LangString str_section_start_menu ${LANG_RUSSIAN} \
|
||||
"В меню кнопки Пуск"
|
||||
LangString str_desc_start_menu ${LANG_RUSSIAN} \
|
||||
"Создание ярлыков редактора Vim в меню кнопки Пуск"
|
||||
"Создание ярлыков программы Gvim в меню кнопки Пуск"
|
||||
|
||||
#LangString str_section_quick_launch ${LANG_RUSSIAN} \
|
||||
# "На панели быстрого запуска"
|
||||
#LangString str_desc_quick_launch ${LANG_RUSSIAN} \
|
||||
# "Создание ярлыков редактора Vim на панели быстрого запуска"
|
||||
# "Создание ярлыков программы GVim на панели быстрого запуска"
|
||||
|
||||
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} \
|
||||
# "Добавление в пункт контекстного меню \
|
||||
# «Открыть с помощью...» 32-разрядных приложений"
|
||||
# "Добавление вызова программы Gvim в пункт $\"Открыть с помощью...$\" контекстного меню \
|
||||
# для 32-разрядных приложений"
|
||||
|
||||
#LangString str_section_edit_with64 ${LANG_RUSSIAN} \
|
||||
# "Для 64-разрядной версии программы"
|
||||
# "64-разрядная версия программы"
|
||||
#LangString str_desc_edit_with64 ${LANG_RUSSIAN} \
|
||||
# "Добавление в пункт контекстного меню \
|
||||
# «Открыть с помощью...» 64-разрядных приложений"
|
||||
# "Добавление вызова программы Gvim в пункт $\"Открыть с помощью...$\" контекстного меню \
|
||||
# для 64-разрядных приложений"
|
||||
|
||||
LangString str_section_vim_rc ${LANG_RUSSIAN} \
|
||||
"Начальная настройка программы"
|
||||
"Настройки программы по умолчанию"
|
||||
LangString str_desc_vim_rc ${LANG_RUSSIAN} \
|
||||
"Создание файла _vimrc с предустановленными настройками, если нет других \
|
||||
файлов настроек"
|
||||
@@ -124,31 +110,25 @@ 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. Модули в этом каталоге доступны для \
|
||||
всех пользователей"
|
||||
|
||||
#LangString str_section_vis_vim ${LANG_RUSSIAN} \
|
||||
# "Подключаемый модуль VisVim"
|
||||
#LangString str_desc_vis_vim ${LANG_RUSSIAN} \
|
||||
# "Подключаемый модуль VisVim используется для интеграции с \
|
||||
# Microsoft Visual Studio"
|
||||
"Создание каталога для подключаемых модулей в каталоге установки редактора Vim. \
|
||||
Модули в этом каталоге будут доступны для любого пользователя \
|
||||
зарегистрировавшегося в системе"
|
||||
|
||||
LangString str_section_nls ${LANG_RUSSIAN} \
|
||||
"Поддержка региональных языков"
|
||||
LangString str_desc_nls ${LANG_RUSSIAN} \
|
||||
"Установка файлов для работы программе на различных региональных языках"
|
||||
"Установка файлов для поддержки региональных языков операционной системы"
|
||||
|
||||
LangString str_unsection_register ${LANG_RUSSIAN} \
|
||||
"Отменить регистрацию компонентов программы Vim"
|
||||
@@ -178,8 +158,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. В этом каталоге находятся файлы \
|
||||
настроек!"
|
||||
|
||||
|
||||
##############################################################################
|
||||
@@ -219,11 +199,10 @@ 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} \
|
||||
# "Отсутствуют права на доступ к программе, выполняющей удаление"
|
||||
@@ -240,15 +219,14 @@ 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} \
|
||||
"Удаление предыдущих версий программ..."
|
||||
@@ -267,8 +245,7 @@ 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} \
|
||||
" Варианты использования программы "
|
||||
@@ -279,26 +256,27 @@ LangString str_msg_compat_vi ${LANG_RUSSIAN} \
|
||||
LangString str_msg_compat_vim ${LANG_RUSSIAN} \
|
||||
"Работа в варианте функциональности редактора Vim"
|
||||
LangString str_msg_compat_defaults ${LANG_RUSSIAN} \
|
||||
"Включить некоторые улучшения (из файла defaults.vim)"
|
||||
"Работа редактора Vim с некоторыми улучшениями (файл defaults.vim)"
|
||||
LangString str_msg_compat_all ${LANG_RUSSIAN} \
|
||||
"Включить все улучшения (из файла vimrc_example.vim). Стандартно"
|
||||
"Работа редактора Vim со всеми улучшениями (файл vimrc_example.vim). \
|
||||
Используется по умолчанию"
|
||||
|
||||
LangString str_msg_keymap_title ${LANG_RUSSIAN} \
|
||||
" Клавиатурные команды "
|
||||
LangString str_msg_keymap_desc ${LANG_RUSSIAN} \
|
||||
"Изменение клавиатурных команд CTRL+V, CTRL+C, CTRL+S, CTRL+F и т. п."
|
||||
"Клавиатурные команды используемые в ОС Windows (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‐подобных ОС)"
|
||||
|
||||
+1
-16
@@ -3,11 +3,10 @@
|
||||
# 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 "Serbian"
|
||||
!insertmacro MUI_LANGUAGE "Српски"
|
||||
|
||||
|
||||
# Overwrite the default translation.
|
||||
@@ -17,20 +16,6 @@ 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
|
||||
##############################################################################
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
# installer.
|
||||
#
|
||||
# Locale ID : 2052
|
||||
# Locale Name : cn
|
||||
# fileencoding : UTF-8
|
||||
# Author : Guopeng Wen, David Liu
|
||||
|
||||
@@ -18,21 +17,6 @@ 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
|
||||
##############################################################################
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
# installer.
|
||||
#
|
||||
# Locale ID : 1028
|
||||
# Locale Name : tw
|
||||
# fileencoding : UTF-8
|
||||
# Author : Guopeng Wen
|
||||
|
||||
@@ -18,21 +17,6 @@ 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
|
||||
##############################################################################
|
||||
|
||||
@@ -1,9 +1,4 @@
|
||||
# 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
|
||||
|
||||
@@ -16,22 +11,6 @@ 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ç"
|
||||
|
||||
|
||||
@@ -1,149 +0,0 @@
|
||||
" Last Modified: 2023-09-11
|
||||
|
||||
function! cargo#Load()
|
||||
" Utility call to get this script loaded, for debugging
|
||||
endfunction
|
||||
|
||||
function! cargo#cmd(args) abort
|
||||
" Trim trailing spaces. This is necessary since :terminal command parses
|
||||
" trailing spaces as an empty argument.
|
||||
let args = substitute(a:args, '\s\+$', '', '')
|
||||
if exists('g:cargo_shell_command_runner')
|
||||
let cmd = g:cargo_shell_command_runner
|
||||
elseif has('terminal')
|
||||
let cmd = 'terminal'
|
||||
elseif has('nvim')
|
||||
let cmd = 'noautocmd new | terminal'
|
||||
else
|
||||
let cmd = '!'
|
||||
endif
|
||||
execute cmd 'cargo' args
|
||||
endfunction
|
||||
|
||||
function! s:nearest_cargo(...) abort
|
||||
" If the second argument is not specified, the first argument determines
|
||||
" whether we will start from the current directory or the directory of the
|
||||
" current buffer, otherwise, we start with the provided path on the
|
||||
" second argument.
|
||||
|
||||
let l:is_getcwd = get(a:, 1, 0)
|
||||
if l:is_getcwd
|
||||
let l:starting_path = get(a:, 2, getcwd())
|
||||
else
|
||||
let l:starting_path = get(a:, 2, expand('%:p:h'))
|
||||
endif
|
||||
|
||||
return findfile('Cargo.toml', l:starting_path . ';')
|
||||
endfunction
|
||||
|
||||
function! cargo#nearestCargo(is_getcwd) abort
|
||||
return s:nearest_cargo(a:is_getcwd)
|
||||
endfunction
|
||||
|
||||
function! cargo#nearestWorkspaceCargo(is_getcwd) abort
|
||||
let l:nearest = s:nearest_cargo(a:is_getcwd)
|
||||
while l:nearest !=# ''
|
||||
for l:line in readfile(l:nearest, '', 0x100)
|
||||
if l:line =~# '\V[workspace]'
|
||||
return l:nearest
|
||||
endif
|
||||
endfor
|
||||
let l:next = fnamemodify(l:nearest, ':p:h:h')
|
||||
let l:nearest = s:nearest_cargo(0, l:next)
|
||||
endwhile
|
||||
return ''
|
||||
endfunction
|
||||
|
||||
function! cargo#nearestRootCargo(is_getcwd) abort
|
||||
" Try to find a workspace Cargo.toml, and if not found, take the nearest
|
||||
" regular Cargo.toml
|
||||
let l:workspace_cargo = cargo#nearestWorkspaceCargo(a:is_getcwd)
|
||||
if l:workspace_cargo !=# ''
|
||||
return l:workspace_cargo
|
||||
endif
|
||||
return s:nearest_cargo(a:is_getcwd)
|
||||
endfunction
|
||||
|
||||
|
||||
function! cargo#build(args)
|
||||
call cargo#cmd("build " . a:args)
|
||||
endfunction
|
||||
|
||||
function! cargo#check(args)
|
||||
call cargo#cmd("check " . a:args)
|
||||
endfunction
|
||||
|
||||
function! cargo#clean(args)
|
||||
call cargo#cmd("clean " . a:args)
|
||||
endfunction
|
||||
|
||||
function! cargo#doc(args)
|
||||
call cargo#cmd("doc " . a:args)
|
||||
endfunction
|
||||
|
||||
function! cargo#new(args)
|
||||
call cargo#cmd("new " . a:args)
|
||||
cd `=a:args`
|
||||
endfunction
|
||||
|
||||
function! cargo#init(args)
|
||||
call cargo#cmd("init " . a:args)
|
||||
endfunction
|
||||
|
||||
function! cargo#run(args)
|
||||
call cargo#cmd("run " . a:args)
|
||||
endfunction
|
||||
|
||||
function! cargo#test(args)
|
||||
call cargo#cmd("test " . a:args)
|
||||
endfunction
|
||||
|
||||
function! cargo#bench(args)
|
||||
call cargo#cmd("bench " . a:args)
|
||||
endfunction
|
||||
|
||||
function! cargo#update(args)
|
||||
call cargo#cmd("update " . a:args)
|
||||
endfunction
|
||||
|
||||
function! cargo#search(args)
|
||||
call cargo#cmd("search " . a:args)
|
||||
endfunction
|
||||
|
||||
function! cargo#publish(args)
|
||||
call cargo#cmd("publish " . a:args)
|
||||
endfunction
|
||||
|
||||
function! cargo#install(args)
|
||||
call cargo#cmd("install " . a:args)
|
||||
endfunction
|
||||
|
||||
function! cargo#runtarget(args)
|
||||
let l:filename = expand('%:p')
|
||||
let l:read_manifest = system('cargo read-manifest')
|
||||
let l:metadata = json_decode(l:read_manifest)
|
||||
let l:targets = get(l:metadata, 'targets', [])
|
||||
let l:did_run = 0
|
||||
for l:target in l:targets
|
||||
let l:src_path = get(l:target, 'src_path', '')
|
||||
let l:kinds = get(l:target, 'kind', [])
|
||||
let l:name = get(l:target, 'name', '')
|
||||
if l:src_path == l:filename
|
||||
if index(l:kinds, 'example') != -1
|
||||
let l:did_run = 1
|
||||
call cargo#run("--example " . shellescape(l:name) . " " . a:args)
|
||||
return
|
||||
elseif index(l:kinds, 'bin') != -1
|
||||
let l:did_run = 1
|
||||
call cargo#run("--bin " . shellescape(l:name) . " " . a:args)
|
||||
return
|
||||
endif
|
||||
endif
|
||||
endfor
|
||||
if l:did_run != 1
|
||||
call cargo#run(a:args)
|
||||
return
|
||||
endif
|
||||
endfunction
|
||||
|
||||
" vim: set et sw=4 sts=4 ts=8:
|
||||
@@ -1,29 +0,0 @@
|
||||
" Last Modified: 2023-09-11
|
||||
|
||||
function! cargo#quickfix#CmdPre() abort
|
||||
if &filetype ==# 'rust' && get(b:, 'current_compiler', '') ==# 'cargo' &&
|
||||
\ &makeprg =~ '\V\^cargo\ \.\*'
|
||||
" Preserve the current directory, and 'lcd' to the nearest Cargo file.
|
||||
let b:rust_compiler_cargo_qf_has_lcd = haslocaldir()
|
||||
let b:rust_compiler_cargo_qf_prev_cd = getcwd()
|
||||
let b:rust_compiler_cargo_qf_prev_cd_saved = 1
|
||||
let l:nearest = fnamemodify(cargo#nearestRootCargo(0), ':h')
|
||||
execute 'lchdir! '.l:nearest
|
||||
else
|
||||
let b:rust_compiler_cargo_qf_prev_cd_saved = 0
|
||||
endif
|
||||
endfunction
|
||||
|
||||
function! cargo#quickfix#CmdPost() abort
|
||||
if exists("b:rust_compiler_cargo_qf_prev_cd_saved") && b:rust_compiler_cargo_qf_prev_cd_saved
|
||||
" Restore the current directory.
|
||||
if b:rust_compiler_cargo_qf_has_lcd
|
||||
execute 'lchdir! '.b:rust_compiler_cargo_qf_prev_cd
|
||||
else
|
||||
execute 'chdir! '.b:rust_compiler_cargo_qf_prev_cd
|
||||
endif
|
||||
let b:rust_compiler_cargo_qf_prev_cd_saved = 0
|
||||
endif
|
||||
endfunction
|
||||
|
||||
" vim: set et sw=4 sts=4 ts=8:
|
||||
@@ -1,11 +1,10 @@
|
||||
vim9script noclear
|
||||
|
||||
# Vim completion script
|
||||
# Language: C
|
||||
# Maintainer: The Vim Project <https://github.com/vim/vim>
|
||||
# Last Change: 2024 Jun 06
|
||||
# Language: C
|
||||
# Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
# Rewritten in Vim9 script by github user lacygoill
|
||||
# Former Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
# Last Change: 2022 Jan 31
|
||||
|
||||
var prepended: string
|
||||
var grepCache: dict<list<dict<any>>>
|
||||
@@ -210,7 +209,7 @@ export def Complete(findstart: bool, abase: string): any # {{{1
|
||||
# Find the variable in the tags file(s)
|
||||
var diclist: list<dict<any>> = taglist('^' .. items[0] .. '$')
|
||||
# Remove members, these can't appear without something in front.
|
||||
->filter((_, v: dict<any>): bool =>
|
||||
->filter((_, v: dict<string>): bool =>
|
||||
v->has_key('kind') ? v.kind != 'm' : true)
|
||||
|
||||
res = []
|
||||
|
||||
@@ -3,7 +3,7 @@ vim9script
|
||||
# Language: ConTeXt typesetting engine
|
||||
# Maintainer: Nicola Vitacolonna <nvitacolonna@gmail.com>
|
||||
# Former Maintainers: Nikolai Weibull <now@bitwi.se>
|
||||
# Latest Revision: 2023 Dec 26
|
||||
# Latest Revision: 2022 Sep 19
|
||||
|
||||
# Typesetting {{{
|
||||
import autoload './typeset.vim'
|
||||
|
||||
Vendored
+67
-398
@@ -2,19 +2,14 @@ vim9script
|
||||
|
||||
# Vim functions for file type detection
|
||||
#
|
||||
# Maintainer: The Vim Project <https://github.com/vim/vim>
|
||||
# Last Change: 2024 May 23
|
||||
# Former Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
# Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
# Last Change: 2022 Dec 14
|
||||
|
||||
# These functions are moved here from runtime/filetype.vim to make startup
|
||||
# faster.
|
||||
|
||||
var prolog_pattern = '^\s*\(:-\|%\+\(\s\|$\)\|\/\*\)\|\.\s*$'
|
||||
|
||||
export def Check_inp()
|
||||
if getline(1) =~ '%%'
|
||||
setf tex
|
||||
elseif getline(1) =~ '^\*'
|
||||
if getline(1) =~ '^\*'
|
||||
setf abaqus
|
||||
else
|
||||
var n = 1
|
||||
@@ -66,7 +61,7 @@ export def FTasmsyntax()
|
||||
endif
|
||||
enddef
|
||||
|
||||
var ft_visual_basic_content = '\c^\s*\%(Attribute\s\+VB_Name\|Begin\s\+\%(VB\.\|{\%(\x\+-\)\+\x\+}\)\)'
|
||||
var ft_visual_basic_content = '\cVB_Name\|Begin VB\.\(Form\|MDIForm\|UserControl\)'
|
||||
|
||||
# See FTfrm() for Visual Basic form file detection
|
||||
export def FTbas()
|
||||
@@ -150,20 +145,12 @@ export def FTcls()
|
||||
return
|
||||
endif
|
||||
|
||||
var line1 = getline(1)
|
||||
if line1 =~ '^#!.*\<\%(rexx\|regina\)\>'
|
||||
setf rexx
|
||||
return
|
||||
elseif line1 == 'VERSION 1.0 CLASS'
|
||||
setf vb
|
||||
return
|
||||
endif
|
||||
|
||||
var nonblank1 = getline(nextnonblank(1))
|
||||
if nonblank1 =~ '^\v%(\%|\\)'
|
||||
if getline(1) =~ '^\v%(\%|\\)'
|
||||
setf tex
|
||||
elseif nonblank1 =~ '^\s*\%(/\*\|::\w\)'
|
||||
elseif getline(1)[0] == '#' && getline(1) =~ 'rexx'
|
||||
setf rexx
|
||||
elseif getline(1) == 'VERSION 1.0 CLASS'
|
||||
setf vb
|
||||
else
|
||||
setf st
|
||||
endif
|
||||
@@ -283,23 +270,6 @@ export def DtraceCheck()
|
||||
endif
|
||||
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
|
||||
endif
|
||||
|
||||
if exists("g:filetype_def")
|
||||
exe "setf " .. g:filetype_def
|
||||
else
|
||||
setf def
|
||||
endif
|
||||
enddef
|
||||
|
||||
export def FTe()
|
||||
if exists('g:filetype_euphoria')
|
||||
exe 'setf ' .. g:filetype_euphoria
|
||||
@@ -316,48 +286,12 @@ export def FTe()
|
||||
endif
|
||||
enddef
|
||||
|
||||
def IsForth(): bool
|
||||
var first_line = nextnonblank(1)
|
||||
|
||||
# SwiftForth block comment (line is usually filled with '-' or '=') or
|
||||
# OPTIONAL (sometimes precedes the header comment)
|
||||
if getline(first_line) =~? '^\%({\%(\s\|$\)\|OPTIONAL\s\)'
|
||||
return true
|
||||
endif
|
||||
|
||||
var n = first_line
|
||||
while n < 100 && n <= line("$")
|
||||
# Forth comments and colon definitions
|
||||
if getline(n) =~ '^[:(\\] '
|
||||
return true
|
||||
endif
|
||||
n += 1
|
||||
endwhile
|
||||
return false
|
||||
enddef
|
||||
|
||||
# Distinguish between Forth and Fortran
|
||||
export def FTf()
|
||||
if exists("g:filetype_f")
|
||||
exe "setf " .. g:filetype_f
|
||||
elseif IsForth()
|
||||
setf forth
|
||||
else
|
||||
setf fortran
|
||||
endif
|
||||
enddef
|
||||
|
||||
export def FTfrm()
|
||||
if exists("g:filetype_frm")
|
||||
exe "setf " .. g:filetype_frm
|
||||
return
|
||||
endif
|
||||
|
||||
if getline(1) == "VERSION 5.00"
|
||||
setf vb
|
||||
return
|
||||
endif
|
||||
|
||||
var lines = getline(1, min([line("$"), 5]))
|
||||
|
||||
if match(lines, ft_visual_basic_content) > -1
|
||||
@@ -367,75 +301,35 @@ export def FTfrm()
|
||||
endif
|
||||
enddef
|
||||
|
||||
# Distinguish between Forth and F#
|
||||
# Distinguish between Forth and F#.
|
||||
# Provided by Doug Kearns.
|
||||
export def FTfs()
|
||||
if exists("g:filetype_fs")
|
||||
exe "setf " .. g:filetype_fs
|
||||
elseif IsForth()
|
||||
setf forth
|
||||
else
|
||||
setf fsharp
|
||||
endif
|
||||
enddef
|
||||
|
||||
# Recursively search for Hare source files in a directory and any
|
||||
# subdirectories, up to a given depth.
|
||||
def IsHareModule(dir: string, depth: number): bool
|
||||
if depth <= 0
|
||||
return !empty(glob(dir .. '/*.ha'))
|
||||
endif
|
||||
|
||||
return reduce(sort(glob(dir .. '/*', true, true),
|
||||
(a, b) => isdirectory(a) - isdirectory(b)),
|
||||
(acc, n) => acc
|
||||
|| n =~ '\.ha$'
|
||||
|| isdirectory(n)
|
||||
&& IsHareModule(n, depth - 1),
|
||||
false)
|
||||
enddef
|
||||
|
||||
# Determine if a README file exists within a Hare module and should be given the
|
||||
# Haredoc filetype.
|
||||
export def FTharedoc()
|
||||
if exists('g:filetype_haredoc')
|
||||
if IsHareModule('<afile>:h', get(g:, 'haredoc_search_depth', 1))
|
||||
setf haredoc
|
||||
var line = getline(nextnonblank(1))
|
||||
# comments and colon definitions
|
||||
if line =~ '^\s*\.\=( ' || line =~ '^\s*\\G\= ' || line =~ '^\\$'
|
||||
\ || line =~ '^\s*: \S'
|
||||
setf forth
|
||||
else
|
||||
setf fsharp
|
||||
endif
|
||||
endif
|
||||
enddef
|
||||
|
||||
# Distinguish between HTML, XHTML, Django and Angular
|
||||
# Distinguish between HTML, XHTML and Django
|
||||
export def FThtml()
|
||||
var n = 1
|
||||
|
||||
# Test if the filename follows the Angular component template convention
|
||||
# Disabled for the reasons mentioned here: #13594
|
||||
# if expand('%:t') =~ '^.*\.component\.html$'
|
||||
# setf htmlangular
|
||||
# return
|
||||
# endif
|
||||
|
||||
while n < 40 && n <= line("$")
|
||||
# Check for Angular
|
||||
if getline(n) =~ '@\(if\|for\|defer\|switch\)\|\*\(ngIf\|ngFor\|ngSwitch\|ngTemplateOutlet\)\|ng-template\|ng-content\|{{.*}}'
|
||||
setf htmlangular
|
||||
return
|
||||
endif
|
||||
# Check for XHTML
|
||||
while n < 10 && n <= line("$")
|
||||
if getline(n) =~ '\<DTD\s\+XHTML\s'
|
||||
setf xhtml
|
||||
return
|
||||
endif
|
||||
# Check for Django
|
||||
if getline(n) =~ '{%\s*\(autoescape\|block\|comment\|csrf_token\|cycle\|debug\|extends\|filter\|firstof\|for\|if\|ifchanged\|include\|load\|lorem\|now\|query_string\|regroup\|resetcycle\|spaceless\|templatetag\|url\|verbatim\|widthratio\|with\)\>\|{#\s\+'
|
||||
if getline(n) =~ '{%\s*\(extends\|block\|load\)\>\|{#\s\+'
|
||||
setf htmldjango
|
||||
return
|
||||
endif
|
||||
# Check for SuperHTML
|
||||
if getline(n) =~ '<extend\|<super>'
|
||||
setf superhtml
|
||||
return
|
||||
endif
|
||||
n += 1
|
||||
endwhile
|
||||
setf FALLBACK html
|
||||
@@ -454,24 +348,20 @@ export def FTidl()
|
||||
setf idl
|
||||
enddef
|
||||
|
||||
# Distinguish between "default", Prolog, zsh module's C and Cproto prototype file.
|
||||
# Distinguish between "default", Prolog and Cproto prototype file.
|
||||
export def ProtoCheck(default: string)
|
||||
# zsh modules use '#include "*.pro"'
|
||||
# https://github.com/zsh-users/zsh/blob/63f086d167960a27ecdbcb762179e2c2bf8a29f5/Src/Modules/example.c#L31
|
||||
if getline(1) =~ '/* Generated automatically */'
|
||||
setf c
|
||||
# Cproto files have a comment in the first line and a function prototype in
|
||||
# the second line, it always ends in ";". Indent files may also have
|
||||
# comments, thus we can't match comments to see the difference.
|
||||
# IDL files can have a single ';' in the second line, require at least one
|
||||
# chacter before the ';'.
|
||||
elseif getline(2) =~ '.;$'
|
||||
if getline(2) =~ '.;$'
|
||||
setf cpp
|
||||
else
|
||||
# recognize Prolog by specific text in the first non-empty line
|
||||
# require a blank after the '%' because Perl uses "%list" and "%translate"
|
||||
var lnum = getline(nextnonblank(1))
|
||||
if lnum =~ '\<prolog\>' || lnum =~ prolog_pattern
|
||||
var l = getline(nextnonblank(1))
|
||||
if l =~ '\<prolog\>' || l =~ '^\s*\(%\+\(\s\|$\)\|/\*\)' || l =~ ':-'
|
||||
setf prolog
|
||||
else
|
||||
exe 'setf ' .. default
|
||||
@@ -536,25 +426,6 @@ export def FTm()
|
||||
endif
|
||||
enddef
|
||||
|
||||
export def FTmake()
|
||||
# Check if it is a Microsoft Makefile
|
||||
unlet! b:make_microsoft
|
||||
var n = 1
|
||||
while n < 1000 && n <= line('$')
|
||||
var line = getline(n)
|
||||
if line =~? '^\s*!\s*\(ifn\=\(def\)\=\|include\|message\|error\)\>'
|
||||
b:make_microsoft = 1
|
||||
break
|
||||
elseif line =~ '^ *ifn\=\(eq\|def\)\>' || line =~ '^ *[-s]\=include\s'
|
||||
break
|
||||
elseif line =~ '^ *\w\+\s*[!?:+]='
|
||||
break
|
||||
endif
|
||||
n += 1
|
||||
endwhile
|
||||
setf make
|
||||
enddef
|
||||
|
||||
export def FTmms()
|
||||
var n = 1
|
||||
while n < 20
|
||||
@@ -597,65 +468,28 @@ enddef
|
||||
|
||||
# Returns true if file content looks like LambdaProlog module
|
||||
def IsLProlog(): bool
|
||||
# skip apparent comments and blank lines, what looks like
|
||||
# skip apparent comments and blank lines, what looks like
|
||||
# LambdaProlog comment may be RAPID header
|
||||
var lnum: number = nextnonblank(1)
|
||||
while lnum > 0 && lnum < line('$') && getline(lnum) =~ '^\s*%' # LambdaProlog comment
|
||||
lnum = nextnonblank(lnum + 1)
|
||||
var l: number = nextnonblank(1)
|
||||
while l > 0 && l < line('$') && getline(l) =~ '^\s*%' # LambdaProlog comment
|
||||
l = nextnonblank(l + 1)
|
||||
endwhile
|
||||
# this pattern must not catch a go.mod file
|
||||
return getline(lnum) =~ '\<module\s\+\w\+\s*\.\s*\(%\|$\)'
|
||||
enddef
|
||||
|
||||
def IsModula2(): bool
|
||||
return getline(nextnonblank(1)) =~ '\<MODULE\s\+\w\+\s*\%(\[.*]\s*\)\=;\|^\s*(\*'
|
||||
enddef
|
||||
|
||||
def SetFiletypeModula2()
|
||||
const KNOWN_DIALECTS = ["iso", "pim", "r10"]
|
||||
const KNOWN_EXTENSIONS = ["gm2"]
|
||||
const LINE_COUNT = 200
|
||||
const TAG = '(\*!m2\(\w\+\)\%(+\(\w\+\)\)\=\*)'
|
||||
|
||||
var dialect = get(g:, "modula2_default_dialect", "pim")
|
||||
var extension = get(g:, "modula2_default_extension", "")
|
||||
|
||||
var matches = []
|
||||
|
||||
# ignore unknown dialects or badly formatted tags
|
||||
for lnum in range(1, min([line("$"), LINE_COUNT]))
|
||||
matches = matchlist(getline(lnum), TAG)
|
||||
if !empty(matches)
|
||||
if index(KNOWN_DIALECTS, matches[1]) >= 0
|
||||
dialect = matches[1]
|
||||
endif
|
||||
if index(KNOWN_EXTENSIONS, matches[2]) >= 0
|
||||
extension = matches[2]
|
||||
endif
|
||||
break
|
||||
endif
|
||||
endfor
|
||||
|
||||
modula2#SetDialect(dialect, extension)
|
||||
|
||||
setf modula2
|
||||
return getline(l) =~ '\<module\s\+\w\+\s*\.\s*\(%\|$\)'
|
||||
enddef
|
||||
|
||||
# Determine if *.mod is ABB RAPID, LambdaProlog, Modula-2, Modsim III or go.mod
|
||||
export def FTmod()
|
||||
if get(g:, "filetype_mod", "") == "modula2" || IsModula2()
|
||||
SetFiletypeModula2()
|
||||
return
|
||||
endif
|
||||
|
||||
if exists("g:filetype_mod")
|
||||
exe "setf " .. g:filetype_mod
|
||||
elseif expand("<afile>") =~ '\<go.mod$'
|
||||
setf gomod
|
||||
elseif IsLProlog()
|
||||
setf lprolog
|
||||
elseif getline(nextnonblank(1)) =~ '\%(\<MODULE\s\+\w\+\s*;\|^\s*(\*\)'
|
||||
setf modula2
|
||||
elseif IsRapid()
|
||||
setf rapid
|
||||
elseif expand("<afile>") =~ '\<go.mod$'
|
||||
setf gomod
|
||||
else
|
||||
# Nothing recognized, assume modsim3
|
||||
setf modsim3
|
||||
@@ -668,8 +502,8 @@ export def FTpl()
|
||||
else
|
||||
# recognize Prolog by specific text in the first non-empty line
|
||||
# require a blank after the '%' because Perl uses "%list" and "%translate"
|
||||
var line = getline(nextnonblank(1))
|
||||
if line =~ '\<prolog\>' || line =~ prolog_pattern
|
||||
var l = getline(nextnonblank(1))
|
||||
if l =~ '\<prolog\>' || l =~ '^\s*\(%\+\(\s\|$\)\|/\*\)' || l =~ ':-'
|
||||
setf prolog
|
||||
else
|
||||
setf perl
|
||||
@@ -717,27 +551,23 @@ export def FTprogress_cweb()
|
||||
endif
|
||||
enddef
|
||||
|
||||
# These include the leading '%' sign
|
||||
var ft_swig_keywords = '^\s*%\%(addmethods\|apply\|beginfile\|clear\|constant\|define\|echo\|enddef\|endoffile\|extend\|feature\|fragment\|ignore\|import\|importfile\|include\|includefile\|inline\|insert\|keyword\|module\|name\|namewarn\|native\|newobject\|parms\|pragma\|rename\|template\|typedef\|typemap\|types\|varargs\|warn\)'
|
||||
# This is the start/end of a block that is copied literally to the processor file (C/C++)
|
||||
var ft_swig_verbatim_block_start = '^\s*%{'
|
||||
|
||||
export def FTi()
|
||||
export def FTprogress_asm()
|
||||
if exists("g:filetype_i")
|
||||
exe "setf " .. g:filetype_i
|
||||
return
|
||||
endif
|
||||
# This function checks for an assembly comment or a SWIG keyword or verbatim block in the first 50 lines.
|
||||
# This function checks for an assembly comment the first ten lines.
|
||||
# If not found, assume Progress.
|
||||
var lnum = 1
|
||||
while lnum <= 50 && lnum < line('$')
|
||||
while lnum <= 10 && lnum < line('$')
|
||||
var line = getline(lnum)
|
||||
if line =~ '^\s*;' || line =~ '^\*'
|
||||
FTasm()
|
||||
return
|
||||
elseif line =~ ft_swig_keywords || line =~ ft_swig_verbatim_block_start
|
||||
setf swig
|
||||
return
|
||||
elseif line !~ '^\s*$' || line =~ '^/\*'
|
||||
# Not an empty line: Doesn't look like valid assembly code.
|
||||
# Or it looks like a Progress /* comment
|
||||
break
|
||||
endif
|
||||
lnum += 1
|
||||
endwhile
|
||||
@@ -846,24 +676,26 @@ export def McSetf()
|
||||
enddef
|
||||
|
||||
# Called from filetype.vim and scripts.vim.
|
||||
# When "setft" is passed and false then the 'filetype' option is not set.
|
||||
export def SetFileTypeSH(name: string, setft = true): string
|
||||
if setft && did_filetype()
|
||||
export def SetFileTypeSH(name: string)
|
||||
if did_filetype()
|
||||
# Filetype was already detected
|
||||
return ''
|
||||
return
|
||||
endif
|
||||
if setft && expand("<amatch>") =~ g:ft_ignore_pat
|
||||
return ''
|
||||
if expand("<amatch>") =~ g:ft_ignore_pat
|
||||
return
|
||||
endif
|
||||
if name =~ '\<csh\>'
|
||||
# Some .sh scripts contain #!/bin/csh.
|
||||
return SetFileTypeShell("csh", setft)
|
||||
SetFileTypeShell("csh")
|
||||
return
|
||||
elseif name =~ '\<tcsh\>'
|
||||
# Some .sh scripts contain #!/bin/tcsh.
|
||||
return SetFileTypeShell("tcsh", setft)
|
||||
SetFileTypeShell("tcsh")
|
||||
return
|
||||
elseif name =~ '\<zsh\>'
|
||||
# Some .sh scripts contain #!/bin/zsh.
|
||||
return SetFileTypeShell("zsh", setft)
|
||||
SetFileTypeShell("zsh")
|
||||
return
|
||||
elseif name =~ '\<ksh\>'
|
||||
b:is_kornshell = 1
|
||||
if exists("b:is_bash")
|
||||
@@ -890,43 +722,34 @@ export def SetFileTypeSH(name: string, setft = true): string
|
||||
unlet b:is_bash
|
||||
endif
|
||||
endif
|
||||
|
||||
return SetFileTypeShell("sh", setft)
|
||||
SetFileTypeShell("sh")
|
||||
enddef
|
||||
|
||||
# For shell-like file types, check for an "exec" command hidden in a comment,
|
||||
# as used for Tcl.
|
||||
# When "setft" is passed and false then the 'filetype' option is not set.
|
||||
# Also called from scripts.vim, thus can't be local to this script.
|
||||
export def SetFileTypeShell(name: string, setft = true): string
|
||||
if setft && did_filetype()
|
||||
export def SetFileTypeShell(name: string)
|
||||
if did_filetype()
|
||||
# Filetype was already detected
|
||||
return ''
|
||||
return
|
||||
endif
|
||||
if setft && expand("<amatch>") =~ g:ft_ignore_pat
|
||||
return ''
|
||||
if expand("<amatch>") =~ g:ft_ignore_pat
|
||||
return
|
||||
endif
|
||||
|
||||
var lnum = 2
|
||||
while lnum < 20 && lnum < line("$") && getline(lnum) =~ '^\s*\(#\|$\)'
|
||||
var l = 2
|
||||
while l < 20 && l < line("$") && getline(l) =~ '^\s*\(#\|$\)'
|
||||
# Skip empty and comment lines.
|
||||
lnum += 1
|
||||
l += 1
|
||||
endwhile
|
||||
if lnum < line("$") && getline(lnum) =~ '\s*exec\s' && getline(lnum - 1) =~ '^\s*#.*\\$'
|
||||
if l < line("$") && getline(l) =~ '\s*exec\s' && getline(l - 1) =~ '^\s*#.*\\$'
|
||||
# Found an "exec" line after a comment with continuation
|
||||
var n = substitute(getline(lnum), '\s*exec\s\+\([^ ]*/\)\=', '', '')
|
||||
var n = substitute(getline(l), '\s*exec\s\+\([^ ]*/\)\=', '', '')
|
||||
if n =~ '\<tclsh\|\<wish'
|
||||
if setft
|
||||
setf tcl
|
||||
endif
|
||||
return 'tcl'
|
||||
setf tcl
|
||||
return
|
||||
endif
|
||||
endif
|
||||
|
||||
if setft
|
||||
exe "setf " .. name
|
||||
endif
|
||||
return name
|
||||
exe "setf " .. name
|
||||
enddef
|
||||
|
||||
export def CSH()
|
||||
@@ -1281,159 +1104,5 @@ export def FTlsl()
|
||||
endif
|
||||
enddef
|
||||
|
||||
export def FTtyp()
|
||||
if exists("g:filetype_typ")
|
||||
exe "setf " .. g:filetype_typ
|
||||
return
|
||||
endif
|
||||
|
||||
# Look for SQL type definition syntax
|
||||
for line in getline(1, 200)
|
||||
# SQL type files may define the casing
|
||||
if line =~ '^CASE\s\==\s\=\(SAME\|LOWER\|UPPER\|OPPOSITE\)$'
|
||||
setf sql
|
||||
return
|
||||
endif
|
||||
|
||||
# SQL type files may define some types as follows
|
||||
if line =~ '^TYPE\s.*$'
|
||||
setf sql
|
||||
return
|
||||
endif
|
||||
endfor
|
||||
|
||||
# Otherwise, affect the typst filetype
|
||||
setf typst
|
||||
enddef
|
||||
|
||||
# Detect Microsoft Developer Studio Project files (Makefile) or Faust DSP
|
||||
# files.
|
||||
export def FTdsp()
|
||||
if exists("g:filetype_dsp")
|
||||
exe "setf " .. g:filetype_dsp
|
||||
return
|
||||
endif
|
||||
|
||||
# Test the filename
|
||||
if expand('%:t') =~ '^[mM]akefile.*$'
|
||||
setf make
|
||||
return
|
||||
endif
|
||||
|
||||
# Test the file contents
|
||||
for line in getline(1, 200)
|
||||
# Chech for comment style
|
||||
if line =~ '^#.*'
|
||||
setf make
|
||||
return
|
||||
endif
|
||||
|
||||
# Check for common lines
|
||||
if line =~ '^.*Microsoft Developer Studio Project File.*$'
|
||||
setf make
|
||||
return
|
||||
endif
|
||||
|
||||
if line =~ '^!MESSAGE This is not a valid makefile\..+$'
|
||||
setf make
|
||||
return
|
||||
endif
|
||||
|
||||
# Check for keywords
|
||||
if line =~ '^!(IF,ELSEIF,ENDIF).*$'
|
||||
setf make
|
||||
return
|
||||
endif
|
||||
|
||||
# Check for common assignments
|
||||
if line =~ '^SOURCE=.*$'
|
||||
setf make
|
||||
return
|
||||
endif
|
||||
endfor
|
||||
|
||||
# Otherwise, assume we have a Faust file
|
||||
setf faust
|
||||
enddef
|
||||
|
||||
# Set the filetype of a *.v file to Verilog, V or Cog based on the first 200
|
||||
# lines.
|
||||
export def FTv()
|
||||
if did_filetype()
|
||||
# ":setf" will do nothing, bail out early
|
||||
return
|
||||
endif
|
||||
if exists("g:filetype_v")
|
||||
exe "setf " .. g:filetype_v
|
||||
return
|
||||
endif
|
||||
|
||||
var in_comment = 0
|
||||
for lnum in range(1, min([line("$"), 200]))
|
||||
var line = getline(lnum)
|
||||
# Skip Verilog and V comments (lines and blocks).
|
||||
if line =~ '^\s*/\*'
|
||||
# start comment block
|
||||
in_comment = 1
|
||||
endif
|
||||
if in_comment == 1
|
||||
if line =~ '\*/'
|
||||
# end comment block
|
||||
in_comment = 0
|
||||
endif
|
||||
# skip comment-block line
|
||||
continue
|
||||
endif
|
||||
if line =~ '^\s*//'
|
||||
# skip comment line
|
||||
continue
|
||||
endif
|
||||
|
||||
# Coq: line ends with a '.' followed by an optional variable number of
|
||||
# spaces or contains the start of a comment, but not inside a Verilog or V
|
||||
# comment.
|
||||
# Example: "Definition x := 10. (*".
|
||||
if (line =~ '\.\s*$' && line !~ '/[/*]') || (line =~ '(\*' && line !~ '/[/*].*(\*')
|
||||
setf coq
|
||||
return
|
||||
endif
|
||||
|
||||
# Verilog: line ends with ';' followed by an optional variable number of
|
||||
# spaces and an optional start of a comment.
|
||||
# Example: " b <= a + 1; // Add 1".
|
||||
if line =~ ';\s*\(/[/*].*\)\?$'
|
||||
setf verilog
|
||||
return
|
||||
endif
|
||||
endfor
|
||||
|
||||
# No line matched, fall back to "v".
|
||||
setf v
|
||||
enddef
|
||||
|
||||
export def FTvba()
|
||||
if getline(1) =~ '^["#] Vimball Archiver'
|
||||
setf vim
|
||||
else
|
||||
setf vb
|
||||
endif
|
||||
enddef
|
||||
|
||||
export def Detect_UCI_statements(): bool
|
||||
# Match a config or package statement at the start of the line.
|
||||
const config_or_package_statement = '^\s*\(\(c\|config\)\|\(p\|package\)\)\s\+\S'
|
||||
# Match a line that is either all blank or blank followed by a comment
|
||||
const comment_or_blank = '^\s*\(#.*\)\?$'
|
||||
|
||||
# Return true iff the file has a config or package statement near the
|
||||
# top of the file and all preceding lines were comments or blank.
|
||||
return getline(1) =~# config_or_package_statement
|
||||
\ || getline(1) =~# comment_or_blank
|
||||
\ && ( getline(2) =~# config_or_package_statement
|
||||
\ || getline(2) =~# comment_or_blank
|
||||
\ && getline(3) =~# config_or_package_statement
|
||||
\ )
|
||||
enddef
|
||||
|
||||
# Uncomment this line to check for compilation errors early
|
||||
# defcompile
|
||||
|
||||
Vendored
-182
@@ -1,182 +0,0 @@
|
||||
vim9script
|
||||
|
||||
# Maintainer: Maxim Kim <habamax@gmail.com>
|
||||
# Last update: 2023-12-10
|
||||
#
|
||||
# Set of functions to format/beautify JSON data structures.
|
||||
#
|
||||
# Could be used to reformat a minified json in a buffer (put it into ~/.vim/ftplugin/json.vim):
|
||||
# import autoload 'dist/json.vim'
|
||||
# setl formatexpr=json.FormatExpr()
|
||||
#
|
||||
# Or to get a formatted string out of vim's dict/list/string:
|
||||
# vim9script
|
||||
# import autoload 'dist/json.vim'
|
||||
# echo json.Format({
|
||||
# "widget": { "debug": "on", "window": { "title": "Sample \"Konfabulator\" Widget",
|
||||
# "name": "main_window", "width": 500, "height": 500
|
||||
# },
|
||||
# "image": { "src": "Images/Sun.png", "name": "sun1", "hOffset": 250,
|
||||
# "vOffset": 250, "alignment": "center" },
|
||||
# "text": { "data": "Click Here", "size": 36, "style": "bold", "name": "text1",
|
||||
# "hOffset": 250, "vOffset": 100, "alignment": "center",
|
||||
# "onMouseUp": "sun1.opacity = (sun1.opacity / 100) * 90;" } }
|
||||
# })
|
||||
#
|
||||
# Should output:
|
||||
# {
|
||||
# "widget": {
|
||||
# "debug": "on",
|
||||
# "window": {
|
||||
# "title": "Sample \"Konfabulator\" Widget",
|
||||
# "name": "main_window",
|
||||
# "width": 500,
|
||||
# "height": 500
|
||||
# },
|
||||
# "image": {
|
||||
# "src": "Images/Sun.png",
|
||||
# "name": "sun1",
|
||||
# "hOffset": 250,
|
||||
# "vOffset": 250,
|
||||
# "alignment": "center"
|
||||
# },
|
||||
# "text": {
|
||||
# "data": "Click Here",
|
||||
# "size": 36,
|
||||
# "style": "bold",
|
||||
# "name": "text1",
|
||||
# "hOffset": 250,
|
||||
# "vOffset": 100,
|
||||
# "alignment": "center",
|
||||
# "onMouseUp": "sun1.opacity = (sun1.opacity / 100) * 90;"
|
||||
# }
|
||||
# }
|
||||
# }
|
||||
#
|
||||
# NOTE: order of `key: value` pairs is not kept.
|
||||
#
|
||||
# You can also use a JSON string instead of vim's dict/list to maintain order:
|
||||
# echo json.Format('{"hello": 1, "world": 2}')
|
||||
# {
|
||||
# "hello": 1,
|
||||
# "world": 2
|
||||
# }
|
||||
|
||||
|
||||
# To be able to reformat with `gq` add following to `~/.vim/ftplugin/json.vim`:
|
||||
# import autoload 'dist/json.vim'
|
||||
# setl formatexpr=json.FormatExpr()
|
||||
export def FormatExpr(): number
|
||||
FormatRange(v:lnum, v:lnum + v:count - 1)
|
||||
return 0
|
||||
enddef
|
||||
|
||||
|
||||
# import autoload 'dist/json.vim'
|
||||
# command -range=% JSONFormat json.FormatRange(<line1>, <line2>)
|
||||
export def FormatRange(line1: number, line2: number)
|
||||
var indent_base = matchstr(getline(line1), '^\s*')
|
||||
var indent = &expandtab ? repeat(' ', &shiftwidth) : "\t"
|
||||
|
||||
var [l1, l2] = line1 > line2 ? [line2, line1] : [line1, line2]
|
||||
|
||||
var json_src = getline(l1, l2)->join()
|
||||
var json_fmt = Format(json_src, {use_tabs: !&et, indent: &sw, indent_base: indent_base})->split("\n")
|
||||
|
||||
exe $":{l1},{l2}d"
|
||||
|
||||
if line('$') == 1 && getline(1) == ''
|
||||
setline(l1, json_fmt[0])
|
||||
append(l1, json_fmt[1 : ])
|
||||
else
|
||||
append(l1 - 1, json_fmt)
|
||||
endif
|
||||
enddef
|
||||
|
||||
|
||||
# Format JSON string or dict/list as JSON
|
||||
# import autoload 'dist/json.vim'
|
||||
# echo json.Format('{"hello": "world"}', {use_tabs: false, indent: 2, indent_base: 0})
|
||||
|
||||
# {
|
||||
# "hello": "world"
|
||||
# }
|
||||
|
||||
# echo json.Format({'hello': 'world'}, {use_tabs: false, indent: 2, indent_base: 0})
|
||||
# {
|
||||
# "hello": "world"
|
||||
# }
|
||||
#
|
||||
# Note, when `obj` is dict, order of the `key: value` pairs might be different:
|
||||
# echo json.Format({'hello': 1, 'world': 2})
|
||||
# {
|
||||
# "world": 2,
|
||||
# "hello": 1
|
||||
# }
|
||||
export def Format(obj: any, params: dict<any> = {}): string
|
||||
var obj_str = ''
|
||||
if type(obj) == v:t_string
|
||||
obj_str = obj
|
||||
else
|
||||
obj_str = json_encode(obj)
|
||||
endif
|
||||
|
||||
var indent_lvl = 0
|
||||
var indent_base = get(params, "indent_base", "")
|
||||
var indent = get(params, "use_tabs", false) ? "\t" : repeat(' ', get(params, "indent", 2))
|
||||
var json_line = indent_base
|
||||
var json = ""
|
||||
var state = ""
|
||||
for char in obj_str
|
||||
if state == ""
|
||||
if char =~ '[{\[]'
|
||||
json_line ..= char
|
||||
json ..= json_line .. "\n"
|
||||
indent_lvl += 1
|
||||
json_line = indent_base .. repeat(indent, indent_lvl)
|
||||
elseif char =~ '[}\]]'
|
||||
if json_line !~ '^\s*$'
|
||||
json ..= json_line .. "\n"
|
||||
indent_lvl -= 1
|
||||
if indent_lvl < 0
|
||||
json_line = strpart(indent_base, -indent_lvl * len(indent))
|
||||
else
|
||||
json_line = indent_base .. repeat(indent, indent_lvl)
|
||||
endif
|
||||
elseif json =~ '[{\[]\n$'
|
||||
json = json[ : -2]
|
||||
json_line = substitute(json_line, '^\s*', '', '')
|
||||
indent_lvl -= 1
|
||||
endif
|
||||
json_line ..= char
|
||||
elseif char == ':'
|
||||
json_line ..= char .. ' '
|
||||
elseif char == '"'
|
||||
json_line ..= char
|
||||
state = 'QUOTE'
|
||||
elseif char == ','
|
||||
json_line ..= char
|
||||
json ..= json_line .. "\n"
|
||||
json_line = indent_base .. repeat(indent, indent_lvl)
|
||||
elseif char !~ '\s'
|
||||
json_line ..= char
|
||||
endif
|
||||
elseif state == "QUOTE"
|
||||
json_line ..= char
|
||||
if char == '\'
|
||||
state = "ESCAPE"
|
||||
elseif char == '"'
|
||||
state = ""
|
||||
endif
|
||||
elseif state == "ESCAPE"
|
||||
state = "QUOTE"
|
||||
json_line ..= char
|
||||
else
|
||||
json_line ..= char
|
||||
endif
|
||||
endfor
|
||||
if json_line !~ '^\s*$'
|
||||
json ..= json_line .. "\n"
|
||||
endif
|
||||
return json
|
||||
enddef
|
||||
Vendored
+29
-86
@@ -1,10 +1,9 @@
|
||||
" Vim filetype plugin autoload file
|
||||
" Language: man
|
||||
" Maintainer: Jason Franklin <jason@oneway.dev>
|
||||
" Maintainer: Jason Franklin <vim@justemail.net>
|
||||
" Maintainer: SungHyun Nam <goweol@gmail.com>
|
||||
" Autoload Split: Bram Moolenaar
|
||||
" Last Change: 2024 Jan 17 (make it work on AIX, see #13847)
|
||||
" 2024 Jul 06 (honor command modifiers, #15117)
|
||||
" Last Change: 2022 Jun 18
|
||||
|
||||
let s:cpo_save = &cpo
|
||||
set cpo-=C
|
||||
@@ -14,85 +13,39 @@ let s:man_tag_depth = 0
|
||||
let s:man_sect_arg = ""
|
||||
let s:man_find_arg = "-w"
|
||||
try
|
||||
if !has("win32") && $OSTYPE !~ 'cygwin\|linux'
|
||||
" cache the value
|
||||
let uname_s = system('uname -s')
|
||||
|
||||
if uname_s =~ "SunOS" && system('uname -r') =~ "^5"
|
||||
" Special Case for Man on SunOS
|
||||
let s:man_sect_arg = "-s"
|
||||
let s:man_find_arg = "-l"
|
||||
elseif uname_s =~? 'AIX'
|
||||
" Special Case for Man on AIX
|
||||
let s:man_sect_arg = ""
|
||||
let s:man_find_arg = ""
|
||||
endif
|
||||
if !has("win32") && $OSTYPE !~ 'cygwin\|linux' && system('uname -s') =~ "SunOS" && system('uname -r') =~ "^5"
|
||||
let s:man_sect_arg = "-s"
|
||||
let s:man_find_arg = "-l"
|
||||
endif
|
||||
catch /E145:/
|
||||
" Ignore the error in restricted mode
|
||||
endtry
|
||||
|
||||
unlet! uname_s
|
||||
|
||||
func s:ParseIntoPageAndSection()
|
||||
" Accommodate a reference that terminates in a hyphen.
|
||||
"
|
||||
" See init_charset_table() at
|
||||
" https://git.savannah.gnu.org/cgit/groff.git/tree/src/roff/troff/input.cpp?h=1.22.4#n6794
|
||||
"
|
||||
" See can_break_after() at
|
||||
" https://git.savannah.gnu.org/cgit/groff.git/tree/src/roff/troff/charinfo.h?h=1.22.4#n140
|
||||
"
|
||||
" Assumptions and limitations:
|
||||
" 1) Manual-page references (in consequence of command-related filenames)
|
||||
" do not contain non-ASCII HYPHENs (0x2010), any terminating HYPHEN
|
||||
" must have been introduced to mark division of a word at the end of
|
||||
" a line and can be discarded; whereas similar references may contain
|
||||
" ASCII HYPHEN-MINUSes (0x002d) and any terminating HYPHEN-MINUS forms
|
||||
" a compound word in addition to marking word division.
|
||||
" 2) Well-formed manual-page references always have a section suffix, e.g.
|
||||
" "git-commit(1)", therefore suspended hyphenated compounds are not
|
||||
" determined, e.g. [V] (With cursor at _git-merge-_ below...)
|
||||
" ".................... git-merge- and git-merge-base. (See git-cherry-
|
||||
" pick(1) and git-cherry(1).)" (... look up "git-merge-pick(1)".)
|
||||
"
|
||||
" Note that EM DASH (0x2014), a third stooge from init_charset_table(),
|
||||
" neither connects nor divides parts of a word.
|
||||
let str = expand("<cWORD>")
|
||||
|
||||
if str =~ '\%u2010$' " HYPHEN (-1).
|
||||
let str = strpart(str, 0, strridx(str, "\u2010"))
|
||||
|
||||
" Append the leftmost WORD (or an empty string) from the line below.
|
||||
let str .= get(split(get(getbufline(bufnr('%'), line('.') + 1), 0, '')), 0, '')
|
||||
elseif str =~ '-$' " HYPHEN-MINUS.
|
||||
" Append the leftmost WORD (or an empty string) from the line below.
|
||||
let str .= get(split(get(getbufline(bufnr('%'), line('.') + 1), 0, '')), 0, '')
|
||||
endif
|
||||
|
||||
" According to man(1), section name formats vary (MANSECT):
|
||||
" 1 n l 8 3 2 3posix 3pm 3perl 3am 5 4 9 6 7
|
||||
let parts = matchlist(str, '\(\k\+\)(\(\k\+\))')
|
||||
return (len(parts) > 2)
|
||||
\ ? {'page': parts[1], 'section': parts[2]}
|
||||
\ : {'page': matchstr(str, '\k\+'), 'section': ''}
|
||||
endfunc
|
||||
|
||||
func dist#man#PreGetPage(cnt)
|
||||
if a:cnt == 0
|
||||
let what = s:ParseIntoPageAndSection()
|
||||
let sect = what.section
|
||||
let page = what.page
|
||||
let old_isk = &iskeyword
|
||||
if &ft == 'man'
|
||||
setl iskeyword+=(,)
|
||||
endif
|
||||
let str = expand("<cword>")
|
||||
let &l:iskeyword = old_isk
|
||||
let page = substitute(str, '(*\(\k\+\).*', '\1', '')
|
||||
let sect = substitute(str, '\(\k\+\)(\([^()]*\)).*', '\2', '')
|
||||
if match(sect, '^[0-9 ]\+$') == -1
|
||||
let sect = ""
|
||||
endif
|
||||
if sect == page
|
||||
let sect = ""
|
||||
endif
|
||||
else
|
||||
let what = s:ParseIntoPageAndSection()
|
||||
let sect = a:cnt
|
||||
let page = what.page
|
||||
let page = expand("<cword>")
|
||||
endif
|
||||
|
||||
call dist#man#GetPage('', sect, page)
|
||||
endfunc
|
||||
|
||||
func s:GetCmdArg(sect, page)
|
||||
|
||||
if empty(a:sect)
|
||||
return shellescape(a:page)
|
||||
endif
|
||||
@@ -122,11 +75,9 @@ func dist#man#GetPage(cmdmods, ...)
|
||||
return
|
||||
endif
|
||||
|
||||
" To support: nmap K :Man <cWORD><CR>
|
||||
if page ==? '<cword>'
|
||||
let what = s:ParseIntoPageAndSection()
|
||||
let sect = what.section
|
||||
let page = what.page
|
||||
" To support: nmap K :Man <cword>
|
||||
if page == '<cword>'
|
||||
let page = expand('<cword>')
|
||||
endif
|
||||
|
||||
if !exists('g:ft_man_no_sect_fallback') || (g:ft_man_no_sect_fallback == 0)
|
||||
@@ -166,9 +117,7 @@ func dist#man#GetPage(cmdmods, ...)
|
||||
endwhile
|
||||
endif
|
||||
if &filetype != "man"
|
||||
if a:cmdmods =~ '\<\(tab\|vertical\|horizontal\)\>'
|
||||
let open_cmd = a:cmdmods . ' split'
|
||||
elseif exists("g:ft_man_open_mode")
|
||||
if exists("g:ft_man_open_mode")
|
||||
if g:ft_man_open_mode == 'vert'
|
||||
let open_cmd = 'vsplit'
|
||||
elseif g:ft_man_open_mode == 'tab'
|
||||
@@ -177,7 +126,7 @@ func dist#man#GetPage(cmdmods, ...)
|
||||
let open_cmd = 'split'
|
||||
endif
|
||||
else
|
||||
let open_cmd = 'split'
|
||||
let open_cmd = a:cmdmods . ' split'
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
@@ -205,14 +154,9 @@ func dist#man#GetPage(cmdmods, ...)
|
||||
endif
|
||||
let env_cmd = s:env_has_u ? 'env -u MANPAGER' : 'env MANPAGER=cat'
|
||||
let env_cmd .= ' GROFF_NO_SGR=1'
|
||||
let man_cmd = env_cmd . ' man ' . s:GetCmdArg(sect, page)
|
||||
|
||||
let man_cmd = env_cmd . ' man ' . s:GetCmdArg(sect, page) . ' | col -b'
|
||||
silent exec "r !" . man_cmd
|
||||
|
||||
" Emulate piping the buffer through the "col -b" command.
|
||||
" Ref: https://github.com/vim/vim/issues/12301
|
||||
exe 'silent! keepjumps keeppatterns %s/\v(.)\b\ze\1?//e' .. (&gdefault ? '' : 'g')
|
||||
|
||||
if unsetwidth
|
||||
let $MANWIDTH = ''
|
||||
endif
|
||||
@@ -236,10 +180,9 @@ func dist#man#PopPage()
|
||||
exec "let s:man_tag_buf=s:man_tag_buf_".s:man_tag_depth
|
||||
exec "let s:man_tag_lin=s:man_tag_lin_".s:man_tag_depth
|
||||
exec "let s:man_tag_col=s:man_tag_col_".s:man_tag_depth
|
||||
|
||||
exec s:man_tag_buf."b"
|
||||
call cursor(s:man_tag_lin, s:man_tag_col)
|
||||
|
||||
exec s:man_tag_lin
|
||||
exec "norm! ".s:man_tag_col."|"
|
||||
exec "unlet s:man_tag_buf_".s:man_tag_depth
|
||||
exec "unlet s:man_tag_lin_".s:man_tag_depth
|
||||
exec "unlet s:man_tag_col_".s:man_tag_depth
|
||||
|
||||
Vendored
+87
-127
@@ -3,9 +3,8 @@ vim9script
|
||||
# Vim function for detecting a filetype from the file contents.
|
||||
# Invoked from "scripts.vim" in 'runtimepath'
|
||||
#
|
||||
# Maintainer: The Vim Project <https://github.com/vim/vim>
|
||||
# Last Change: 2023 Aug 10
|
||||
# Former Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
# Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
# Last Change: 2022 Nov 24
|
||||
|
||||
export def DetectFiletype()
|
||||
var line1 = getline(1)
|
||||
@@ -45,7 +44,7 @@ def DetectFromHashBang(firstline: string)
|
||||
elseif line1 =~ '^#!\s*[^/\\ ]*\>\([^/\\]\|$\)'
|
||||
name = substitute(line1, '^#!\s*\([^/\\ ]*\>\).*', '\1', '')
|
||||
else
|
||||
name = substitute(line1, '^#!\s*\S*[/\\]\(\f\+\).*', '\1', '')
|
||||
name = substitute(line1, '^#!\s*\S*[/\\]\(\i\+\).*', '\1', '')
|
||||
endif
|
||||
|
||||
# tcl scripts may have #!/bin/sh in the first line and "exec wish" in the
|
||||
@@ -54,188 +53,151 @@ def DetectFromHashBang(firstline: string)
|
||||
name = 'wish'
|
||||
endif
|
||||
|
||||
var ft = Exe2filetype(name, line1)
|
||||
if ft != ''
|
||||
exe 'setl ft=' .. ft
|
||||
endif
|
||||
enddef
|
||||
|
||||
# Returns the filetype name associated with program "name".
|
||||
# "line1" is the #! line at the top of the file. Use the same as "name" if
|
||||
# not available.
|
||||
# Returns an empty string when not recognized.
|
||||
export def Exe2filetype(name: string, line1: string): string
|
||||
# Bourne-like shell scripts: bash bash2 dash ksh ksh93 sh
|
||||
if name =~ '^\(bash\d*\|dash\|ksh\d*\|sh\)\>'
|
||||
return dist#ft#SetFileTypeSH(line1, false)
|
||||
call dist#ft#SetFileTypeSH(line1)
|
||||
|
||||
# csh scripts
|
||||
elseif name =~ '^csh\>'
|
||||
return dist#ft#SetFileTypeShell(exists("g:filetype_csh") ? g:filetype_csh : 'csh', false)
|
||||
if exists("g:filetype_csh")
|
||||
call dist#ft#SetFileTypeShell(g:filetype_csh)
|
||||
else
|
||||
call dist#ft#SetFileTypeShell("csh")
|
||||
endif
|
||||
|
||||
# tcsh scripts
|
||||
elseif name =~ '^tcsh\>'
|
||||
return dist#ft#SetFileTypeShell("tcsh", false)
|
||||
call dist#ft#SetFileTypeShell("tcsh")
|
||||
|
||||
# Z shell scripts
|
||||
elseif name =~ '^zsh\>'
|
||||
return 'zsh'
|
||||
set ft=zsh
|
||||
|
||||
# TCL scripts
|
||||
elseif name =~ '^\(tclsh\|wish\|expectk\|itclsh\|itkwish\)\>'
|
||||
return 'tcl'
|
||||
set ft=tcl
|
||||
|
||||
# Expect scripts
|
||||
elseif name =~ '^expect\>'
|
||||
return 'expect'
|
||||
set ft=expect
|
||||
|
||||
# Gnuplot scripts
|
||||
elseif name =~ '^gnuplot\>'
|
||||
return 'gnuplot'
|
||||
set ft=gnuplot
|
||||
|
||||
# Makefiles
|
||||
elseif name =~ 'make\>'
|
||||
return 'make'
|
||||
set ft=make
|
||||
|
||||
# Pike
|
||||
elseif name =~ '^pike\%(\>\|[0-9]\)'
|
||||
return 'pike'
|
||||
set ft=pike
|
||||
|
||||
# Lua
|
||||
elseif name =~ 'lua'
|
||||
return 'lua'
|
||||
set ft=lua
|
||||
|
||||
# Perl
|
||||
elseif name =~ 'perl'
|
||||
return 'perl'
|
||||
set ft=perl
|
||||
|
||||
# PHP
|
||||
elseif name =~ 'php'
|
||||
return 'php'
|
||||
set ft=php
|
||||
|
||||
# Python
|
||||
elseif name =~ 'python'
|
||||
return 'python'
|
||||
set ft=python
|
||||
|
||||
# Groovy
|
||||
elseif name =~ '^groovy\>'
|
||||
return 'groovy'
|
||||
set ft=groovy
|
||||
|
||||
# Raku
|
||||
elseif name =~ 'raku'
|
||||
return 'raku'
|
||||
set ft=raku
|
||||
|
||||
# Ruby
|
||||
elseif name =~ 'ruby'
|
||||
return 'ruby'
|
||||
set ft=ruby
|
||||
|
||||
# JavaScript
|
||||
elseif name =~ 'node\(js\)\=\>\|js\>' || name =~ 'rhino\>'
|
||||
return 'javascript'
|
||||
set ft=javascript
|
||||
|
||||
# BC calculator
|
||||
elseif name =~ '^bc\>'
|
||||
return 'bc'
|
||||
set ft=bc
|
||||
|
||||
# sed
|
||||
elseif name =~ 'sed\>'
|
||||
return 'sed'
|
||||
set ft=sed
|
||||
|
||||
# OCaml-scripts
|
||||
elseif name =~ 'ocaml'
|
||||
return 'ocaml'
|
||||
set ft=ocaml
|
||||
|
||||
# Awk scripts; also finds "gawk"
|
||||
elseif name =~ 'awk\>'
|
||||
return 'awk'
|
||||
set ft=awk
|
||||
|
||||
# Website MetaLanguage
|
||||
elseif name =~ 'wml'
|
||||
return 'wml'
|
||||
set ft=wml
|
||||
|
||||
# Scheme scripts
|
||||
elseif name =~ 'scheme'
|
||||
return 'scheme'
|
||||
set ft=scheme
|
||||
|
||||
# CFEngine scripts
|
||||
elseif name =~ 'cfengine'
|
||||
return 'cfengine'
|
||||
set ft=cfengine
|
||||
|
||||
# Erlang scripts
|
||||
elseif name =~ 'escript'
|
||||
return 'erlang'
|
||||
set ft=erlang
|
||||
|
||||
# Haskell
|
||||
elseif name =~ 'haskell'
|
||||
return 'haskell'
|
||||
set ft=haskell
|
||||
|
||||
# Scala
|
||||
elseif name =~ 'scala\>'
|
||||
return 'scala'
|
||||
set ft=scala
|
||||
|
||||
# Clojure
|
||||
elseif name =~ 'clojure'
|
||||
return 'clojure'
|
||||
set ft=clojure
|
||||
|
||||
# Free Pascal
|
||||
elseif name =~ 'instantfpc\>'
|
||||
return 'pascal'
|
||||
set ft=pascal
|
||||
|
||||
# Fennel
|
||||
elseif name =~ 'fennel\>'
|
||||
return 'fennel'
|
||||
set ft=fennel
|
||||
|
||||
# MikroTik RouterOS script
|
||||
elseif name =~ 'rsc\>'
|
||||
return 'routeros'
|
||||
set ft=routeros
|
||||
|
||||
# Fish shell
|
||||
elseif name =~ 'fish\>'
|
||||
return 'fish'
|
||||
set ft=fish
|
||||
|
||||
# Gforth
|
||||
elseif name =~ 'gforth\>'
|
||||
return 'forth'
|
||||
set ft=forth
|
||||
|
||||
# Icon
|
||||
elseif name =~ 'icon\>'
|
||||
return 'icon'
|
||||
set ft=icon
|
||||
|
||||
# Guile
|
||||
elseif name =~ 'guile'
|
||||
return 'scheme'
|
||||
|
||||
# Nix
|
||||
elseif name =~ 'nix-shell'
|
||||
return 'nix'
|
||||
|
||||
# Crystal
|
||||
elseif name =~ '^crystal\>'
|
||||
return 'crystal'
|
||||
|
||||
# Rexx
|
||||
elseif name =~ '^\%(rexx\|regina\)\>'
|
||||
return 'rexx'
|
||||
|
||||
# Janet
|
||||
elseif name =~ '^janet\>'
|
||||
return 'janet'
|
||||
|
||||
# Dart
|
||||
elseif name =~ '^dart\>'
|
||||
return 'dart'
|
||||
|
||||
# Execline (s6)
|
||||
elseif name =~ '^execlineb\>'
|
||||
return 'execline'
|
||||
|
||||
# Vim
|
||||
elseif name =~ '^vim\>'
|
||||
return 'vim'
|
||||
set ft=scheme
|
||||
|
||||
endif
|
||||
|
||||
return ''
|
||||
enddef
|
||||
|
||||
|
||||
@@ -256,28 +218,28 @@ def DetectFromText(line1: string)
|
||||
|| "\n" .. line1 .. "\n" .. line2 .. "\n" .. line3 ..
|
||||
"\n" .. line4 .. "\n" .. line5
|
||||
=~ '\n\s*emulate\s\+\%(-[LR]\s\+\)\=[ckz]\=sh\>'
|
||||
setl ft=zsh
|
||||
set ft=zsh
|
||||
|
||||
# ELM Mail files
|
||||
elseif line1 =~ '^From \([a-zA-Z][a-zA-Z_0-9\.=-]*\(@[^ ]*\)\=\|-\) .* \(19\|20\)\d\d$'
|
||||
setl ft=mail
|
||||
set ft=mail
|
||||
|
||||
# Mason
|
||||
elseif line1 =~ '^<[%&].*>'
|
||||
setl ft=mason
|
||||
set ft=mason
|
||||
|
||||
# Vim scripts (must have '" vim' as the first line to trigger this)
|
||||
elseif line1 =~ '^" *[vV]im$'
|
||||
setl ft=vim
|
||||
set ft=vim
|
||||
|
||||
# libcxx and libstdc++ standard library headers like "iostream" do not have
|
||||
# an extension, recognize the Emacs file mode.
|
||||
elseif line1 =~? '-\*-.*C++.*-\*-'
|
||||
setl ft=cpp
|
||||
set ft=cpp
|
||||
|
||||
# MOO
|
||||
elseif line1 =~ '^\*\* LambdaMOO Database, Format Version \%([1-3]\>\)\@!\d\+ \*\*$'
|
||||
setl ft=moo
|
||||
set ft=moo
|
||||
|
||||
# Diff file:
|
||||
# - "diff" in first line (context diff)
|
||||
@@ -296,11 +258,11 @@ def DetectFromText(line1: string)
|
||||
|| (line1 =~ '^\*\*\* ' && line2 =~ '^--- ')
|
||||
|| (line1 =~ '^=== ' && ((line2 =~ '^=\{66\}' && line3 =~ '^--- ' && line4 =~ '^+++') || (line2 =~ '^--- ' && line3 =~ '^+++ ')))
|
||||
|| (line1 =~ '^=== \(removed\|added\|renamed\|modified\)')
|
||||
setl ft=diff
|
||||
set ft=diff
|
||||
|
||||
# PostScript Files (must have %!PS as the first line, like a2ps output)
|
||||
elseif line1 =~ '^%![ \t]*PS'
|
||||
setl ft=postscr
|
||||
set ft=postscr
|
||||
|
||||
# M4 scripts: Guess there is a line that starts with "dnl".
|
||||
elseif line1 =~ '^\s*dnl\>'
|
||||
@@ -308,64 +270,64 @@ def DetectFromText(line1: string)
|
||||
|| line3 =~ '^\s*dnl\>'
|
||||
|| line4 =~ '^\s*dnl\>'
|
||||
|| line5 =~ '^\s*dnl\>'
|
||||
setl ft=m4
|
||||
set ft=m4
|
||||
|
||||
# AmigaDos scripts
|
||||
elseif $TERM == "amiga" && (line1 =~ "^;" || line1 =~? '^\.bra')
|
||||
setl ft=amiga
|
||||
set ft=amiga
|
||||
|
||||
# SiCAD scripts (must have procn or procd as the first line to trigger this)
|
||||
elseif line1 =~? '^ *proc[nd] *$'
|
||||
setl ft=sicad
|
||||
set ft=sicad
|
||||
|
||||
# Purify log files start with "**** Purify"
|
||||
elseif line1 =~ '^\*\*\*\* Purify'
|
||||
setl ft=purifylog
|
||||
set ft=purifylog
|
||||
|
||||
# XML
|
||||
elseif line1 =~ '<?\s*xml.*?>'
|
||||
setl ft=xml
|
||||
set ft=xml
|
||||
|
||||
# XHTML (e.g.: PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN")
|
||||
elseif line1 =~ '\<DTD\s\+XHTML\s'
|
||||
setl ft=xhtml
|
||||
set ft=xhtml
|
||||
|
||||
# HTML (e.g.: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN")
|
||||
# Avoid "doctype html", used by slim.
|
||||
elseif line1 =~? '<!DOCTYPE\s\+html\>'
|
||||
setl ft=html
|
||||
set ft=html
|
||||
|
||||
# PDF
|
||||
elseif line1 =~ '^%PDF-'
|
||||
setl ft=pdf
|
||||
set ft=pdf
|
||||
|
||||
# XXD output
|
||||
elseif line1 =~ '^\x\{7}: \x\{2} \=\x\{2} \=\x\{2} \=\x\{2} '
|
||||
setl ft=xxd
|
||||
set ft=xxd
|
||||
|
||||
# RCS/CVS log output
|
||||
elseif line1 =~ '^RCS file:' || line2 =~ '^RCS file:'
|
||||
setl ft=rcslog
|
||||
set ft=rcslog
|
||||
|
||||
# CVS commit
|
||||
elseif line2 =~ '^CVS:' || getline("$") =~ '^CVS: '
|
||||
setl ft=cvs
|
||||
set ft=cvs
|
||||
|
||||
# Prescribe
|
||||
elseif line1 =~ '^!R!'
|
||||
setl ft=prescribe
|
||||
set ft=prescribe
|
||||
|
||||
# Send-pr
|
||||
elseif line1 =~ '^SEND-PR:'
|
||||
setl ft=sendpr
|
||||
set ft=sendpr
|
||||
|
||||
# SNNS files
|
||||
elseif line1 =~ '^SNNS network definition file'
|
||||
setl ft=snnsnet
|
||||
set ft=snnsnet
|
||||
elseif line1 =~ '^SNNS pattern definition file'
|
||||
setl ft=snnspat
|
||||
set ft=snnspat
|
||||
elseif line1 =~ '^SNNS result file'
|
||||
setl ft=snnsres
|
||||
set ft=snnsres
|
||||
|
||||
# Virata
|
||||
elseif line1 =~ '^%.\{-}[Vv]irata'
|
||||
@@ -373,81 +335,79 @@ def DetectFromText(line1: string)
|
||||
|| line3 =~ '^%.\{-}[Vv]irata'
|
||||
|| line4 =~ '^%.\{-}[Vv]irata'
|
||||
|| line5 =~ '^%.\{-}[Vv]irata'
|
||||
setl ft=virata
|
||||
set ft=virata
|
||||
|
||||
# Strace
|
||||
# inaccurate fast match first, then use accurate slow match
|
||||
elseif (line1 =~ 'execve(' && line1 =~ '^[0-9:. ]*execve(')
|
||||
|| line1 =~ '^__libc_start_main'
|
||||
setl ft=strace
|
||||
elseif line1 =~ '[0-9:.]* *execve(' || line1 =~ '^__libc_start_main'
|
||||
set ft=strace
|
||||
|
||||
# VSE JCL
|
||||
elseif line1 =~ '^\* $$ JOB\>' || line1 =~ '^// *JOB\>'
|
||||
setl ft=vsejcl
|
||||
set ft=vsejcl
|
||||
|
||||
# TAK and SINDA
|
||||
elseif line4 =~ 'K & K Associates' || line2 =~ 'TAK 2000'
|
||||
setl ft=takout
|
||||
set ft=takout
|
||||
elseif line3 =~ 'S Y S T E M S I M P R O V E D '
|
||||
setl ft=sindaout
|
||||
set ft=sindaout
|
||||
elseif getline(6) =~ 'Run Date: '
|
||||
setl ft=takcmp
|
||||
set ft=takcmp
|
||||
elseif getline(9) =~ 'Node File 1'
|
||||
setl ft=sindacmp
|
||||
set ft=sindacmp
|
||||
|
||||
# DNS zone files
|
||||
elseif line1 .. line2 .. line3 .. line4 =~ '^; <<>> DiG [0-9.]\+.* <<>>\|$ORIGIN\|$TTL\|IN\s\+SOA'
|
||||
setl ft=bindzone
|
||||
set ft=bindzone
|
||||
|
||||
# BAAN
|
||||
elseif line1 =~ '|\*\{1,80}' && line2 =~ 'VRC '
|
||||
|| line2 =~ '|\*\{1,80}' && line3 =~ 'VRC '
|
||||
setl ft=baan
|
||||
set ft=baan
|
||||
|
||||
# Valgrind
|
||||
elseif line1 =~ '^==\d\+== valgrind' || line3 =~ '^==\d\+== Using valgrind'
|
||||
setl ft=valgrind
|
||||
set ft=valgrind
|
||||
|
||||
# Go docs
|
||||
elseif line1 =~ '^PACKAGE DOCUMENTATION$'
|
||||
setl ft=godoc
|
||||
set ft=godoc
|
||||
|
||||
# Renderman Interface Bytestream
|
||||
elseif line1 =~ '^##RenderMan'
|
||||
setl ft=rib
|
||||
set ft=rib
|
||||
|
||||
# Scheme scripts
|
||||
elseif line1 =~ 'exec\s\+\S*scheme' || line2 =~ 'exec\s\+\S*scheme'
|
||||
setl ft=scheme
|
||||
set ft=scheme
|
||||
|
||||
# Git output
|
||||
elseif line1 =~ '^\(commit\|tree\|object\) \x\{40,\}\>\|^tag \S\+$'
|
||||
setl ft=git
|
||||
set ft=git
|
||||
|
||||
# Gprof (gnu profiler)
|
||||
elseif line1 == 'Flat profile:'
|
||||
&& line2 == ''
|
||||
&& line3 =~ '^Each sample counts as .* seconds.$'
|
||||
setl ft=gprof
|
||||
set ft=gprof
|
||||
|
||||
# Erlang terms
|
||||
# (See also: http://www.gnu.org/software/emacs/manual/html_node/emacs/Choosing-Modes.html#Choosing-Modes)
|
||||
elseif line1 =~? '-\*-.*erlang.*-\*-'
|
||||
setl ft=erlang
|
||||
set ft=erlang
|
||||
|
||||
# YAML
|
||||
elseif line1 =~ '^%YAML'
|
||||
setl ft=yaml
|
||||
set ft=yaml
|
||||
|
||||
# MikroTik RouterOS script
|
||||
elseif line1 =~ '^#.*by RouterOS.*$'
|
||||
setl ft=routeros
|
||||
set ft=routeros
|
||||
|
||||
# Sed scripts
|
||||
# #ncomment is allowed but most likely a false positive so require a space
|
||||
# before any trailing comment text
|
||||
elseif line1 =~ '^#n\%($\|\s\)'
|
||||
setl ft=sed
|
||||
set ft=sed
|
||||
|
||||
else
|
||||
var lnum = 1
|
||||
@@ -456,7 +416,7 @@ def DetectFromText(line1: string)
|
||||
endwhile
|
||||
if getline(lnum) =~ '^Index:\s\+\f\+$'
|
||||
# CVS diff
|
||||
setl ft=diff
|
||||
set ft=diff
|
||||
|
||||
# locale input files: Formal Definitions of Cultural Conventions
|
||||
# filename must be like en_US, fr_FR@euro or en_US.UTF-8
|
||||
|
||||
Vendored
-36
@@ -1,36 +0,0 @@
|
||||
" Vim runtime support library,
|
||||
" runs the vim9 script version or legacy script version
|
||||
" on demand (mostly for Neovim compatability)
|
||||
"
|
||||
" Maintainer: The Vim Project <https://github.com/vim/vim>
|
||||
" Last Change: 2023 Nov 04
|
||||
|
||||
|
||||
" enable the zip and gzip plugin by default, if not set
|
||||
if !exists('g:zip_exec')
|
||||
let g:zip_exec = 1
|
||||
endif
|
||||
|
||||
if !exists('g:gzip_exec')
|
||||
let g:gzip_exec = 1
|
||||
endif
|
||||
|
||||
if !has('vim9script')
|
||||
function dist#vim#IsSafeExecutable(filetype, executable)
|
||||
let cwd = getcwd()
|
||||
if empty(exepath(a:executable))
|
||||
echomsg a:executable .. " not found in $PATH"
|
||||
return v:false
|
||||
endif
|
||||
return get(g:, a:filetype .. '_exec', get(g:, 'plugin_exec', 0)) &&
|
||||
\ (fnamemodify(exepath(a:executable), ':p:h') !=# cwd
|
||||
\ || (split($PATH, has('win32') ? ';' : ':')->index(cwd) != -1 &&
|
||||
\ cwd != '.'))
|
||||
endfunction
|
||||
|
||||
finish
|
||||
endif
|
||||
|
||||
def dist#vim#IsSafeExecutable(filetype: string, executable: string): bool
|
||||
return dist#vim9#IsSafeExecutable(filetype, executable)
|
||||
enddef
|
||||
Vendored
-21
@@ -1,21 +0,0 @@
|
||||
vim9script
|
||||
|
||||
# Vim runtime support library
|
||||
#
|
||||
# Maintainer: The Vim Project <https://github.com/vim/vim>
|
||||
# Last Change: 2023 Oct 25
|
||||
|
||||
export def IsSafeExecutable(filetype: string, executable: string): bool
|
||||
if empty(exepath(executable))
|
||||
echomsg executable .. " not found in $PATH"
|
||||
return v:false
|
||||
endif
|
||||
var cwd = getcwd()
|
||||
return get(g:, filetype .. '_exec', get(g:, 'plugin_exec', 0))
|
||||
&& (fnamemodify(exepath(executable), ':p:h') !=# cwd
|
||||
|| (split($PATH, has('win32') ? ';' : ':')->index(cwd) != -1
|
||||
&& cwd != '.'))
|
||||
enddef
|
||||
|
||||
# Uncomment this line to check for compilation errors early
|
||||
# defcompile
|
||||
Vendored
+20
-14
@@ -2,10 +2,7 @@ vim9script
|
||||
|
||||
# Language: Vim script
|
||||
# Maintainer: github user lacygoill
|
||||
# Last Change: 2023 Jun 29
|
||||
#
|
||||
# Includes Changes from Vim:
|
||||
# - 2024 Feb 09: Fix indent after literal Dict (A. Radev via #13966)
|
||||
# Last Change: 2023 Feb 01
|
||||
|
||||
# NOTE: Whenever you change the code, make sure the tests are still passing:
|
||||
#
|
||||
@@ -115,6 +112,10 @@ const DICT_KEY: string = '^\s*\%('
|
||||
.. '\)'
|
||||
.. ':\%(\s\|$\)'
|
||||
|
||||
# NOT_A_DICT_KEY {{{3
|
||||
|
||||
const NOT_A_DICT_KEY: string = ':\@!'
|
||||
|
||||
# END_OF_COMMAND {{{3
|
||||
|
||||
const END_OF_COMMAND: string = $'\s*\%($\|||\@!\|{INLINE_COMMENT}\)'
|
||||
@@ -196,13 +197,13 @@ patterns =<< trim eval END
|
||||
ldo\=\>!\=
|
||||
tabdo\=\>
|
||||
windo\>
|
||||
au\%[tocmd]\>!\=.*
|
||||
com\%[mand]\>!\=.*
|
||||
au\%[tocmd]\>.*
|
||||
com\%[mand]\>.*
|
||||
g\%[lobal]!\={PATTERN_DELIMITER}.*
|
||||
v\%[global]!\={PATTERN_DELIMITER}.*
|
||||
END
|
||||
|
||||
const HIGHER_ORDER_COMMAND: string = $'\%(^\|{BAR_SEPARATION}\)\s*\<\%({patterns->join('\|')}\)\%(\s\|$\)\@='
|
||||
const HIGHER_ORDER_COMMAND: string = $'\%(^\|{BAR_SEPARATION}\)\s*\<\%({patterns->join('\|')}\){NOT_A_DICT_KEY}'
|
||||
|
||||
# START_MIDDLE_END {{{3
|
||||
|
||||
@@ -253,7 +254,7 @@ START_MIDDLE_END = START_MIDDLE_END
|
||||
kwds->map((_, kwd: string) => kwd == ''
|
||||
? ''
|
||||
: $'\%(^\|{BAR_SEPARATION}\|\<sil\%[ent]\|{HIGHER_ORDER_COMMAND}\)\s*'
|
||||
.. $'\<\%({kwd}\)\>\%(\s\|$\|!\)\@=\%(\s*{OPERATOR}\)\@!'))
|
||||
.. $'\<\%({kwd}\)\>\%(\s*{OPERATOR}\)\@!'))
|
||||
|
||||
lockvar! START_MIDDLE_END
|
||||
|
||||
@@ -278,7 +279,7 @@ patterns = BLOCKS
|
||||
|
||||
const ENDS_BLOCK_OR_CLAUSE: string = '^\s*\%(' .. patterns->join('\|') .. $'\){END_OF_COMMAND}'
|
||||
.. $'\|^\s*cat\%[ch]\%(\s\+\({PATTERN_DELIMITER}\).*\1\)\={END_OF_COMMAND}'
|
||||
.. $'\|^\s*elseif\=\>\%(\s\|$\)\@=\%(\s*{OPERATOR}\)\@!'
|
||||
.. $'\|^\s*elseif\=\>\%({OPERATOR}\)\@!'
|
||||
|
||||
# STARTS_NAMED_BLOCK {{{3
|
||||
|
||||
@@ -295,7 +296,7 @@ patterns = []
|
||||
endfor
|
||||
}
|
||||
|
||||
const STARTS_NAMED_BLOCK: string = $'^\s*\%(sil\%[ent]\s\+\)\=\%({patterns->join('\|')}\)\>\%(\s\|$\|!\)\@='
|
||||
const STARTS_NAMED_BLOCK: string = $'^\s*\%(sil\%[ent]\s\+\)\=\%({patterns->join('\|')}\)\>{NOT_A_DICT_KEY}'
|
||||
|
||||
# STARTS_CURLY_BLOCK {{{3
|
||||
|
||||
@@ -311,7 +312,7 @@ const STARTS_CURLY_BLOCK: string = '\%('
|
||||
|
||||
# STARTS_FUNCTION {{{3
|
||||
|
||||
const STARTS_FUNCTION: string = $'^\s*\%({MODIFIERS.def}\)\=def\>!\=\s\@='
|
||||
const STARTS_FUNCTION: string = $'^\s*\%({MODIFIERS.def}\)\=def\>{NOT_A_DICT_KEY}'
|
||||
|
||||
# ENDS_FUNCTION {{{3
|
||||
|
||||
@@ -384,7 +385,7 @@ const LINE_CONTINUATION_AT_EOL: string = '\%('
|
||||
# It can be the start of a dictionary or a block.
|
||||
# We only want to match the former.
|
||||
.. '\|' .. $'^\%({STARTS_CURLY_BLOCK}\)\@!.*\zs{{'
|
||||
.. '\)\s*\%(\s#[^{].*\)\=$'
|
||||
.. '\)\s*\%(\s#.*\)\=$'
|
||||
# }}}2
|
||||
# SOL {{{2
|
||||
# BACKSLASH_AT_SOL {{{3
|
||||
@@ -1120,8 +1121,13 @@ def Is_IN_KeywordForLoop(line_1: string, line_2: string): bool # {{{3
|
||||
enddef
|
||||
|
||||
def InCommentOrString(): bool # {{{3
|
||||
return synstack('.', col('.'))
|
||||
->indexof((_, id: number): bool => synIDattr(id, 'name') =~ '\ccomment\|string\|heredoc') >= 0
|
||||
for synID: number in synstack('.', col('.'))
|
||||
if synIDattr(synID, 'name') =~ '\ccomment\|string\|heredoc'
|
||||
return true
|
||||
endif
|
||||
endfor
|
||||
|
||||
return false
|
||||
enddef
|
||||
|
||||
def AlsoClosesBlock(line_B: dict<any>): bool # {{{3
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
" ---------------------------------------------------------------------
|
||||
" getscript.vim
|
||||
" Maintainer: This runtime file is looking for a new maintainer.
|
||||
" Original Author: Charles E. Campbell
|
||||
" Author: Charles E. Campbell
|
||||
" Date: Jan 21, 2014
|
||||
" Version: 36
|
||||
" Installing: :help glvs-install
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
" Vim autoload file for editing compressed files.
|
||||
" Maintainer: The Vim Project <https://github.com/vim/vim>
|
||||
" Last Change: 2023 Aug 10
|
||||
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2016 Sep 28
|
||||
|
||||
" These functions are used by the gzip plugin.
|
||||
|
||||
@@ -10,17 +9,12 @@
|
||||
fun s:check(cmd)
|
||||
let name = substitute(a:cmd, '\(\S*\).*', '\1', '')
|
||||
if !exists("s:have_" . name)
|
||||
" safety check, don't execute anything from the current directory
|
||||
let f = dist#vim#IsSafeExecutable('gzip', name)
|
||||
if !f
|
||||
echoerr "Warning: NOT executing " .. name .. " from current directory!"
|
||||
endif
|
||||
let e = executable(name)
|
||||
if e < 0
|
||||
let r = system(name . " --version")
|
||||
let e = (r !~ "not found" && r != "")
|
||||
endif
|
||||
exe "let s:have_" . name . "=" . (e && f)
|
||||
exe "let s:have_" . name . "=" . e
|
||||
endif
|
||||
exe "return s:have_" . name
|
||||
endfun
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
" Vim autoload file.
|
||||
" Language: Hare
|
||||
" Maintainer: Amelia Clarke <selene@perilune.dev>
|
||||
" Last Updated: 2024-05-10
|
||||
" Upstream: https://git.sr.ht/~sircmpwn/hare.vim
|
||||
|
||||
" Attempt to find the directory for a given Hare module.
|
||||
function hare#FindModule(str)
|
||||
let path = substitute(trim(a:str, ':', 2), '::', '/', 'g')
|
||||
let dir = finddir(path)
|
||||
while !empty(path) && empty(dir)
|
||||
let path = substitute(path, '/\?\h\w*$', '', '')
|
||||
let dir = finddir(path)
|
||||
endwhile
|
||||
return dir
|
||||
endfunction
|
||||
|
||||
" Return the value of HAREPATH if it exists. Otherwise use a reasonable default.
|
||||
function hare#GetPath()
|
||||
if empty($HAREPATH)
|
||||
return '/usr/src/hare/stdlib,/usr/src/hare/third-party'
|
||||
endif
|
||||
return substitute($HAREPATH, ':', ',', 'g')
|
||||
endfunction
|
||||
|
||||
" vim: et sts=2 sw=2 ts=8
|
||||
@@ -156,8 +156,8 @@ function! javascriptcomplete#CompleteJS(findstart, base)
|
||||
\ 'text', 'vLink']
|
||||
let bodys = bodyprop
|
||||
" Document - document.
|
||||
let docuprop = ['anchors', 'applets', 'body', 'characterSet', 'childNodes',
|
||||
\ 'doctype', 'documentElement', 'documentURI', 'embeds', 'fonts', 'forms',
|
||||
let docuprop = ['anchors', 'body', 'characterSet', 'doctype',
|
||||
\ 'documentElement', 'documentURI', 'embeds', 'fonts', 'forms',
|
||||
\ 'head', 'hidden', 'images', 'implementation', 'lastStyleSheetSet',
|
||||
\ 'links', 'plugins', 'preferredStyleSheetSet', 'scripts',
|
||||
\ 'scrollingElement', 'selectedStyleSheetSet', 'styleSheetSets',
|
||||
@@ -171,7 +171,7 @@ function! javascriptcomplete#CompleteJS(findstart, base)
|
||||
\ 'createEvent', 'createExpression', 'createNSResolver',
|
||||
\ 'createNodeIterator', 'createProcessingInstruction', 'createRange',
|
||||
\ 'createTextNode', 'createTouchList', 'createTreeWalker',
|
||||
\ 'enableStyleSheetsForSet', 'evaluate', 'focus',
|
||||
\ 'enableStyleSheetsForSet', 'evaluate', 'focus', 'getElementById',
|
||||
\ 'getElementById', 'getElementsByClassName', 'getElementsByName',
|
||||
\ 'getElementsByTagName', 'getElementsByTagNameNS',
|
||||
\ 'hasStorageAccess', 'importNode', 'onClick', 'onDblClick',
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
vim9script
|
||||
# Support scripts for MacVim-specific functionality
|
||||
# Maintainer: Yee Cheng Chin (macvim-dev@macvim.org)
|
||||
# Last Change: 2023-03-15
|
||||
# Last Change: 2022-10-14
|
||||
|
||||
# Retrieves the text under the selection, without polluting the registers.
|
||||
# This is easier if we could yank, but we don't know what the user has been
|
||||
@@ -76,56 +76,4 @@ export def ShowDefinitionUnderCursor()
|
||||
endif
|
||||
enddef
|
||||
|
||||
# Print functionality. We simply show the file in Preview and let the user
|
||||
# decide what to do. This allows for more control instead of immediately
|
||||
# piping the file to lpr which will actually print the file.
|
||||
#
|
||||
# PreviewConvertPostScript:
|
||||
# Convert the provided PostScript file to PDF, then show in Preview. This is
|
||||
# necessary in macOS 13+ as Preview doesn't support .ps files anymore.
|
||||
# PreviewPostScript:
|
||||
# Directly open PostScript file in Preview. Can use this if
|
||||
# PreviewConvertPostScript doesn't work.
|
||||
export def PreviewConvertPostScript(deltimer = 10000): number
|
||||
# Convert PS to PDF because Preview can't use PS files in macOS 13+
|
||||
if executable('/usr/bin/pstopdf')
|
||||
system($"/usr/bin/pstopdf {v:fname_in} -o {v:fname_in}.pdf")
|
||||
else
|
||||
# Starting in macOS 14, pstopdf is no longer bundled. We just require the
|
||||
# user to install ps2pdf as it's the simplest solution for a relatively
|
||||
# niche feature today (printing).
|
||||
if executable('ps2pdf')
|
||||
system($"ps2pdf {v:fname_in} {v:fname_in}.pdf")
|
||||
else
|
||||
echoerr 'Cannot find ps2pdf. You can install it by installing Ghostscript. This is necessary in macOS 14+ for printing to work.'
|
||||
return 1
|
||||
endif
|
||||
endif
|
||||
if v:shell_error != 0
|
||||
return v:shell_error
|
||||
endif
|
||||
system($"open -a Preview {v:fname_in}.pdf")
|
||||
delete(v:fname_in)
|
||||
|
||||
# Delete the file after it's opened in Preview for privacy. We don't have an
|
||||
# easy way to detect that Preview has opened the file already, so we just
|
||||
# use a generous 10 secs timer.
|
||||
# Note that we can't use `open -W` instead because 1) it will block
|
||||
# synchronously, and 2) it will only return if Preview.app has closed, which
|
||||
# may not happen for a while if it has other unrelated documents opened.
|
||||
var to_delete_file = $"{v:fname_in}.pdf"
|
||||
timer_start(deltimer, (timer) => delete(to_delete_file))
|
||||
|
||||
return v:shell_error
|
||||
enddef
|
||||
|
||||
export def PreviewPostScript(deltimer = 10000): number
|
||||
system($"open -a Preview {v:fname_in}")
|
||||
|
||||
var to_delete_file = v:fname_in
|
||||
timer_start(deltimer, (timer) => delete(to_delete_file))
|
||||
|
||||
return v:shell_error
|
||||
enddef
|
||||
|
||||
# vim: set sw=2 ts=2 et :
|
||||
|
||||
@@ -1,31 +0,0 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: Modula-2
|
||||
" Maintainer: Doug Kearns <dougkearns@gmail.com>
|
||||
" Last Change: 2024 Jan 04
|
||||
|
||||
" Dialect can be one of pim, iso, r10
|
||||
function modula2#GetDialect() abort
|
||||
|
||||
if exists("b:modula2.dialect")
|
||||
return b:modula2.dialect
|
||||
endif
|
||||
|
||||
if exists("g:modula2_default_dialect")
|
||||
let dialect = g:modula2_default_dialect
|
||||
else
|
||||
let dialect = "pim"
|
||||
endif
|
||||
|
||||
return dialect
|
||||
endfunction
|
||||
|
||||
function modula2#SetDialect(dialect, extension = "") abort
|
||||
if exists("b:modula2")
|
||||
unlockvar! b:modula2
|
||||
endif
|
||||
|
||||
let b:modula2 = #{ dialect: a:dialect, extension: a:extension }
|
||||
lockvar! b:modula2
|
||||
endfunction
|
||||
|
||||
" vim: nowrap sw=2 sts=2 ts=8 noet fdm=marker:
|
||||
+299
-389
File diff suppressed because it is too large
Load Diff
@@ -1,7 +1,6 @@
|
||||
" netrwFileHandlers: contains various extension-based file handlers for
|
||||
" netrw's browsers' x command ("eXecute launcher")
|
||||
" Maintainer: This runtime file is looking for a new maintainer.
|
||||
" Original Author: Charles E. Campbell
|
||||
" Author: Charles E. Campbell
|
||||
" Date: Sep 18, 2020
|
||||
" Version: 11
|
||||
" Copyright: Copyright (C) 1999-2012 Charles E. Campbell {{{1
|
||||
|
||||
@@ -1,10 +1,7 @@
|
||||
" netrwSettings.vim: makes netrw settings simpler
|
||||
" Date: Nov 15, 2021
|
||||
" Maintainer: This runtime file is looking for a new maintainer.
|
||||
" Former Maintainer: Charles E Campbell
|
||||
" Version: 18
|
||||
" Last Change:
|
||||
" 2024 May 08 by Vim Project: cleanup legacy Win9X checks
|
||||
" Date: Aug 12, 2021
|
||||
" Maintainer: Charles E Campbell <NcampObell@SdrPchip.AorgM-NOSPAM>
|
||||
" Version: 17 ASTRO-ONLY
|
||||
" Copyright: Copyright (C) 1999-2007 Charles E. Campbell {{{1
|
||||
" Permission is hereby granted to use and distribute this code,
|
||||
" with or without modifications, provided that this copyright
|
||||
@@ -22,7 +19,7 @@
|
||||
if exists("g:loaded_netrwSettings") || &cp
|
||||
finish
|
||||
endif
|
||||
let g:loaded_netrwSettings = "v18"
|
||||
let g:loaded_netrwSettings = "v17"
|
||||
if v:version < 700
|
||||
echohl WarningMsg
|
||||
echo "***warning*** this version of netrwSettings needs vim 7.0"
|
||||
@@ -93,6 +90,7 @@ fun! netrwSettings#NetrwSettings()
|
||||
put = 'let g:netrw_sshport = '.g:netrw_sshport
|
||||
put = 'let g:netrw_silent = '.g:netrw_silent
|
||||
put = 'let g:netrw_use_nt_rcp = '.g:netrw_use_nt_rcp
|
||||
put = 'let g:netrw_win95ftp = '.g:netrw_win95ftp
|
||||
let s:netrw_xfer_stop= line(".")
|
||||
put =''
|
||||
put ='+ Netrw Messages'
|
||||
@@ -161,6 +159,8 @@ fun! netrwSettings#NetrwSettings()
|
||||
put = 'let g:netrw_localmkdiropt = '.g:netrw_localmkdiropt
|
||||
put = 'let g:netrw_localmovecmd = '.g:netrw_localmovecmd
|
||||
put = 'let g:netrw_localmovecmdopt = '.g:netrw_localmovecmdopt
|
||||
put = 'let g:netrw_localrmdir = '.g:netrw_localrmdir
|
||||
put = 'let g:netrw_localrmdiropt = '.g:netrw_localrmdiropt
|
||||
put = 'let g:netrw_maxfilenamelen = '.g:netrw_maxfilenamelen
|
||||
put = 'let g:netrw_menu = '.g:netrw_menu
|
||||
put = 'let g:netrw_mousemaps = '.g:netrw_mousemaps
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
" Vim support file to help with paste mappings and menus
|
||||
" Maintainer: The Vim Project <https://github.com/vim/vim>
|
||||
" Last Change: 2023 Aug 10
|
||||
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2019 Jan 27
|
||||
|
||||
" Define the string to use for items that are present both in Edit, Popup and
|
||||
" Toolbar menu. Also used in mswin.vim and macmap.vim.
|
||||
|
||||
@@ -2907,7 +2907,7 @@ endfor
|
||||
" builtin class information
|
||||
let g:php_builtin_object_functions = {}
|
||||
|
||||
" When completing for 'everything imaginable' (no class context, not a
|
||||
" When completing for 'everyting imaginable' (no class context, not a
|
||||
" variable) we need a list of built-in classes in a format of {'classname':''}
|
||||
" for performance reasons we precompile this too
|
||||
let g:php_builtin_classnames = {}
|
||||
|
||||
@@ -22,7 +22,8 @@ let s:maxoff = 50 " maximum number of lines to look backwards for ()
|
||||
function s:SearchBracket(fromlnum, flags)
|
||||
return searchpairpos('[[({]', '', '[])}]', a:flags,
|
||||
\ {-> synstack('.', col('.'))
|
||||
\ ->indexof({_, id -> synIDattr(id, 'name') =~ '\%(Comment\|Todo\|String\)$'}) >= 0},
|
||||
\ ->map({_, id -> id->synIDattr('name')})
|
||||
\ ->match('\%(Comment\|Todo\|String\)$') >= 0},
|
||||
\ [0, a:fromlnum - s:maxoff]->max(), g:python_indent.searchpair_timeout)
|
||||
endfunction
|
||||
|
||||
@@ -156,13 +157,15 @@ function python#GetIndent(lnum, ...)
|
||||
" the start of the comment. synID() is slow, a linear search would take
|
||||
" too long on a long line.
|
||||
if synstack(plnum, pline_len)
|
||||
\ ->indexof({_, id -> synIDattr(id, 'name') =~ '\%(Comment\|Todo\)$'}) >= 0
|
||||
\ ->map({_, id -> id->synIDattr('name')})
|
||||
\ ->match('\%(Comment\|Todo\)$') >= 0
|
||||
let min = 1
|
||||
let max = pline_len
|
||||
while min < max
|
||||
let col = (min + max) / 2
|
||||
if synstack(plnum, col)
|
||||
\ ->indexof({_, id -> synIDattr(id, 'name') =~ '\%(Comment\|Todo\)$'}) >= 0
|
||||
\ ->map({_, id -> id->synIDattr('name')})
|
||||
\ ->match('\%(Comment\|Todo\)$') >= 0
|
||||
let max = col
|
||||
else
|
||||
let min = col + 1
|
||||
|
||||
@@ -1,213 +0,0 @@
|
||||
" Maintainer: D. Ben Knoble <ben.knoble+github@gmail.com>
|
||||
" URL: https://github.com/benknoble/vim-racket
|
||||
" Last Change: 2023 Sep 22
|
||||
vim9script
|
||||
|
||||
def MakePatternFromLiterals(xs: list<string>): string
|
||||
return printf('\V%s', xs->mapnew((_, v) => escape(v, '\'))->join('\|'))
|
||||
enddef
|
||||
|
||||
const openers = ['(', '[', '{']
|
||||
const closers = {'(': ')', '[': ']', '{': '}'}
|
||||
const brackets_pattern: string = closers->items()->flattennew()->MakePatternFromLiterals()
|
||||
|
||||
# transliterated from a modified copy of src/indent.c
|
||||
|
||||
export def Indent(): number
|
||||
if InHerestring(v:lnum)
|
||||
return -1
|
||||
endif
|
||||
# Indent from first column to avoid odd results from nested forms.
|
||||
cursor(v:lnum, 1)
|
||||
const bracket = FindBracket()
|
||||
if bracket == null_dict || !bracket.found
|
||||
return -1
|
||||
endif
|
||||
|
||||
# assert_report(printf('{lnum: %d, str: %s, found: %s, line: %d, column: %d}',
|
||||
# v:lnum, getline(bracket.line)[bracket.column - 1], bracket.found, bracket.line, bracket.column))
|
||||
# N.B. Column =/= Line Index; Columns start at 1
|
||||
const amount: number = bracket.column
|
||||
const line = getline(bracket.line)
|
||||
|
||||
const lw = Lispword(line[bracket.column :])
|
||||
if !IsForFold(lw) # skip: see comments about for/fold special case below
|
||||
# "Extra trick"
|
||||
var current = prevnonblank(v:lnum - 1)
|
||||
while current > bracket.line
|
||||
cursor(current, 1)
|
||||
if getline(current) !~# '^\s*;' && synID(current, 1, 0)->synIDattr('name') !~? 'string' && FindBracket() == bracket
|
||||
return indent(current)
|
||||
endif
|
||||
current = prevnonblank(current - 1)
|
||||
endwhile
|
||||
cursor(v:lnum, 1)
|
||||
endif
|
||||
|
||||
if index(openers, line[bracket.column - 1]) >= 0 && !empty(lw)
|
||||
# Special case for/fold &co. The iterator clause (2nd form) is indented
|
||||
# under the accumulator clause (1st form). Everything else is standard.
|
||||
const start_of_first_form = match(line[bracket.column :], MakePatternFromLiterals(openers))
|
||||
# assert_report(printf('{line: %s}', line))
|
||||
# assert_report(printf('{start: %s}', start_of_first_form >= 0 ? line[bracket.column + start_of_first_form :] : '<NULL>'))
|
||||
if IsForFold(lw) && IsSecondForm(bracket.line, bracket.column, v:lnum) && start_of_first_form >= 0
|
||||
return amount + start_of_first_form
|
||||
else
|
||||
# Lispword, but not for/fold second form (or first form couldn't be
|
||||
# found): indent like define or lambda.
|
||||
# 2 extra indent, but subtract 1 for columns starting at 1.
|
||||
# Current vim9 doesn't constant fold "x + 2 - 1", so write "x + 1"
|
||||
return amount + 1
|
||||
endif
|
||||
else
|
||||
# assert_report(printf('{line: %s}', line[bracket.column :]))
|
||||
return amount + IndentForContinuation(bracket.line, bracket.column, line[bracket.column :])
|
||||
endif
|
||||
enddef
|
||||
|
||||
def InHerestring(start: number): bool
|
||||
return synID(start, col([start, '$']) - 1, 0)->synIDattr('name') =~? 'herestring'
|
||||
enddef
|
||||
|
||||
def FindBracket(): dict<any>
|
||||
const paren = FindMatch('(', ')')
|
||||
const square = FindMatch('\[', ']')
|
||||
const curly = FindMatch('{', '}')
|
||||
return null_dict
|
||||
->MatchMax(paren)
|
||||
->MatchMax(square)
|
||||
->MatchMax(curly)
|
||||
enddef
|
||||
|
||||
def Lispword(line: string): string
|
||||
# assume keyword on same line as opener
|
||||
const word: string = matchstr(line, '^\s*\k\+\>')->trim()
|
||||
# assert_report(printf('line: %s; word: %s', line, word))
|
||||
# assert_report(&l:lispwords->split(',')->index(word) >= 0 ? 't' : 'f')
|
||||
return &l:lispwords->split(',')->index(word) >= 0 ? word : ''
|
||||
enddef
|
||||
|
||||
# line contains everything on line_nr after column
|
||||
def IndentForContinuation(line_nr: number, column: number, line: string): number
|
||||
const end = len(line)
|
||||
var indent = match(line, '[^[:space:]]')
|
||||
# first word is a string or some other literal (or maybe a form); assume that
|
||||
# the current line is outside such a thing
|
||||
if indent < end && ['"', '#']->index(line[indent]) >= 0
|
||||
return indent
|
||||
endif
|
||||
if indent < end && ["'", '`']->index(line[indent]) >= 0
|
||||
# could be a form or a word. Advance one and see.
|
||||
++indent
|
||||
endif
|
||||
if indent < end && ['(', '[', '{']->index(line[indent]) >= 0
|
||||
# there's a form; assume outside, but need to skip it to see if any others
|
||||
cursor(line_nr, column + indent + 1)
|
||||
# assert_report(getline(line_nr)[column + indent :])
|
||||
normal! %
|
||||
const [_, matched_line, matched_col, _, _] = getcursorcharpos()
|
||||
if line_nr != matched_line || matched_col == column + indent + 1
|
||||
return indent
|
||||
endif
|
||||
indent = matched_col - column
|
||||
endif
|
||||
var in_delim: bool
|
||||
var quoted: bool
|
||||
while indent < end && (line[indent] !~# '\s' || in_delim || quoted)
|
||||
if line[indent] == '\' && !in_delim
|
||||
quoted = true
|
||||
else
|
||||
quoted = false
|
||||
endif
|
||||
if line[indent] == '|' && !quoted
|
||||
in_delim = !in_delim
|
||||
endif
|
||||
++indent
|
||||
endwhile
|
||||
# not handling newlines in first words
|
||||
if quoted || in_delim
|
||||
return 0
|
||||
endif
|
||||
# no other word on this line
|
||||
if indent == end
|
||||
return 0
|
||||
endif
|
||||
# find beginning of next word
|
||||
indent += match(line[indent :], '[^[:space:]]')
|
||||
return indent
|
||||
enddef
|
||||
|
||||
def FindMatch(start: string, end: string): dict<any>
|
||||
# TODO too slow…
|
||||
# could try replicating C? might have false positives. Or make "100"
|
||||
# configurable number: for amounts of indent bodies, we're still fast enough…
|
||||
const [linenr, column] = searchpairpos(start, '', end, 'bnzW',
|
||||
() =>
|
||||
synID(line('.'), col('.'), 0)->synIDattr('name') =~? 'char\|string\|comment',
|
||||
line('.') > 100 ? line('.') - 100 : 0)
|
||||
if linenr > 0 && column > 0
|
||||
return {found: true, line: linenr, column: column}
|
||||
else
|
||||
return {found: false, line: linenr, column: column}
|
||||
endif
|
||||
enddef
|
||||
|
||||
def MatchMax(left: dict<any>, right: dict<any>): dict<any>
|
||||
if left == null_dict || !left.found
|
||||
return right
|
||||
endif
|
||||
if right == null_dict || !right.found
|
||||
return left
|
||||
endif
|
||||
# left and right non-null, both found
|
||||
return PosLT(left, right) ? right : left
|
||||
enddef
|
||||
|
||||
def PosLT(left: dict<any>, right: dict<any>): bool
|
||||
return left.line != right.line
|
||||
\ ? left.line < right.line
|
||||
\ : (left.column != right.column && left.column < right.column)
|
||||
enddef
|
||||
|
||||
def IsForFold(word: string): bool
|
||||
return ['for/fold', 'for/foldr', 'for*/fold', 'for*/foldr']->index(word) >= 0
|
||||
enddef
|
||||
|
||||
def IsSecondForm(blnum: number, bcol: number, vlnum: number): bool
|
||||
var forms_seen: number # "top-level" (inside for/fold) counter only
|
||||
var [lnum, col] = [blnum, bcol + 1]
|
||||
cursor(lnum, col)
|
||||
var stack: list<string> = []
|
||||
|
||||
while lnum <= vlnum
|
||||
const found = search(brackets_pattern, '', vlnum, 0, () =>
|
||||
synID(line('.'), col('.'), 0)->synIDattr('name') =~? 'char\|string\|comment')
|
||||
if found <= 0
|
||||
break
|
||||
endif
|
||||
const pos = getcursorcharpos()
|
||||
lnum = pos[1]
|
||||
col = pos[2]
|
||||
var current_char = getline(lnum)[col - 1]
|
||||
# assert_report(printf('search: %d, %d: %s', lnum, col, current_char))
|
||||
# assert_report(printf('forms seen post-search: %d', forms_seen))
|
||||
if index(openers, current_char) >= 0
|
||||
insert(stack, current_char)
|
||||
elseif !empty(stack) && current_char ==# closers[stack[0]]
|
||||
stack = stack[1 :]
|
||||
if empty(stack)
|
||||
++forms_seen
|
||||
endif
|
||||
else
|
||||
# parse failure of some kind: not an opener or not the correct closer
|
||||
return false
|
||||
endif
|
||||
# assert_report(printf('forms seen pre-check: %d', forms_seen))
|
||||
if forms_seen > 2
|
||||
return false
|
||||
endif
|
||||
endwhile
|
||||
|
||||
# assert_report(printf('forms seen pre-return: %d', forms_seen))
|
||||
return forms_seen == 2 || (forms_seen == 1 && !empty(stack))
|
||||
enddef
|
||||
@@ -2,7 +2,8 @@
|
||||
" Language: Ruby
|
||||
" Maintainer: Mark Guzman <segfault@hasno.info>
|
||||
" URL: https://github.com/vim-ruby/vim-ruby
|
||||
" Last Change: 2023 Dec 31
|
||||
" Release Coordinator: Doug Kearns <dougkearns@gmail.com>
|
||||
" Last Change: 2020 Apr 12
|
||||
" ----------------------------------------------------------------------------
|
||||
"
|
||||
" Ruby IRB/Complete author: Keiju ISHITSUKA(keiju@ishitsuka.com)
|
||||
@@ -489,7 +490,7 @@ class VimRubyCompletion
|
||||
trail = "%s%s" % [ dir, sub ]
|
||||
tcfg = "%sconfig" % trail
|
||||
|
||||
if File.exist?( tcfg )
|
||||
if File.exists?( tcfg )
|
||||
rails_base = trail
|
||||
break
|
||||
end
|
||||
@@ -502,7 +503,7 @@ class VimRubyCompletion
|
||||
|
||||
bootfile = rails_base + "config/boot.rb"
|
||||
envfile = rails_base + "config/environment.rb"
|
||||
if File.exist?( bootfile ) && File.exist?( envfile )
|
||||
if File.exists?( bootfile ) && File.exists?( envfile )
|
||||
begin
|
||||
require bootfile
|
||||
require envfile
|
||||
|
||||
+295
-450
@@ -1,258 +1,207 @@
|
||||
" Author: Kevin Ballard
|
||||
" Description: Helper functions for Rust commands/mappings
|
||||
" Last Modified: 2023-09-11
|
||||
" Last Modified: May 27, 2014
|
||||
" For bugs, patches and license go to https://github.com/rust-lang/rust.vim
|
||||
|
||||
function! rust#Load()
|
||||
" Utility call to get this script loaded, for debugging
|
||||
endfunction
|
||||
|
||||
function! rust#GetConfigVar(name, default)
|
||||
" Local buffer variable with same name takes predeence over global
|
||||
if has_key(b:, a:name)
|
||||
return get(b:, a:name)
|
||||
endif
|
||||
if has_key(g:, a:name)
|
||||
return get(g:, a:name)
|
||||
endif
|
||||
return a:default
|
||||
endfunction
|
||||
|
||||
" Include expression {{{1
|
||||
|
||||
function! rust#IncludeExpr(fname) abort
|
||||
" Remove leading 'crate::' to deal with 2018 edition style 'use'
|
||||
" statements
|
||||
let l:fname = substitute(a:fname, '^crate::', '', '')
|
||||
|
||||
" Remove trailing colons arising from lines like
|
||||
"
|
||||
" use foo::{Bar, Baz};
|
||||
let l:fname = substitute(l:fname, ':\+$', '', '')
|
||||
|
||||
" Replace '::' with '/'
|
||||
let l:fname = substitute(l:fname, '::', '/', 'g')
|
||||
|
||||
" When we have
|
||||
"
|
||||
" use foo::bar::baz;
|
||||
"
|
||||
" we can't tell whether baz is a module or a function; and we can't tell
|
||||
" which modules correspond to files.
|
||||
"
|
||||
" So we work our way up, trying
|
||||
"
|
||||
" foo/bar/baz.rs
|
||||
" foo/bar.rs
|
||||
" foo.rs
|
||||
while l:fname !=# '.'
|
||||
let l:path = findfile(l:fname)
|
||||
if !empty(l:path)
|
||||
return l:fname
|
||||
endif
|
||||
let l:fname = fnamemodify(l:fname, ':h')
|
||||
endwhile
|
||||
return l:fname
|
||||
endfunction
|
||||
|
||||
" Jump {{{1
|
||||
|
||||
function! rust#Jump(mode, function) range
|
||||
let cnt = v:count1
|
||||
normal! m'
|
||||
if a:mode ==# 'v'
|
||||
norm! gv
|
||||
endif
|
||||
let foldenable = &foldenable
|
||||
set nofoldenable
|
||||
while cnt > 0
|
||||
execute "call <SID>Jump_" . a:function . "()"
|
||||
let cnt = cnt - 1
|
||||
endwhile
|
||||
let &foldenable = foldenable
|
||||
let cnt = v:count1
|
||||
normal! m'
|
||||
if a:mode ==# 'v'
|
||||
norm! gv
|
||||
endif
|
||||
let foldenable = &foldenable
|
||||
set nofoldenable
|
||||
while cnt > 0
|
||||
execute "call <SID>Jump_" . a:function . "()"
|
||||
let cnt = cnt - 1
|
||||
endwhile
|
||||
let &foldenable = foldenable
|
||||
endfunction
|
||||
|
||||
function! s:Jump_Back()
|
||||
call search('{', 'b')
|
||||
keepjumps normal! w99[{
|
||||
call search('{', 'b')
|
||||
keepjumps normal! w99[{
|
||||
endfunction
|
||||
|
||||
function! s:Jump_Forward()
|
||||
normal! j0
|
||||
call search('{', 'b')
|
||||
keepjumps normal! w99[{%
|
||||
call search('{')
|
||||
normal! j0
|
||||
call search('{', 'b')
|
||||
keepjumps normal! w99[{%
|
||||
call search('{')
|
||||
endfunction
|
||||
|
||||
" Run {{{1
|
||||
|
||||
function! rust#Run(bang, args)
|
||||
let args = s:ShellTokenize(a:args)
|
||||
if a:bang
|
||||
let idx = index(l:args, '--')
|
||||
if idx != -1
|
||||
let rustc_args = idx == 0 ? [] : l:args[:idx-1]
|
||||
let args = l:args[idx+1:]
|
||||
else
|
||||
let rustc_args = l:args
|
||||
let args = []
|
||||
endif
|
||||
else
|
||||
let rustc_args = []
|
||||
endif
|
||||
let args = s:ShellTokenize(a:args)
|
||||
if a:bang
|
||||
let idx = index(l:args, '--')
|
||||
if idx != -1
|
||||
let rustc_args = idx == 0 ? [] : l:args[:idx-1]
|
||||
let args = l:args[idx+1:]
|
||||
else
|
||||
let rustc_args = l:args
|
||||
let args = []
|
||||
endif
|
||||
else
|
||||
let rustc_args = []
|
||||
endif
|
||||
|
||||
let b:rust_last_rustc_args = l:rustc_args
|
||||
let b:rust_last_args = l:args
|
||||
let b:rust_last_rustc_args = l:rustc_args
|
||||
let b:rust_last_args = l:args
|
||||
|
||||
call s:WithPath(function("s:Run"), rustc_args, args)
|
||||
call s:WithPath(function("s:Run"), rustc_args, args)
|
||||
endfunction
|
||||
|
||||
function! s:Run(dict, rustc_args, args)
|
||||
let exepath = a:dict.tmpdir.'/'.fnamemodify(a:dict.path, ':t:r')
|
||||
if has('win32')
|
||||
let exepath .= '.exe'
|
||||
endif
|
||||
let exepath = a:dict.tmpdir.'/'.fnamemodify(a:dict.path, ':t:r')
|
||||
if has('win32')
|
||||
let exepath .= '.exe'
|
||||
endif
|
||||
|
||||
let relpath = get(a:dict, 'tmpdir_relpath', a:dict.path)
|
||||
let rustc_args = [relpath, '-o', exepath] + a:rustc_args
|
||||
let relpath = get(a:dict, 'tmpdir_relpath', a:dict.path)
|
||||
let rustc_args = [relpath, '-o', exepath] + a:rustc_args
|
||||
|
||||
let rustc = exists("g:rustc_path") ? g:rustc_path : "rustc"
|
||||
let rustc = exists("g:rustc_path") ? g:rustc_path : "rustc"
|
||||
|
||||
let pwd = a:dict.istemp ? a:dict.tmpdir : ''
|
||||
let output = s:system(pwd, shellescape(rustc) . " " . join(map(rustc_args, 'shellescape(v:val)')))
|
||||
if output !=# ''
|
||||
echohl WarningMsg
|
||||
echo output
|
||||
echohl None
|
||||
endif
|
||||
if !v:shell_error
|
||||
exe '!' . shellescape(exepath) . " " . join(map(a:args, 'shellescape(v:val)'))
|
||||
endif
|
||||
let pwd = a:dict.istemp ? a:dict.tmpdir : ''
|
||||
let output = s:system(pwd, shellescape(rustc) . " " . join(map(rustc_args, 'shellescape(v:val)')))
|
||||
if output != ''
|
||||
echohl WarningMsg
|
||||
echo output
|
||||
echohl None
|
||||
endif
|
||||
if !v:shell_error
|
||||
exe '!' . shellescape(exepath) . " " . join(map(a:args, 'shellescape(v:val)'))
|
||||
endif
|
||||
endfunction
|
||||
|
||||
" Expand {{{1
|
||||
|
||||
function! rust#Expand(bang, args)
|
||||
let args = s:ShellTokenize(a:args)
|
||||
if a:bang && !empty(l:args)
|
||||
let pretty = remove(l:args, 0)
|
||||
else
|
||||
let pretty = "expanded"
|
||||
endif
|
||||
call s:WithPath(function("s:Expand"), pretty, args)
|
||||
let args = s:ShellTokenize(a:args)
|
||||
if a:bang && !empty(l:args)
|
||||
let pretty = remove(l:args, 0)
|
||||
else
|
||||
let pretty = "expanded"
|
||||
endif
|
||||
call s:WithPath(function("s:Expand"), pretty, args)
|
||||
endfunction
|
||||
|
||||
function! s:Expand(dict, pretty, args)
|
||||
try
|
||||
let rustc = exists("g:rustc_path") ? g:rustc_path : "rustc"
|
||||
try
|
||||
let rustc = exists("g:rustc_path") ? g:rustc_path : "rustc"
|
||||
|
||||
if a:pretty =~? '^\%(everybody_loops$\|flowgraph=\)'
|
||||
let flag = '--xpretty'
|
||||
else
|
||||
let flag = '--pretty'
|
||||
endif
|
||||
let relpath = get(a:dict, 'tmpdir_relpath', a:dict.path)
|
||||
let args = [relpath, '-Z', 'unstable-options', l:flag, a:pretty] + a:args
|
||||
let pwd = a:dict.istemp ? a:dict.tmpdir : ''
|
||||
let output = s:system(pwd, shellescape(rustc) . " " . join(map(args, 'shellescape(v:val)')))
|
||||
if v:shell_error
|
||||
echohl WarningMsg
|
||||
echo output
|
||||
echohl None
|
||||
else
|
||||
new
|
||||
silent put =output
|
||||
1
|
||||
d
|
||||
setl filetype=rust
|
||||
setl buftype=nofile
|
||||
setl bufhidden=hide
|
||||
setl noswapfile
|
||||
" give the buffer a nice name
|
||||
let suffix = 1
|
||||
let basename = fnamemodify(a:dict.path, ':t:r')
|
||||
while 1
|
||||
let bufname = basename
|
||||
if suffix > 1 | let bufname .= ' ('.suffix.')' | endif
|
||||
let bufname .= '.pretty.rs'
|
||||
if bufexists(bufname)
|
||||
let suffix += 1
|
||||
continue
|
||||
endif
|
||||
exe 'silent noautocmd keepalt file' fnameescape(bufname)
|
||||
break
|
||||
endwhile
|
||||
endif
|
||||
endtry
|
||||
if a:pretty =~? '^\%(everybody_loops$\|flowgraph=\)'
|
||||
let flag = '--xpretty'
|
||||
else
|
||||
let flag = '--pretty'
|
||||
endif
|
||||
let relpath = get(a:dict, 'tmpdir_relpath', a:dict.path)
|
||||
let args = [relpath, '-Z', 'unstable-options', l:flag, a:pretty] + a:args
|
||||
let pwd = a:dict.istemp ? a:dict.tmpdir : ''
|
||||
let output = s:system(pwd, shellescape(rustc) . " " . join(map(args, 'shellescape(v:val)')))
|
||||
if v:shell_error
|
||||
echohl WarningMsg
|
||||
echo output
|
||||
echohl None
|
||||
else
|
||||
new
|
||||
silent put =output
|
||||
1
|
||||
d
|
||||
setl filetype=rust
|
||||
setl buftype=nofile
|
||||
setl bufhidden=hide
|
||||
setl noswapfile
|
||||
" give the buffer a nice name
|
||||
let suffix = 1
|
||||
let basename = fnamemodify(a:dict.path, ':t:r')
|
||||
while 1
|
||||
let bufname = basename
|
||||
if suffix > 1 | let bufname .= ' ('.suffix.')' | endif
|
||||
let bufname .= '.pretty.rs'
|
||||
if bufexists(bufname)
|
||||
let suffix += 1
|
||||
continue
|
||||
endif
|
||||
exe 'silent noautocmd keepalt file' fnameescape(bufname)
|
||||
break
|
||||
endwhile
|
||||
endif
|
||||
endtry
|
||||
endfunction
|
||||
|
||||
function! rust#CompleteExpand(lead, line, pos)
|
||||
if a:line[: a:pos-1] =~# '^RustExpand!\s*\S*$'
|
||||
" first argument and it has a !
|
||||
let list = ["normal", "expanded", "typed", "expanded,identified", "flowgraph=", "everybody_loops"]
|
||||
if !empty(a:lead)
|
||||
call filter(list, "v:val[:len(a:lead)-1] == a:lead")
|
||||
endif
|
||||
return list
|
||||
endif
|
||||
if a:line[: a:pos-1] =~ '^RustExpand!\s*\S*$'
|
||||
" first argument and it has a !
|
||||
let list = ["normal", "expanded", "typed", "expanded,identified", "flowgraph=", "everybody_loops"]
|
||||
if !empty(a:lead)
|
||||
call filter(list, "v:val[:len(a:lead)-1] == a:lead")
|
||||
endif
|
||||
return list
|
||||
endif
|
||||
|
||||
return glob(escape(a:lead, "*?[") . '*', 0, 1)
|
||||
return glob(escape(a:lead, "*?[") . '*', 0, 1)
|
||||
endfunction
|
||||
|
||||
" Emit {{{1
|
||||
|
||||
function! rust#Emit(type, args)
|
||||
let args = s:ShellTokenize(a:args)
|
||||
call s:WithPath(function("s:Emit"), a:type, args)
|
||||
let args = s:ShellTokenize(a:args)
|
||||
call s:WithPath(function("s:Emit"), a:type, args)
|
||||
endfunction
|
||||
|
||||
function! s:Emit(dict, type, args)
|
||||
try
|
||||
let output_path = a:dict.tmpdir.'/output'
|
||||
try
|
||||
let output_path = a:dict.tmpdir.'/output'
|
||||
|
||||
let rustc = exists("g:rustc_path") ? g:rustc_path : "rustc"
|
||||
let rustc = exists("g:rustc_path") ? g:rustc_path : "rustc"
|
||||
|
||||
let relpath = get(a:dict, 'tmpdir_relpath', a:dict.path)
|
||||
let args = [relpath, '--emit', a:type, '-o', output_path] + a:args
|
||||
let pwd = a:dict.istemp ? a:dict.tmpdir : ''
|
||||
let output = s:system(pwd, shellescape(rustc) . " " . join(map(args, 'shellescape(v:val)')))
|
||||
if output !=# ''
|
||||
echohl WarningMsg
|
||||
echo output
|
||||
echohl None
|
||||
endif
|
||||
if !v:shell_error
|
||||
new
|
||||
exe 'silent keepalt read' fnameescape(output_path)
|
||||
1
|
||||
d
|
||||
if a:type ==# "llvm-ir"
|
||||
setl filetype=llvm
|
||||
let extension = 'll'
|
||||
elseif a:type ==# "asm"
|
||||
setl filetype=asm
|
||||
let extension = 's'
|
||||
endif
|
||||
setl buftype=nofile
|
||||
setl bufhidden=hide
|
||||
setl noswapfile
|
||||
if exists('l:extension')
|
||||
" give the buffer a nice name
|
||||
let suffix = 1
|
||||
let basename = fnamemodify(a:dict.path, ':t:r')
|
||||
while 1
|
||||
let bufname = basename
|
||||
if suffix > 1 | let bufname .= ' ('.suffix.')' | endif
|
||||
let bufname .= '.'.extension
|
||||
if bufexists(bufname)
|
||||
let suffix += 1
|
||||
continue
|
||||
endif
|
||||
exe 'silent noautocmd keepalt file' fnameescape(bufname)
|
||||
break
|
||||
endwhile
|
||||
endif
|
||||
endif
|
||||
endtry
|
||||
let relpath = get(a:dict, 'tmpdir_relpath', a:dict.path)
|
||||
let args = [relpath, '--emit', a:type, '-o', output_path] + a:args
|
||||
let pwd = a:dict.istemp ? a:dict.tmpdir : ''
|
||||
let output = s:system(pwd, shellescape(rustc) . " " . join(map(args, 'shellescape(v:val)')))
|
||||
if output != ''
|
||||
echohl WarningMsg
|
||||
echo output
|
||||
echohl None
|
||||
endif
|
||||
if !v:shell_error
|
||||
new
|
||||
exe 'silent keepalt read' fnameescape(output_path)
|
||||
1
|
||||
d
|
||||
if a:type == "llvm-ir"
|
||||
setl filetype=llvm
|
||||
let extension = 'll'
|
||||
elseif a:type == "asm"
|
||||
setl filetype=asm
|
||||
let extension = 's'
|
||||
endif
|
||||
setl buftype=nofile
|
||||
setl bufhidden=hide
|
||||
setl noswapfile
|
||||
if exists('l:extension')
|
||||
" give the buffer a nice name
|
||||
let suffix = 1
|
||||
let basename = fnamemodify(a:dict.path, ':t:r')
|
||||
while 1
|
||||
let bufname = basename
|
||||
if suffix > 1 | let bufname .= ' ('.suffix.')' | endif
|
||||
let bufname .= '.'.extension
|
||||
if bufexists(bufname)
|
||||
let suffix += 1
|
||||
continue
|
||||
endif
|
||||
exe 'silent noautocmd keepalt file' fnameescape(bufname)
|
||||
break
|
||||
endwhile
|
||||
endif
|
||||
endif
|
||||
endtry
|
||||
endfunction
|
||||
|
||||
" Utility functions {{{1
|
||||
@@ -270,154 +219,145 @@ endfunction
|
||||
" existing path of the current buffer. If the path is inside of {dict.tmpdir}
|
||||
" then it is guaranteed to have a '.rs' extension.
|
||||
function! s:WithPath(func, ...)
|
||||
let buf = bufnr('')
|
||||
let saved = {}
|
||||
let dict = {}
|
||||
try
|
||||
let saved.write = &write
|
||||
set write
|
||||
let dict.path = expand('%')
|
||||
let pathisempty = empty(dict.path)
|
||||
let buf = bufnr('')
|
||||
let saved = {}
|
||||
let dict = {}
|
||||
try
|
||||
let saved.write = &write
|
||||
set write
|
||||
let dict.path = expand('%')
|
||||
let pathisempty = empty(dict.path)
|
||||
|
||||
" Always create a tmpdir in case the wrapped command wants it
|
||||
let dict.tmpdir = tempname()
|
||||
call mkdir(dict.tmpdir)
|
||||
" Always create a tmpdir in case the wrapped command wants it
|
||||
let dict.tmpdir = tempname()
|
||||
call mkdir(dict.tmpdir)
|
||||
|
||||
if pathisempty || !saved.write
|
||||
let dict.istemp = 1
|
||||
" if we're doing this because of nowrite, preserve the filename
|
||||
if !pathisempty
|
||||
let filename = expand('%:t:r').".rs"
|
||||
else
|
||||
let filename = 'unnamed.rs'
|
||||
endif
|
||||
let dict.tmpdir_relpath = filename
|
||||
let dict.path = dict.tmpdir.'/'.filename
|
||||
if pathisempty || !saved.write
|
||||
let dict.istemp = 1
|
||||
" if we're doing this because of nowrite, preserve the filename
|
||||
if !pathisempty
|
||||
let filename = expand('%:t:r').".rs"
|
||||
else
|
||||
let filename = 'unnamed.rs'
|
||||
endif
|
||||
let dict.tmpdir_relpath = filename
|
||||
let dict.path = dict.tmpdir.'/'.filename
|
||||
|
||||
let saved.mod = &modified
|
||||
set nomodified
|
||||
let saved.mod = &mod
|
||||
set nomod
|
||||
|
||||
silent exe 'keepalt write! ' . fnameescape(dict.path)
|
||||
if pathisempty
|
||||
silent keepalt 0file
|
||||
endif
|
||||
else
|
||||
let dict.istemp = 0
|
||||
update
|
||||
endif
|
||||
silent exe 'keepalt write! ' . fnameescape(dict.path)
|
||||
if pathisempty
|
||||
silent keepalt 0file
|
||||
endif
|
||||
else
|
||||
let dict.istemp = 0
|
||||
update
|
||||
endif
|
||||
|
||||
call call(a:func, [dict] + a:000)
|
||||
finally
|
||||
if bufexists(buf)
|
||||
for [opt, value] in items(saved)
|
||||
silent call setbufvar(buf, '&'.opt, value)
|
||||
unlet value " avoid variable type mismatches
|
||||
endfor
|
||||
endif
|
||||
if has_key(dict, 'tmpdir') | silent call s:RmDir(dict.tmpdir) | endif
|
||||
endtry
|
||||
call call(a:func, [dict] + a:000)
|
||||
finally
|
||||
if bufexists(buf)
|
||||
for [opt, value] in items(saved)
|
||||
silent call setbufvar(buf, '&'.opt, value)
|
||||
unlet value " avoid variable type mismatches
|
||||
endfor
|
||||
endif
|
||||
if has_key(dict, 'tmpdir') | silent call s:RmDir(dict.tmpdir) | endif
|
||||
endtry
|
||||
endfunction
|
||||
|
||||
function! rust#AppendCmdLine(text)
|
||||
call setcmdpos(getcmdpos())
|
||||
let cmd = getcmdline() . a:text
|
||||
return cmd
|
||||
call setcmdpos(getcmdpos())
|
||||
let cmd = getcmdline() . a:text
|
||||
return cmd
|
||||
endfunction
|
||||
|
||||
" Tokenize the string according to sh parsing rules
|
||||
function! s:ShellTokenize(text)
|
||||
" states:
|
||||
" 0: start of word
|
||||
" 1: unquoted
|
||||
" 2: unquoted backslash
|
||||
" 3: double-quote
|
||||
" 4: double-quoted backslash
|
||||
" 5: single-quote
|
||||
let l:state = 0
|
||||
let l:current = ''
|
||||
let l:args = []
|
||||
for c in split(a:text, '\zs')
|
||||
if l:state == 0 || l:state == 1 " unquoted
|
||||
if l:c ==# ' '
|
||||
if l:state == 0 | continue | endif
|
||||
call add(l:args, l:current)
|
||||
let l:current = ''
|
||||
let l:state = 0
|
||||
elseif l:c ==# '\'
|
||||
let l:state = 2
|
||||
elseif l:c ==# '"'
|
||||
let l:state = 3
|
||||
elseif l:c ==# "'"
|
||||
let l:state = 5
|
||||
else
|
||||
let l:current .= l:c
|
||||
let l:state = 1
|
||||
endif
|
||||
elseif l:state == 2 " unquoted backslash
|
||||
if l:c !=# "\n" " can it even be \n?
|
||||
let l:current .= l:c
|
||||
endif
|
||||
let l:state = 1
|
||||
elseif l:state == 3 " double-quote
|
||||
if l:c ==# '\'
|
||||
let l:state = 4
|
||||
elseif l:c ==# '"'
|
||||
let l:state = 1
|
||||
else
|
||||
let l:current .= l:c
|
||||
endif
|
||||
elseif l:state == 4 " double-quoted backslash
|
||||
if stridx('$`"\', l:c) >= 0
|
||||
let l:current .= l:c
|
||||
elseif l:c ==# "\n" " is this even possible?
|
||||
" skip it
|
||||
else
|
||||
let l:current .= '\'.l:c
|
||||
endif
|
||||
let l:state = 3
|
||||
elseif l:state == 5 " single-quoted
|
||||
if l:c ==# "'"
|
||||
let l:state = 1
|
||||
else
|
||||
let l:current .= l:c
|
||||
endif
|
||||
endif
|
||||
endfor
|
||||
if l:state != 0
|
||||
call add(l:args, l:current)
|
||||
endif
|
||||
return l:args
|
||||
" states:
|
||||
" 0: start of word
|
||||
" 1: unquoted
|
||||
" 2: unquoted backslash
|
||||
" 3: double-quote
|
||||
" 4: double-quoted backslash
|
||||
" 5: single-quote
|
||||
let l:state = 0
|
||||
let l:current = ''
|
||||
let l:args = []
|
||||
for c in split(a:text, '\zs')
|
||||
if l:state == 0 || l:state == 1 " unquoted
|
||||
if l:c ==# ' '
|
||||
if l:state == 0 | continue | endif
|
||||
call add(l:args, l:current)
|
||||
let l:current = ''
|
||||
let l:state = 0
|
||||
elseif l:c ==# '\'
|
||||
let l:state = 2
|
||||
elseif l:c ==# '"'
|
||||
let l:state = 3
|
||||
elseif l:c ==# "'"
|
||||
let l:state = 5
|
||||
else
|
||||
let l:current .= l:c
|
||||
let l:state = 1
|
||||
endif
|
||||
elseif l:state == 2 " unquoted backslash
|
||||
if l:c !=# "\n" " can it even be \n?
|
||||
let l:current .= l:c
|
||||
endif
|
||||
let l:state = 1
|
||||
elseif l:state == 3 " double-quote
|
||||
if l:c ==# '\'
|
||||
let l:state = 4
|
||||
elseif l:c ==# '"'
|
||||
let l:state = 1
|
||||
else
|
||||
let l:current .= l:c
|
||||
endif
|
||||
elseif l:state == 4 " double-quoted backslash
|
||||
if stridx('$`"\', l:c) >= 0
|
||||
let l:current .= l:c
|
||||
elseif l:c ==# "\n" " is this even possible?
|
||||
" skip it
|
||||
else
|
||||
let l:current .= '\'.l:c
|
||||
endif
|
||||
let l:state = 3
|
||||
elseif l:state == 5 " single-quoted
|
||||
if l:c == "'"
|
||||
let l:state = 1
|
||||
else
|
||||
let l:current .= l:c
|
||||
endif
|
||||
endif
|
||||
endfor
|
||||
if l:state != 0
|
||||
call add(l:args, l:current)
|
||||
endif
|
||||
return l:args
|
||||
endfunction
|
||||
|
||||
function! s:RmDir(path)
|
||||
" sanity check; make sure it's not empty, /, or $HOME
|
||||
if empty(a:path)
|
||||
echoerr 'Attempted to delete empty path'
|
||||
return 0
|
||||
elseif a:path ==# '/' || a:path ==# $HOME
|
||||
let l:path = expand(a:path)
|
||||
if l:path ==# '/' || l:path ==# $HOME
|
||||
echoerr 'Attempted to delete protected path: ' . a:path
|
||||
return 0
|
||||
endif
|
||||
endif
|
||||
|
||||
if !isdirectory(a:path)
|
||||
return 0
|
||||
endif
|
||||
|
||||
" delete() returns 0 when removing file successfully
|
||||
return delete(a:path, 'rf') == 0
|
||||
" sanity check; make sure it's not empty, /, or $HOME
|
||||
if empty(a:path)
|
||||
echoerr 'Attempted to delete empty path'
|
||||
return 0
|
||||
elseif a:path == '/' || a:path == $HOME
|
||||
echoerr 'Attempted to delete protected path: ' . a:path
|
||||
return 0
|
||||
endif
|
||||
return system("rm -rf " . shellescape(a:path))
|
||||
endfunction
|
||||
|
||||
" Executes {cmd} with the cwd set to {pwd}, without changing Vim's cwd.
|
||||
" If {pwd} is the empty string then it doesn't change the cwd.
|
||||
function! s:system(pwd, cmd)
|
||||
let cmd = a:cmd
|
||||
if !empty(a:pwd)
|
||||
let cmd = 'cd ' . shellescape(a:pwd) . ' && ' . cmd
|
||||
endif
|
||||
return system(cmd)
|
||||
let cmd = a:cmd
|
||||
if !empty(a:pwd)
|
||||
let cmd = 'cd ' . shellescape(a:pwd) . ' && ' . cmd
|
||||
endif
|
||||
return system(cmd)
|
||||
endfunction
|
||||
|
||||
" Playpen Support {{{1
|
||||
@@ -426,10 +366,10 @@ endfunction
|
||||
" http://github.com/mattn/gist-vim
|
||||
function! s:has_webapi()
|
||||
if !exists("*webapi#http#post")
|
||||
try
|
||||
call webapi#http#post()
|
||||
catch
|
||||
endtry
|
||||
try
|
||||
call webapi#http#post()
|
||||
catch
|
||||
endtry
|
||||
endif
|
||||
return exists("*webapi#http#post")
|
||||
endfunction
|
||||
@@ -441,130 +381,35 @@ function! rust#Play(count, line1, line2, ...) abort
|
||||
let l:rust_shortener_url = get(g:, 'rust_shortener_url', 'https://is.gd/')
|
||||
|
||||
if !s:has_webapi()
|
||||
echohl ErrorMsg | echomsg ':RustPlay depends on webapi.vim (https://github.com/mattn/webapi-vim)' | echohl None
|
||||
return
|
||||
echohl ErrorMsg | echomsg ':RustPlay depends on webapi.vim (https://github.com/mattn/webapi-vim)' | echohl None
|
||||
return
|
||||
endif
|
||||
|
||||
let bufname = bufname('%')
|
||||
if a:count < 1
|
||||
let content = join(getline(a:line1, a:line2), "\n")
|
||||
let content = join(getline(a:line1, a:line2), "\n")
|
||||
else
|
||||
let save_regcont = @"
|
||||
let save_regtype = getregtype('"')
|
||||
silent! normal! gvy
|
||||
let content = @"
|
||||
call setreg('"', save_regcont, save_regtype)
|
||||
let save_regcont = @"
|
||||
let save_regtype = getregtype('"')
|
||||
silent! normal! gvy
|
||||
let content = @"
|
||||
call setreg('"', save_regcont, save_regtype)
|
||||
endif
|
||||
|
||||
let url = l:rust_playpen_url."?code=".webapi#http#encodeURI(content)
|
||||
let body = l:rust_playpen_url."?code=".webapi#http#encodeURI(content)
|
||||
|
||||
if strlen(url) > 5000
|
||||
echohl ErrorMsg | echomsg 'Buffer too large, max 5000 encoded characters ('.strlen(url).')' | echohl None
|
||||
return
|
||||
if strlen(body) > 5000
|
||||
echohl ErrorMsg | echomsg 'Buffer too large, max 5000 encoded characters ('.strlen(body).')' | echohl None
|
||||
return
|
||||
endif
|
||||
|
||||
let payload = "format=simple&url=".webapi#http#encodeURI(url)
|
||||
let payload = "format=simple&url=".webapi#http#encodeURI(body)
|
||||
let res = webapi#http#post(l:rust_shortener_url.'create.php', payload, {})
|
||||
if res.status[0] ==# '2'
|
||||
let url = res.content
|
||||
endif
|
||||
let url = res.content
|
||||
|
||||
let footer = ''
|
||||
if exists('g:rust_clip_command')
|
||||
call system(g:rust_clip_command, url)
|
||||
if !v:shell_error
|
||||
let footer = ' (copied to clipboard)'
|
||||
endif
|
||||
endif
|
||||
redraw | echomsg 'Done: '.url.footer
|
||||
endfunction
|
||||
|
||||
" Run a test under the cursor or all tests {{{1
|
||||
|
||||
" Finds a test function name under the cursor. Returns empty string when a
|
||||
" test function is not found.
|
||||
function! s:SearchTestFunctionNameUnderCursor() abort
|
||||
let cursor_line = line('.')
|
||||
|
||||
" Find #[test] attribute
|
||||
if search('\m\C#\[test\]', 'bcW') is 0
|
||||
return ''
|
||||
endif
|
||||
|
||||
" Move to an opening brace of the test function
|
||||
let test_func_line = search('\m\C^\s*fn\s\+\h\w*\s*(.\+{$', 'eW')
|
||||
if test_func_line is 0
|
||||
return ''
|
||||
endif
|
||||
|
||||
" Search the end of test function (closing brace) to ensure that the
|
||||
" cursor position is within function definition
|
||||
if maparg('<Plug>(MatchitNormalForward)') ==# ''
|
||||
keepjumps normal! %
|
||||
else
|
||||
" Prefer matchit.vim official plugin to native % since the plugin
|
||||
" provides better behavior than original % (#391)
|
||||
" To load the plugin, run:
|
||||
" :packadd matchit
|
||||
execute 'keepjumps' 'normal' "\<Plug>(MatchitNormalForward)"
|
||||
endif
|
||||
if line('.') < cursor_line
|
||||
return ''
|
||||
endif
|
||||
|
||||
return matchstr(getline(test_func_line), '\m\C^\s*fn\s\+\zs\h\w*')
|
||||
endfunction
|
||||
|
||||
function! rust#Test(mods, winsize, all, options) abort
|
||||
let manifest = findfile('Cargo.toml', expand('%:p:h') . ';')
|
||||
if manifest ==# ''
|
||||
return rust#Run(1, '--test ' . a:options)
|
||||
endif
|
||||
|
||||
" <count> defaults to 0, but we prefer an empty string
|
||||
let winsize = a:winsize ? a:winsize : ''
|
||||
|
||||
if has('terminal')
|
||||
if has('patch-8.0.910')
|
||||
let cmd = printf('%s noautocmd %snew | terminal ++curwin ', a:mods, winsize)
|
||||
else
|
||||
let cmd = printf('%s terminal ', a:mods)
|
||||
endif
|
||||
elseif has('nvim')
|
||||
let cmd = printf('%s noautocmd %snew | terminal ', a:mods, winsize)
|
||||
else
|
||||
let cmd = '!'
|
||||
let manifest = shellescape(manifest)
|
||||
endif
|
||||
|
||||
if a:all
|
||||
if a:options ==# ''
|
||||
execute cmd . 'cargo test --manifest-path' manifest
|
||||
else
|
||||
execute cmd . 'cargo test --manifest-path' manifest a:options
|
||||
endif
|
||||
return
|
||||
endif
|
||||
|
||||
let saved = getpos('.')
|
||||
try
|
||||
let func_name = s:SearchTestFunctionNameUnderCursor()
|
||||
finally
|
||||
call setpos('.', saved)
|
||||
endtry
|
||||
if func_name ==# ''
|
||||
echohl ErrorMsg
|
||||
echomsg 'No test function was found under the cursor. Please add ! to command if you want to run all tests'
|
||||
echohl None
|
||||
return
|
||||
endif
|
||||
if a:options ==# ''
|
||||
execute cmd . 'cargo test --manifest-path' manifest func_name
|
||||
else
|
||||
execute cmd . 'cargo test --manifest-path' manifest func_name a:options
|
||||
endif
|
||||
redraw | echomsg 'Done: '.url
|
||||
endfunction
|
||||
|
||||
" }}}1
|
||||
|
||||
" vim: set et sw=4 sts=4 ts=8:
|
||||
" vim: set noet sw=8 ts=8:
|
||||
|
||||
@@ -1,105 +0,0 @@
|
||||
" Last Modified: 2023-09-11
|
||||
|
||||
" For debugging, inspired by https://github.com/w0rp/rust/blob/master/autoload/rust/debugging.vim
|
||||
|
||||
let s:global_variable_list = [
|
||||
\ '_rustfmt_autosave_because_of_config',
|
||||
\ 'ftplugin_rust_source_path',
|
||||
\ 'loaded_syntastic_rust_cargo_checker',
|
||||
\ 'loaded_syntastic_rust_filetype',
|
||||
\ 'loaded_syntastic_rust_rustc_checker',
|
||||
\ 'rust_bang_comment_leader',
|
||||
\ 'rust_cargo_avoid_whole_workspace',
|
||||
\ 'rust_clip_command',
|
||||
\ 'rust_conceal',
|
||||
\ 'rust_conceal_mod_path',
|
||||
\ 'rust_conceal_pub',
|
||||
\ 'rust_fold',
|
||||
\ 'rust_last_args',
|
||||
\ 'rust_last_rustc_args',
|
||||
\ 'rust_original_delimitMate_excluded_regions',
|
||||
\ 'rust_playpen_url',
|
||||
\ 'rust_prev_delimitMate_quotes',
|
||||
\ 'rust_recent_nearest_cargo_tol',
|
||||
\ 'rust_recent_root_cargo_toml',
|
||||
\ 'rust_recommended_style',
|
||||
\ 'rust_set_conceallevel',
|
||||
\ 'rust_set_conceallevel=1',
|
||||
\ 'rust_set_foldmethod',
|
||||
\ 'rust_set_foldmethod=1',
|
||||
\ 'rust_shortener_url',
|
||||
\ 'rustc_makeprg_no_percent',
|
||||
\ 'rustc_path',
|
||||
\ 'rustfmt_autosave',
|
||||
\ 'rustfmt_autosave_if_config_present',
|
||||
\ 'rustfmt_command',
|
||||
\ 'rustfmt_emit_files',
|
||||
\ 'rustfmt_fail_silently',
|
||||
\ 'rustfmt_options',
|
||||
\ 'syntastic_extra_filetypes',
|
||||
\ 'syntastic_rust_cargo_fname',
|
||||
\]
|
||||
|
||||
function! s:Echo(message) abort
|
||||
execute 'echo a:message'
|
||||
endfunction
|
||||
|
||||
function! s:EchoGlobalVariables() abort
|
||||
for l:key in s:global_variable_list
|
||||
if l:key !~# '^_'
|
||||
call s:Echo('let g:' . l:key . ' = ' . string(get(g:, l:key, v:null)))
|
||||
endif
|
||||
|
||||
if has_key(b:, l:key)
|
||||
call s:Echo('let b:' . l:key . ' = ' . string(b:[l:key]))
|
||||
endif
|
||||
endfor
|
||||
endfunction
|
||||
|
||||
function! rust#debugging#Info() abort
|
||||
call cargo#Load()
|
||||
call rust#Load()
|
||||
call rustfmt#Load()
|
||||
call s:Echo('rust.vim Global Variables:')
|
||||
call s:Echo('')
|
||||
call s:EchoGlobalVariables()
|
||||
|
||||
silent let l:output = system(g:rustfmt_command . ' --version')
|
||||
echo l:output
|
||||
|
||||
let l:rustc = exists("g:rustc_path") ? g:rustc_path : "rustc"
|
||||
silent let l:output = system(l:rustc . ' --version')
|
||||
echo l:output
|
||||
|
||||
silent let l:output = system('cargo --version')
|
||||
echo l:output
|
||||
|
||||
version
|
||||
|
||||
if exists(":SyntasticInfo")
|
||||
echo "----"
|
||||
echo "Info from Syntastic:"
|
||||
execute "SyntasticInfo"
|
||||
endif
|
||||
endfunction
|
||||
|
||||
function! rust#debugging#InfoToClipboard() abort
|
||||
redir @"
|
||||
silent call rust#debugging#Info()
|
||||
redir END
|
||||
|
||||
call s:Echo('RustInfo copied to your clipboard')
|
||||
endfunction
|
||||
|
||||
function! rust#debugging#InfoToFile(filename) abort
|
||||
let l:expanded_filename = expand(a:filename)
|
||||
|
||||
redir => l:output
|
||||
silent call rust#debugging#Info()
|
||||
redir END
|
||||
|
||||
call writefile(split(l:output, "\n"), l:expanded_filename)
|
||||
call s:Echo('RustInfo written to ' . l:expanded_filename)
|
||||
endfunction
|
||||
|
||||
" vim: set et sw=4 sts=4 ts=8:
|
||||
+68
-222
@@ -1,261 +1,107 @@
|
||||
" Author: Stephen Sugden <stephen@stephensugden.com>
|
||||
" Last Modified: 2023-09-11
|
||||
"
|
||||
" Adapted from https://github.com/fatih/vim-go
|
||||
" For bugs, patches and license go to https://github.com/rust-lang/rust.vim
|
||||
|
||||
if !exists("g:rustfmt_autosave")
|
||||
let g:rustfmt_autosave = 0
|
||||
let g:rustfmt_autosave = 0
|
||||
endif
|
||||
|
||||
if !exists("g:rustfmt_command")
|
||||
let g:rustfmt_command = "rustfmt"
|
||||
let g:rustfmt_command = "rustfmt"
|
||||
endif
|
||||
|
||||
if !exists("g:rustfmt_options")
|
||||
let g:rustfmt_options = ""
|
||||
let g:rustfmt_options = ""
|
||||
endif
|
||||
|
||||
if !exists("g:rustfmt_fail_silently")
|
||||
let g:rustfmt_fail_silently = 0
|
||||
endif
|
||||
|
||||
function! rustfmt#DetectVersion()
|
||||
" Save rustfmt '--help' for feature inspection
|
||||
silent let s:rustfmt_help = system(g:rustfmt_command . " --help")
|
||||
let s:rustfmt_unstable_features = s:rustfmt_help =~# "--unstable-features"
|
||||
|
||||
" Build a comparable rustfmt version variable out of its `--version` output:
|
||||
silent let l:rustfmt_version_full = system(g:rustfmt_command . " --version")
|
||||
let l:rustfmt_version_list = matchlist(l:rustfmt_version_full,
|
||||
\ '\vrustfmt ([0-9]+[.][0-9]+[.][0-9]+)')
|
||||
if len(l:rustfmt_version_list) < 3
|
||||
let s:rustfmt_version = "0"
|
||||
else
|
||||
let s:rustfmt_version = l:rustfmt_version_list[1]
|
||||
endif
|
||||
return s:rustfmt_version
|
||||
endfunction
|
||||
|
||||
call rustfmt#DetectVersion()
|
||||
|
||||
if !exists("g:rustfmt_emit_files")
|
||||
let g:rustfmt_emit_files = s:rustfmt_version >= "0.8.2"
|
||||
endif
|
||||
|
||||
if !exists("g:rustfmt_file_lines")
|
||||
let g:rustfmt_file_lines = s:rustfmt_help =~# "--file-lines JSON"
|
||||
let g:rustfmt_fail_silently = 0
|
||||
endif
|
||||
|
||||
let s:got_fmt_error = 0
|
||||
|
||||
function! rustfmt#Load()
|
||||
" Utility call to get this script loaded, for debugging
|
||||
endfunction
|
||||
|
||||
function! s:RustfmtWriteMode()
|
||||
if g:rustfmt_emit_files
|
||||
return "--emit=files"
|
||||
else
|
||||
return "--write-mode=overwrite"
|
||||
endif
|
||||
endfunction
|
||||
|
||||
function! s:RustfmtConfigOptions()
|
||||
let l:rustfmt_toml = findfile('rustfmt.toml', expand('%:p:h') . ';')
|
||||
if l:rustfmt_toml !=# ''
|
||||
return '--config-path '.shellescape(fnamemodify(l:rustfmt_toml, ":p"))
|
||||
endif
|
||||
|
||||
let l:_rustfmt_toml = findfile('.rustfmt.toml', expand('%:p:h') . ';')
|
||||
if l:_rustfmt_toml !=# ''
|
||||
return '--config-path '.shellescape(fnamemodify(l:_rustfmt_toml, ":p"))
|
||||
endif
|
||||
|
||||
" Default to edition 2018 in case no rustfmt.toml was found.
|
||||
return '--edition 2018'
|
||||
endfunction
|
||||
|
||||
function! s:RustfmtCommandRange(filename, line1, line2)
|
||||
if g:rustfmt_file_lines == 0
|
||||
echo "--file-lines is not supported in the installed `rustfmt` executable"
|
||||
return
|
||||
endif
|
||||
|
||||
let l:arg = {"file": shellescape(a:filename), "range": [a:line1, a:line2]}
|
||||
let l:write_mode = s:RustfmtWriteMode()
|
||||
let l:rustfmt_config = s:RustfmtConfigOptions()
|
||||
|
||||
" FIXME: When --file-lines gets to be stable, add version range checking
|
||||
" accordingly.
|
||||
let l:unstable_features = s:rustfmt_unstable_features ? '--unstable-features' : ''
|
||||
|
||||
let l:cmd = printf("%s %s %s %s %s --file-lines '[%s]' %s", g:rustfmt_command,
|
||||
\ l:write_mode, g:rustfmt_options,
|
||||
\ l:unstable_features, l:rustfmt_config,
|
||||
\ json_encode(l:arg), shellescape(a:filename))
|
||||
return l:cmd
|
||||
let l:arg = {"file": shellescape(a:filename), "range": [a:line1, a:line2]}
|
||||
return printf("%s %s --write-mode=overwrite --file-lines '[%s]'", g:rustfmt_command, g:rustfmt_options, json_encode(l:arg))
|
||||
endfunction
|
||||
|
||||
function! s:RustfmtCommand()
|
||||
let write_mode = g:rustfmt_emit_files ? '--emit=stdout' : '--write-mode=display'
|
||||
let config = s:RustfmtConfigOptions()
|
||||
return join([g:rustfmt_command, write_mode, config, g:rustfmt_options])
|
||||
function! s:RustfmtCommand(filename)
|
||||
return g:rustfmt_command . " --write-mode=overwrite " . g:rustfmt_options . " " . shellescape(a:filename)
|
||||
endfunction
|
||||
|
||||
function! s:DeleteLines(start, end) abort
|
||||
silent! execute a:start . ',' . a:end . 'delete _'
|
||||
endfunction
|
||||
function! s:RunRustfmt(command, curw, tmpname)
|
||||
if exists("*systemlist")
|
||||
let out = systemlist(a:command)
|
||||
else
|
||||
let out = split(system(a:command), '\r\?\n')
|
||||
endif
|
||||
|
||||
function! s:RunRustfmt(command, tmpname, from_writepre)
|
||||
let l:view = winsaveview()
|
||||
if v:shell_error == 0 || v:shell_error == 3
|
||||
" remove undo point caused via BufWritePre
|
||||
try | silent undojoin | catch | endtry
|
||||
|
||||
let l:stderr_tmpname = tempname()
|
||||
call writefile([], l:stderr_tmpname)
|
||||
" Replace current file with temp file, then reload buffer
|
||||
call rename(a:tmpname, expand('%'))
|
||||
silent edit!
|
||||
let &syntax = &syntax
|
||||
|
||||
let l:command = a:command . ' 2> ' . l:stderr_tmpname
|
||||
" only clear location list if it was previously filled to prevent
|
||||
" clobbering other additions
|
||||
if s:got_fmt_error
|
||||
let s:got_fmt_error = 0
|
||||
call setloclist(0, [])
|
||||
lwindow
|
||||
endif
|
||||
elseif g:rustfmt_fail_silently == 0
|
||||
" otherwise get the errors and put them in the location list
|
||||
let errors = []
|
||||
|
||||
if a:tmpname ==# ''
|
||||
" Rustfmt in stdin/stdout mode
|
||||
for line in out
|
||||
" src/lib.rs:13:5: 13:10 error: expected `,`, or `}`, found `value`
|
||||
let tokens = matchlist(line, '^\(.\{-}\):\(\d\+\):\(\d\+\):\s*\(\d\+:\d\+\s*\)\?\s*error: \(.*\)')
|
||||
if !empty(tokens)
|
||||
call add(errors, {"filename": @%,
|
||||
\"lnum": tokens[2],
|
||||
\"col": tokens[3],
|
||||
\"text": tokens[5]})
|
||||
endif
|
||||
endfor
|
||||
|
||||
" chdir to the directory of the file
|
||||
let l:has_lcd = haslocaldir()
|
||||
let l:prev_cd = getcwd()
|
||||
execute 'lchdir! '.expand('%:h')
|
||||
if empty(errors)
|
||||
% | " Couldn't detect rustfmt error format, output errors
|
||||
endif
|
||||
|
||||
let l:buffer = getline(1, '$')
|
||||
if exists("*systemlist")
|
||||
silent let out = systemlist(l:command, l:buffer)
|
||||
else
|
||||
silent let out = split(system(l:command,
|
||||
\ join(l:buffer, "\n")), '\r\?\n')
|
||||
endif
|
||||
else
|
||||
if exists("*systemlist")
|
||||
silent let out = systemlist(l:command)
|
||||
else
|
||||
silent let out = split(system(l:command), '\r\?\n')
|
||||
endif
|
||||
endif
|
||||
if !empty(errors)
|
||||
call setloclist(0, errors, 'r')
|
||||
echohl Error | echomsg "rustfmt returned error" | echohl None
|
||||
endif
|
||||
|
||||
let l:stderr = readfile(l:stderr_tmpname)
|
||||
let s:got_fmt_error = 1
|
||||
lwindow
|
||||
" We didn't use the temp file, so clean up
|
||||
call delete(a:tmpname)
|
||||
endif
|
||||
|
||||
call delete(l:stderr_tmpname)
|
||||
|
||||
let l:open_lwindow = 0
|
||||
if v:shell_error == 0
|
||||
if a:from_writepre
|
||||
" remove undo point caused via BufWritePre
|
||||
try | silent undojoin | catch | endtry
|
||||
endif
|
||||
|
||||
if a:tmpname ==# ''
|
||||
let l:content = l:out
|
||||
else
|
||||
" take the tmpfile's content, this is better than rename
|
||||
" because it preserves file modes.
|
||||
let l:content = readfile(a:tmpname)
|
||||
endif
|
||||
|
||||
call s:DeleteLines(len(l:content), line('$'))
|
||||
call setline(1, l:content)
|
||||
|
||||
" only clear location list if it was previously filled to prevent
|
||||
" clobbering other additions
|
||||
if s:got_fmt_error
|
||||
let s:got_fmt_error = 0
|
||||
call setloclist(0, [])
|
||||
let l:open_lwindow = 1
|
||||
endif
|
||||
elseif g:rustfmt_fail_silently == 0 && !a:from_writepre
|
||||
" otherwise get the errors and put them in the location list
|
||||
let l:errors = []
|
||||
|
||||
let l:prev_line = ""
|
||||
for l:line in l:stderr
|
||||
" error: expected one of `;` or `as`, found `extern`
|
||||
" --> src/main.rs:2:1
|
||||
let tokens = matchlist(l:line, '^\s\+-->\s\(.\{-}\):\(\d\+\):\(\d\+\)$')
|
||||
if !empty(tokens)
|
||||
call add(l:errors, {"filename": @%,
|
||||
\"lnum": tokens[2],
|
||||
\"col": tokens[3],
|
||||
\"text": l:prev_line})
|
||||
endif
|
||||
let l:prev_line = l:line
|
||||
endfor
|
||||
|
||||
if !empty(l:errors)
|
||||
call setloclist(0, l:errors, 'r')
|
||||
echohl Error | echomsg "rustfmt returned error" | echohl None
|
||||
else
|
||||
echo "rust.vim: was not able to parse rustfmt messages. Here is the raw output:"
|
||||
echo "\n"
|
||||
for l:line in l:stderr
|
||||
echo l:line
|
||||
endfor
|
||||
endif
|
||||
|
||||
let s:got_fmt_error = 1
|
||||
let l:open_lwindow = 1
|
||||
endif
|
||||
|
||||
" Restore the current directory if needed
|
||||
if a:tmpname ==# ''
|
||||
if l:has_lcd
|
||||
execute 'lchdir! '.l:prev_cd
|
||||
else
|
||||
execute 'chdir! '.l:prev_cd
|
||||
endif
|
||||
endif
|
||||
|
||||
" Open lwindow after we have changed back to the previous directory
|
||||
if l:open_lwindow == 1
|
||||
lwindow
|
||||
endif
|
||||
|
||||
call winrestview(l:view)
|
||||
call winrestview(a:curw)
|
||||
endfunction
|
||||
|
||||
function! rustfmt#FormatRange(line1, line2)
|
||||
let l:tmpname = tempname()
|
||||
call writefile(getline(1, '$'), l:tmpname)
|
||||
let command = s:RustfmtCommandRange(l:tmpname, a:line1, a:line2)
|
||||
call s:RunRustfmt(command, l:tmpname, v:false)
|
||||
call delete(l:tmpname)
|
||||
let l:curw = winsaveview()
|
||||
let l:tmpname = expand("%:p:h") . "/." . expand("%:p:t") . ".rustfmt"
|
||||
call writefile(getline(1, '$'), l:tmpname)
|
||||
|
||||
let command = s:RustfmtCommandRange(l:tmpname, a:line1, a:line2)
|
||||
|
||||
call s:RunRustfmt(command, l:curw, l:tmpname)
|
||||
endfunction
|
||||
|
||||
function! rustfmt#Format()
|
||||
call s:RunRustfmt(s:RustfmtCommand(), '', v:false)
|
||||
let l:curw = winsaveview()
|
||||
let l:tmpname = expand("%:p:h") . "/." . expand("%:p:t") . ".rustfmt"
|
||||
call writefile(getline(1, '$'), l:tmpname)
|
||||
|
||||
let command = s:RustfmtCommand(l:tmpname)
|
||||
|
||||
call s:RunRustfmt(command, l:curw, l:tmpname)
|
||||
endfunction
|
||||
|
||||
function! rustfmt#Cmd()
|
||||
" Mainly for debugging
|
||||
return s:RustfmtCommand()
|
||||
endfunction
|
||||
|
||||
function! rustfmt#PreWrite()
|
||||
if !filereadable(expand("%@"))
|
||||
return
|
||||
endif
|
||||
if rust#GetConfigVar('rustfmt_autosave_if_config_present', 0)
|
||||
if findfile('rustfmt.toml', '.;') !=# '' || findfile('.rustfmt.toml', '.;') !=# ''
|
||||
let b:rustfmt_autosave = 1
|
||||
let b:_rustfmt_autosave_because_of_config = 1
|
||||
endif
|
||||
else
|
||||
if has_key(b:, '_rustfmt_autosave_because_of_config')
|
||||
unlet b:_rustfmt_autosave_because_of_config
|
||||
unlet b:rustfmt_autosave
|
||||
endif
|
||||
endif
|
||||
|
||||
if !rust#GetConfigVar("rustfmt_autosave", 0)
|
||||
return
|
||||
endif
|
||||
|
||||
call s:RunRustfmt(s:RustfmtCommand(), '', v:true)
|
||||
endfunction
|
||||
|
||||
|
||||
" vim: set et sw=4 sts=4 ts=8:
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
" Vim script to download a missing spell file
|
||||
" Maintainer: The Vim Project <https://github.com/vim/vim>
|
||||
" Last Change: 2023 Aug 10
|
||||
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2020 Jul 10
|
||||
|
||||
if !exists('g:spellfile_URL')
|
||||
" Always use https:// because it's secure. The certificate is for nluug.nl,
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user