Compare commits

...

257 Commits

Author SHA1 Message Date
Yee Cheng Chin 8e7808c296 MacVim r181
Updated to Vim 9.1.1128

This update contains a completely new GUI tabs implementation by @sfsam!
It also contains lots of small fixes for window resizing and full screen
mode that aims to make using MacVim feel rock solid and stable.

Defaults Change
====================

New settings defaults related to window sizing #1528:

- "Smoothly resizes window" is now on by default. MacVim's window will
  now resize smoothly instead of snapped to the size of the character
  grid.
- Vim's `guioption` now has `k` set by default (`:h go-k`). This
  prevents MacVim's window size from changing unnecessarily when
  showing/hiding tabs or changing font size.

These should align MacVim better with how other apps work and integrate
better with OS window management, including macOS 15 Sequoia's window
tiling feature.

Features
====================

Tabs
--------------------

MacVim has a new tabs implementation! The old version (PSMTabBarControl)
is not maintained and lacks features such as overflowing tabs and
customizable colors. The new tabs will overflow horizontally and are
scrollable. They also animate when tabs are closed or moved, respect
system settings such as right-to-left locales and high-contrast modes,
and are designed to fit within the currently selected Vim colors.

There are a few ways to customize the colors of the new tabs, under the
"Appearance" settings pane. MacVim defaults to an "Automatic colors"
mode which tries to pick sensible colors automatically based on the
current foreground/background colors. However, you can also configure it
to simply use the tab colors specified by the Vim color scheme (some
color schemes will work better than others depending on their choice of
colors). Another new option is "Use tabs background color" which when
combined with "Transparent title bar" allows the title bar and tabs to
look like a single cohesive whole.

Relevant work:

- #1120 (by @sfsam)
- Also: #1535 / #1536 / #1537 / #1538 / #1539 / #1557 / #1558 / #1560

New Vim features
--------------------

- new bundled color scheme:
    - unokai (vim/vim#16443)
- new bundled optional plugins (use `packadd` to enable them):
    - helptoc: Use `:HelpToc` to show an interactive table of contents
      for Vim help, man pages, Markdown files, and terminal.
      vim/vim#10446
- new options:
    - `set diffopt+=linematch:{n}`. Matches lines better when in diff
      mode. v9.1.1099
    - `findfunc`. Customizes `:find` and other commands. v9.1.0831
    - `set completeopt+=preinsert`. Preview inserted text in completion.
      v9.1.1056
    - `messagesopt`. Allows customizing hit-enter behavior. v9.1.0908
- new functions:
    - `getcellpixels()`. Query the pixel size of a character cell in the
      grid. v9.1.0854 / #1554 / #1555
- Vim tutor has a new interactive plugin (v9.1.0836). There is also now
  a chapter 2 (vim/vim#5729).

Misc New Settings
--------------------

- "Open untitled window" (General) has a new option to only open on
  MacVim re-activation. #1509
- "Show document icon at title bar" (Appearance). Previously MacVim
  implicitly hid the document icon when using transparent title bar.
  This is now customizable. #1510

General
====================

- The MacVim dmg installer has a new design. Courtesy of @jasonlong.
  #1540 #1545
- Legacy builds (macOS 10.9 - 10.12) are no longer built by GitHub
  hosted runners, due to GitHub's deprecation of old runners. They are
  now built by a custom self-hosted VM instead. In the future we hope to
  set up reproducible builds (#1506) so it will not matter who's
  building the app as it would be verifiable. #1559
- "Nightly" build: We now build a dmg installer for every commit. This
  allows for trying out the latest developmental version of MacVim, but
  note that the app will not be signed / notarized, and it will not be
  as polished as official release/pre-release builds. See
  [wiki](https://github.com/macvim-dev/macvim/wiki/Installing) for
  instructions. #1532

Fixes
====================

Apple "Intelligence" Writing Tools
--------------------

macOS 15 Sequoia's Apple "Intelligence" Writing Tools should work
correctly with MacVim now. To use it, select some text, right click to
show menu, and then select the "Writing Tools" sub-menu. As part of this
fix, the integration with the "Services" menu now works more reliably as
well. You can select texts in blockwise visual mode and select a service
and MacVim will try to place the new texts back to the blockwise
selection if possible. #1552

Window resizing and full screen
--------------------

- Flicker begone: Changing font size, showing/hiding tabs or scroll
  bars, or entering non-native full screen should no longer cause MacVim
  to flicker. Previously there could be a momentary but
  distracting/annoying stale image that flashes briefly. #1547 #1549
- Fixed issue where resizing MacVim window would occasionally cause Vim
  to be stuck in a stale wrong size. #1518
- Non-native full screen now supports `blurradius` option. #1546
- Fixed window size not always restoring correctly when exiting full
  screen. Non-native full screen also works more reliably in
  multi-monitor setup. #1525
- Fixed non-native full screen mode when using an external monitor with
  a MacBook with a notch, and having the "Show menu bar in non-native
  mode" option set. Previously MacVim would sometimes miscalculate the
  menu bar height in the second screen. #1548
- Fixed misc issues with non-native full screen's interaction with
  `fuoptions` and also the `transparency` setting, and rare crash. #1521

Other Fixes
--------------------

- Fixed issue where changing font size (using Cmd =/-) with guifont set
  to "-monospace-" would result in guifont being changed to a confusing
  name like ".AppleSystemUIFontMonospaced-Regular". #1544
- "MacVim Website" menu item now goes to the updated URL. #1524
- What's New page now allows changing font size (using Cmd =/-), and
  showing table of contents. #1561 #1562
- Dark mode documentation is now a bit clearer on `v:os_appearance`.
  #1511
- Using dictionary look up on selected texts (by right clicking and then
  selecting "Look Up" in the pop-up menu) is now more resilient as it
  uses Vim's native `getregion()` to determine the selected texts. #1508

Scripting
====================

- Scripting languages versions:
    - Ruby is now built against 3.4, up from 3.3.
    - Perl is now built against 5.34, up from 5.30.

Compatibility
====================

Requires macOS 10.9 or above. (10.9 - 10.12 requires downloading a
separate legacy build)

Script interfaces have compatibility with these versions:

- Lua 5.4
- Perl 5.34
- Python2 2.7
- Python3 3.9 or above
- Ruby 3.4
2025-02-20 16:05:49 -08:00
Yee Cheng Chin 3710248dbc Merge pull request #1562 from ychin/fix-whatsnew-url-comparison
Fix What's New URL checking logic to compare port correctly
2025-02-20 14:47:14 -08:00
Yee Cheng Chin af567e9eb0 Fix What's New URL checking logic to compare port correctly
In a normal HTTP URL the port will be nil, which doesn't equal itself.

This bug was introduced by #1561 when it tried to add more granular
comparison to URL checking to allow for anchor links.
2025-02-20 14:45:48 -08:00
Yee Cheng Chin 08e946fa19 Merge remote-tracking branch 'vim/master' 2025-02-20 14:16:05 -08:00
Lucas Eekhof 27f5136761 runtime(mail): add commentstring '> %s' to ftplugin
The new native commenting functionality is currently not used when
editing mail. One could reasonably expect it to change the "quote" state
of any given line in the mail (i.e. the preceding ">"), which would be
very handy and feel natural when editing mail. Especially since the
current file already uses "setlocal comments+=n:>".

Solution: Add commentstring to `> %s` to be used in files of type mail.

closes: #16669

Signed-off-by: Lucas Eekhof <105216949+eekhof@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-20 22:32:07 +01:00
Yegappan Lakshmanan e3fed4828c patch 9.1.1128: patch 9.1.1119 caused a regression with imports
Problem:  patch 9.1.1119 caused a regression with imports
          (girishji)
Solution: revert the script ID change for the class script variable for
          now (Yegappan Lakshmanan)

fixes: #16664
closes: #16670

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-20 22:20:54 +01:00
dringsim 106899eb21 runtime(dnsmasq): include simple filetype plugin
closes: #16671

Signed-off-by: dringsim <dringsim@qq.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-20 22:19:23 +01:00
glepnir 52fd867f5e patch 9.1.1127: preinsert text is not cleaned up correctly
Problem:  when 'completeopt' is set to preinsert the preinserted text is
          not cleared when adding new leader (Yee Cheng Chin)
Solution: add a condition to delete preinsert text in edit function
          (glepnir)

closes: #16672

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-20 22:13:24 +01:00
glepnir 4418041698 patch 9.1.1126: patch 9.1.1121 used a wrong way to handle enter
Problem:  patch 9.1.1121 used a wrong way to handle enter
Solution: compl_enter_selects also needs to consider the selected item
          in ins_compl_new_leader() (glepnir)

closes: #16673

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-20 22:09:48 +01:00
glepnir 3af0a8d8f5 patch 9.1.1125: cannot loop through pum menu with multiline items
Problem:  cannot loop through pum menu with multiline items with
          fuzzy and noselect in 'completeopt' (Tomasz N)
Solution: remove unnecessary compl_no_select condition (glepnir)

fixes: #16641
closes: #16674

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-20 22:06:16 +01:00
zeertzjq 08a83a033a patch 9.1.1124: No test for 'listchars' "precedes" with double-width char
Problem:  No test for 'listchars' "precedes" with double-width char.
Solution: Add a test and fix a typo in code (zeertzjq).

closes: #16675

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-20 22:04:09 +01:00
Yee Cheng Chin e700ddeea4 patch 9.1.1123: popup hi groups not falling back to defaults
Problem:  Highlight groups PopupSelected/PopupNotification/
          MessageWindow are supposed to fall back to default highlight
          groups if they are not defined. However, once a colorscheme
          has defined them, switching to another colorscheme that
          doesn't do so will leave behind a cleared colorscheme, which
          causes the fallback to fail.

Solution: Set up default links to the relevant fallback highlight
          groups, which makes sure a `:hi clear` command will reset the
          state properly (Yee Cheng Chin).

closes: #16676

Signed-off-by: Yee Cheng Chin <ychin.git@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-20 21:58:21 +01:00
David Mandelberg 911742a975 runtime(dosini): Add support for # comments to ftplugin
runtime/syntax/dosini.vim supports both ; and # as comments, and I think
a bunch of the files detected as dosini do too, so add support for # to
the ftplugin.

closes: #16681

Signed-off-by: David Mandelberg <david@mandelberg.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-20 20:43:10 +01:00
Yee Cheng Chin d5218a81b4 Merge pull request #1561 from ychin/whatsnew-fontsize-allow-anchors
Add font size up/down support and allow anchor links for What's New page
2025-02-20 06:13:14 -08:00
Yee Cheng Chin 7402362114 Add font size up/down support and allow anchor links for What's New page
The anchor links are for table of contents links that our release notes
will start to generate.
2025-02-20 05:54:00 -08:00
Yee Cheng Chin 7861c788f0 Merge pull request #1560 from ychin/tabs-fix-hover-button-image-recursion
Tabs: Fix MMHoverButton poor usage of images and potential stack overflow
2025-02-19 21:37:33 -08:00
Yee Cheng Chin f4680b8f79 Tabs: Fix MMHoverButton poor usage of images and potential stack overflow
Fix hover buttons to not keep setting image on itself everytime a fg
color is changed, leading to each image referring to the last one. If a
display changed happens and macOS triggers a redraw, this could
sometimes lead to a stack overflow crash.

Just simplify the code and properly separate out the image template and
the derived images. This also makes sure we properly free the old
images when we change fg color where we discard the last image and make
a new one.
2025-02-19 21:13:55 -08:00
Yee Cheng Chin 9b30caf13d Merge pull request #1559 from ychin/ci-self-hosted-github-runner-legacy-build
ci: Add support for using self-hosted runners for legacy builds
2025-02-18 23:44:54 -08:00
Yee Cheng Chin 460dffeb9f ci: Add support for using self-hosted runners for legacy builds
MacVim legacy builds target macOS 10.9, which needs Xcode 14.0.1 or
below. However, GitHub Actions no longer has a runner that has that
installed as macos-12 was removed and macos-13 has newer Xcode versions.
We are setting up a custom self-hosted runner that has Xcode 14.0.1
installed and configure GitHub Actions to use that to build legacy
builds. Only do this when making a full release because this has to be
spun up manually.

One big problem with setting up such a workflow is that GitHub Actions'
workflow syntax does not provide a way to selectively skip certain
matrix configuration in the `runs-on` field. The cleanest solution
(which is still quite messy) is to refactor the build-and-test step into
a separate reusable workflow, and have the parent workflow invoke it
with a "skip" boolean flag for each matrix entry. The child workflow
will then use that to selectively decide to run the job or not. It does
mean the CI YAML file is now split into two. This does have some
benefits since if we want to add reproducible builds in the future
(#1506) this would allow us to set up a new workflow that builds MacVim
the same way when a new release is made and verify that it's been built
properly.
2025-02-18 23:12:57 -08:00
Yee Cheng Chin 4af622dfd6 Merge remote-tracking branch 'vim/master' 2025-02-18 20:27:53 -08:00
John Marriott d6e3c9048d patch 9.1.1122: too many strlen() calls in findfile.c
Problem:  too many strlen() calls in findfile.c
Solution: refactor findfile.c and remove calls to strlen()
          (John Marriott)

closes: #16595

Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-18 20:45:48 +01:00
glepnir 07f0dbe3aa patch 9.1.1121: Enter does not insert newline with "noselect"
Problem:  Enter does not insert newline with "noselect" when the pum is
          visible (lifepillar)
Solution: When Enter is pressed and no complete-item is selected,
          ins_compl_prep returns false, and the edit function continues
          processing Enter to insert a new line. (glepnir)

fixes: #1653
closes: #16653

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-18 20:27:30 +01:00
Luca Saccarola ee1a24b21d runtime(netrw): fix s:NetrwHome() regression
If $MYVIMDIR is unset netrw creates a directory called '$MYVIMDIR' in
the current directory

fixes: #16609

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-18 20:11:51 +01:00
Christian Brabandt 44c1c04ddb patch 9.1.1120: tests: Test_registers fails
Problem:  tests: Test_registers fails
          (T.J. Townsend, after v9.1.1115)
Solution: require clipboard feature

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-17 22:27:45 +01:00
Christian Brabandt 5647c91355 runtime(doc): add reference to extendnew() at extend()
related: #16607

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-17 21:33:30 +01:00
Yegappan Lakshmanan 778ada48fb patch 9.1.1119: Vim9: Not able to use an autoloaded class from another autoloaded script
Problem:  Vim9: Not able to use an autoloaded class from another
          autoloaded script (Elliot)
Solution: make it work (Yegappan Lakshmanan)

fixes: #15031
closes: #16652

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-17 20:21:23 +01:00
Christian Brabandt b34a688ba0 patch 9.1.1118: tests: test_termcodes fails
Problem:  tests: test_termcodes fails
          (after: v9.1.1114)
Solution: adjust the test for the expected termguicolors value

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-17 20:09:11 +01:00
Doug Kearns 68ba6c2c6c runtime(vim): Update base-syntax, improve performance
Contain the vimNotation syntax group, matching this at top level is
unnecessary and very slow.

The removed vimString and vimNumber definitions are broken and/or never
match. They have long been replaced by newer definitions.

closes: #16645

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-16 16:40:12 +01:00
Hirohito Higashi 5887cce1d7 patch 9.1.1117: there are a few minor style issues
Problem:  there are a few minor style issues
Solution: fix the issues (Hirohito Higashi)

closes: #16646

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-16 16:34:30 +01:00
Yegappan Lakshmanan b5f463ce4f patch 9.1.1116: Vim9: super not supported in lambda expressions
Problem:  Vim9: super not supported in lambda expressions
          (Aliaksei Budavei)
Solution: Support using the super keyword in a closure in an instance
          method (Yegappan Lakshmanan)

fixes: #16586
closes: #16647

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-16 16:25:24 +01:00
Yegappan Lakshmanan 44831e4bea runtime(doc): Update the 'specifies' keyword documentation, slightly reformat
closes: #16648

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-16 16:23:07 +01:00
Christian Brabandt c0f0e2380e patch 9.1.1115: [security]: use-after-free in str_to_reg()
Problem:  [security]: use-after-free in str_to_reg()
          (fizz-is-on-the-way)
Solution: when redirecting the :display command, check that one
          does not output to the register being displayed

Github Advisory:
https://github.com/vim/vim/security/advisories/GHSA-63p5-mwg2-787v

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-16 16:06:38 +01:00
Christian Brabandt 27822a0441 patch 9.1.1114: enabling termguicolors automatically confuses users
Problem:  enabling termguicolors automatically confuses users. Since
          querying the terminal for the RGB flag happens asynchronously,
          enabling termguicolors is noticeable by users as the highlighting changes
          and is therefore unexpected.
          (after v9.1.1054)
Solution: comment out that part for now. We may need another way to
          enable this in the future.

fixes: #16539
fixes: #16568
fixes: #16649

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-16 09:30:00 +01:00
Yee Cheng Chin 8969ff8787 Merge pull request #1558 from ychin/mmtabs-automatic-colors-tuning
Tabs: Tune automatic colors and use LAB for deriving colors
2025-02-15 03:47:16 -08:00
Yee Cheng Chin 25b448f236 Tabs: Tune automatic colors and use LAB for deriving colors
Tune how automatic colors are derived. It used to use a custom
brightness calculation formula to determine in background color is light
or dark, then then simply interpolate the background color to either
white or black to drive the fill and tab colors. There were a couple
issues:
- Really dark background color would end up interpolating more than a
  moderately dark color, leading to the fill color being desaturated and
  also perceptually far from background color leading to a
  high-constrast look. Ideally we want to have a fixed offset in terms
  of perceptual difference between fill and background color.
- The brightness calculation was wrong and flipped the green and blue
  coefficients. Also, calculating perceptual brightness in sRGB gamma
  space is inherently wrong as the components are not linear.
- Blending colors in sRGB space are also not ideal because we are
  blending in gamma space (not linear), and also perceptually each
  component will contribute differently.

To fix this, use CIE LAB colors and just change the L* component of the
colors in fixed offsets to calculate a new color that's a
brighter/darker version fo the previous one. This is not completely
accurate but gives a more stable result over a large range of input
colors. The new fill / tab colors are a little more saturated as a
result which subjectively may or may not be more pleasant but with
automatic colors it won't be perfect, and the user who cares would
likely use Vim colorscheme mode instead.
2025-02-15 03:20:07 -08:00
Vladyslav Rehan 3f60114236 runtime(keymap): Add ukrainian-enhanced keymap
The "Ukrainian enhanced keymap" allows you to type Ukrainian in Vim
using jcuken Windows layout.

Original file is made by Ivan Korneliuk and can be found at
https://github.com/vansha/ukrainian-enhanced.vim. It is being added here
with the permission of the author.

There is another ukrainian layout already in Vim, namely the
keymap\ukrainian-jcuken.vim script by Anatoli Sakhnik. But this one
differs in way it maps numeric keys. It uses values usual for Windows
users.

closes: #16628

Signed-off-by: Vladyslav Rehan <rehanvladyslav@gmail.com>
Signed-off-by: Ivan Korneliuk <vansha@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-15 09:59:57 +01:00
Yee Cheng Chin 8bac9064f7 Merge pull request #1557 from ychin/mmtabs-vim-colorscheme-fixes
Tabs: Use TabLineFill fg, fix colorscheme w/ transparent/inverse highlights
2025-02-14 21:44:21 -08:00
Yee Cheng Chin aaf55031bf Tabs: Use TabLineFill fg, fix colorscheme w/ transparent/inverse highlights
When using Vim colorscheme mode, fix the fill foreground colors (used
for add tab and scroll buttons) to use the colorscheme's TabLineFill's
guifg colors. Previously they were automatically calculated based on the
other foreground colors which worked for automatic colors but not when
we are using a colorscheme where it may not match. Just use the one
specified in color scheme. Colorschemes like everforest and koehler
should have visible buttons now.

Also, fix the previous broken logic for parsing the colorscheme colors.
It was not accounting for transparent colors where missing colors or
cleared highlight groups should fall through to default bg/fg colors
(e.g. delek and catppuccin do this for TabLineSel). It also wasn't
respecting the `gui=reverse` flag (which means bg/fg colors should be
flipped) that some colorschemes (e.g. Solarized) uses.

Also, include a fix to builtin colorscheme 'retrobox' where the
TabLineFill group isn't set correctly. This is fixed upstream but
including it here to save some round trip time. See
vim/colorschemes#273.
2025-02-14 20:59:07 -08:00
Yee Cheng Chin e67eff2e24 patch 9.1.1113: tests: Test_terminal_builtin_without_gui waits 2 seconds
Problem:  tests: Test_terminal_builtin_without_gui waits 2 seconds
Solution: add --not-a-term to remove the annoying 2s delay in error
          message when Vim detects that stdio are not from a terminal
          (Yee Cheng Chin)

closes: #16635

Signed-off-by: Yee Cheng Chin <ychin.git@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-14 18:01:25 +01:00
zeertzjq b6c900be9c patch 9.1.1112: Inconsistencies in get_next_or_prev_match()
Problem:  Inconsistencies in get_next_or_prev_match() (after 9.1.1109).
Solution: Change "file" to "entry" or "match" in comments.  Use the same
          order of branches for PAGEUP and PAGEDOWN (zeertzjq).

closes: #16633

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-14 17:59:31 +01:00
glepnir faf4112cdc runtime(doc): document ComplMatchIns highlight for insert-completion
closes: #16636

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-14 17:57:52 +01:00
Luca Saccarola 73d8222b31 runtime(netrw): upstream snapshot of v177
relevant commits:
- defaults!: use 'suffixes' for 'g:netrw_sort_sequence'
- refactor: remove associated buffer when deliting a file
- refactor: s:NetrwLocalRm
- refactor: s:NetrwDelete
- refactor: s:NetrwLocalRmFile
- feat: use vim.notify on neovim
- fix: prefer v:lua instead of luaeval for vim.deprecate
- chore: remove old batteries

closes: #16638

Signed-off-by: Luca Saccarola <github.e41mv@aleeas.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-14 17:54:22 +01:00
Yee Cheng Chin 961c25235b Merge pull request #1556 from ychin/fix-test-dark-mode-flakiness
Fix MacVim dark mode test being a little flaky
2025-02-13 23:16:06 -08:00
Yee Cheng Chin fa4f21c122 Fix MacVim dark mode test being a little flaky
We need to make sure to wait for Vim to handle the system appearance
change message before querying it or it would be subject to timing
issues.
2025-02-13 20:50:31 -08:00
Yee Cheng Chin d4f3eca4ee Merge pull request #1555 from ychin/getcellpixels-update-docs-delay
Update getcellpixels() docs to point out the delay in MacVim GUI
2025-02-13 19:24:55 -08:00
Yee Cheng Chin 0b82a98ba9 Update getcellpixels() docs to point out the delay in MacVim GUI
#1554 added support for `getcellpixels()`, but it has a quirk in MacVim
in that it has a slight delay due to MacVim's asynchronous nature. Make
sure the documentation reflects that to avoid surprises.
2025-02-13 19:22:51 -08:00
Yee Cheng Chin 347d8c7327 Merge pull request #1554 from ychin/getcellpixels-support
Implement getcellpixels() for MacVim
2025-02-13 17:58:10 -08:00
Yee Cheng Chin dd1a253df4 Implement getcellpixels() for MacVim
Don't use `gui.char_width` / `char_height` unlike the other GVim
implementations. Those are used for deriving screen pixel sizes and
MacVim has been hard-coding them to 1 for simplicity since the actual
GUI functionality is handled out of the Vim process anyway. Changing
those values would require some refactoring. Instead, just use a new
variable to store them.

Note that there is a delay with this method, as we only update Vim's
knowledge of cell size after MacVim has received the font change
message. This means if a user wants to immediately query getcellpixels()
in vimrc or after changing guifont this will not work. This is a
deliberate design choice to avoid having to add synchronous state query
APIs to MacVim, but it's possible to change it in the future. The
handling of this message did get placed in `processInput:` which means
it will be picked up whenever we sleep or process messages in Vim,
instead of only when waiting for keys (where most of other MacVim
messages are handled in `processInputQueue`).

Related: vim/vim#16004
2025-02-13 17:36:28 -08:00
Yee Cheng Chin e2f0b2421e Merge remote-tracking branch 'vim/master' 2025-02-13 14:15:55 -08:00
Hirohito Higashi bf7c88d852 patch 9.1.1111: Vim9: variable not found in transitive import
Problem:  Vim9: variable not found in transitive import
          (lifepillar)
Solution: fix import and class extends (Hirohito Higashi)

fixes: #16379
related: #16440
closes: #16602

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-13 21:04:07 +01:00
Yee Cheng Chin e70587dbdb patch 9.1.1110: Vim tests are slow and flaky
Problem:  Vim tests are slow and flaky at the same time due to reliance
          on timeouts which are unreliable.
Solution: improve Vim test performance and reduce flakiness
          (Yee Cheng Chin)

A lot of Vim tests currently rely on waiting a specific amount of time
before asserting a condition. This is bad because 1) it is slow, as the
timeout is hardcoded, 2) it's unreliable as a resource-starved runner
may overshoot the timeout. Also, there are a lot of builtin sleep
commands in commonly used utilities like VerifyScreenDump and WaitFor()
which leads to a lot of unnecessary idle time.

Fix these issues by doing the following:
1. Make utilities like VerifyScreenDump and WaitFor use the lowest wait
   time possible (1 ms). This essentially turns it into a spin wait. On
   fast machines, these will finish very quickly. For existing tests
   that had an implicit reliance on the old timeouts (e.g.
   VerifyScreenDump had a 50ms wait before), fix the tests to wait that
   specific amount explicitly.
2. Fix tests that sleep or wait for long amounts of time to instead
   explicitly use a callback mechanism to be notified when a child
   terminal job has finished. This allows the test to only take as much
   time as possible instead of having to hard code an unreliable
   timeout.

With these fixes, tests should 1) completely quickly on fast machines,
and 2) on slow machines they will still run to completion albeit slowly.
Note that previoulsy both were not true. The hardcoded timeouts meant
that on fast machines the tests were mostly idling wasting time, whereas
on slow machines, the timeouts often were not generous enough to allow
them to run to completion.

closes: #16615

Signed-off-by: Yee Cheng Chin <ychin.git@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-13 20:55:45 +01:00
glepnir 977561a719 patch 9.1.1109: cmdexpand.c hard to read
Problem:  cmdexpand.c hard to read
Solution: refactor the file slightly (glepnir)

closes: #16621

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-13 20:48:56 +01:00
Matt Perry d7deeffe11 runtime(exports): include simple filetype plugin
closes: #16625

Signed-off-by: Matt Perry <matt@mattperry.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-13 20:45:13 +01:00
Matt Perry 407319fe89 runtime(samba): include simple filetype plugin
closes: #16626

Signed-off-by: Matt Perry <matt@mattperry.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-13 20:42:43 +01:00
zeertzjq 2c47ab8fcd patch 9.1.1108: 'smoothscroll' gets stuck with 'listchars' "eol"
Problem:  'smoothscroll' gets stuck with 'listchars' "eol".
Solution: Count size of 'listchars' "eol" in line size when scrolling.
          (zeertzjq)

related: neovim/neovim#32405
closes: #16627

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-13 20:34:34 +01:00
glepnir c0b7ca406b patch 9.1.1107: cannot loop through completion menu with fuzzy
Problem:  cannot loop through completion menu with fuzzy and nosort in
          'completeopt'
          (Tomasz N)
Solution: Reset cur to zero and update compl_shown_match when
          'completeopt' contains "nosort" but not "noselect"
          (glepnir)

fixes: #16624
closes: #16629

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-13 20:27:44 +01:00
Doug Kearns 4f010c90bd runtime(vim): Update base-syntax, always match continuation comments to EOL
closes: #16630

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-13 20:24:42 +01:00
Wu, Zhenyu 8f3277fbbe runtime(nroff): set define option & add matchit config in ftplugin
closes: #16619

Signed-off-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Signed-off-by: Aman Verma <amanraoverma@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-12 20:58:57 +01:00
Doug Kearns a9c06429ac runtime(vim): Update base-syntax, match Vim9 boolean and null literals in parens
- Match Vim9 boolean and null literals in parenthesised expressions and
  function argument lists.
- Match read-only registers in expressions.

closes: #16622

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-12 20:44:17 +01:00
Yee Cheng Chin 6eea0b8931 Merge pull request #1553 from ychin/fix-ci-macvim-test-ipcselectedtext
ci: Fix MacVim test breakage for testIPCSelectedText test
2025-02-12 11:41:24 -08:00
Yee Cheng Chin b6dbf0540a ci: Fix MacVim test breakage for testIPCSelectedText test
It seems that the input system is a little flaky and can occasionally
drop the full command. Switching to a regular Vim function seems to
alleviate this for now. This would be looked at and revamped in more
details when we drop Distributed Objects soon.
2025-02-12 11:21:14 -08:00
Yee Cheng Chin 712e067015 Merge pull request #1552 from ychin/fix-writing-tools-and-services-text-replacement
Fix Writing Tools integration and fix up Services integration with texts
2025-02-12 05:42:34 -08:00
Christian Brabandt 88ce0c546b patch 9.1.1106: tests: Test_log_nonexistent() causes asan failure
Problem:  tests: Test_log_nonexistent() causes asan failure
          (Hirohito Higashi)
Solution: don't run vim using system(), but run Vim in a terminal

related: #16602
related: #16610

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-11 22:58:20 +01:00
Yegappan Lakshmanan 7e89800988 patch 9.1.1105: Vim9: no support for protected new() method
Problem:  Vim9: no support for protected new() method
Solution: support the protected "_new()" object method
          (Yegappan Lakshmanan)

closes: #16604

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-11 22:07:05 +01:00
Drew Vogel f0ed0e6f63 patch 9.1.1104: CI: using Ubuntu 22.04 Github runners
Problem:  CI: uses Ubuntu 22.04 runners
Solution: Switch to Ubuntu 24.04 runners, make a few adjustments for
          different $TMPDIR (Drew Vogel)

closes: #16442

Signed-off-by: Drew Vogel <dvogel@github>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-11 21:36:33 +01:00
Yee Cheng Chin db26a3b1ac Fix Writing Tools integration and fix up Services integration with texts
Apple "Intelligence" Writing Tools was previously not working correctly
with MacVim. When the user chooses to replace the original selection
with the updated texts, MacVim mistreats the input and treat them as
commands instead of raw texts. The reason was that even though this
service uses the NSServicesMenuRequestor API to obtain the selected
texts, it does not use it to send over the replacement. Instead, it uses
NSTextInput's `insertText:replacementRange` to do so instead, which we
never implemented properly. The reason behind this choice was probably
because Writing Tools first shows a UI with user interaction and has a
delay between obtaining the texts and replacing them, like a regular
Services menu. This means the selection may already be invalid by the
time it requests a replacement.

To fix this, add a new IPC API `replaceSelectedText` to replace the
selected texts and redirect `insertText:replacementRange` to use it if
the replacement range is non-empty. This isn't the most correct
implementation of the protocol but should work in most cases. We don't
have a way to implement it "correctly" as MacVim does not have easy
access to Vim's internal text storage. Also make sure the Service
menu uses this API (for things like "convert to full width" and
Traditional/Simplified Chinese conversions). The old method of simple
injecting a normal mode command `s` before the text was horribly buggy.
It also works with visual block selection properly now.

The implementation uses Vim's register put functionality because Vim
doesn't have an API to simply replace a block of text, and everything
has to go through registers. At the same time, replace the
implementation for the old `selectedText` IPC API to not do this,
because Vim *did* end an API to do so for obtaining texts (via
`getregion()`) and it's more stable to use this than to manually
cache/restore registers.

Related: vim/vim#16596 (fixes `setreg()` which this uses)

Fix #1512
2025-02-11 11:25:33 -08:00
Yee Cheng Chin 5881828104 ci: syntax tests spam output
Currently syntax tests outputs all the Vim commands to the console,
which is annoying for a local developer but also makes the CI output
impossible to parse and just printing all the terminal output comes with
a performance penalty.

So let's just simply redirect all output to /dev/null similar to what
the script tests do.

This can be turned off locally for someone diagnosing issues but it
should not be the default behavior to output all terminal control
sequences to output in CI.

closes: #16612

Signed-off-by: Yee Cheng Chin <ychin.git@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-11 20:16:11 +01:00
Drew Vogel 8cc725e927 patch 9.1.1103: if_perl: still some compile errors with Perl 5.38
Problem:  if_perl: still some compile errors with Perl 5.38
Solution: copy declaration of PL_memory_wrap from Perl header
          (Drew Vogel)

closes: #16613

Signed-off-by: Drew Vogel <dvogel@github>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-11 20:06:07 +01:00
Christian Brabandt bfc7719e48 patch 9.1.1102: tests: Test_WinScrolled_Resized_eiw() uses wrong filename
Problem:  tests: Test_WinScrolled_Resized_eiw() uses wrong filename
          (Luuk van Baal, after v9.1.1084)
Solution: Rename the filename to something more unique

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-11 20:03:10 +01:00
glepnir 40891bac5d patch 9.1.1101: insexpand.c hard to read
Problem:  insexpand.c hard to read
Solution: refactor slightly to make it better readable
          (glepnir)

Problem:
- Complex while loops with nested conditions
- Redundant if branches
- Hard to understand and maintain

Solution:
- Restructure using while(true) with clear break conditions
- Using ternary to replace some if conditions
- Add descriptive comments for each step

closes: #16600

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-10 22:18:00 +01:00
Christian Brabandt 35e02af7bf patch 9.1.1100: tests: Test_log_nonexistent only works on Linux
Problem:  tests: Test_log_nonexistent only works on Linux
          (after v9.1.1097)
Solution: Add CheckUnix condition

closes: #16476

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-10 22:13:43 +01:00
Doug Kearns 1aa287e048 runtime(vim): Update base-syntax, improve variable matching
- Match variables after operators, including line continuations.
- Match option variables without leading whitespace.
- Explicitly match expression subscripts.
- Match Vim9 variables in LHS of assignments and method calls.
- Match option variables (&option) with a dedicated syntax group like
  environment variables.
- Match list literals, fixes: #5830
- Match :{un}lockvar arguments.
- Match registers and environment variables in :let unpack lists.
- Match lambda expressions
- Match Vim9 scope blocks
- Match variables in :for subject
- Highlight user variables with Normal
- Improve this/super keyword matching, fixes: #15970

closes: #16476

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-10 22:00:27 +01:00
Yegappan Lakshmanan 54d7f18c38 patch 9.1.1099: Vim9: import with extends may crash
Problem:  Vim9: import with extends may crash, v9.1.1087 wasn't the
          correct way to fix it)
Solution: When using an import class, Check for a valid class member
          variable at compile time (Yegappan Lakshmanan)

related: #16601
closes: #16603

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-10 21:35:07 +01:00
glepnir e3647c8bf5 patch 9.1.1098: leaking memory with completing multi lines
Problem:  leaking memory with completing multi lines
          (after v9.1.1086)
Solution: free allocated memory (glepnir)

closes: #16605

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-10 21:16:32 +01:00
Hirohito Higashi c5654b8448 patch 9.1.1097: --log with non-existent path causes a crash
Problem:  --log with non-existent path causes a crash
          (Ekkosun)
Solution: split initialization phase and init the execution stack
          earlier (Hirohito Higashi)

fixes: #16606
closes: #16610

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-10 21:12:19 +01:00
Drew Vogel 97baa1cfe8 patch 9.1.1096: if_perl: Perl 5.38 adds new symbols causing link failure
Problem:  if_perl: Perl 5.38 adds new symbols causing link failure
Solution: add stub symbols (Drew Vogel)

closes: #16611

Signed-off-by: Drew Vogel <dvogel@github>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-10 20:17:56 +01:00
Christian Brabandt 7de6b1bb56 patch 9.1.1095: tests: matchparen plugin test wrongly named
Problem:  tests: matchparen plugin test wrongly named
          (zeertzjq)
Solution: rename test_matchparen to test_plugin_matchparen
          to be consistent with the other plugin tests

related: #16599

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-10 20:12:46 +01:00
Yegappan Lakshmanan 68d0858892 patch 9.1.1094: Vim9: problem finding implemented method in type hierarchy
Problem:  Vim9: problem finding implemented method for abstract method
          in type hierarchy (Aliaksei Budavei)
Solution: When checking for abstract methods in an extended class, check
          whether an abstract method is implemented in one of the parent
          classes (Yegappan Lakshmanan)

fixes: #16495
closes: #16497

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-09 19:39:52 +01:00
Doug Kearns f30eb4a170 runtime(qf): Update syntax file, match second delimiter
Match both | separators and link to the Delimiter highlight group.

fixes #16584
closes: #16590

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-09 18:40:05 +01:00
Christian Brabandt 3cfac59f92 patch 9.1.1093: tests: output of test ...win32_ctrl_z depends on python version
Problem:  tests: output of test Test_terminal_eof_arg_win32_ctrl_z depends on python
          version.
Solution: Check for the expected output in both, the second last line
          and last line

It seems python 3.13 changed the output a bit and there is no longer a
trailing blank line.  So to keep compatible with python < 3.13, let's
check for the expected output in either the last line and the second
last line.

closes: #16599

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-09 17:22:30 +01:00
Christian Brabandt 2e4361bd40 patch 9.1.1092: tests: fix expected return code for python 3.13 on Windows
Problem:  tests: fix expected return code for python 3.13 on Windows
Solution: Check for return code 1 or 123 on Windows

There is a regression with python 3.13 on Windows, that it no longer
prints the requested error code, but instead exits with return code 1,
which  breaks the test-suite.

So let's check for either exit code 1 or 123 in tests
Test_terminal_duplicate_eof_arg() and Test_terminal_eof_arg()

This will probably be fixed on the Python side, see the pull request
python/cpython#129901 but in the meantime, let's allow both error codes.

related: #16599
related: python/cpython#129900

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-09 17:18:07 +01:00
Christian Brabandt ec7a4e4d69 patch 9.1.1091: tests: timeout might be a bit too small
Problem:  tests: timeout might be a bit too small
Solution: increase the test timeout from 30 to 45 seconds

related: #16599

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-09 17:16:36 +01:00
Christian Brabandt aae1bfbdb9 patch 9.1.1090: tests: test_terminwscroll_topline2 unreliable
Problem:  tests: test_terminwscroll_topline2 unreliable
          (Yee Cheng Chin)
Solution: instead of using term_wait() with a specific time, use
          terminal-api and to wait until the terminal is finished

call a terminal callback function when finished printing, instead of
using term_wait(), with a defined time, which caused timeouts on CI
with the macos runners

Unfortunately I couldn't figure out how to call the terminal-api on Windows,
so skip the test on Windows. cmd.com echo didn's seem to work and
neither did trying to use python, but perhaps it was just me fighting
with the terminal quoting rules 🤷

related: #16599
related: #16552

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-09 17:10:30 +01:00
Christian Brabandt 6f14ef4b0b patch 9.1.1089: tests: No check when tests are run under Github actions
Problem:  tests: No check when tests are run under Github actions
Solution: Add the CheckGithubActions check command and skip test if
          needed

related: #16599
related: actions/runner-images#11512

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-09 17:05:21 +01:00
Christian Brabandt 934d9ab3a2 patch 9.1.1088: tests: plugin tests are named inconsistently
Problem:  tests: plugin tests are named inconsistently
Solution: group them under a common 'plugin' prefix

related: #16599

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-09 17:03:31 +01:00
Hirohito Higashi 645a4288e2 patch 9.1.1087: Vim9: import with extends may crash
Problem:  Vim9: import with extends may crash
Solution: check otv for being NULL before trying to access it
          (Hirohito Higashi)

closes: #16601

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-09 16:41:23 +01:00
glepnir 76bdb82527 patch 9.1.1086: completion doesn't work with multi lines
Problem:  completion doesn't work with multi lines
          (Łukasz Jan Niemier)
Solution: handle linebreaks in completion code as expected
          (glepnir)

fixes: #2505
closes: #15373

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-08 19:09:02 +01:00
Christoph Sax 746fe54d4f patch 9.1.1085: filetype: cmmt files are not recognized
Problem:  filetype: cmmt files are not recognized
Solution: detect '*.cmmt' as trace32 filetype
          (Christian Sax)

"*.cmmt" files use the same syntax as regular TRACE32 scripts,
but are intended as a kind of script template.

closes: #16598

Signed-off-by: Christoph Sax <c_sax@mailbox.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-08 19:01:05 +01:00
Luuk van Baal b7147f8236 patch 9.1.1084: Unable to persistently ignore events in a window and its buffers
Problem:  Unable to persistently ignore events in a window and its buffers.
Solution: Add 'eventignorewin' option to ignore events in a window and buffer
          (Luuk van Baal)

Add the window-local 'eventignorewin' option that is analogous to
'eventignore', but applies to a certain window and its buffers. Identify
events that should be allowed in 'eventignorewin', adapt "auto_event"
and "event_tab" to encode this information. Window context is not passed
onto apply_autocmds_group(), and when to ignore an event is a bit
ambiguous when "buf" is not "curbuf", rather than a large refactor, only
ignore an event when all windows into "buf" are ignoring the event.

closes: #16530

Signed-off-by: Luuk van Baal <luukvbaal@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-08 18:52:39 +01:00
Eisuke Kawashima a35040f795 runtime(tex): improve syntax highlighting
this change includes the following changes:
- a macro option must be #1–#9
- add \providecommand
- add starred versions of \newcommand, \newenvironment, and their
  variants
- add number of arguments to \(re)newenvironment

Signed-off-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-08 18:32:14 +01:00
Yee Cheng Chin a17f8bfb28 patch 9.1.1083: setreg() doesn't correctly handle mbyte chars in blockwise mode
Problem:  setreg() doesn't correctly handle mbyte chars in blockwise
          mode
Solution: use mb_ptr2len_len function pointer (Yee Cheng Chin)

setreg() will automatically calculate the width when a blockwise mode is
specified, but it does not properly calculate the line widths of mbyte
characters when value is passed as newline-terminated string. It does
work when value is passed as a list of lines though.

Fix this by properly using the mbyte function pointer to increment the
loop counter.

closes: #16596

Signed-off-by: Yee Cheng Chin <ychin.git@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-08 18:19:15 +01:00
Julio B a6d5778d9b patch 9.1.1082: unexpected DCS responses may cause out of bounds reads
Problem:  unexpected DCS responses may cause out of bounds reads
          (after v9.1.1054)
Solution: check that the parsed value is '=' as expected
          (Julio B)

Signed-off-by: Julio B <julio.bacel@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-07 20:54:56 +01:00
Yee Cheng Chin 252a1330da Merge pull request #1549 from ychin/no-flicker-enter-nonnative-fullscreen
Reduce flicker when entering non-native full screen
2025-02-06 21:13:24 -08:00
Yee Cheng Chin 16b2af7aa7 Reduce flicker when entering non-native full screen
In #1547, flicker during font size change and showing tab/scrollbar were
reduced. Here, we do something similar for the flicker that happens when
entering non-native full screen, where the temporarily moved text view
shows a brief temporary draw before the updated Vim redraws over it,
leading to a flicker. Use the same mechanism here to block rendering and
offset the text view draw while we wait for Vim to preserve visual
stability as much as possible.

No need to do this for native full screen as the smooth but slow
transition means there isn't a sharp flicker anyway.

Also, reduce the "fill right" behavior of Core Text renderer (#1276).
It's designed to make smooth resizing more seamless but it fills all the
way to the right which makes situations like this or maximizing the
window jarrying as Vim looks stretched horizontally but not vertically
during the resize before Vim catches up and resizes/redraws. Just put a
sane cap of 4 cell widths. This way even if Vim is a little slow to
respond, smooth resize still looks good, but it won't stretch across the
whole screen.
2025-02-06 20:17:45 -08:00
Yee Cheng Chin a3a185c309 Merge pull request #1548 from ychin/non-native-fullscreen-menubar-height-calc
Fix non-native full screen menu sizing / make resize option updates immediate
2025-02-06 19:42:01 -08:00
Yee Cheng Chin 024706611d Fix non-native full screen menu sizing / make resize option updates immediate
Problem: Non-native full screen has an option to show the menu bar but
it does not work properly in some multi-monitor scenarios. On a MacBook
with a notch it would sometimes use the thicker notch menu bar height
even when going full screen on a regular monitor, and when using a
single Space for all displays it would also show a black bar on top on
the screen that does not have the menu bar.

Solution: Use the NSScreen visibleFrame API exclusively instead of
querying the menu bar height which seems to be inconsistent. There are
some quirks with this API (e.g. a one-pixel gap) but we already handle
it when handling non-native full screen on a laptop screen with notch so
it's best to consolidate the code paths.

Also, make the "show menu bar" option immediate when changing it in
preference pane. As a corollary, this also makes changing "smooth
scrolling" option immediate, as well as liveResizeDidEnd's delayed
pending resize.
2025-02-06 18:46:41 -08:00
Zhaoming Luo a41dfcd55b patch 9.1.1081: has('bsd') is true for GNU/Hurd
Problem:  has('bsd') is true for GNU/Hurd
Solution: exclude GNU/Hurd from BSD feature flag
          (Zhaoming Luo)

GNU/Hurd, like Mac OS X, is a BSD-based system. It should exclude
has('bsd') feature just like what Mac OS X does. The __GNU__ pre-defined
macro indicates it's compiled for GNU/Hurd.

closes: #16580

Signed-off-by: Zhaoming Luo <zhmingluo@163.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-06 21:39:35 +01:00
Chris Kipp 9c8f9b10fc patch 9.1.1080: filetype: Mill files are not recognized
Problem:  filetype: Mill files are not recognized
Solution: detect '*.mill' files as scala filetype
          (author)

In the past [Mill](https://mill-build.org/mill/index.html) build files
were always `build.sc` and treated as Scala files. However as the 0.12.x
series of mill you can create a `build.mill` file. You can see a lot of
examples of this if you search
[GitHub](https://github.com/search?q=build.mill&type=code). This small
change just ensures that if you have a `*.mill` file it treats it as a
Scala file.

closes: #16585

Signed-off-by: Chris Kipp <ckipp@pm.me>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-06 21:26:08 +01:00
Yee Cheng Chin a5e03f68a8 patch 9.1.1079: GUI late startup leads to uninitialized scrollbars
Problem:  GUI late startup leads to uninitialized scrollbars
Solution: initialize scrollbars for all windows in all tabpages
          (Yee Cheng Chin)

GUI startup was erroneously only initializing scrollbars for all windows
in current tab, instead of all tabs. This breaks if the user has created
tab pages before using `:gui` command to enter GUI mode, or sourced a
session file in vimrc.

closes: #16588
related: macvim-dev/macvim#862

Signed-off-by: Yee Cheng Chin <ychin.git@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-06 21:18:17 +01:00
Corpulent Robin b69cd52447 runtime(misc): Add support for lz4 to tar & gzip plugin
while at it, clean up the tar plugin a bit and sort the patterns for the
tar and gzip plugin

References:
- https://github.com/lz4/lz4
- https://lz4.org/

closes: #16591

Signed-off-by: Christian Brabandt <cb@256bit.org>
Signed-off-by: Corpulent Robin <177767857+corpulentrobin@users.noreply.github.com>
2025-02-06 21:10:49 +01:00
Julio B cde8ff63e2 patch 9.1.1078: Terminal ansi colors off by one after tgc reset
Problem:  Terminal ansi colors off by one after tgc reset
Solution: Set the correct index for libvterm palette,
          revert parts in libvterm/src/pen.c that deviated from upstream
          (Julio B)

fixes: #16568
closes: #16573
related: Vim patch v8.2.0804

Co-authored-by: Christian Brabandt <cb@256bit.org>
Signed-off-by: Julio B <julio.bacel@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-06 20:31:27 +01:00
Theodore Dubois f50d5364d7 patch 9.1.1077: included syntax items do not understand contains=TOP
Problem:  Syntax engine interpreted contains=TOP as matching nothing
          inside included files, since :syn-include forces HL_CONTAINED
          on for every included item. After 8.2.2761, interprets
          contains=TOP as contains=@INCLUDED, which is also not correct
          since it doesn't respect exclusions, and doesn't work if there
          is no @INCLUDED cluster.
Solution: revert patch 8.2.2761, instead track groups that have had
          HL_CONTAINED forced, and interpret contains=TOP and
          contains=CONTAINED using this. (Theodore Dubois)

fixes: #11277
closes: #16571

Signed-off-by: Theodore Dubois <tblodt@icloud.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-05 23:59:25 +01:00
Yee Cheng Chin dc49d725a7 Merge pull request #1547 from ychin/font-change-newtab-no-flicker
Reduce flicker when changing fonts/adding tabs in go+=k/fullscreen
2025-02-05 10:02:07 -08:00
Yee Cheng Chin 767ffc4eef Reduce flicker when changing fonts/adding tabs in go+=k/fullscreen
MacVim would previously show a quick flicker when adjusting font (e.g.
Cmd =/-) or showing/hiding tabs/scroll bar when in fixed window size
mode (guioptions+=k or full screen). This was because after the state
change, Vim requests a resize asynchronously to the GUI to fit it in the
window.  MacVim does so after changing the font/showing the tab, leading
to a momentary incorrect result before Vim then redraws the resized
grid. In normal GVim this is not an issue because Vim requests the
resize synchronously in a single-process environment, and we would like
to avoid that as the message passing between Vim/MacVim and designed to
be mostly non-blocking.

To fix this, after receiving the Vim resize request, we block all
further text rendering commands, until Vim has resized / redrawn,
preventing the short period of time where text view is drawing the old
state using the new font. For tabs / scroll bars, the text view itself
has moved after the new layout, so we temporarily apply a render offset
to make the text view pretend it didn't move and looks mostly the same
to the user while we wait for Vim to redraw with the updated grid.

There are some potential ways to still see flicker, but they are mostly
edge cases:

- When changing fonts, if Vim is slow and the user gets MacVim to
  re-draw the text view (e.g. dragging the window to resize) while we
  wait for Vim to resize, it would still draw an incorrect result (since
  it has the new font, but old text grid). This should realistically
  only happen if Vim takes an abnormal amount of time to respond.
- For tabs / scrollbars we have a similar issue. We immediately
  place/remove them while we wait for Vim to resize, which could cause a
  small visual discontinuity (easiest way is to toggle `go+=e`). From
  testing, having the tab bar / etc immediately show up and hide feels
  better as the user feels like something has happened, so keeping the
  responsiveness is more important than delaying showing/hiding the tab
  bar for visual stability (not to mention the deferral is more
  complicated to implement).

If Vim takes a long time to resize/redraw, this change could make font
size change *feel* less responsive because nothing happens on the screen
until the fully redrawn screen is shown. This is ok, and if Vim takes so
long to resize then that's the actual issue to address.

This change also removes unnecessary code:

- Excessive and unnecessary redraws when showing/hiding tabs and setting
  fonts. They were written a long time ago as temporary hacks which
  survived till now. From testing this makes changing font size and
  showing/hiding tabs feel a fair bit more responsive because Vim isn't
  trying to redraw over and over again now.
- Stale "maximize" code that has long been unused. It was trying to solve
  a similar issue but long obsolete and disabled.
2025-02-05 05:19:40 -08:00
Yee Cheng Chin 5c462e7cbc Merge pull request #1546 from ychin/fix-blurradius-fullscreen
Fix non-native full screen to support 'blurradius'
2025-02-04 23:59:36 -08:00
zeertzjq 34e1e8de91 patch 9.1.1076: vim_strnchr() is strange and unnecessary
Problem:  vim_strnchr() is strange and unnecessary (after v9.1.1009)
Solution: Remove vim_strnchr() and use memchr() instead.  Also remove a
          comment referencing an #if that is no longer present.

vim_strnchr() is strange in several ways:
- It's named like vim_strchr(), but unlike vim_strchr() it doesn't
  support finding a multibyte char.
- Its logic is similar to vim_strbyte(), but unlike vim_strbyte() it
  uses char instead of char_u.
- It takes a pointer as its size argument, which isn't convenient for
  all its callers.
- It allows embedded NULs, unlike other "strn*" functions which stop
  when encountering a NUL byte.

In comparison, memchr() also allows embedded NULs, and it converts bytes
in the string to (unsigned char).

closes: #16579

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-04 16:48:36 +01:00
Hirohito Higashi f7cb9f9280 patch 9.1.1075: Vim9: len variable not used in compile_load()
Problem:  Vim9: length variable not used in compile_load()
Solution: use len instead of re-calculating the length
          (Hirohito Higashi)

closes: #16582

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-04 16:40:08 +01:00
Yee Cheng Chin 9162e2c802 Fix non-native full screen to support 'blurradius' 2025-02-04 02:26:08 -08:00
Doug Kearns 4a530a632b runtime(vim): Update base-syntax, match :debuggreedy count prefix
Match :0debuggreedy as a special case until better range/count support
is implemented.

closes: #16572

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-03 18:59:09 +01:00
zeertzjq 449c2e5454 patch 9.1.1074: Strange error when heredoc marker starts with "trim"
Problem:  Strange error when heredoc marker starts with "trim".
Solution: Check for whitespace after "trim" or "eval" (zeertzjq)

For :python3 etc., a heredoc marker that starts with a lower-case letter
is valid, and when it starts with "trim" it works in a script but not in
a function, and this PR makes it works in a function.
For :let, a heredoc marker that starts with a lower-case letter is not
valid, but when it starts with "trim" or "eval" the error can be a bit
confusing in a function, and this PR make it less confusing.

closes: #16574

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-03 18:56:16 +01:00
zeertzjq 23da16d3d0 patch 9.1.1073: tests: test_compiler fails on Windows without Maven
Problem:  tests: test_compiler fails on Windows without Maven.
Solution: Add Xspotbugs directory to $PATH when mvn is not available
          (zeertzjq).

closes: #16576

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-03 18:53:28 +01:00
zeertzjq ccd7f454fc patch 9.1.1072: 'diffopt' "linematch" cannot be used with {n} less than 10
Problem:  'diffopt' "linematch" cannot be used with {n} less than 10
          digits (after v9.1.1022)
Solution: Fix off-by-one error when checking for digit (zeertzjq)

closes: #16577

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-03 18:49:49 +01:00
zeertzjq 04d2a3fdc0 patch 9.1.1071: args missing after failing to redefine a function
Problem:  Arguments of a function are missing after failing to redefine
          it (after 8.2.2505), and heap-use-after-free with script-local
          function (after 9.1.1063).
Solution: Don't clear arguments or free uf_name_exp when failing to
          redefine an existing function (zeertzjq)

closes: #16567

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-02 19:04:22 +01:00
zeertzjq edf0f7db28 patch 9.1.1070: Cannot control cursor positioning of getchar()
Problem:  Cannot control cursor positioning of getchar().
Solution: Add "cursor" flag to {opts}, with possible values "hide",
          "keep" and "msg".

related: #10603
closes: #16569

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-02 19:01:01 +01:00
glepnir 001c26cd61 patch 9.1.1069: preinsert text completions not deleted with <C-W>/<C-U>
Problem:  preinsert text completions not deleted with <C-W>/<C-U>
          (ddad431, after v9.1.1059)
Solution: handle <C-W> or <C-U> specifically and clear the completion
          (glepnir)

fixes: #16557
closes: #16565

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-02 09:36:22 +01:00
zeertzjq e0a2ab397f patch 9.1.1068: getchar() can't distinguish between C-I and Tab
Problem:  getchar() can't distinguish between C-I and Tab.
Solution: Add {opts} to pass extra flags to getchar() and getcharstr(),
          with "number" and "simplify" keys.

related: #10603
closes: #16554

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-02 09:14:35 +01:00
Philip H. cbc1f409c1 CI: bump windows python to 3.13
closes: #16562

Signed-off-by: Philip H. <47042125+pheiduck@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-02 09:08:05 +01:00
Christian Brabandt 44a21351a8 patch 9.1.1067: tests: Test_termwinscroll_topline2 fails on MacOS
Problem:  tests: Test_termwinscroll_topline2 fails on MacOS
          (after v9.1.1062)
Solution: reduce termwinscroll further, increase term_wait time

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-02 09:03:00 +01:00
zeertzjq 2101230f40 patch 9.1.1066: heap-use-after-free and stack-use-after-scope with :14verbose
Problem:  heap-use-after-free and stack-use-after-scope with :14verbose
          when using :return and :try (after 9.1.1063).
Solution: Move back the vim_free(tofree) and the scope of numbuf[].
          (zeertzjq)

closes: #16563

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-02 08:55:57 +01:00
Yee Cheng Chin ac134634d3 Merge pull request #1545 from ychin/fix-dmg-duplicate-images
Fix dmg installer to not have duplicate images and icons
2025-02-01 19:48:02 -08:00
Yee Cheng Chin d04d99de73 Fix dmg installer to not have duplicate images and icons
We added a new step in #1540 to generate the image / icon set for the
dmg installer during the dmg build step, but the intermediate files were
erroneously placed in the same folder as the one being copied over,
causing them to be in the final dmg as well. Just use a scratch folder
instead.
2025-02-01 18:25:22 -08:00
Yee Cheng Chin 7b4df97ece Merge pull request #1540 from ychin/dmg-design-updates
Beautify MacVim's dmg installer background and volume icon
2025-02-01 14:28:36 -08:00
Yee Cheng Chin 1ca0a976db Merge pull request #1544 from ychin/guifont-monospace-fontsizeupdown-keep-alias
Fix fontSizeUp/Down actions to preserve -monospace- font alias
2025-02-01 14:28:06 -08:00
Yee Cheng Chin dbdc27d0f8 Fix fontSizeUp/Down actions to preserve -monospace- font alias
This prevents using Cmd +/- to adjust font size resulting in guifont
being set from "-monospace-" to a non-user-friendly internal name like
".AppleSystemUIFontMonospaced-Regular".
2025-02-01 09:24:11 -08:00
Hans Ginzel 3a621188ee patch 9.1.1065: no digraph for "Approaches the limit"
Problem:  no digraph for "Approaches the limit"
Solution: Add the digraph using .= (Hans Ginzel)

Add digraph Approaches the Limit

≐ U+2250 https://www.fileformat.info/info/unicode/char/2250/index.htm

closes: #16508

Signed-off-by: Hans Ginzel <hans@matfyz.cz>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-01 16:17:14 +01:00
Christ van Willegen c078675ac7 patch 9.1.1064: not possible to use plural forms with gettext()
Problem:  not possible to use plural forms with gettext()
Solution: implement ngettext() Vim script function (Christ van Willegen)

closes: #16561

Signed-off-by: Christ van Willegen <cvwillegen@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-01 15:47:51 +01:00
John Marriott b32800f7c5 patch 9.1.1063: too many strlen() calls in userfunc.c
Problem:  too many strlen() calls in userfunc.c
Solution: refactor userfunc.c and remove calls to strlen(),
          drop set_ufunc_name() and roll it into alloc_ufunc(),
          check for out-of-memory condition in trans_function_name_ext()
          (John Marriott)

closes: #16537

Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-01 15:25:34 +01:00
Hirohito Higashi 3219da514c patch 9.1.1062: terminal: E315 when dragging the terminal with the mouse
Problem:  terminal: E315 when dragging the terminal with the mouse
          (user202729)
Solution: call update_topline() and validate_cursor() when clicking
          on the status line with the mouse (Hirohito Higashi)

fixes: #16024
fixes: #16211
closes: #16552

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-01 14:48:35 +01:00
Yee Cheng Chin 8ac49d696a MacVim r180.2 (prerelease)
Updated to Vim 9.1.1050
2025-02-01 03:05:40 -08:00
Yee Cheng Chin bb8d406099 Merge pull request #1542 from ychin/macvim-dont-sign-PSMTabBarControl
Don't sign PSMTabBarControl in code signing
2025-02-01 03:05:07 -08:00
Yee Cheng Chin 28bae8cefb Don't sign PSMTabBarControl in code signing
This has been removed and replaced by MMTabline which isn't a separate
framework.
2025-02-01 03:04:34 -08:00
Morton Fox 7c930eb61a runtime(openPlugin): fix unclosed parenthesis in GetWordUnderCursor()
Problem:

Saw the following error when invoking gx mapping with cursor on a URL:

    Error detected while compiling function <SNR>95_GetWordUnderCursor:
    line    7:
    E1123: Missing comma before argument: return expand(user_var)
    E116: Invalid arguments for function dist#vim9#Open

Solution:

The line before "return expand(...)" has two open parentheses but only
one close parenthesis. Add another close parenthesis.

closes: #16553

Signed-off-by: Morton Fox <github@qslw.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-01 10:28:52 +01:00
Hirohito Higashi 195fcc90d0 runtime(doc): Tweak documentation style a bit
closes: #16556

Signed-off-by: Christian Brabandt <cb@256bit.org>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
2025-02-01 10:26:58 +01:00
Yee Cheng Chin c8a844c6ee Merge pull request #1541 from ychin/ci-dont-run-broken-vim-syntax-tests
ci: Don't run Vim non-src tests (indent/syntax etc)
2025-02-01 01:12:54 -08:00
Yee Cheng Chin 65c9fc5775 ci: Don't run Vim non-src tests (indent/syntax etc)
Currently Vim syntax tests are quite broken and keep failing in MacVim
CI. There seems to be some Unicode / emoji handling bug causing tests to
fail sporadically, and the syntax tests also spam the console output as
they aren't redirecting output to /dev/null like normal Vim script
tests. Just disable them for now until this is fixed.

This should not cause much issues anyway. It's unlike MacVim will have
any downstream syntax/indent bugs as those files are mostly merged from
upstream as-is.
2025-02-01 00:20:59 -08:00
Yee Cheng Chin ed41976f21 Merge pull request #1539 from ychin/mmtabs-option-colorscheme-use-tab-color-window
MMTabline: Add Vim colorscheme / window use tab fill color support
2025-01-31 21:17:04 -08:00
Yee Cheng Chin c22b4df9e7 Beautify MacVim's dmg installer background and volume icon
The existing background image for the MacVim dmg installer was quite
old. It did not have a 2x retina version, and design-wise it showed a
redundant MacVim logo when there's already a draggable MacVim app with
the same icon. Update the background image for a cleaner refreshed
design. Image was designed by Jason Long (@jasonlong).

Also, change the dmg's volume icon. We were using the MacVim logo as the
volume icon, but when mounting the image, it could lead to a confusing
state where the user sees a MacVim logo on the desktop, thinking it's
the app itself, but it's actually a dmg volume. Instead, use a new
designed volume icon with the macOS disk image icon overlaid with Vim's
logo/color for styling to make it clear it's a volume, not an app.
2025-01-31 19:56:42 -08:00
Yee Cheng Chin 663fba9d03 MMTabline: Add Vim colorscheme / window use tab fill color support
Tabs can now use colors defined by the Vim colorscheme under the
TabLine/TabLineFill/TabLineSel highlight groups. There are now 3
coloring modes available: default, automatic (the default mode that
generates matching colors using foreground/background colors), and Vim
colorscheme. The new mode looks quite nice in some colorschemes and
allows user customization, but for some existing ones it doesn't quite
look right as they were designed for non-GUI tabs, which is why it's not
the default.

MacVim window can now also use the tabline's fill color as the window
background color, which allows the title bar to show as a cohesive whole
when transparent title bar is set. This creates a nice look especially
when the colorscheme is designed for this.

Other tab coloring changes:
- Tabs now support high contrast mode (macOS accessibility setting) now.
  The default colors will use higher contrast colors, and in all modes,
  the tabs will be drawn with an outline similar to other system native
  UI to aid visual differentiation.
- Tabs will also show a dimmed text color when the window has lost
  focus, similar to other native title bar / tool bar UI elements.
- Fixed default colors to look a little better. Previously the fill
  color and unselected tab background colors were the same.
2025-01-31 18:56:16 -08:00
Christian Brabandt 85e3f24bea patch 9.1.1061: tests: test_glvs fails when unarchiver not available
Problem:  tests: test_glvs fails when unarchiver not available
          (Brian L. Matthews)
Solution: Check if an unarchiver is available, skip the test otherwise

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-31 17:02:32 +01:00
Christian Brabandt d7f5854fcc patch 9.1.1060: Vim always enables 'termguicolors' in a terminal
Problem:  Vim always enables 'termguicolors' in a terminal, even
          when not wanted (after v9.1.1054)
Solution: Respect `:set notermguicolors` in vimrc file

fixes: #16538
fixes: #16539
closes: #16540

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-31 16:16:48 +01:00
glepnir bfb4eea786 patch 9.1.1059: completion: input text deleted with preinsert when adding leader
Problem:  completion: input text deleted with preinsert when adding leader
Solution: remove compl_length and check the ptr for being equal
          to pattern when preinsert is active (glepnir)

closes: #16545

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-31 15:28:29 +01:00
Ivan Pešić fe0a9a3269 patch 9.1.1058: translation(sr): Missing Serbian translation for the tutor
Problem:  translation(sr): Missing Serbian translation for the tutor
Solution: include new Serbian translation for the new tutor,
          include translation for chapter 2 of the traditional tutor,
          update the Makefiles for installing the runtime files
          (Ivan Pešić)

closes: #16550

Signed-off-by: Ivan Pešić <27575106+eevan78@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-31 15:20:03 +01:00
zeertzjq 8297e2cee3 patch 9.1.1057: Superfluous cleanup steps in test_ins_complete.vim
Problem:  Superfluous cleanup steps in test_ins_complete.vim.
Solution: Remove unnecessary :bw! and :autocmd! commands.
          Also remove unnecessary STRLEN() in insexpand.c
          (zeertzjq)

closes: #16542

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-30 11:04:47 +01:00
Christian Brabandt 6d6ec2ee05 runtime(netrw): correct wrong version check
The version check introduced with commit edd4ac3e8 has a logic error.
Also it should only trigger when trying to use the netrw plugin and not
always.

fixes: #16541

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-30 11:00:35 +01:00
Yee Cheng Chin a7db694cf5 Merge pull request #1538 from ychin/mmtabs-rtl
MMTabline: Add right-to-left (RTL) locale support
2025-01-29 18:18:17 -08:00
Yee Cheng Chin 3f8e40538a MMTabline: Add right-to-left (RTL) locale support
In RTL locales (e.g. Arabic, Hebrew), macOS lays everything out in the
flipped direction, including most UI elements and native tabs. This
change makes sure MacVim tabs will obey the same convention and behave
intuitively in such locales. The buttons and UI elements in
MMTab/MMTabline already automatically get flipped. However, the logic of
handling the tabs placements, scrolling, and drag-and-drop use manual
calculations and need to be fixed up.

In order to keep scrolling stable, and for tabs animation to look
correct and the same as the left-to-right, we simply flip the frames we
use for tabs layout, by starting from 0 in X coordinate, and grow
towards the negative range. This helps keep most of the logic the same
while only needing to apply the X-flip adjustment in a couple places.

Also, as a minor adjustment, make the default widths of the tab just a
bit wider.
2025-01-29 17:14:36 -08:00
Yee Cheng Chin 62f5e1a707 Merge pull request #1537 from ychin/mmtabs-localization
MMTabline: Localize button strings
2025-01-29 16:49:14 -08:00
glepnir edd4ac3e89 patch 9.1.1056: Vim doesn't highlight to be inserted text when completing
Problem:  Vim doesn't highlight to be inserted text when completing
Solution: Add support for the "preinsert" 'completeopt' value
          (glepnir)

Support automatically inserting the currently selected candidate word
that does not belong to the latter part of the leader.

fixes: #3433
closes: #16403

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-29 18:58:04 +01:00
Luca Saccarola ec961b05dc runtime(netrw): upstream snapshot of v176
relevant commits:
- deprecate!: netrw#Launch, netrw#Open and gx mappings
- refactor: move some utility functions in a private file
- feat: add function to deprecate features
- refactor!: remove NetrwClean command and function
- refactor: use appropriate directories to store temporary files
- refactor: better way to call vim.ui.open
- refactor(Open): prefer lua wrapper function instead of cmdline
- refactor!: drop vim 7 checks
- refactor: use vim.ui.open when using neovim
- refactor: remove s:CheckIfKde
- refactor: balloon functionality
- refactor!: remove netrw#Access function

closes: #16519

Signed-off-by: Luca Saccarola <github.e41mv@aleeas.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-29 18:39:30 +01:00
Luca Saccarola 766801295d runtime(dist/vim9): fix regressions in dist#vim9#Open
fixes: #16533
fixes: #16532
closes: #16535

Signed-off-by: Luca Saccarola <github.e41mv@aleeas.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-29 18:36:01 +01:00
Yee Cheng Chin 2b811bb6ed MMTabline: Localize button strings
Use Apple Glossary for the new tab button translations. For the scroll
backward/forward buttons I took it from Firefox
(https://pontoon.mozilla.org/) under the arrowscrollbox strings.
2025-01-29 04:22:20 -08:00
Yee Cheng Chin 018ee0f8fe Merge pull request #1536 from ychin/mmtabs-add-scrollbutton-prefs-other-fixups
Tabs: Expose option to show scroll tab buttons, fix tab scroll behavior, fix memory leaks, cache images and other cleanups
2025-01-29 02:49:04 -08:00
Luca Saccarola a5d19aa44d runtime(hyprlang): fix string recognition
fixes: #16064
closes: #16527

Signed-off-by: Luca Saccarola <github.e41mv@aleeas.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-29 10:28:42 +01:00
Yee Cheng Chin 18f00e57e4 MMTabline: Add ability to turn off animation
This is not exposed in the user preference pane, as it should be a niche
case, but it's useful to have a way to turn off animations for either
accessibility or user preferences reasons.
2025-01-29 01:21:35 -08:00
Yee Cheng Chin 2745806351 MMTabline: Clear all tabs while showing / hiding tab line
When the GUI tab line is hidden (either due to `set showtabline` or `set
go-=e`), Vim stops sending update messages to the GUI. This means the
tabs were stale and would never get cleared, and the moment we show the
tabs we see a confusing animation when the tabs quicly try to rearrange
to match Vim's state. To fix this, just make sure to clean up and remove
all of them when we hide the tab line.
2025-01-28 23:51:41 -08:00
Yee Cheng Chin 558c2e936a MMTabline: Use cached images for buttons, fix memory leaks and misc issues
MMHoverButton was a bit inefficient in its image management. It always
made a new template image which then had to be converted into two other
images (image and alternateImage) for every button. Cache at least the
template images with weak references so we don't have to keep generating
new ones. For now, allow setImage: to create new images but they could
be changed to also just use cached images as well.

Also, fix memory leaks in the tabs codebase due to improper closure
usage in blocks. They were subtly capturing the self pointer which led
to the tab line and hover buttons never getting destroyed. Fix to make
sure we never accidentally capture self and try to capture as little as
possible.

Another leak happens in the usage of the local event monitor that we use
to intercept scroll wheel events. The API contract mandates that we
remove the monitor which the code never does. Make sure we do that, and
fix up the logic of the event interceptor to be more resilient and works
better with third-party software (which could inject horizontal scroll
events without holding down the Shift key).
2025-01-28 23:49:10 -08:00
Yee Cheng Chin 8406d28431 MMTabline: expose scroll button settings and fix misc scroll issues
Allows the user to set whether to show the tabs scroll buttons or not in
the preference pane as this is likely going to be a relatively popular
configuration.

Also, add new `macaction`'s for scrolling to selected tab and scrolling
backward/forward so the user doesn't have to use the mouse to scroll.

Fix misc issues with scrolling to a tab. The existing implementation
was animating both the bounds size and position which would cause issues
if the user resizes the window while still scrolling. Make sure the
animation only touches the position.

Also, the scrolling logic were using the physical locations of the
scroll bounds to determine scroll condition, which doesn't account for
the fact that it could be in the middle of animation. This led to rapid
clicking of the scroll buttons having some clicks being ignored.
Instead, fix it to always use the animated destination.
2025-01-28 21:36:58 -08:00
Sergei Trofimovich 04cc897593 patch 9.1.1055: make install fails because of a missing dependency
Problem:  make install fails because of a missing dependency
Solution: add explicit dependencies for tutor/{en,it}
          (Sergei Trofimovich)

Without the change `make install -j16` fails
sometimes due to race condition to create a directory.

It's best reproducible with `make --shuffle`:

    $ make install --shuffle
    ...
    bash install-sh -c -d /vim-9.1.0990/share/vim/vim91/tutor
    chmod 755 /vim-9.1.0990/share/vim/vim91/tutor
    cp ../runtime/tutor/README* ../runtime/tutor/tutor* /vim-9.1.0990/share/vim/vim91/tutor
    cp ../runtime/tutor/en/* /vim-9.1.0990/share/vim/vim91/tutor/en/
    cp: target '/vim-9.1.0990/share/vim/vim91/tutor/en/': No such file or directory
    make[1]: [Makefile:2487: installtutor] Error 1 (ignored) shuffle=2340321974
    cp ../runtime/tutor/it/* /vim-9.1.0990/share/vim/vim91/tutor/it/
    cp: target '/vim-9.1.0990/share/vim/vim91/tutor/it/': No such file or directory
    make[1]: [Makefile:2488: installtutor] Error 1 (ignored) shuffle=2340321974

The fix adds a dependency on targeted directories used to install tutor.

Before the change it too 2-3 attempts to reproduce the install failure.
After the change `vim` survives 150 install attempts without failures.

closes: #16531

Signed-off-by: Sergei Trofimovich <slyich@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-28 11:37:52 +01:00
Yee Cheng Chin dffce6919a Merge pull request #1535 from ychin/mmtabs-fix-update-animation-scroll
Make GUI tabs track Vim tabs in updates and animate correctly
2025-01-27 05:50:08 -08:00
Yee Cheng Chin 7fbb445300 Make GUI tabs track Vim tabs in updates and animate correctly
MMTabline was introduced in #1120, which replaced the ancient
PSMTabBarControl for representing Vim tabs. It uses animation to handle
tab layouts, but it only worked in some situations, due to the Vim IPC
API only sending a tabline update with all the tab labels with no way to
track individual tabs. Update the API so that Vim now sends individual
unique IDs in the update message as well to allow the GUI to track tabs
over time and animate them. Vim does not interally have a concept of
unique tab IDs, but we can use the pointer to the structure as such
because they are allocated as a linked list and will never change.

Extend MMTabline to have a new `updateTabsByTags` API to batch update
all tabs in one go, which will diff the new tags with existing tabs and
create/remove/move tabs as necessary. The scrolling logic has also been
moved inside it and it now only scrolls to selected tab when it has
changed or moved. When deleting tabs we won't scroll as usually the user
doesn't expect it. Dragging tabs also now work correctly when it is
removed during a drag, or another tab has been selected.

This does mean the add/close tab APIs are currently unused, as the only
entrypoint for modifying tabs from MacVim is currently only via
`updateTabsByTags`.

After this, different Vim operations will now animate correctly,
including `:tabmove`, `:bdelete` (which could remove multiple tabs at
once), `:tabnew`, `:tabclose`.
2025-01-27 04:16:02 -08:00
Nir Lichtman db23436b92 runtime(asm): add byte directives to syntax script
closes: #16523

Signed-off-by: Nir Lichtman <nir@lichtman.org>
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-26 16:55:54 +01:00
Christian Brabandt 279dd703e1 patch 9.1.1054: Vim doesn't work well with TERM=xterm-direct
Problem:  Vim doesn't work well with TERM=xterm-direct
          (Andrea Pappacoda)
Solution: detect if a terminal supports true-colors and
          enable termguicolors

The terminfo database for xterm-direct contains both the (non-standard)
termcap RGB capability and a number of colors == 0x1000000 so it seems
either of those two options can be used to detect a terminal capable of
displaying true colors.

So set the termguicolor option automatically, when either of the two
options is detected. (for some reasons, my debian xterm (v393) does not
respond to XTGETTCAP query attempts, so falling back to the number of
colors seems like a good compromize)

fixes: #16327
closes: #16490

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-26 10:53:17 +01:00
Christian Brabandt fb49e3cde7 runtime(filetype): commit 99181205c5 breaks V lang detection
so make the regex more strict and have it check for a parenthesis.

See:
https://github.com/vlang/v/blob/master/examples/submodule/mymodules/submodule/sub_functions.v

related: #16513

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-25 16:18:51 +01:00
Luca Saccarola c729d6d154 runtime: decouple Open and Launch commands and gx mapping from netrw
closes: #16494
fixes: ##16486

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-25 16:07:12 +01:00
zeertzjq d65aa1bbdb patch 9.1.1053: "nosort" enables fuzzy filtering even if "fuzzy" isn't in 'completeopt'
Problem:  "nosort" enables fuzzy filtering even if "fuzzy" isn't in
          'completeopt' (after v9.1.1049)
Solution: Only enable fuzzy filtering when "fuzzy" is in 'completeopt'.
          (zeertzjq)

closes: #16510

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-25 15:30:46 +01:00
Peter Benjamin 509a8d58f9 runtime(just): fix typo in syntax file
closes: #16515

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-25 15:27:15 +01:00
Christian Brabandt 99181205c5 runtime(filetype): Improve Verilog detection by checking for modules definition
While at it, also increase the maximum number of lines to check to 500.

fixes: #16513

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-25 15:23:52 +01:00
Yee Cheng Chin 3acfbb4b54 patch 9.1.1052: tests: off-by-one error in CheckCWD in test_debugger.vim
Problem:  tests: off-by-one error in CheckCWD in test_debugger.vim
Solution: Fix off-by-one in CheckCWD leading to local tests failure
          (Yee Cheng Chin)

Vim's test_debugger's Test_debug_backtrace_level test will fail if you
happen to run it in a Vim repository with full path of directory being
exactly 29 characters (e.g. `/Users/bob/developing/src/vim`). The test
does term dump comparison and the printout will overflow if the CWD is
too long. It does have a function to skip to test if it detects that but
it's off by one leading to this one situation where it will fail.

The reason why the logic didn't account for this is that Vim's message
printing will overflow the text if it prints a message at exactly the
width of the terminal. This could be considered a bug / quirk but that
will be another issue.

closes: #16517

Signed-off-by: Yee Cheng Chin <ychin.git@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-25 15:14:06 +01:00
Christian Brabandt 08ea2e1fb0 patch 9.1.1051: tests: no support for env variables when running Vim in terminal
Problem:  tests: no support for env variables when running Vim in
          terminal
Solution: support the "env" argument in RunVimInTerminal(),
          close swapfiles properly in test_termcodes,
          use CheckFeature in test_termencoding

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-25 15:01:42 +01:00
Yee Cheng Chin 8a68481be9 Merge pull request #1533 from ychin/ci-dont-run-gui-nongui-vim-tests
ci: Don't run both non-GUI/GUI Vim tests most of the time
2025-01-25 18:04:09 +09:00
Yee Cheng Chin c8ff0ff505 ci: Don't run both non-GUI/GUI Vim tests most of the time
Only run the full suite of Vim tests when doing a tagged release.
Otherwise just either run GUI or non-GUI test on each platform. This
should catch most regressions in Vim upstream functionality, as even a
bad upstream merge should still exhibit the same issue in one of the
other (and most MacVim pull requests do not touch Vim to begin with).
This helps speeds up CI as currently it's quite time consuming to run
Vim tests twice.

We still run the whole thing for a release for now just to catch any
potential issues.
2025-01-25 00:34:01 -08:00
Yee Cheng Chin 92e9b884cf Merge pull request #1532 from ychin/build-dmg-every-commit
Always build dmg installer in CI
2025-01-25 11:30:45 +09:00
Yee Cheng Chin 237f257f23 Always build dmg installer in CI
Given that building a dmg is fast, just always build it instead of only
doing so when doing a release. This allows a user to download fixes and
new features quickly to test it out locally. Note that the dmg will be
unsigned, however, and not officially blessed by the team. This is
essentially a nightly build for the project.

Add a sane upper limit to retention days for dev builds, just in case we
end up making a lot of artifacts this way (since we are doing this per
every commit to master now).

Also, remove the previous "--skip-jenkins" hack we passed to create-dmg.
It was necessary in previous runners due to permission issues but it
seems like new GitHub Actions images have relaxed on that so the script
runs without that flag now. This allows us to beautify the dmg image in
CI.
2025-01-24 17:59:28 -08:00
Yee Cheng Chin 964fd9a1be Merge remote-tracking branch 'vim/master' 2025-01-23 22:30:29 -08:00
Yee Cheng Chin c548d5de7e Merge pull request #1120 from sfsam/tabs
Tabs
2025-01-24 09:13:39 +09:00
Sanjay Madan a75eea218e MMTabline: a new tabline for MacVim 2025-01-23 13:18:48 -08:00
John Marriott efc41a5958 patch 9.1.1050: too many strlen() calls in os_unix.c
Problem:  too many strlen() calls in os_unix.c
Solution: refactor os_unix.c and remove calls to strlen()
          (John Marriott)

closes: #16496

Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-23 20:05:29 +01:00
glepnir f400a0cc41 patch 9.1.1049: insert-completed items are always sorted
Problem:  insert-completed items are always sorted, although the LSP
          spec[1] standard defines sortText in the returned
          completionitem list. This means that the server has sorted the
          results. When fuzzy is enabled, this will break the server's
          sorting results.
Solution: disable sorting of candidates when "nosort" is set in
          'completeopt'

[1]
https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#completionItem

closes: #16501

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-23 19:59:28 +01:00
Yee Cheng Chin 0af529daae Merge pull request #1531 from ychin/fix-xcode8-build
Fix code to be buildable on Xcode 8 again
2025-01-23 15:35:25 +09:00
Yee Cheng Chin c083c5bb5b Fix code to be buildable on Xcode 8 again
We added code to rely on MAC_OS_X_VERSION_10_15, and therefore need to
add stub for that to make it buildable on older Xcode versions. Use this
opportunity to add the other missing ones to prevent future mistakes.
2025-01-22 21:13:28 -08:00
zeertzjq df098fedbc patch 9.1.1048: crash after scrolling and pasting in silent Ex mode
Problem:  Crash after scrolling and pasting in silent Ex mode.
          (fizz-is-on-the-way)
Solution: Don't move cursor to line 0 when scrolling.
          (zeertzjq)

closes: #16506

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-22 22:27:30 +01:00
Christian Brabandt 613d0bc128 patch 9.1.1047: Makefiles uses non-portable syntax
Problem:  Makefiles uses non-portable syntax
          (simo-zz, after v9.1.1029)
Solution: Revert auto-generation of MAJOR/MINOR variables

fixes: #16502
closes: #16503

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-22 22:21:50 +01:00
glepnir 9dfc7e5e61 patch 9.1.1046: fuzzymatching doesn't prefer matching camelcase
Problem:  fuzzymatching doesn't prefer matching camelcase
          (Tomasz N)
Solution: Add extra score when case matches (glepnir)

fixes: #16434
closes: #16439

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-21 22:33:13 +01:00
Gordian Dziwis c04334c33f patch 9.1.1045: filetype: N-Tripels and TriG files are not recognized
Problem:  filetype: N-Tripels and TriG files are not recognized
Solution: detect '*.nt' files as ntriples filetype and '*.trig' files
          as trig filetype (Gordian Dziwis)

closes: #16493

Signed-off-by: Gordian Dziwis <gordian@dziw.is>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-21 22:24:23 +01:00
Christian Brabandt d9a1f267ba patch 9.1.1044: Vim9: Patch 9.1.1014 causes regressions
Problem:  Vim9: Patch 9.1.1014 causes regressions
Solution: revert it for now

This reverts commit 57f0119358 since this
causes some regressions:
https://github.com/vim/vim/pull/16440#issuecomment-2600235629

So revert "patch 9.1.1014: Vim9: variable not found in transitive
import" for now.

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-21 22:17:50 +01:00
ichizok e2a0471851 Update .gitignore for v9.1.1036
Ignore the src/{LICENSE,README.txt} which are created from shadow
directories.

closes: #16499

Signed-off-by: ichizok <gclient.gaap@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-21 21:48:58 +01:00
Ivan Pešić 9601b1435a translation(sr): Update Serbian messages translation
closes: #16500

Signed-off-by: Ivan Pešić <27575106+eevan78@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-21 21:42:48 +01:00
Christian Brabandt 9d1bed5ecc patch 9.1.1043: [security]: segfault in win_line()
Problem:  [security]: segfault in win_line()
          (fizz-is-on-the-way)
Solution: Check that ScreenLines is not NULL

Github Advisory:
https://github.com/vim/vim/security/advisories/GHSA-j3g9-wg22-v955

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-20 22:55:57 +01:00
Christian Brabandt 4cbc54a743 runtime(doc): update helptags
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-20 22:52:54 +01:00
Peter Benjamin 72755b3c8e patch 9.1.1042: filetype: just files are not recognized
Problem:  filetype: just files are not recognized
Solution: adjust filetype detection pattern, detect just shebang line,
          include just ftplugin, indent and syntax plugin
          (Peter Benjamin)

closes: #16466

Signed-off-by: Peter Benjamin <petermbenjamin@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-20 21:56:41 +01:00
Doug Kearns c273f1ac77 runtime(vim): Update base-syntax, match ternary and falsy operators
fixes: #14423
fixes: #16227
closes: #16484

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-20 21:53:01 +01:00
Yegappan Lakshmanan cb848b687f patch 9.1.1041: Vim9: out-of-bound access when echoing an enum
Problem:  Vim9: out-of-bound access when echoing an enum
Solution: Add NUL to growarray, check that ufunc is non-null
          before accessing it to make Coverity happy
          (Yegappan Lakshmanan)

closes: #16488

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-20 21:38:09 +01:00
Yegappan Lakshmanan d79ea47079 patch 9.1.1040: Vim9: imported type cannot be used as func return type
Problem:  Vim9: imported type cannot be used as func return type
          (Dayvid Albuquerque)
Solution: temporarily reset the is_export flag (Yegappan Lakshmanan)

fixes: #16489
closes: #16492

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-20 21:20:56 +01:00
Christian Brabandt 4335fcfed1 runtime(kconfig): updated ftplugin and syntax script
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-20 21:01:41 +01:00
Jon Parise 71028a32db runtime(doc): rename last t_BG reference to t_RB
This was missed in 37c64c78fd.

closes: #16491

Signed-off-by: Jon Parise <jon@indelible.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-20 20:19:18 +01:00
Yee Cheng Chin c147e0c6d6 Merge pull request #1530 from ychin/vim-tests-dont-use-guioptions-k
ci: Don't use guioptions-k in Vim tests, clean up defaults for gui tests
2025-01-20 09:52:18 +09:00
Yee Cheng Chin 041fc932ba ci: Don't use guioptions-k in Vim tests, clean up defaults for gui tests
This keeps it consistent with other Vim GUIs and prevent unintentional
breakages, since we have enabled guioptions-k as default now in MacVim
which isn't the case for other platforms.

Also, since MacVim tests are run before Vim GUI tests, there's a
possibility that there are stale auto-saved states leftover that
interferes with them. Usually they should not matter, but we clean them
up anyway to make sure we have a consistent state to run tests from.
2025-01-19 16:03:03 -08:00
Yegappan Lakshmanan a81cf8b99e patch 9.1.1039: Vim9: comments are outdated
Problem:  Vim9: comments are outdated
Solution: Update comments, and include an enum example in the help
          (Yegappan Lakshmanan)

closes: #16485

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-19 22:20:34 +01:00
Christian Brabandt 2a5312e738 patch 9.1.1038: tests: test_channel.py fails with IPv6
Problem:  tests: test_channel.py fails with IPv6
          (eds-collabora)
Solution: Use 127.0.0.1 instead of localhost

fixes: #16398

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-19 14:50:31 +01:00
Doug Kearns 8dec6c2e6c runtime(vim): Update base-syntax, fix is/isnot operator matching
- Match is? and isnot? operators.
- Limit other comparison operators to one match modifier rather than
  two.

closes: #16482

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-19 14:02:06 +01:00
Ernie Rael bce60c4742 patch 9.1.1037: Vim9: confusing error when using abstract method via super
Problem:  Vim9: confusing error when using abstract method via super
Solution: Display an error when an abstract method is invoked using
          super (Ernie Rael)

fixes: #15514
closes: #16478

Signed-off-by: Ernie Rael <errael@raelity.com>
Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-19 10:07:51 +01:00
Christian Brabandt 5abc44e3c1 patch 9.1.1036: make install fails when using shadowdir
Problem:  make install fails when using shadowdir
          (after v9.1.1029)
Solution: also link in README.txt and LICENSE file

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-19 10:00:40 +01:00
Yegappan Lakshmanan 90b397586d patch 9.1.1035: Vim9: memory leak with blob2str()
Problem:  Vim9: memory leak with blob2str()
Solution: free converted_str (Yegappan Lakshmanan)

closes: #16481

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-19 09:37:07 +01:00
Christian Brabandt 2cb8246eb9 runtime(tex): add texEmphStyle to texMatchGroup in syntax script
fixes: #16228

Co-authored-by: Github User JordL
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-18 18:09:38 +01:00
Philip H. c65bb2ea8e CI: bump windows python to 3.12
closes: #16473

Signed-off-by: Philip H. <47042125+pheiduck@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-18 17:38:12 +01:00
Luca Saccarola d402ba81e2 runtime(netrw): upstream snapshot of v175
Relevant commits:
- release: netrw v175
- fix: prevent netrw to load into the built-in terminal
- fix: restore correctly cpo settings
- fix(docs): mispelled original authors name
- chore: move viml files to new formatting standard

fixes: #16463
closes: #16465

Signed-off-by: Luca Saccarola <github.e41mv@aleeas.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-18 17:36:02 +01:00
rhysd 87f65f3857 CI: add Linux arm64 CI job
This patch adds jobs to run tests on arm64 GitHub Actions hosted runner
for tiny and huge features.

closes: #16477

Signed-off-by: rhysd <lin90162@yahoo.co.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-18 17:33:31 +01:00
Ernie Rael 7c92e88894 patch 9.1.1033: Vim9: compiling abstract method fails without return
Problem:  Vim9: compiling abstract method fails without return
          (Aliaksei Budavei)
Solution: don't require return for an abstract method
          (Ernie Rael)

fixes: #15432
related: ##15441
closes: #16469

Signed-off-by: Ernie Rael <errael@raelity.com>
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-18 17:29:06 +01:00
Philip H. fef4be0d7a CI: bump windows libsodium to 1.0.20
closes: #16475

Signed-off-by: Philip H. <47042125+pheiduck@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-18 17:20:13 +01:00
Doug Kearns e06405181a runtime(c): add new constexpr keyword to syntax file (C23)
closes: #16471

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-18 10:52:27 +01:00
Christian Brabandt 1d2867df0c patch 9.1.1033: tests: shaderslang was removed from test_filetype erroneously
Problem:  tests: shaderslang was removed from test_filetype erroneously
          (Christian Clason, after v9.1.1030)
Solution: restore the test

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-18 10:49:08 +01:00
Yegappan Lakshmanan b77c598487 patch 9.1.1032: link error when FEAT_SPELL not defined
Problem:  link error when FEAT_SPELL not defined
          (after v9.1.1016, John Marriott)
Solution: adjust ifdefs (Yegappan Lakshmanan)

closes: #16468

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-18 10:35:57 +01:00
Yegappan Lakshmanan 5e9aaedf52 patch 9.1.1031: Coverity complains about insecure data handling
Problem:  Coverity complains about insecure data handling
          (v9.1.1024)
Solution: use int consistently to access the blob index
          (Yegappan Lakshmanan)

related: #16468

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-18 10:29:46 +01:00
Eisuke Kawashima 54cb514c9a runtime(sh): update syntax script
- remove duplicated keywords
- add bash coproc and COPROC_PID keywords

Signed-off-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-18 10:11:28 +01:00
Doug Kearns 866f229591 runtime(c): Add missing syntax test files
These were missing from commit c2a967a.

closes: #16470

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-18 10:06:59 +01:00
Christian Brabandt 727c567a09 patch 9.1.1030: filetype: setting bash filetype is backwards incompatible
Problem:  filetype: setting bash filetype is backwards incompatible
Solution: revert patch v9.1.0965, detect bash scripts again as sh
          filetype

This reverts commit b9b762c21f.

related: #16309

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-18 10:03:46 +01:00
Doug Kearns c2a967a1b9 runtime(c): Update syntax and ftplugin files
- highlight more C keywords, including some from C23

Conditionally highlight C23 features:
- #embed, #elifdef and #elifndef preprocessor directives
- predefined macros
- UTF-8 character constants
- binary integer constants, _BitInt literals, and digit separators
- nullptr_t type and associated constant
- decimal real floating-point, bit precise and char types
- typeof operators

Matchit:
- update for new preprocessor directives

fixes: #13667
fixes: #13679
closes: #12984

Co-authored-by: Albin Ahlbäck <albin.ahlback@gmail.com>
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-17 14:12:16 +01:00
RestorerZ 2730d3873f patch 9.1.1029: the installer can be improved
Problem:  the installer can be improved
Solution: update the installer with the correct README and LICENSE
          files, improve the documentation, add a Makefile for the
          installer, update the Makefiles (RestorerZ)

fixes: #16378
closes: #16378

Signed-off-by: RestorerZ <restorer@mail2k.ru>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-17 14:04:44 +01:00
John Marriott c15de972e8 patch 9.1.1028: too many strlen() calls in screen.c
Problem:  too many strlen() calls in screen.c
Solution: refactor screen.c and remove calls to strlen(),
          verify that leadmultispace != NULL (John Marriott)

closes: #16460

Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-17 13:54:49 +01:00
Jonathon ca307efe48 patch 9.1.1027: no sanitize check when running linematch
Problem:  no sanitize check when running linematch
Solution: add sanitize check before applying the linematch algorithm,
          similar to diff_find_change() (Jonathon)

closes: #16446

Signed-off-by: Jonathon <jonathonwhite@protonmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-17 13:37:35 +01:00
Marces Engel 3a738fccaa patch 9.1.1026: filetype: swc configuration files are not recognized
Problem:  filetype: swc configuration files are not recognized
Solution: detect .swcrc files as json filetype (Marces Engel)

References:
https://swc.rs/docs/configuration/swcrc

closes: #16462

Signed-off-by: Marces Engel <marces@facemurphy.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-17 13:10:15 +01:00
Luca Saccarola 9cfdabb074 runtime(netrw): change netrw maintainer
Dr. Chip retired some time ago and is no longer maintaining the netrw
plugin. However as a runtime plugin distributed by Vim, it important to
maintain the netrw plugin in the future and fix bugs as they are
reported.

So, split out the netrw plugin as an additional package, however include
some stubs to make sure the plugin is still loaded by default and the
documentation is accessible as well.

closes: #16368

Signed-off-by: Luca Saccarola <github.e41mv@aleeas.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-17 13:03:53 +01:00
Yegappan Lakshmanan 166b1754a9 patch 9.1.1025: wrong return type of blob2str()
Problem:  wrong return type of blob2str()
Solution: update return to list of string
          (Yegappan Lakshmanan)

closes: #16461

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-17 11:48:12 +01:00
Yegappan Lakshmanan a11b23c4d5 patch 9.1.1024: blob2str/str2blob() do not support list of strings
Problem:  blob2str/str2blob() do not support list of strings
          (after v9.1.1016)
Solution: Add support for using a list of strings (Yegappan Lakshmanan)

closes: #16459

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-16 19:16:42 +01:00
Christian Brabandt a234a46651 runtime(doc): fix typo in usr_02.txt
fixes: #16455

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-16 19:12:48 +01:00
Christian Brabandt a9f77be922 patch 9.1.1023: Coverity complains about dereferencing NULL pointer
Problem:  Coverity complains about dereferencing NULL pointer
Solution: Verify curdiff is not null before dereferencing it

closes: #16437

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-16 19:06:57 +01:00
Christian Brabandt 9162e636b3 patch 9.1.1022: linematch option value not completed
Problem:  linematch option value not completed
          (after v9.1.1009)
Solution: Update diffoption completion values

related: #9661
closes: #16437

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-16 19:03:40 +01:00
John Marriott 70dfc374ec patch 9.1.1021: string might be used without a trailing NUL
Problem:  string might be used without a trailing NUL (after v9.1.0997)
Solution: Make sure that the buffer is NUL terminated

closes: #16457

Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-16 18:58:20 +01:00
glepnir 037b028a22 patch 9.1.1020: no way to get current selected item in a async context
Problem:  no way to get current selected item in a async context
Solution: add completed flag to show the entries of currently selected
          index item (@glepnir)

closes: #16451

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-16 14:37:44 +01:00
Wu, Zhenyu 3058087f6f patch 9.1.1019: filetype: fd ignore files are not recognized
Problem:  filetype: fd ignore files are not recognized
Solution: detect .fdignore files as gitignore filetype

closes: #16444

Signed-off-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-15 18:46:37 +01:00
Yukihiro Nakadaira 01f6509fb2 patch 9.1.1018: v9.1.0743 causes regression with diff mode
Problem:  v9.1.0743 causes regression with diff mode
Solution: Fix the regression with overlapping regions

closes: #16454

Signed-off-by: Yukihiro Nakadaira <yukihiro.nakadaira@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-15 18:36:43 +01:00
Maxim Kim 6472e58365 runtime(doc): fix base64 encode/decode examples
Use str2blob()/blob2str() functions in examples given.

closes: #16449

Signed-off-by: Maxim Kim <habamax@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-15 18:31:28 +01:00
Yegappan Lakshmanan 9904cbca41 patch 9.1.1017: Vim9: Patch 9.1.1013 causes a few problems
Problem:  Vim9: Patch 9.1.1013 causes a few problems
Solution: Translate the function name only when it is a string
          (Yegappan Lakshmanan)

fixes: #16453
closes: #16450

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-15 18:25:19 +01:00
Yegappan Lakshmanan 1aefe1de0b patch 9.1.1016: Not possible to convert string2blob and blob2string
Problem:  Not possible to convert string2blob and blob2string
Solution: add support for the blob2str() and str2blob() functions

closes: #16373

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-14 17:29:42 +01:00
Christian Brabandt 1ac53b84ad patch 9.1.1015: Coverity complains about dereferencing NULL value
Problem:  Coverity complains about dereferencing NULL value
Solution: Check that cms2 is not null

closes: #16438

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-14 17:25:02 +01:00
Hirohito Higashi 57f0119358 patch 9.1.1014: Vim9: variable not found in transitive import
Problem:  Vim9: variable not found in transitive import
Solution: Allow nested import (Hirohito Higashi)

fixe: #16379
closes: #16440

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-14 17:21:42 +01:00
Maxim Kim 045564d0a7 runtime(colors): Update colorschemes, include new unokai colorscheme
- new unokai colorscheme (similar/inspired by monokai)
- the rest: add explicit PopupSelected link to PmenuSel

closes: #16443

Signed-off-by: Maxim Kim <habamax@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-14 17:15:59 +01:00
Yegappan Lakshmanan 6289f91591 patch 9.1.1013: Vim9: Regression caused by patch v9.1.0646
Problem:  Vim9: Regression caused by patch v9.1.0646
Solution: Translate the function name before invoking it in call()
          (Yegappan Lakshmanan)

fixes: #16430
closes: #16445

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-14 17:13:36 +01:00
Denilson Sá Maia 30377e0fe0 runtime(lyrics): support milliseconds in syntax script
The following tool creates LRC files using three fractional digits after
the seconds (i.e. milliseconds).

References:
https://github.com/magic-akari/lrc-maker
https://lrc-maker.github.io/

closes: #16436

Signed-off-by: Denilson Sá Maia <denilsonsa@gmail.com>
Signed-off-by: ObserverOfTime <chronobserver@disroot.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-13 08:23:24 +01:00
Doug Kearns 221c53202d runtime(vim): Split Vim legacy and Vim9 script indent tests
The indent test file is not highlighted correctly as it's currently a
syntactically erroneous mix of legacy and Vim9 script.  This is causing
spurious indent test failures as the indent script relies on syntax ID
tests to determine the context of lines being processed.

Splitting the tests into legacy and Vim9 specific files allows for
correct syntax highlighting and indenting.

closes: #16431

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-13 07:54:33 +01:00
Yegappan Lakshmanan 8e92db4ea2 patch 9.1.1012: Vim9: class interface inheritance not correctly working
Problem:  Vim9: class interface inheritance not correctly working
Solution: make the class inherit the interfaces of the super class

fixes: #16395
closes: #16412

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-13 07:30:11 +01:00
zeertzjq 3a0cc36c69 patch 9.1.1011: popupmenu internal error with some abbr in completion item
Problem:  Popup menu internal error with some abbr in completion item.
Solution: Don't compute attributes when there is no corresponding text.
          Reduce indent in pum_redraw() while at it (zeertzjq).

fixes: #16427
closes: #16435

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-13 07:27:43 +01:00
Konfekt c200f53cbb patch 9.1.1010: filetype: VisualCode setting file not recognized
Problem:  filetype: VisualCode setting file not recognized
Solution: detect json files in VSCode config directory as jsonc filetype
          (Konfekt)

closes: #16400

Signed-off-by: Konfekt <Konfekt@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-12 20:02:04 +01:00
Jonathon 7c7a4e6d1a patch 9.1.1009: diff feature can be improved
Problem:  diff feature can be improved
Solution: include the linematch diff alignment algorithm
          (Jonathon)

closes: #9661

Signed-off-by: Jonathon <jonathonwhite@protonmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-12 09:58:00 +01:00
zeertzjq faf250c9e4 patch 9.1.1008: tests: test for patch 9.1.1006 doesn't fail without the patch
Problem:  tests: test for patch 9.1.1006 doesn't fail without the patch
          (after v9.1.1006)
Solution: Add ctermbg=NONE to the highlight groups (zeertzjq).

closes: #16425

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-12 09:32:27 +01:00
Wu, Zhenyu 8cbe2e0a0a patch 9.1.1007: filetype: various ignore are not recognized
Problem:  filetype: various ignore are not recognized
Solution: detect rg/docker/npm/vvsce ignore files as 'gitgnore' filetype
          (Wu, Zhenyu)

Not only prettier, but many programs also support ignore files (like rg,
docker, npm, vscode). So use the gitignore filetype for them due to same syntax

closes: #16428

Signed-off-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-12 09:27:01 +01:00
Aliaksei Budavei 5eaacef18e tests: Load screendump files with "git vimdumps"
Also, fold the difference part and the bottom part for the
identical screendump files.

closes: #16380

Co-authored-by: D. Ben Knoble <ben.knoble+github@gmail.com>
Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-11 17:12:04 +01:00
glepnir 9eff3ee818 patch 9.1.1006: PmenuMatch completion highlight can be combined
Problem:  PmenuMatch completion highlight can be combined
Solution: Combine highlight groups PmenuMatch with Pmenu and
          PmenuMatchSel with PmenuSel (glepnir)

fixes: #15563
closes: #16408

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-11 16:47:34 +01:00
glepnir 9fddb8ae77 patch 9.1.1005: completion text is highlighted even with no pattern found
Problem:  completion text is highlighted even with no pattern found
Solution: use ins_compl_leader_len() instead of checking
          compl_leader.length (glepnir)

closes: #16422

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-11 16:42:50 +01:00
Christian Brabandt ebb08d5913 patch 9.1.1004: tests: a few termdebug tests are flaky
Problem:  tests: a few termdebug tests are flaky; test_termdebug_basic()
          and test_termdebug_config_types() may fail if there is too
          much load
Solution: Set g:test_is_flaky

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-11 15:43:12 +01:00
Christian Brabandt c9a1e257f1 patch 9.1.1003: [security]: heap-buffer-overflow with visual mode
Problem:  [security]: heap-buffer-overflow with visual mode when
          using :all, causing Vim trying to access beyond end-of-line
          (gandalf)
Solution: Reset visual mode on :all, validate position in gchar_pos()
          and charwise_block_prep()

This fixes CVE-2025-22134

Github Advisory:
https://github.com/vim/vim/security/advisories/GHSA-5rgf-26wj-48v8

Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-11 15:25:00 +01:00
Christian Brabandt 9598a6369b runtime(doc): add package-<name> helptags for included packages
Improve how to find the justify package

closes: #16420

Co-authored-by: Peter Benjamin <petermbenjamin@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-11 10:14:24 +01:00
Yegappan Lakshmanan c10342da44 patch 9.1.1002: Vim9: unknown func error with interface declaring func var
Problem:  Vim9: unknown function error with interface declaring a
          function variable (lifepillar)
Solution: Use correct instruction for getting interface member variables
          (Yegappan Lakshmanan)

fixes: #16345
closes: #16421

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-11 09:39:01 +01:00
Christian Brabandt 668e9f2403 runtime(filetype): don't detect string interpolation as angular
fixes: #16375

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-11 09:20:55 +01:00
glepnir ad409876d9 patch 9.1.1001: ComplMatchIns highlight hard to read on light background
Problem:  ComplMatchIns highlight hard to read on light background
          (after v9.1.0996)
Solution: define the highlighting group cleared, it should be configured in
          colorschemes separately (glepnir)

closes: #16414

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-10 20:08:20 +01:00
Doug Kearns 695522dea3 runtime(vim): Update base-syntax, highlight literal string quote escape
Match the '' escape sequence in literal strings.  These were previously
ending the current string and starting another concatenated literal
string.

closes: #16415

Signed-off-by: Christian Brabandt <cb@256bit.org>
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
2025-01-10 20:02:17 +01:00
Yochem van Rosmalen 51754c8a49 runtime(editorconfig): set omnifunc to syntaxcomplete func
closes: #16419

Signed-off-by: Yochem van Rosmalen <git@yochem.nl>
Signed-off-by: Riley Bruins <ribru17@hotmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-10 19:54:13 +01:00
821 changed files with 30107 additions and 22314 deletions
+7
View File
@@ -153,6 +153,7 @@ runtime/ftplugin/debchangelog.vim @jamessan
runtime/ftplugin/debcontrol.vim @jamessan
runtime/ftplugin/debsources.vim @jamessan
runtime/ftplugin/desktop.vim @e-kwsm
runtime/ftplugin/dnsmasq.vim @dringsim
runtime/ftplugin/dosbatch.vim @mrdubya
runtime/ftplugin/editorconfig.vim @ribru17
runtime/ftplugin/eiffel.vim @dkearns
@@ -160,6 +161,7 @@ runtime/ftplugin/elixir.vim @mhanberg
runtime/ftplugin/erlang.vim @hcs42
runtime/ftplugin/eruby.vim @tpope @dkearns
runtime/ftplugin/expect.vim @dkearns
runtime/ftplugin/exports.vim @mperry2
runtime/ftplugin/fennel.vim @gpanders
runtime/ftplugin/fetchmail.vim @dkearns
runtime/ftplugin/forth.vim @jkotlinski
@@ -208,6 +210,7 @@ runtime/ftplugin/json.vim @dbarnett
runtime/ftplugin/json5.vim @dkearns
runtime/ftplugin/jsonc.vim @izhakjakov
runtime/ftplugin/julia.vim @carlobaldassi
runtime/ftplugin/just.vim @pbnj
runtime/ftplugin/jq.vim @vito-c
runtime/ftplugin/kconfig.vim @chrisbra
runtime/ftplugin/kdl.vim @imsnif @jiangyinzuo
@@ -266,6 +269,7 @@ runtime/ftplugin/routeros.vim @zainin
runtime/ftplugin/rst.vim @marshallward
runtime/ftplugin/ruby.vim @tpope @dkearns
runtime/ftplugin/rust.vim @lilyball
runtime/ftplugin/samba.vim @mperry2
runtime/ftplugin/sass.vim @tpope
runtime/ftplugin/scala.vim @derekwyatt
runtime/ftplugin/scheme.vim @evhan
@@ -354,6 +358,7 @@ runtime/indent/javascript.vim @bounceme
runtime/indent/json.vim @elzr
runtime/indent/jsonc.vim @izhakjakov
runtime/indent/julia.vim @carlobaldassi
runtime/indent/just.vim @pbnj
runtime/indent/kdl.vim @imsnif @jiangyinzuo
runtime/indent/kotlin.vim @udalov
runtime/indent/krl.vim @KnoP-01
@@ -402,6 +407,7 @@ 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/keymap/ukrainian-enhanced.vim @Dolfost
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
@@ -512,6 +518,7 @@ runtime/syntax/jjdescription.vim @gpanders
runtime/syntax/json.vim @vito-c
runtime/syntax/jsonc.vim @izhakjakov
runtime/syntax/julia.vim @carlobaldassi
runtime/syntax/just.vim @pbnj
runtime/syntax/jq.vim @vito-c
runtime/syntax/karel.vim @kirillmorozov
runtime/syntax/kconfig.vim @chrisbra
+24 -374
View File
@@ -1,5 +1,7 @@
name: MacVim GitHub CI
# Main CI workflow for MacVim. Will build and test MacVim on different platforms.
on:
push:
pull_request:
@@ -11,399 +13,47 @@ concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
cancel-in-progress: true
env:
MACOSX_DEPLOYMENT_TARGET: '10.13'
MACOSX_DEPLOYMENT_TARGET_LEGACY: '10.9'
MACVIM_ARCHS: "x86_64 arm64" # Universal app for Intel/Apple Silicon
MACVIM_ARCHS_LEGACY: "x86_64" # Legacy builds only need to build x86-64 because Apple Silicon can't run on these old OSes
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.34' # 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
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
TERM: xterm
BASH_SILENCE_DEPRECATION_WARNING: 1
jobs:
# Builds and test MacVim
build-and-test:
# Test on macOS 11.x / 12.x, and also older versions of Xcode for compatibility testing.
strategy:
fail-fast: false
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]
#
# # Older version of Xcode, and used to publish legacy builds (for macOS 10.9 - 10.12)
# - os: macos-12
# xcode: '14.0' # last version of Xcode that uses the macOS 12 SDK, which still supports deploying to macOS 10.9
# publish: true
# legacy: true
# publish_postfix: '_10.9'
# Self-hosted runner with old enough software (Xcode 14.0.1) to be
# able to make legacy builds. We only run this when making a full
# release build.
- os: macos-13-xcode14-self-hosted
publish: true
publish_postfix: '_10.9'
skip: ${{ ! startswith(github.ref, 'refs/tags/release') }}
legacy: true
- os: macos-13
xcode: '15.2'
testgui: true
extra: [vimtags, check-xcodeproj-compat]
# Below runners use Apple Silicon.
- os: macos-14
xcode: '15.4'
optimized: true
testgui: false
# Most up to date OS and Xcode. Used to publish release for the main build.
- os: macos-15
xcode: '16.2'
testgui: true
publish: true
optimized: true
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up legacy build
if: matrix.legacy
run: |
# Set the correct build env vars to target the correct architectures and min OS targets.
echo "MACOSX_DEPLOYMENT_TARGET=$MACOSX_DEPLOYMENT_TARGET_LEGACY" >> $GITHUB_ENV
echo "MACVIM_ARCHS=$MACVIM_ARCHS_LEGACY" >> $GITHUB_ENV
# Use Sparkle 1 because Sparkle 2 requires newer OS version than our legacy build.
# 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.
#
- name: Set up gettext
if: matrix.publish
uses: ./.github/actions/universal-package
with:
formula: gettext
contents: lib/libintl.a,lib/libintl.dylib
# Set up, install, and cache libsodium library for encryption.
- name: Set up libsodium
if: matrix.publish
uses: ./.github/actions/universal-package
with:
formula: libsodium
contents: lib/libsodium.a,lib/libsodium.dylib
# 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
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 --quiet ruby
brew install --quiet lua
if [[ -d $(brew --prefix)/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 /
# All set up steps are done. Build and test MacVim below.
- name: Configure
run: |
set -o verbose
CONFOPT=(
--with-local-dir=$(brew --prefix)
--with-features=huge
--enable-netbeans
--with-tlib=ncurses
--enable-cscope
--enable-gui=macvim
--with-compiledby="GitHub Actions"
)
if ${{ matrix.publish == true }}; then
CONFOPT+=(
--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-macarchs="$MACVIM_ARCHS"
)
else
CONFOPT+=(
--disable-sparkle # Disable Sparkle for testing that this flag builds and works
--enable-nls=no --enable-libsodium=no # Disable gettext and libsodium unless we built them ourselves for publish
)
fi
if ${{ matrix.legacy == true }}; then
CONFOPT+=(
--enable-sparkle_1
)
fi
echo "CONFOPT: ${CONFOPT[@]}"
./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
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: |
# Ruby is keg-only in Homebrew, so need to manually link in the path so Vim will know where to look for the binaries.
perl -p -i -e "s#(?<=-DDYNAMIC_RUBY_DLL=\\\\\").*?(?=\\\\\")#${vi_cv_dll_name_ruby}#" src/auto/config.mk
grep -q -- "-DDYNAMIC_PERL_DLL=\\\\\"${vi_cv_dll_name_perl}\\\\\"" src/auto/config.mk
grep -q -- "-DDYNAMIC_PYTHON_DLL=\\\\\"${vi_cv_dll_name_python}\\\\\"" src/auto/config.mk
grep -q -- "-DDYNAMIC_PYTHON3_DLL=\\\\\"${vi_cv_dll_name_python3}\\\\\"" src/auto/config.mk
grep -q -- "-DDYNAMIC_RUBY_DLL=\\\\\"${vi_cv_dll_name_ruby}\\\\\"" src/auto/config.mk
# Also search for the arm64 overrides for the default library locations, which are different from x86_64
# because Homebrew puts them at a different place.
grep -q -- "-DDYNAMIC_PYTHON3_DLL_ARM64=\\\\\"${vi_cv_dll_name_python3_arm64}\\\\\"" src/auto/config.mk
grep -q -- "-DDYNAMIC_RUBY_DLL_ARM64=\\\\\"${vi_cv_dll_name_ruby_arm64}\\\\\"" src/auto/config.mk
grep -q -- "-DDYNAMIC_LUA_DLL_ARM64=\\\\\"${vi_cv_dll_name_lua_arm64}\\\\\"" src/auto/config.mk
- name: Show configure output
run: |
cat src/auto/config.mk
cat src/auto/config.h
- name: Build
env:
LC_ALL: C
run: |
NPROC=$(getconf _NPROCESSORS_ONLN)
echo "Building MacVim with ${NPROC} cores"
set -o verbose
make ${MAKE_BUILD_ARGS} -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
macvim_excmd() {
${VIM_BIN} -u NONE -i NONE -g -f -X -V1 -es "$@" -c 'echo ""' -c 'qall!' 2>&1
}
# Smoketest scripting languages
macvim_excmd -c 'lua print("Test")' | grep Test
macvim_excmd -c 'perl VIM::Msg("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'
# Make sure we are building universal x86_64 / arm64 builds and didn't accidentally create a thin app.
check_arch() {
local archs=($(lipo -archs "$1"))
if [[ ${archs[@]} != "$MACVIM_ARCHS" ]]; then
echo "Wrong arch(s) in $1: ${archs[@]}"; false
else
lipo -info "$1"
fi
}
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: Upload failed MacVim test results
if: ${{ !cancelled() && failure() }}
uses: ./.github/actions/test_macvim_artifacts
- 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
timeout-minutes: 25
run: make ${MAKE_BUILD_ARGS} test
- name: Upload failed test files
if: ${{ !cancelled() && failure() }}
uses: ./.github/actions/test_artifacts
- name: Test Vim (GUI)
timeout-minutes: 25
run: |
make ${MAKE_BUILD_ARGS} -C src/testdir clean
make ${MAKE_BUILD_ARGS} -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
# format our release notes and add pictures to make them look nice.
- name: Build MacVim dmg image
if: startsWith(github.ref, 'refs/tags/') && matrix.publish
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
if ${{ matrix.publish_postfix != '' }}; then
mv src/MacVim/build/Release/MacVim.dmg src/MacVim/build/Release/MacVim${{ matrix.publish_postfix }}.dmg
fi
- name: Upload MacVim image
if: startsWith(github.ref, 'refs/tags/') && matrix.publish
uses: actions/upload-artifact@v4
with:
name: MacVim${{ matrix.publish_postfix }}.dmg
path: src/MacVim/build/Release/MacVim${{ matrix.publish_postfix }}.dmg
uses: ./.github/workflows/macvim-buildtest.yaml
with:
skip: ${{ matrix.skip && true || false }}
os: ${{ matrix.os }}
legacy: ${{ matrix.legacy && true || false }}
xcode: ${{ matrix.xcode }}
publish: ${{ matrix.publish && true || false }}
publish_postfix: ${{ matrix.publish_postfix }}
optimized: ${{ matrix.optimized && true || false }}
vimtags: ${{ contains(matrix.extra, 'vimtags') }}
check-xcodeproj-compat: ${{ contains(matrix.extra, 'check-xcodeproj-compat') }}
+416
View File
@@ -0,0 +1,416 @@
name: MacVim Build and Test
# Child workflow to be called by other workflows for building/testing MacVim
on:
workflow_call:
inputs:
skip:
type: boolean
os:
type: string
legacy:
type: boolean
xcode:
type: string
publish:
type: boolean
publish_postfix:
type: string
optimized:
type: boolean
vimtags:
type: boolean
check-xcodeproj-compat:
type: boolean
env:
MACOSX_DEPLOYMENT_TARGET: '10.13'
MACOSX_DEPLOYMENT_TARGET_LEGACY: '10.9'
MACVIM_ARCHS: "x86_64 arm64" # Universal app for Intel/Apple Silicon
MACVIM_ARCHS_LEGACY: "x86_64 arm64" # Build universal for legacy too, mostly just to make building/testing on Apple Silicon CI work. In reality all Apple Silicon Macs shoud use non-legacy.
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.
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
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
TERM: xterm
BASH_SILENCE_DEPRECATION_WARNING: 1
jobs:
# Builds and test MacVim
build-and-test:
if: ${{ !inputs.skip }}
runs-on: ${{ inputs.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up legacy build
if: inputs.legacy
run: |
# Set the correct build env vars to target the correct architectures and min OS targets.
echo "MACOSX_DEPLOYMENT_TARGET=$MACOSX_DEPLOYMENT_TARGET_LEGACY" >> $GITHUB_ENV
echo "MACVIM_ARCHS=$MACVIM_ARCHS_LEGACY" >> $GITHUB_ENV
# Use Sparkle 1 because Sparkle 2 requires newer OS version than our legacy build.
# 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: inputs.xcode != ''
run: |
sudo xcode-select -s /Applications/Xcode_${{ inputs.xcode }}.app/Contents/Developer
xcode-select -p
xcodebuild -version
# Set up, install, and cache gettext library for localization.
- name: Set up gettext
if: inputs.publish
uses: ./.github/actions/universal-package
with:
formula: gettext
contents: lib/libintl.a,lib/libintl.dylib
# Set up, install, and cache libsodium library for encryption.
- name: Set up libsodium
if: inputs.publish
uses: ./.github/actions/universal-package
with:
formula: libsodium
contents: lib/libsodium.a,lib/libsodium.dylib
# 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
# Cache Python 2 to avoid downloading the installer every time. This cache shouldn't change
# over time as Python 2.7 is legacy. Can't directly cache to
# /Library/Frameworks/Python.framework due to permission issues.
#
# Note: Legacy self-hosted runner already has this installed and doesn't need this.
- name: Cache Python 2
if: inputs.publish && !inputs.legacy
uses: actions/cache@v4
with:
path: python27-cache
key: ${{ inputs.os }}-python27
- name: Install scripting runtimes
if: inputs.publish
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 --quiet ruby
brew install --quiet lua
if [[ -d $(brew --prefix)/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.
export PERL_VERSION=$(perl -e 'print $^V =~ s/v(\d\.\d+).*/\1/r')
echo "vi_cv_dll_name_perl=$(printf $vi_cv_dll_name_perl $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.
if [ -d /Library/Frameworks/Python.framework/Versions/2.7 ]; then
echo "Python 2.7 already installed"
elif [ -d python27-cache ]; then
sudo cp -R python27-cache /Library/Frameworks/Python.framework/Versions/2.7
else
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 /
cp -R /Library/Frameworks/Python.framework/Versions/2.7 python27-cache # Allow this to be cached
fi
# All set up steps are done. Build and test MacVim below.
- name: Configure
run: |
set -o verbose
CONFOPT=(
--with-local-dir=$(brew --prefix)
--with-features=huge
--enable-netbeans
--with-tlib=ncurses
--enable-cscope
--enable-gui=macvim
--with-compiledby="GitHub Actions"
)
if ${{ inputs.publish == true }}; then
CONFOPT+=(
--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-macarchs="$MACVIM_ARCHS"
)
else
CONFOPT+=(
--disable-sparkle # Disable Sparkle for testing that this flag builds and works
--enable-nls=no --enable-libsodium=no # Disable gettext and libsodium unless we built them ourselves for publish
)
fi
if ${{ inputs.legacy == true }}; then
CONFOPT+=(
--enable-sparkle_1
)
fi
echo "CONFOPT: ${CONFOPT[@]}"
./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
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 ${{ inputs.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: inputs.publish
run: |
set -o verbose
# Ruby is keg-only in Homebrew, so need to manually link in the path so Vim will know where to look for the binaries.
perl -p -i -e "s#(?<=-DDYNAMIC_RUBY_DLL=\\\\\").*?(?=\\\\\")#${vi_cv_dll_name_ruby}#" src/auto/config.mk
grep -q -- "-DDYNAMIC_PERL_DLL=\\\\\"${vi_cv_dll_name_perl}\\\\\"" src/auto/config.mk
grep -q -- "-DDYNAMIC_PYTHON_DLL=\\\\\"${vi_cv_dll_name_python}\\\\\"" src/auto/config.mk
grep -q -- "-DDYNAMIC_PYTHON3_DLL=\\\\\"${vi_cv_dll_name_python3}\\\\\"" src/auto/config.mk
grep -q -- "-DDYNAMIC_RUBY_DLL=\\\\\"${vi_cv_dll_name_ruby}\\\\\"" src/auto/config.mk
# Also search for the arm64 overrides for the default library locations, which are different from x86_64
# because Homebrew puts them at a different place.
grep -q -- "-DDYNAMIC_PYTHON3_DLL_ARM64=\\\\\"${vi_cv_dll_name_python3_arm64}\\\\\"" src/auto/config.mk
grep -q -- "-DDYNAMIC_RUBY_DLL_ARM64=\\\\\"${vi_cv_dll_name_ruby_arm64}\\\\\"" src/auto/config.mk
grep -q -- "-DDYNAMIC_LUA_DLL_ARM64=\\\\\"${vi_cv_dll_name_lua_arm64}\\\\\"" src/auto/config.mk
- name: Show configure output
run: |
cat src/auto/config.mk
cat src/auto/config.h
- name: Build
env:
LC_ALL: C
run: |
NPROC=$(getconf _NPROCESSORS_ONLN)
echo "Building MacVim with ${NPROC} cores"
set -o verbose
make ${MAKE_BUILD_ARGS} -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 ${{ inputs.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: inputs.publish
run: |
set -o verbose
macvim_excmd() {
${VIM_BIN} -u NONE -i NONE -g -f -X -V1 -es "$@" -c 'echo ""' -c 'qall!' 2>&1
}
# Smoketest scripting languages
macvim_excmd -c 'lua print("Test")' | grep Test
macvim_excmd -c 'perl VIM::Msg("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'
# Make sure we are building universal x86_64 / arm64 builds and didn't accidentally create a thin app.
check_arch() {
local archs=($(lipo -archs "$1"))
if [[ ${archs[@]} != "$MACVIM_ARCHS" ]]; then
echo "Wrong arch(s) in $1: ${archs[@]}"; false
else
lipo -info "$1"
fi
}
check_arch "${VIM_BIN}"
check_arch "${MACVIM_BIN}"
- name: Check Vim help tags
if: inputs.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: inputs['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
id: test_macvim
timeout-minutes: 10
run: |
make ${MAKE_BUILD_ARGS} -C src macvim-tests
- name: Upload failed MacVim test results
if: ${{ !cancelled() && failure() && steps.test_macvim.conclusion == 'failure' }}
uses: ./.github/actions/test_macvim_artifacts
- 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
if: startsWith(github.ref, 'refs/tags/') || !matrix.testgui
timeout-minutes: 30
run: |
defaults delete org.vim.MacVim # Clean up stale states
# Currently we don't run any non-src tests, as syntax tests are fragile and prone to spamming escape codes.
# This needs to be investigated and fixed upstream.
# MacVim is unlikely to introduce breaking changes in runtime files anyway.
make ${MAKE_BUILD_ARGS} -C src test
- name: Test Vim (GUI)
if: startsWith(github.ref, 'refs/tags/') || matrix.testgui
timeout-minutes: 30
run: |
defaults delete org.vim.MacVim # Clean up stale states
make ${MAKE_BUILD_ARGS} -C src/testdir clean
make ${MAKE_BUILD_ARGS} -C src testgui
- name: Upload failed test files
if: ${{ !cancelled() && failure() }}
uses: ./.github/actions/test_artifacts
- name: Build MacVim dmg image
if: inputs.publish && (startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/master')
run: |
if ${{ inputs.legacy == true }}; then
make -C src macvim-dmg-legacy
else
make -C src macvim-dmg
fi
if ${{ inputs.publish_postfix != '' }}; then
mv src/MacVim/build/Release/MacVim.dmg src/MacVim/build/Release/MacVim${{ inputs.publish_postfix }}.dmg
fi
# Upload the dmg installer only when making tagged release or making a dev build from a master branch.
# 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 format our release notes
# and add pictures to make them look nice.
- name: Upload MacVim image
if: inputs.publish && (startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/master')
uses: actions/upload-artifact@v4
with:
name: MacVim${{ inputs.publish_postfix }}.dmg
path: src/MacVim/build/Release/MacVim${{ inputs.publish_postfix }}.dmg
# If doing a tagged release, use repository-specified number of retention days (usually 90 days) to make it
# easier to audit. (specify "0" to indicate using repository settings)
#
# Otherwise, we are just doing a dev build for potential testing, just use a maximum of 21 days as we don't
# tend to need these for long.
retention-days: ${{ startsWith(github.ref, 'refs/tags/') && 0 || (github.retention_days > 21 && 21 || 0) }}
+2
View File
@@ -163,6 +163,8 @@ src/shadow
src/shadow-*
src/runtime
src/pixmaps
src/LICENSE
src/README.txt
# other files possibly created by tools
src/cscope.out
+2 -2
View File
@@ -79,7 +79,7 @@ can be translated:
* Menus, see [runtime/lang/README.txt][2]
* Vim tutor, see [runtime/tutor/README.txt][3]
* Manual pages, see [runtime/doc/\*.1][4] for examples
* Installer, see [nsis/lang/\*.nsi][5] for examples
* Installer, see [nsis/lang/README.txt][5]
The help files can be translated and made available separately.
See https://www.vim.org/translations.php for examples.
@@ -103,7 +103,7 @@ mailing list. For other questions please use the [Vi Stack Exchange][8] website,
[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
[5]: https://github.com/vim/vim/blob/master/nsis/lang/README.txt
[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
+19 -4
View File
@@ -52,6 +52,7 @@ SRC_ALL = \
src/debugger.c \
src/dict.c \
src/diff.c \
src/linematch.c \
src/digraph.c \
src/drawline.c \
src/drawscreen.c \
@@ -230,6 +231,8 @@ SRC_ALL = \
src/testdir/silent.wav \
src/testdir/popupbounce.vim \
src/testdir/crash/* \
src/testdir/ru_RU/LC_MESSAGES/Makefile \
src/testdir/ru_RU/LC_MESSAGES/__PACKAGE__.po \
src/testdir/ru_RU/LC_MESSAGES/__PACKAGE__.mo \
src/proto.h \
src/protodef.h \
@@ -286,6 +289,7 @@ SRC_ALL = \
src/proto/insexpand.pro \
src/proto/job.pro \
src/proto/json.pro \
src/proto/linematch.pro \
src/proto/list.pro \
src/proto/locale.pro \
src/proto/logfile.pro \
@@ -607,6 +611,8 @@ SRC_DOS = \
src/xxd/Make_mvc.mak \
nsis/gvim.nsi \
nsis/gvim_version.nsh \
nsis/Makefile \
nsis/Make_mvc.mak \
nsis/README.txt \
nsis/lang/*.nsi \
nsis/lang/README.txt \
@@ -708,8 +714,6 @@ RT_ALL = \
README_VIM9.md \
LICENSE \
CONTRIBUTING.md \
lang/LICENSE.itx \
lang/README.itx \
runtime/bugreport.vim \
runtime/doc/*.awk \
runtime/doc/*.pl \
@@ -771,6 +775,8 @@ RT_ALL = \
runtime/tutor/en/vim-01-beginner.tutor.json \
runtime/tutor/it/vim-01-beginner.tutor \
runtime/tutor/it/vim-01-beginner.tutor.json \
runtime/tutor/sr/vim-01-beginner.tutor \
runtime/tutor/sr/vim-01-beginner.tutor.json \
runtime/tutor/tutor.tutor \
runtime/tutor/tutor.tutor.json \
runtime/tutor/tutor.vim \
@@ -807,6 +813,15 @@ RT_ALL = \
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/pack/dist/opt/netrw/LICENSE.txt \
runtime/pack/dist/opt/netrw/README.md \
runtime/pack/dist/opt/netrw/autoload/netrw.vim \
runtime/pack/dist/opt/netrw/autoload/netrw/own.vim \
runtime/pack/dist/opt/netrw/autoload/netrwSettings.vim \
runtime/pack/dist/opt/netrw/autoload/netrw_gitignore.vim \
runtime/pack/dist/opt/netrw/doc/netrw.txt \
runtime/pack/dist/opt/netrw/plugin/netrwPlugin.vim \
runtime/pack/dist/opt/netrw/syntax/netrw.vim
# Runtime files for all distributions without CR/LF translation.
RT_ALL_BIN = \
@@ -1033,7 +1048,8 @@ IN_README_DIR = \
# Generic language files.
LANG_GEN = \
README.??x.txt \
lang/README.*.txt \
lang/LICENSE.*.txt \
runtime/doc/*-da.1 \
runtime/doc/*-da.UTF-8.1 \
runtime/doc/*-de.1 \
@@ -1049,7 +1065,6 @@ 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 \
+22 -27
View File
@@ -161,12 +161,12 @@ MINOR = 1
# - See src/INSTALLpc.txt for installing the compiler and SDK.
# - Set environment for Visual C++ 2015:
# > cd src
# > msvc2015.bat
# > msvc-latest.bat
# - Build the console binary:
# > nmake -f Make_mvc.mak
# > nmake.exe -f Make_mvc.mak
# - Run the tests and check the output:
# > nmake -f Make_mvc.mak testclean
# > nmake -f Make_mvc.mak test
# > nmake.exe -f Make_mvc.mak testclean
# > nmake.exe -f Make_mvc.mak test
# - Rename (using ../tools/rename.bat):
# vim.exe to vimw32.exe
# tee/tee.exe to teew32.exe
@@ -176,10 +176,10 @@ MINOR = 1
# uninstall.exe to uninstallw32.exe
# Win32 GUI version build:
# - > cd src
# > nmake -f Make_mvc.mak GUI=yes
# > nmake.exe -f Make_mvc.mak "GUI=yes"
# - Run the tests and check the output:
# > nmake -f Make_mvc.mak testclean
# > nmake -f Make_mvc.mak testgvim
# > nmake.exe -f Make_mvc.mak testclean
# > nmake.exe -f Make_mvc.mak testgvim
# - move "gvim.exe" to here (otherwise the OLE version will overwrite it).
# - Move gvim.pdb to here.
# - Copy "GvimExt/gvimext.dll" to here.
@@ -191,8 +191,8 @@ MINOR = 1
# > cd src
# > bigvim.bat
# - Run the tests:
# > nmake -f Make_mvc.mak testclean
# > nmake -f Make_mvc.mak testgvim
# > nmake.exe -f Make_mvc.mak testclean
# > nmake.exe -f Make_mvc.mak testgvim
# - check the output.
# - Rename "gvim.exe" to "gvim_ole.exe".
# - Rename gvim.pdb to "gvim_ole.pdb".
@@ -216,9 +216,9 @@ MINOR = 1
# - Make sure there is a diff.exe two levels up (get it from a previous Vim
# version). Also put winpty32.dll and winpty-agent.exe there.
# - go to ../nsis and do:
# > unzip icons.zip
# > makensis gvim.nsi (takes a few minutes).
# ignore warning for libwinpthread-1.dll
# > nmake.exe -f Make_mvc.mak all
# (takes a few minutes).
# See nsis/README.txt for details.
# - Copy gvim##.exe to the dist directory.
#
# 64 bit builds (these are not in the normal distribution, the 32 bit build
@@ -226,9 +226,9 @@ MINOR = 1
# Like the console and GUI version, but first run vcvars64.bat or
# "..\VC\vcvarsall.bat x86_amd64".
# - Build the console version:
# > nmake -f Make_mvc.mak
# > nmake.exe -f Make_mvc.mak
# - Build the GUI version:
# > nmake -f Make_mvc.mak GUI=yes
# > nmake.exe -f Make_mvc.mak "GUI=yes"
# - Build the OLE version with interfaces:
# > bigvim64.bat
#
@@ -266,8 +266,8 @@ dist:
# Clean up some files to avoid they are included.
# Copy README files to the top directory.
prepare:
if test -f runtime/doc/uganda.nsis.txt; then \
rm runtime/doc/uganda.nsis.???; fi
if test -f lang/LICENSE.nsis.txt; then \
rm -f lang/LICENSE*.nsis.txt; fi
for name in $(IN_README_DIR); do \
cp READMEdir/"$$name" .; \
done
@@ -408,8 +408,7 @@ amisrc: dist prepare
mv dist/vim$(VERSION)src.tar.gz dist/vim$(VERSION)src.tgz
# MS-DOS sources
dossrc: dist dist/$(COMMENT_SRC) runtime/doc/uganda.nsis.txt \
nsis/gvim_version.nsh
dossrc: dist dist/$(COMMENT_SRC) license nsis/gvim_version.nsh
-rm -rf dist/vim$(VERSION)src.zip
-rm -rf dist/vim
mkdir dist/vim
@@ -420,23 +419,19 @@ dossrc: dist dist/$(COMMENT_SRC) runtime/doc/uganda.nsis.txt \
$(SRC_DOS_BIN) \
$(SRC_AMI_DOS) \
$(SRC_DOS_UNIX) \
runtime/doc/uganda.nsis.??? \
lang/LICENSE.*.txt \
lang/README.*.txt \
nsis/gvim_version.nsh \
| (cd dist/vim/$(VIMRTDIR); tar xf -)
mv dist/vim/$(VIMRTDIR)/runtime/* dist/vim/$(VIMRTDIR)
rmdir dist/vim/$(VIMRTDIR)/runtime
cd dist && zip -9 -rD -z vim$(VERSION)src.zip vim <$(COMMENT_SRC)
runtime/doc/uganda.nsis.txt: runtime/doc/uganda.???
cd runtime/doc && $(MAKE) uganda.nsis.txt
license:
cd nsis && $(MAKE) -f Makefile $@
nsis/gvim_version.nsh: Makefile
echo "# Generated from Makefile: define the version numbers" > $@
echo "!ifndef __GVIM_VER__NSH__" >> $@
echo "!define __GVIM_VER__NSH__" >> $@
echo "!define VER_MAJOR $(MAJOR)" >> $@
echo "!define VER_MINOR $(MINOR)" >> $@
echo "!endif" >> $@
cd nsis && $(MAKE) -f Makefile $(@F)
dosrt: dist dist/$(COMMENT_RT) dosrt_files
-rm -rf dist/vim$(VERSION)rt.zip
+109
View File
@@ -0,0 +1,109 @@
ЛИЦЕНЗИЯ VIM
I) Неизменённые копии программы Vim могут распространяться без ограничения
при условии включения данного текста лицензии. Распространение
неизменённых копий отдельных частей программы Vim также возможно
при соблюдении условия о включении данного текста лицензии. Подобным
образом разрешается добавлять исполняемые файлы, скомпилированные
из неизменённого исходного кода программы Vim, а также собственные
примеры использования и командные файлы редактора Vim.
II) Изменённую (или дополненную) версию программы Vim, включающую
исполняемые файлы и/или исходный код, допускается распространять
при соблюдении следующих четырёх условий:
1) Текст настоящей лицензии должен включаться в состав распространяемой
версии программы Vim без изменений.
2) Изменённая версия программы Vim должна распространяться одним
из следующих пяти способов:
a) При внесении изменений в программу Vim, в дистрибутиве должны
быть явно указаны контактные данные лица, внёсшего эти изменения.
Ответственному разработчику по его запросу (в любой форме) должна
быть безвозмездно предоставлена копия распространяемой изменённой
версии программы Vim, включая её исходный код. Ответственный
разработчик оставляет за собой право включать сделанные изменения
в официальную версию программы Vim. Конкретные действия
ответственного разработчика, относительно переданных изменений,
а также лицензионные условия, на основании которых будет
осуществляться их распространение, могут быть дополнительно
согласованы. Если согласование не проводилось, сделанные изменения
будут распространяться на условиях настоящей лицензии или более
поздней её версии. Лица, в данное время являющиеся ответственными
за разработку, указаны в перечне, размещённом по адресу:
https://github.com/orgs/vim/people. В случае изменения этой
информации, актуальные данные будут опубликованы на
соответствующих ресурсах (вероятнее всего по интернет‐адресам
vim.sf.net, www.vim.org и/или comp.editors). В случае полной
невозможности установить контакт с ответственным разработчиком,
обязательства по отправке изменений утрачивают силу. После
передачи подтверждения о получении изменений от ответственного
разработчика, необходимость в повторной отправке копии изменённой
программы Vim неприменима.
b) Если лицом получена изменённая версия программа Vim,
распространяющаяся на условиях, указанных в ч. II) п. 2) пп. а)
допускается дальнейшее её распространение этим лицом без внесения
изменений и согласно ч. I) настоящей лицензии. В случае внесения
дополнительных изменений, на эти изменения будут распространяться
условия, указанные в ч. II) п. 2) пп. a).
c) Каждая копия распространяемой изменённой версии программы Vim
должна включать информацию обо всех произведённых изменениях,
включая исходный код. Эта информация может быть представлена
в виде построчного сравнения файлов. Выбор лицензии, по условиям
которой будет распространяться добавленный код, остаётся
за автором этих изменений. Изменения и лицензия на эти изменения
не должны запрещать другим лицам внесение своих собственных
изменений в официальную версию программы Vim.
d) Изменённая версия программы Vim, содержащая изменения в
соответствии с ч. II) п. 2 пп. c), может распространяться без
исходного кода для этих изменений, при соблюдении следующих трёх
условий:
- Лицензия, применяемая к внесённым изменениям, предоставляет
ответственному разработчику программы Vim возможность
безвозмездного и неограниченного распространения этих изменений,
а также право на безвозмездное и неограниченное включение этих
изменений в официальную версию программы Vim.
- Изменения должны сохраняться не менее трёх лет со времени
распространения соответствующей изменённой версии программы Vim.
В течение этого периода по запросу ответственного разработчика
или другого пользователя изменённой версии программы Vim
(в любой форме) необходимо предоставить исходный код данных
изменений.
- В дистрибутиве изменённой версии программы Vim должны быть явно
указаны контактные данные лица, внёсшего эти изменения.
Контактные данные должны сохранять актуальность в течение
не менее трёх лет со времени последнего распространения
соответствующей изменённой версии программы Vim или как можно
дольше.
e) Если к изменениям, внесённым в программу Vim, применимы условия
лицензии GNU General Public License (GNU GPL), допускается
распространение изменённой версия программы Vim на условиях
лицензии GNU GPL версии 2 или любой более поздней версии этой
лицензии.
3) Необходимо добавить соответствующую информацию, которая должна быть
выведена в результате выполнения команды ":version" в программе Vim,
а также на экране приветствия программы Vim, чтобы пользователь
изменённой версии программы Vim имел возможность определить,
что он пользуется изменённой версией. При распространении
на условиях, указанных в ч. II) п. 2) пп. e) такую информацию
требуется добавлять только в том случае, когда она не противоречит
лицензии, распространяющейся на эти изменения.
4) Контактная информация, которая указывается по требованию ч. II) п. 2)
пп. a) и ч. II) п. 2) пп. d) не должна удаляться или изменяться никем
другим, кроме лица, указавшего данную контактную информацию.
III) При распространении изменённой версии программы Vim рекомендуется
пользоваться лицензией Vim для произведённых изменений и обеспечить
доступ к этим изменениям ответственного разработчика, включая исходный
код изменений. Предпочтительным способом предоставления доступа
к произведённым изменениям является отправка этих изменений через
электронную почту или размещение файлов на сервер с отправкой
URL-адреса по электронной почте. Если количество изменений
незначительно (например, изменения в файле Makefile), достаточно будет
отправить через электронную почту файл построчного сравнения. Изменения
или URL-адреса должны быть направлены на адрес электронной почты
maintainer@vim.org
IV) Не допускается удаление настоящей лицензия из дистрибутива исходного
кода программы Vim, его отдельных частей или изменённой версии.
Допускается использование настоящей лицензию для предыдущих
изменённых выпусков программы Vim, взамен тех лицензий, с которыми
они распространялись.
+1 -1
View File
@@ -1,4 +1,4 @@
README.rux.txt для версии 9.1 программы Vim — Vi IMproved.
README.ru.txt для версии 9.1 программы Vim — Vi IMproved.
ЧТО ТАКОЕ РЕДАКТОР VIM?
+134
View File
@@ -0,0 +1,134 @@
#
# Makefile for MS Windows for create self-installing exe of Vim.
# 05/04/2024, Restorer restorer@mail2k.ru
#
#!INCLUDE .\Make_all.mak
.SUFFIXES :
!IFDEF PROGRAMW6432
ProgFiles=%%PROGRAMFILES(x86)%%
!ELSE
ProgFiles=$(PROGRAMFILES)
!ENDIF
!IFDEF VIMSRC
MKNSISFLAGS = /D"VIMSRC=$(VIMSRC)"
!ENDIF
!IFDEF VIMRT
MKNSISFLAGS = $(MKNSISFLAGS) /D"VIMRT=$(VIMRT)"
!ENDIF
!IFDEF VIMTOOLS
MKNSISFLAGS = $(MKNSISFLAGS) /D"VIMTOOLS=$(VIMTOOLS)"
!ENDIF
!IFDEF GETTEXT
MKNSISFLAGS = $(MKNSISFLAGS) /D"GETTEXT=$(GETTEXT)"
!ENDIF
!IFDEF HAVE_UPX
MKNSISFLAGS = $(MKNSISFLAGS) /DHAVE_UPX=$(HAVE_UPX)
!ENDIF
!IFDEF HAVE_NLS
MKNSISFLAGS = $(MKNSISFLAGS) /DHAVE_NLS=$(HAVE_NLS)
!ENDIF
!IFDEF HAVE_MULTI_LANG
MKNSISFLAGS = $(MKNSISFLAGS) /DHAVE_MULTI_LANG=$(HAVE_MULTI_LANG)
!ENDIF
!IFDEF WIN64
MKNSISFLAGS = $(MKNSISFLAGS) /DWIN64=$(WIN64)
!ENDIF
!IFDEF INCLUDE_LIBGCC
MKNSISFLAGS = $(MKNSISFLAGS) /DINCLUDE_LIBGCC=$(INCLUDE_LIBGCC)
!ENDIF
!IFDEF X
XX = /X"$(X:;=" /X")"
!ENDIF
# If necessary, correct the full path of the NSIS compiler in the next line.
# Please do not enclose the path in quotation marks.
MKNSIS = $(ProgFiles)\NSIS
PS = powershell.exe
RM = del /f /q
RD = rmdir /s /q
MKNSISFLAGS = /INPUTCHARSET UTF8 $(MKNSISFLAGS)
PSFLAGS = -NoLogo -NoProfile -Command
# Read MAJOR and MINOR from version.h.
!IF ![for /F "tokens=2,3" %G in ( \
'findstr /rc:"VIM_VERSION_MINOR[ ^]*[0-9^]" \
/rc:"VIM_VERSION_MAJOR[ ^]*[0-9^]" ..\src\version.h') do \
@if "VIM_VERSION_MAJOR"=="%G" (echo MAJOR=%H>>_ver.tmp) \
else echo MINOR=%H>>_ver.tmp]
! INCLUDE .\_ver.tmp
! IF [$(RM) .\_ver.tmp]
! ENDIF
!ENDIF
# Read PATCHLEVEL from version.c
!IF ![for /F %G in ( \
'findstr /nblc:"static int included_patches[^]" ..\src\version.c \
^| (set /p "_t=" ^& set /a _t+=2 ^)') do \
@cmd /q /c "for /F "skip=%G delims=, " %H in (..\src\version.c) do \
(echo PATCH=%H>_patchlvl.tmp & exit /b)"]
! INCLUDE .\_patchlvl.tmp
! IF [$(RM) .\_patchlvl.tmp]
! ENDIF
!ENDIF
!IF $(PATCH) < 10
PATCH = 000$(PATCH)
!ELSEIF $(PATCH) < 100
PATCH = 00$(PATCH)
!ELSEIF $(PATCH) < 1000
PATCH = 0$(PATCH)
!ENDIF
all : makeinst
makeinst : prepare
^"$(MKNSIS)\makensis.exe" $(MKNSISFLAGS) gvim.nsi $(XX)
prepare : unzipicons gvim_version.nsh license rename
unzipicons : icons.zip
@ if exist %|fF\nul $(RD) %|fF
@ $(PS) $(PSFLAGS) \
Add-Type -AssemblyName 'System.IO.Compression.FileSystem'; \
[System.IO.Compression.ZipFile]::ExtractToDirectory(\"$**\", \".\")
gvim_version.nsh : Make_mvc.mak
@ 1> $@ echo:^# Generated from Makefile: define the version numbers
@ 1>> $@ echo:^!ifndef __GVIM_VER__NSH__
@ 1>> $@ echo:^!define __GVIM_VER__NSH__
@ 1>> $@ echo:^!define VER_MAJOR $(MAJOR)
@ 1>> $@ echo:^!define VER_MINOR $(MINOR)
@ 1>> $@ echo:^!define PATCHLEVEL $(PATCH)
@ 1>> $@ echo:^!endif
license : ..\lang\LICENSE.*.txt ..\LICENSE
!@ $(PS) $(PSFLAGS) \
Get-Content -Path '$**' -Encoding UTF8 ^| \
Set-Content -Path '..\lang\$(**B).nsis.txt' -Enc Unicode -Force
rename :
@ ..\tools\rename.bat "$(SRC)" "$(DST)" 1> nul
clean :
@ if exist .\gvim_version.nsh $(RM) .\gvim_version.nsh
@ if exist ..\lang\LICENSE*.nsis.txt $(RM) ..\lang\LICENSE*.nsis.txt
@ if exist .\icons\nul $(RD) .\icons
@ if exist .\gvim??.exe $(RM) .\gvim??.exe
# vim: set noet sw=8 ts=8 sts=0 wm=0 tw=0 ft=make:
+95
View File
@@ -0,0 +1,95 @@
#
# Makefile for UNIX-like for create self-installing exe of Vim.
# 15/12/2024, Restorer restorer@mail2k.ru
#
.SUFFIXES:
.PHONY: all makeinst prepare rename clean
ifdef VIMSRC
MKNSISFLAGS := -D"VIMSRC=$(VIMSRC)"
endif
ifdef VIMRT
MKNSISFLAGS := $(MKNSISFLAGS) -D"VIMRT=$(VIMRT)"
endif
ifdef VIMTOOLS
MKNSISFLAGS := $(MKNSISFLAGS) -D"VIMTOOLS=$(VIMTOOLS)"
endif
ifdef GETTEXT
MKNSISFLAGS := $(MKNSISFLAGS) -D"GETTEXT=$(GETTEXT)"
endif
ifdef HAVE_UPX
MKNSISFLAGS := $(MKNSISFLAGS) -DHAVE_UPX=$(HAVE_UPX)
endif
ifdef HAVE_NLS
MKNSISFLAGS := $(MKNSISFLAGS) -DHAVE_NLS=$(HAVE_NLS)
endif
ifdef HAVE_MULTI_LANG
MKNSISFLAGS := $(MKNSISFLAGS) -DHAVE_MULTI_LANG=$(HAVE_MULTI_LANG)
endif
ifdef WIN64
MKNSISFLAGS := $(MKNSISFLAGS) -DWIN64=$(WIN64)
endif
ifdef INCLUDE_LIBGCC
MKNSISFLAGS := $(MKNSISFLAGS) -DINCLUDE_LIBGCC=$(INCLUDE_LIBGCC)
endif
ifdef X
XX := -X"$(X:;=" -X")"
endif
MAJOR != grep -E 'VIM_VERSION_MAJOR\s{2,}' ../src/version.h | \
awk '{ printf "%d",$$3 }'
MINOR != grep -E 'VIM_VERSION_MINOR\s{2,}' ../src/version.h | \
awk '{ printf "%d",$$3 }'
PATCH != awk '/number below this line/,/,/' ../src/version.c | \
awk 'NR == 3 { printf "%04d",$$1 }' | sed -e 's/[ ,]//g'
MKNSISFLAGS := -INPUTCHARSET UTF8 $(MKNSISFLAGS)
all: makeinst
makeinst: prepare
makensis $(MKNSISFLAGS) gvim.nsi $(XX)
prepare: unzipicons gvim_version.nsh license rename
unzipicons: icons.zip
if test -d `basename $? .zip` ; then rm -rf `basename $? .zip` ; fi
unzip $?
gvim_version.nsh: Makefile
echo "# Generated from Makefile: define the version numbers" > $@
echo "!ifndef __GVIM_VER__NSH__" >> $@
echo "!define __GVIM_VER__NSH__" >> $@
echo "!define VER_MAJOR $(MAJOR)" >> $@
echo "!define VER_MINOR $(MINOR)" >> $@
echo "!define PATCHLEVEL $(PATCH)" >> $@
echo "!endif" >> $@
license: ../lang/LICENSE.*.txt ../LICENSE
for lic in $? ; do \
bn=`basename $$lic .txt` ; \
awk 'sub("$$", "\r")' < $$lic | \
iconv -f UTF-8 -t UTF-16 > ../lang/$$bn.nsis.txt ; \
done
rename:
../tools/rename.bat "$(SRC)" "$(DST)"
clean:
if test -f gvim_version.nsh ; then rm -f gvim_version.nsh ; fi
rm -f ../lang/LICENSE*.nsis.txt
if test -d icons ; then rm -rf icons ; fi
if test -f gvim??.exe ; then rm -f gvim??.exe ; fi
# vim: set noet sw=8 ts=8 sts=0 wm=0 tw=0 ft=make:
+48 -48
View File
@@ -3,22 +3,15 @@ Installation System (NSIS), available at http://nsis.sourceforge.net/
To build the installable .exe file:
1. Unpack three archives:
PC sources
PC runtime
PC language files
You can generate these from the Unix sources and runtime plus the extra
archive (see the Makefile in the top directory).
Preparatory stage
2. Go to the src directory and build:
gvim.exe (the OLE version),
vimrun.exe,
install.exe,
uninstall.exe,
tee/tee.exe,
xxd/xxd.exe
1. Clone using the git tool the Vim repository or download its zip file
available at:
https://github.com/vim/vim
Then execute tools/rename.bat to rename the executables.
2. Go to the "/src" directory and build the Vim editor, making sure to use the
following variable values: "GUI=yes"; "OLE=yes"; "VIMDLL=yes". See
INSTALLpc.txt and Make_mvc.mak for details.
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
@@ -32,8 +25,8 @@ To build the installable .exe file:
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.
specify a different directory by specifying the appropriate makefile value.
How to do this is described below.
5. For the terminal window to work in Vim, the library winpty is required.
You can get it at the following url:
@@ -41,8 +34,8 @@ To build the installable .exe file:
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.
directory). However, you can specify a different directory by specifying
the appropriate makefile value. How to do this is described below.
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
@@ -52,12 +45,7 @@ To build the installable .exe file:
"../.." directory (above the "vim91" directory, where "diff.exe" and
"winpty{32|64}.dll").
7. On MS Windows do "nmake.exe -f Make_mvc.mak uganda.nsis.txt" in runtime/doc.
On Unix-like system do "make runtime/doc/uganda.nsis.txt" in top directory
or "make uganda.nsis.txt" in runtime/doc. The created files
"uganda.nsis.???" will be automatically converted to DOS file format.
8. Get gettext and iconv DLLs from the following site:
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
@@ -74,35 +62,47 @@ To build the installable .exe file:
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 specify a
different directory by specifying the appropriate makefile value. How to do
this is described below.
Install NSIS if you didn't do that already.
Download Unicode version the ShellExecAsUser plug-in for NSIS from:
8. 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
and put "ShellExecAsUser.dll" to path\to\NSIS\Plugins\x86-unicode
Installer assembly stage
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)
On MS Windows, open the Developer Command Prompt for VS and go to the
"/nsis" directory and type the command
nmake.exe -lf Make_mvc.mak [variables] all
Then build gvim.exe:
cd nsis
makensis.exe [options] gvim.nsi
After the installer is created and you copy it to the desired location, run
the following command in the "/nsis" directory
nmake.exe -lf Make_mvc.mak clean
On UNIX-like systems, go to the "/nsis" directory and type the command
make -f Makefile [variables] all
Options (not mandatory):
/DVIMSRC=<dir> — directory where location of gvim_ole.exe, vimw32.exe,
After the installer is created and you copy it to the desired location, run
the following command in the "/nsis" directory
make -f Makefile clean
Variables and their values available for building the installer (not mandatory):
"VIMSRC=<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
"VIMRT=<dir>" — directory where location of runtime files.
"VIMTOOLS=<dir>" — directory where location of extra tools: diff.exe,
winpty{32|64}.dll, winpty-agent.exe, libsodium.dll.
"GETTEXT=<dir>" — directory where location of gettext libraries.
"HAVE_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
"HAVE_NLS=0" — do not add native language support.
"HAVE_MULTI_LANG=0" — to create an English-only the installer.
"WIN64=1" — to create a 64-bit the installer.
"X=<scriptcmd>" — executes scriptcmd in script. If multiple scriptcmd
are specified, they are separated by a semicolon.
Example "X=OutFile MyVim.exe;XPMode on"
"MKNSIS=<dir>" — the directory where the "makensis.exe" program is
located.
+38 -105
View File
@@ -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: 2025 Jan 05
Unicode true
@@ -14,19 +14,19 @@ Unicode true
# Location of runtime files
!ifndef VIMRT
!define VIMRT ".."
!define VIMRT "..\runtime"
!endif
# Location of extra tools: diff.exe, winpty{32|64}.dll, winpty-agent.exe, etc.
!ifndef VIMTOOLS
!define VIMTOOLS ..\..
!define VIMTOOLS "..\.."
!endif
# Location of gettext.
# It must contain two directories: gettext32 and gettext64.
# See README.txt for detail.
!ifndef GETTEXT
!define GETTEXT ${VIMRT}
!define GETTEXT ${VIMTOOLS}
!endif
# If you have UPX, use the switch /DHAVE_UPX=1 on the command line makensis.exe.
@@ -74,6 +74,8 @@ Unicode true
!include "nsDialogs.nsh"
!include "Sections.nsh"
!include "x64.nsh"
!include "StrFunc.nsh"
${StrRep}
# See https://nsis.sourceforge.io/LogicLib
;FileExists is already part of LogicLib, but returns true for directories
@@ -246,6 +248,9 @@ Var vim_nsd_mouse
Var vim_compat_stat
Var vim_keymap_stat
Var vim_mouse_stat
!if ${HAVE_NLS}
Var lng_usr
!endif
# Reserve files
@@ -423,6 +428,7 @@ Section "$(str_section_exe)" id_section_exe
File /oname=xxd.exe ${VIMSRC}\xxdw32.exe
File ..\vimtutor.bat
File ..\README.txt
File /oname=LICENSE.txt ..\LICENSE
File ..\uninstall.txt
File ${VIMRT}\*.vim
@@ -621,110 +627,23 @@ SectionGroupEnd
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}
SetOutPath $INSTDIR
!if /FileExists "..\lang\README.*.txt"
File ..\lang\README.*.txt
CopyFiles /SILENT /FILESONLY $INSTDIR\README.$lng_usr.txt \
$INSTDIR\vim${VER_MAJOR}${VER_MINOR}\README.$lng_usr.txt
Delete $INSTDIR\README.*.txt
!endif
!if /FileExists ..\README.nlx.txt
${If} $Language = ${LANG_DUTCH}
File ..\README.nlx.txt
${EndIf}
!if /FileExists "..\lang\LICENSE.??.txt"
File ..\lang\LICENSE.??.txt
!if /FileExists "..\lang\LICENSE.??_??.txt"
File ..\lang\LICENSE.??_??.txt
!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}
CopyFiles /SILENT /FILESONLY $INSTDIR\LICENSE.$lng_usr.txt \
$INSTDIR\vim${VER_MAJOR}${VER_MINOR}\LICENSE.$lng_usr.txt
Delete $INSTDIR\LICENSE.*.txt
!endif
SetOutPath $0\lang
File /r /x Makefile ${VIMRT}\lang\*.*
SetOutPath $0
@@ -883,6 +802,20 @@ Function .onInit
!insertmacro MUI_LANGDLL_DISPLAY
!endif
!if ${HAVE_NLS}
ClearErrors
System::Call 'kernel32::GetUserDefaultLocaleName(t.r19, *i${NSIS_MAX_STRLEN})'
StrCmp $R9 "zh-cn" coincide 0
StrCmp $R9 "zh-tw" 0 part
coincide:
System::Call 'User32::CharLower(t r19 r19)*i${NSIS_MAX_STRLEN}'
${StrRep} $lng_usr "$R9" "-" "_"
Goto done
part:
StrCpy $lng_usr $R9 2
done:
!endif
${If} $INSTDIR == ${DEFAULT_INSTDIR}
# Check $VIM
ReadEnvStr $3 "VIM"
+1
View File
@@ -3,4 +3,5 @@
!define __GVIM_VER__NSH__
!define VER_MAJOR 9
!define VER_MINOR 1
!define PATCHLEVEL 0
!endif
+5 -5
View File
@@ -18,17 +18,17 @@ allowable length of strings. For example:
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"
If you do not yet have a translated "LICENSE" file and/or a main "README.txt"
file, set the following values:
for the license file
LicenseLangString page_lic_file 0 "${VIMRT}\doc\uganda.nsis.txt"
LicenseLangString page_lic_file 0 "..\lang\LICENSE.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.
Translation files should be located in the "lang" subdirectory of the root
directory. The name of the files is as follows: "README.xx.txt", where xx is the
language code according to ISO639.
+3 -3
View File
@@ -19,15 +19,15 @@ 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"
LicenseLangString page_lic_file 0 "..\lang\LICENSE.nsis.txt"
#LicenseLangString page_lic_file ${LANG_DANISH} "..\lang\LICENSE.da.nsis.txt"
##############################################################################
# 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"
#LangString vim_readme_file ${LANG_DANISH} "README.da.txt"
##############################################################################
# MUI Configuration Strings {{{1
+3 -3
View File
@@ -21,15 +21,15 @@ LangString ^UninstallCaption ${LANG_DUTCH} \
# 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"
LicenseLangString page_lic_file 0 "..\lang\LICENSE.nsis.txt"
#LicenseLangString page_lic_file ${LANG_DUTCH} "..\lang\LICENSE.nl.nsis.txt"
##############################################################################
# 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"
#LangString vim_readme_file ${LANG_DUTCH} "README.nl.txt"
##############################################################################
# MUI Configuration Strings {{{1
+1 -1
View File
@@ -21,7 +21,7 @@ LangString ^UninstallCaption ${LANG_ENGLISH} \
# License file for the license page {{{1
##############################################################################
LicenseLangString page_lic_file ${LANG_ENGLISH} "${VIMRT}\doc\uganda.nsis.txt"
LicenseLangString page_lic_file ${LANG_ENGLISH} "..\lang\LICENSE.nsis.txt"
##############################################################################
# README.txt file, which is opened after installation {{{1
+3 -3
View File
@@ -21,15 +21,15 @@ LangString ^UninstallCaption ${LANG_GERMAN} \
# 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"
LicenseLangString page_lic_file 0 "..\lang\LICENSE.nsis.txt"
#LicenseLangString page_lic_file ${LANG_GERMAN} "..\lang\LICENSE.de.nsis.txt"
##############################################################################
# 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"
#LangString vim_readme_file ${LANG_GERMAN} "README.de.txt"
##############################################################################
# MUI Configuration Strings {{{1
+3 -3
View File
@@ -21,15 +21,15 @@ LangString ^UninstallCaption ${LANG_GREEK} \
# 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"
LicenseLangString page_lic_file 0 "..\lang\LICENSE.nsis.txt"
#LicenseLangString page_lic_file ${LANG_GREEK} "..\lang\LICENSE.el.nsis.txt"
##############################################################################
# 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"
#LangString vim_readme_file ${LANG_GREEK} "README.el.txt"
##############################################################################
# MUI Configuration Strings {{{1
+2 -4
View File
@@ -21,15 +21,13 @@ LangString ^UninstallCaption ${LANG_ITALIAN} \
# 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"
LicenseLangString page_lic_file ${LANG_ITALIAN} "..\lang\LICENSE.it.nsis.txt"
##############################################################################
# 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"
LangString vim_readme_file ${LANG_ITALIAN} "README.it.txt"
##############################################################################
# MUI Configuration Strings {{{1
+3 -3
View File
@@ -31,15 +31,15 @@ LangString ^InstallBtn ${LANG_JAPANESE} \
# 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"
LicenseLangString page_lic_file 0 "..\lang\LICENSE.nsis.txt"
#LicenseLangString page_lic_file ${LANG_JAPANESE} "..\lang\LICENSE.ja.nsis.txt"
##############################################################################
# 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"
#LangString vim_readme_file ${LANG_JAPANESE} "README.ja.txt"
##############################################################################
# MUI Configuration Strings {{{1
+2 -2
View File
@@ -21,13 +21,13 @@ LangString ^UninstallCaption ${LANG_RUSSIAN} \
# Translated license file for the license page {{{1
##############################################################################
LicenseLangString page_lic_file ${LANG_RUSSIAN} "${VIMRT}\doc\uganda.nsis.rux"
LicenseLangString page_lic_file ${LANG_RUSSIAN} "..\lang\LICENSE.ru.nsis.txt"
##############################################################################
# Translated README.txt file, which is opened after installation {{{1
##############################################################################
LangString vim_readme_file ${LANG_RUSSIAN} "README.rux.txt"
LangString vim_readme_file ${LANG_RUSSIAN} "README.ru.txt"
##############################################################################
# MUI Configuration Strings {{{1
+3 -3
View File
@@ -21,15 +21,15 @@ LangString ^UninstallCaption ${LANG_SERBIAN} \
# 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"
LicenseLangString page_lic_file 0 "..\lang\LICENSE.nsis.txt"
#LicenseLangString page_lic_file ${LANG_SERBIAN} "..\lang\LICENSE.sr.nsis.txt"
##############################################################################
# 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"
#LangString vim_readme_file ${LANG_SERBIAN} "README.sr.txt"
##############################################################################
# MUI Configuration Strings {{{1
+3 -3
View File
@@ -22,16 +22,16 @@ LangString ^UninstallCaption ${LANG_SIMPCHINESE} \
# Translated license file for the license page {{{1
##############################################################################
LicenseLangString page_lic_file 0 "${VIMRT}\doc\uganda.nsis.txt"
LicenseLangString page_lic_file 0 "..\lang\LICENSE.nsis.txt"
#LicenseLangString page_lic_file ${LANG_SIMPCHINESE} \
# "${VIMRT}\doc\uganda.nsis.cnx"
# "..\lang\LICENSE.zh_cn.nsis.txt"
##############################################################################
# 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"
#LangString vim_readme_file ${LANG_SIMPCHINESE} "README.zh_cn.txt"
##############################################################################
# MUI Configuration Strings {{{1
+3 -3
View File
@@ -22,16 +22,16 @@ LangString ^UninstallCaption ${LANG_TRADCHINESE} \
# Translated license file for the license page {{{1
##############################################################################
LicenseLangString page_lic_file 0 "${VIMRT}\doc\uganda.nsis.txt"
LicenseLangString page_lic_file 0 "..\lang\LICENSE.nsis.txt"
#LicenseLangString page_lic_file ${LANG_TRADCHINESE} \
# "${VIMRT}\doc\uganda.nsis.twx"
# "..\lang\LICENSE.zh_tw.nsis.txt"
##############################################################################
# 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"
#LangString vim_readme_file ${LANG_TRADCHINESE} "README.zh_tw.txt"
##############################################################################
# MUI Configuration Strings {{{1
+3 -3
View File
@@ -20,15 +20,15 @@ LangString ^UninstallCaption ${LANG_TURKISH} \
# 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"
LicenseLangString page_lic_file 0 "..\lang\LICENSE.nsis.txt"
#LicenseLangString page_lic_file ${LANG_TURKISH} "..\lang\LICENSE.tr.nsis.txt"
##############################################################################
# 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 vim_readme_file ${LANG_TURKISH} "README.tr.txt"
##############################################################################
+6 -6
View File
@@ -3,7 +3,7 @@ vim9script
# Vim functions for file type detection
#
# Maintainer: The Vim Project <https://github.com/vim/vim>
# Last Change: 2025 Jan 08
# Last Change: 2025 Jan 25
# Former Maintainer: Bram Moolenaar <Bram@vim.org>
# These functions are moved here from runtime/filetype.vim to make startup
@@ -437,7 +437,7 @@ export def FThtml()
while n < 40 && n <= line("$")
# Check for Angular
if getline(n) =~ '@\(if\|for\|defer\|switch\)\|\*\(ngIf\|ngFor\|ngSwitch\|ngTemplateOutlet\)\|ng-template\|ng-content\|{{.*}}'
if getline(n) =~ '@\(if\|for\|defer\|switch\)\|\*\(ngIf\|ngFor\|ngSwitch\|ngTemplateOutlet\)\|ng-template\|ng-content'
setf htmlangular
return
endif
@@ -900,7 +900,6 @@ export def SetFileTypeSH(name: string, setft = true): string
if exists("b:is_sh")
unlet b:is_sh
endif
return SetFileTypeShell("bash", setft)
elseif name =~ '\<sh\>' || name =~ '\<dash\>'
# Ubuntu links "sh" to "dash", thus it is expected to work the same way
b:is_sh = 1
@@ -1385,7 +1384,7 @@ export def FTdsp()
setf faust
enddef
# Set the filetype of a *.v file to Verilog, V or Cog based on the first 200
# Set the filetype of a *.v file to Verilog, V or Cog based on the first 500
# lines.
export def FTv()
if did_filetype()
@@ -1398,7 +1397,7 @@ export def FTv()
endif
var in_comment = 0
for lnum in range(1, min([line("$"), 200]))
for lnum in range(1, min([line("$"), 500]))
var line = getline(lnum)
# Skip Verilog and V comments (lines and blocks).
if line =~ '^\s*/\*'
@@ -1430,7 +1429,8 @@ export def FTv()
# 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*\(/[/*].*\)\?$'
# Alternatively: a module is defined: " module MyModule ( input )"
if line =~ ';\s*\(/[/*].*\)\?$' || line =~ '\C^\s*module\s\+\w\+\s*('
setf verilog
return
endif
+4 -1
View File
@@ -4,7 +4,7 @@ vim9script
# Invoked from "scripts.vim" in 'runtimepath'
#
# Maintainer: The Vim Project <https://github.com/vim/vim>
# Last Change: 2023 Aug 10
# Last Change: 2025 Jan 20
# Former Maintainer: Bram Moolenaar <Bram@vim.org>
export def DetectFiletype()
@@ -133,6 +133,9 @@ export def Exe2filetype(name: string, line1: string): string
elseif name =~ 'node\(js\)\=\>\|js\>' || name =~ 'rhino\>'
return 'javascript'
elseif name =~# 'just'
return 'just'
# BC calculator
elseif name =~ '^bc\>'
return 'bc'
+119 -9
View File
@@ -2,19 +2,129 @@ vim9script
# Vim runtime support library
#
# Maintainer: The Vim Project <https://github.com/vim/vim>
# Last Change: 2023 Oct 25
# Maintainer: The Vim Project <https://github.com/vim/vim>
# Last Change: 2025 Jan 29
export def IsSafeExecutable(filetype: string, executable: string): bool
if empty(exepath(executable))
return v:false
if empty(exepath(executable))
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
def Redir(): string
if get(g:, 'netrw_suppress_gx_mesg', true)
if &srr =~# "%s"
return printf(&srr, has("win32") ? "nul" : "/dev/null")
elseif &srr =~# '>&\?$'
return &srr .. (has("win32") ? "nul" : "/dev/null")
else
return &srr .. (has("win32") ? "> nul" : "> /dev/null")
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 != '.'))
endif
return ''
enddef
if has('unix')
if has('win32unix')
# Cygwin provides cygstart
if executable('cygstart')
export def Launch(args: string)
execute $'silent ! cygstart --hide {args} {Redir()}' | redraw!
enddef
elseif !empty($MSYSTEM) && executable('start')
# MSYS2/Git Bash comes by default without cygstart; see
# https://www.msys2.org/wiki/How-does-MSYS2-differ-from-Cygwin
# Instead it provides /usr/bin/start script running `cmd.exe //c start`
# Adding "" //b` sets void title, hides cmd window and blocks path conversion
# of /b to \b\ " by MSYS2; see https://www.msys2.org/docs/filesystem-paths/
export def Launch(args: string)
execute $'silent !start "" //b {args} {Redir()}' | redraw!
enddef
else
# imitate /usr/bin/start script for other environments and hope for the best
export def Launch(args: string)
execute $'silent !cmd /c start "" /b {args} {Redir()}' | redraw!
enddef
endif
elseif exists('$WSL_DISTRO_NAME') # use cmd.exe to start GUI apps in WSL
export def Launch(args: string)
const command = (args =~? '\v<\f+\.(exe|com|bat|cmd)>')
? $'cmd.exe /c start /b {args} {Redir()}'
: $'nohup {args} {Redir()} &'
execute $'silent ! {command}' | redraw!
enddef
else
export def Launch(args: string)
const fork = has('gui_running') ? '' : '&'
execute $':silent ! nohup {args} {Redir()} {fork}' | redraw!
enddef
endif
elseif has('win32')
export def Launch(args: string)
const shell = (&shell =~? '\<cmd\.exe\>') ? '' : 'cmd.exe /c'
const quotes = empty(shell) ? '' : '""'
execute $'silent ! {shell} start {quotes} /b {args} {Redir()}' | redraw!
enddef
else
export def Launch(dummy: string)
echom 'No common launcher found'
enddef
endif
var os_viewer = null_string
# Git Bash
if has('win32unix')
# (cyg)start suffices
os_viewer = ''
# Windows / WSL
elseif executable('explorer.exe')
os_viewer = 'explorer.exe'
# Linux / BSD
elseif executable('xdg-open')
os_viewer = 'xdg-open'
# MacOS
elseif executable('open')
os_viewer = 'open'
endif
def Viewer(): string
# g:Openprg could be a string of program + its arguments, test if first
# argument is executable
var user_viewer = get(g:, "Openprg", get(g:, "netrw_browsex_viewer", ""))
# Take care of an off-by-one check for "for" too
if executable(trim(user_viewer))
return user_viewer
endif
var args = split(user_viewer, '\s\+\zs')
var viewer = get(args, 0, '')
for arg in args[1 :]
if executable(trim(viewer))
return user_viewer
endif
viewer ..= arg
endfor
if os_viewer == null
echoerr "No program to open this path found. See :help Open for more information."
endif
return os_viewer
enddef
export def Open(file: string)
Launch($"{Viewer()} {shellescape(file, 1)}")
enddef
# Uncomment this line to check for compilation errors early
# defcompile
# vim: ts=8 sts=2 sw=2 et
-249
View File
@@ -1,249 +0,0 @@
" 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
" 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
" notice is copied with it. Like anything else that's free,
" netrwSettings.vim is provided *as is* and comes with no
" warranty of any kind, either expressed or implied. By using
" this plugin, you agree that in no event will the copyright
" holder be liable for any damages resulting from the use
" of this software.
"
" Mat 4:23 (WEB) Jesus went about in all Galilee, teaching in their {{{1
" synagogues, preaching the gospel of the kingdom, and healing
" every disease and every sickness among the people.
" Load Once: {{{1
if exists("g:loaded_netrwSettings") || &cp
finish
endif
let g:loaded_netrwSettings = "v18"
if v:version < 700
echohl WarningMsg
echo "***warning*** this version of netrwSettings needs vim 7.0"
echohl Normal
finish
endif
" ---------------------------------------------------------------------
" NetrwSettings: {{{1
fun! netrwSettings#NetrwSettings()
" this call is here largely just to insure that netrw has been loaded
call netrw#WinPath("")
if !exists("g:loaded_netrw")
echohl WarningMsg | echomsg "***sorry*** netrw needs to be loaded prior to using NetrwSettings" | echohl None
return
endif
above wincmd s
enew
setlocal noswapfile bh=wipe
set ft=vim
file Netrw\ Settings
" these variables have the following default effects when they don't
" exist (ie. have not been set by the user in his/her .vimrc)
if !exists("g:netrw_liststyle")
let g:netrw_liststyle= 0
let g:netrw_list_cmd= "ssh HOSTNAME ls -FLa"
endif
if !exists("g:netrw_silent")
let g:netrw_silent= 0
endif
if !exists("g:netrw_use_nt_rcp")
let g:netrw_use_nt_rcp= 0
endif
if !exists("g:netrw_ftp")
let g:netrw_ftp= 0
endif
if !exists("g:netrw_ignorenetrc")
let g:netrw_ignorenetrc= 0
endif
put ='+ ---------------------------------------------'
put ='+ NetrwSettings: by Charles E. Campbell'
put ='+ Press <F1> with cursor atop any line for help'
put ='+ ---------------------------------------------'
let s:netrw_settings_stop= line(".")
put =''
put ='+ Netrw Protocol Commands'
put = 'let g:netrw_dav_cmd = '.g:netrw_dav_cmd
put = 'let g:netrw_fetch_cmd = '.g:netrw_fetch_cmd
put = 'let g:netrw_ftp_cmd = '.g:netrw_ftp_cmd
put = 'let g:netrw_http_cmd = '.g:netrw_http_cmd
put = 'let g:netrw_rcp_cmd = '.g:netrw_rcp_cmd
put = 'let g:netrw_rsync_cmd = '.g:netrw_rsync_cmd
put = 'let g:netrw_scp_cmd = '.g:netrw_scp_cmd
put = 'let g:netrw_sftp_cmd = '.g:netrw_sftp_cmd
put = 'let g:netrw_ssh_cmd = '.g:netrw_ssh_cmd
let s:netrw_protocol_stop= line(".")
put = ''
put ='+Netrw Transfer Control'
put = 'let g:netrw_cygwin = '.g:netrw_cygwin
put = 'let g:netrw_ftp = '.g:netrw_ftp
put = 'let g:netrw_ftpmode = '.g:netrw_ftpmode
put = 'let g:netrw_ignorenetrc = '.g:netrw_ignorenetrc
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
let s:netrw_xfer_stop= line(".")
put =''
put ='+ Netrw Messages'
put ='let g:netrw_use_errorwindow = '.g:netrw_use_errorwindow
put = ''
put ='+ Netrw Browser Control'
if exists("g:netrw_altfile")
put = 'let g:netrw_altfile = '.g:netrw_altfile
else
put = 'let g:netrw_altfile = 0'
endif
put = 'let g:netrw_alto = '.g:netrw_alto
put = 'let g:netrw_altv = '.g:netrw_altv
put = 'let g:netrw_banner = '.g:netrw_banner
if exists("g:netrw_bannerbackslash")
put = 'let g:netrw_bannerbackslash = '.g:netrw_bannerbackslash
else
put = '\" let g:netrw_bannerbackslash = (not defined)'
endif
put = 'let g:netrw_browse_split = '.g:netrw_browse_split
if exists("g:netrw_browsex_viewer")
put = 'let g:netrw_browsex_viewer = '.g:netrw_browsex_viewer
else
put = '\" let g:netrw_browsex_viewer = (not defined)'
endif
put = 'let g:netrw_compress = '.g:netrw_compress
if exists("g:Netrw_corehandler")
put = 'let g:Netrw_corehandler = '.g:Netrw_corehandler
else
put = '\" let g:Netrw_corehandler = (not defined)'
endif
put = 'let g:netrw_ctags = '.g:netrw_ctags
put = 'let g:netrw_cursor = '.g:netrw_cursor
let decompressline= line("$")
put = 'let g:netrw_decompress = '.string(g:netrw_decompress)
if exists("g:netrw_dynamic_maxfilenamelen")
put = 'let g:netrw_dynamic_maxfilenamelen='.g:netrw_dynamic_maxfilenamelen
else
put = '\" let g:netrw_dynamic_maxfilenamelen= (not defined)'
endif
put = 'let g:netrw_dirhistmax = '.g:netrw_dirhistmax
put = 'let g:netrw_errorlvl = '.g:netrw_errorlvl
put = 'let g:netrw_fastbrowse = '.g:netrw_fastbrowse
let fnameescline= line("$")
put = 'let g:netrw_fname_escape = '.string(g:netrw_fname_escape)
put = 'let g:netrw_ftp_browse_reject = '.g:netrw_ftp_browse_reject
put = 'let g:netrw_ftp_list_cmd = '.g:netrw_ftp_list_cmd
put = 'let g:netrw_ftp_sizelist_cmd = '.g:netrw_ftp_sizelist_cmd
put = 'let g:netrw_ftp_timelist_cmd = '.g:netrw_ftp_timelist_cmd
let globescline= line("$")
put = 'let g:netrw_glob_escape = '.string(g:netrw_glob_escape)
put = 'let g:netrw_hide = '.g:netrw_hide
if exists("g:netrw_home")
put = 'let g:netrw_home = '.g:netrw_home
else
put = '\" let g:netrw_home = (not defined)'
endif
put = 'let g:netrw_keepdir = '.g:netrw_keepdir
put = 'let g:netrw_list_cmd = '.g:netrw_list_cmd
put = 'let g:netrw_list_hide = '.g:netrw_list_hide
put = 'let g:netrw_liststyle = '.g:netrw_liststyle
put = 'let g:netrw_localcopycmd = '.g:netrw_localcopycmd
put = 'let g:netrw_localcopycmdopt = '.g:netrw_localcopycmdopt
put = 'let g:netrw_localmkdir = '.g:netrw_localmkdir
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_maxfilenamelen = '.g:netrw_maxfilenamelen
put = 'let g:netrw_menu = '.g:netrw_menu
put = 'let g:netrw_mousemaps = '.g:netrw_mousemaps
put = 'let g:netrw_mkdir_cmd = '.g:netrw_mkdir_cmd
if exists("g:netrw_nobeval")
put = 'let g:netrw_nobeval = '.g:netrw_nobeval
else
put = '\" let g:netrw_nobeval = (not defined)'
endif
put = 'let g:netrw_remote_mkdir = '.g:netrw_remote_mkdir
put = 'let g:netrw_preview = '.g:netrw_preview
put = 'let g:netrw_rename_cmd = '.g:netrw_rename_cmd
put = 'let g:netrw_retmap = '.g:netrw_retmap
put = 'let g:netrw_rm_cmd = '.g:netrw_rm_cmd
put = 'let g:netrw_rmdir_cmd = '.g:netrw_rmdir_cmd
put = 'let g:netrw_rmf_cmd = '.g:netrw_rmf_cmd
put = 'let g:netrw_sort_by = '.g:netrw_sort_by
put = 'let g:netrw_sort_direction = '.g:netrw_sort_direction
put = 'let g:netrw_sort_options = '.g:netrw_sort_options
put = 'let g:netrw_sort_sequence = '.g:netrw_sort_sequence
put = 'let g:netrw_servername = '.g:netrw_servername
put = 'let g:netrw_special_syntax = '.g:netrw_special_syntax
put = 'let g:netrw_ssh_browse_reject = '.g:netrw_ssh_browse_reject
put = 'let g:netrw_ssh_cmd = '.g:netrw_ssh_cmd
put = 'let g:netrw_scpport = '.g:netrw_scpport
put = 'let g:netrw_sepchr = '.g:netrw_sepchr
put = 'let g:netrw_sshport = '.g:netrw_sshport
put = 'let g:netrw_timefmt = '.g:netrw_timefmt
let tmpfileescline= line("$")
put ='let g:netrw_tmpfile_escape...'
put = 'let g:netrw_use_noswf = '.g:netrw_use_noswf
put = 'let g:netrw_xstrlen = '.g:netrw_xstrlen
put = 'let g:netrw_winsize = '.g:netrw_winsize
put =''
put ='+ For help, place cursor on line and press <F1>'
1d
silent %s/^+/"/e
res 99
silent %s/= \([^0-9].*\)$/= '\1'/e
silent %s/= $/= ''/e
1
call setline(decompressline,"let g:netrw_decompress = ".substitute(string(g:netrw_decompress),"^'\\(.*\\)'$",'\1',''))
call setline(fnameescline, "let g:netrw_fname_escape = '".escape(g:netrw_fname_escape,"'")."'")
call setline(globescline, "let g:netrw_glob_escape = '".escape(g:netrw_glob_escape,"'")."'")
call setline(tmpfileescline,"let g:netrw_tmpfile_escape = '".escape(g:netrw_tmpfile_escape,"'")."'")
set nomod
nmap <buffer> <silent> <F1> :call NetrwSettingHelp()<cr>
nnoremap <buffer> <silent> <leftmouse> <leftmouse>:call NetrwSettingHelp()<cr>
let tmpfile= tempname()
exe 'au BufWriteCmd Netrw\ Settings silent w! '.tmpfile.'|so '.tmpfile.'|call delete("'.tmpfile.'")|set nomod'
endfun
" ---------------------------------------------------------------------
" NetrwSettingHelp: {{{2
fun! NetrwSettingHelp()
" call Dfunc("NetrwSettingHelp()")
let curline = getline(".")
if curline =~ '='
let varhelp = substitute(curline,'^\s*let ','','e')
let varhelp = substitute(varhelp,'\s*=.*$','','e')
" call Decho("trying help ".varhelp)
try
exe "he ".varhelp
catch /^Vim\%((\a\+)\)\=:E149/
echo "***sorry*** no help available for <".varhelp.">"
endtry
elseif line(".") < s:netrw_settings_stop
he netrw-settings
elseif line(".") < s:netrw_protocol_stop
he netrw-externapp
elseif line(".") < s:netrw_xfer_stop
he netrw-variables
else
he netrw-browse-var
endif
" call Dret("NetrwSettingHelp")
endfun
" ---------------------------------------------------------------------
" Modelines: {{{1
" vim:ts=8 fdm=marker
+37 -105
View File
@@ -1,6 +1,5 @@
" tar.vim: Handles browsing tarfiles
" AUTOLOAD PORTION
" Date: Nov 11, 2024
" tar.vim: Handles browsing tarfiles - AUTOLOAD PORTION
" Date: Feb 06, 2025
" Version: 32b (with modifications from the Vim Project)
" Maintainer: This runtime file is looking for a new maintainer.
" Former Maintainer: Charles E Campbell
@@ -17,7 +16,6 @@
" By using this plugin, you agree that in no event will the
" copyright holder be liable for any damages resulting from
" the use of this software.
" call inputsave()|call input("Press <cr> to continue")|call inputrestore()
" ---------------------------------------------------------------------
" Load Once: {{{1
if &cp || exists("g:loaded_tar")
@@ -32,8 +30,6 @@ if v:version < 702
endif
let s:keepcpo= &cpo
set cpo&vim
"DechoTabOn
"call Decho("loading autoload/tar.vim")
" ---------------------------------------------------------------------
" Default Settings: {{{1
@@ -96,7 +92,6 @@ if !exists("g:tar_shq")
else
let g:tar_shq= "'"
endif
" call Decho("g:tar_shq<".g:tar_shq.">")
endif
" ----------------
@@ -106,29 +101,23 @@ endif
" ---------------------------------------------------------------------
" tar#Browse: {{{2
fun! tar#Browse(tarfile)
" call Dfunc("tar#Browse(tarfile<".a:tarfile.">)")
let repkeep= &report
set report=10
" sanity checks
if !executable(g:tar_cmd)
redraw!
" call Decho('***error*** (tar#Browse) "'.g:tar_cmd.'" not available on your system')
echohl Error | echo '***error*** (tar#Browse) "'.g:tar_cmd.'" not available on your system'
let &report= repkeep
" call Dret("tar#Browse")
return
endif
if !filereadable(a:tarfile)
" call Decho('a:tarfile<'.a:tarfile.'> not filereadable')
if a:tarfile !~# '^\a\+://'
" if it's an url, don't complain, let url-handlers such as vim do its thing
redraw!
" call Decho("***error*** (tar#Browse) File not readable<".a:tarfile.">")
echohl Error | echo "***error*** (tar#Browse) File not readable<".a:tarfile.">" | echohl None
endif
let &report= repkeep
" call Dret("tar#Browse : file<".a:tarfile."> not readable")
return
endif
if &ma != 1
@@ -144,7 +133,6 @@ fun! tar#Browse(tarfile)
set ft=tar
" give header
" call Decho("printing header")
let lastline= line("$")
call setline(lastline+1,'" tar.vim version '.g:loaded_tar)
call setline(lastline+2,'" Browsing tarfile '.a:tarfile)
@@ -161,10 +149,10 @@ fun! tar#Browse(tarfile)
let curlast= line("$")
if tarfile =~# '\.\(gz\)$'
" call Decho("1: exe silent r! gzip -d -c -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - ")
exe "sil! r! gzip -d -c -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - "
elseif tarfile =~# '\.\(tgz\)$' || tarfile =~# '\.\(tbz\)$' || tarfile =~# '\.\(txz\)$' || tarfile =~# '\.\(tzst\)$'
elseif tarfile =~# '\.\(tgz\)$' || tarfile =~# '\.\(tbz\)$' || tarfile =~# '\.\(txz\)$' ||
\ tarfile =~# '\.\(tzst\)$' || tarfile =~# '\.\(tlz4\)$'
if has("unix") && executable("file")
let filekind= system("file ".shellescape(tarfile,1))
else
@@ -177,36 +165,34 @@ fun! tar#Browse(tarfile)
exe "sil! r! xz -d -c -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - "
elseif filekind =~ "Zstandard"
exe "sil! r! zstd --decompress --stdout -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - "
elseif filekind =~ "LZ4"
exe "sil! r! lz4 --decompress --stdout -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - "
else
exe "sil! r! gzip -d -c -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - "
endif
elseif tarfile =~# '\.lrp'
" call Decho("2: exe silent r! cat -- ".shellescape(tarfile,1)."|gzip -d -c -|".g:tar_cmd." -".g:tar_browseoptions." - ")
exe "sil! r! cat -- ".shellescape(tarfile,1)."|gzip -d -c -|".g:tar_cmd." -".g:tar_browseoptions." - "
elseif tarfile =~# '\.\(bz2\|tbz\|tb2\)$'
" call Decho("3: exe silent r! bzip2 -d -c -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - ")
exe "sil! r! bzip2 -d -c -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - "
elseif tarfile =~# '\.\(lzma\|tlz\)$'
" call Decho("3: exe silent r! lzma -d -c -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - ")
exe "sil! r! lzma -d -c -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - "
elseif tarfile =~# '\.\(xz\|txz\)$'
" call Decho("3: exe silent r! xz --decompress --stdout -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - ")
exe "sil! r! xz --decompress --stdout -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - "
elseif tarfile =~# '\.\(zst\|tzst\)$'
exe "sil! r! zstd --decompress --stdout -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - "
elseif tarfile =~# '\.\(lz4\|tlz4\)$'
exe "sil! r! lz4 --decompress --stdout -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - "
else
if tarfile =~ '^\s*-'
" A file name starting with a dash is taken as an option. Prepend ./ to avoid that.
let tarfile = substitute(tarfile, '-', './-', '')
endif
" call Decho("4: exe silent r! ".g:tar_cmd." -".g:tar_browseoptions." ".shellescape(tarfile,0))
exe "sil! r! ".g:tar_cmd." -".g:tar_browseoptions." ".shellescape(tarfile,1)
endif
if v:shell_error != 0
redraw!
echohl WarningMsg | echo "***warning*** (tar#Browse) please check your g:tar_browseoptions<".g:tar_browseoptions.">"
" call Dret("tar#Browse : a:tarfile<".a:tarfile.">")
return
endif
"
@@ -237,29 +223,24 @@ fun! tar#Browse(tarfile)
endif
let &report= repkeep
" call Dret("tar#Browse : b:tarfile<".b:tarfile.">")
endfun
" ---------------------------------------------------------------------
" TarBrowseSelect: {{{2
fun! s:TarBrowseSelect()
" call Dfunc("TarBrowseSelect() b:tarfile<".b:tarfile."> curfile<".expand("%").">")
let repkeep= &report
set report=10
let fname= getline(".")
" call Decho("fname<".fname.">")
if !exists("g:tar_secure") && fname =~ '^\s*-\|\s\+-'
redraw!
echohl WarningMsg | echo '***warning*** (tar#BrowseSelect) rejecting tarfile member<'.fname.'> because of embedded "-"'
" call Dret('tar#BrowseSelect : rejecting tarfile member<'.fname.'> because of embedded "-"')
return
endif
" sanity check
if fname =~ '^"'
let &report= repkeep
" call Dret("TarBrowseSelect")
return
endif
@@ -283,19 +264,17 @@ fun! s:TarBrowseSelect()
exe 'com! -buffer -nargs=? -complete=file TarDiff :call tar#Diff(<q-args>,"'.fnameescape(fname).'")'
let &report= repkeep
" call Dret("TarBrowseSelect : s:tblfile_".winnr()."<".s:tblfile_{winnr()}.">")
endfun
" ---------------------------------------------------------------------
" tar#Read: {{{2
fun! tar#Read(fname,mode)
" call Dfunc("tar#Read(fname<".a:fname.">,mode=".a:mode.")")
let repkeep= &report
set report=10
let tarfile = substitute(a:fname,'tarfile:\(.\{-}\)::.*$','\1','')
let fname = substitute(a:fname,'tarfile:.\{-}::\(.*\)$','\1','')
" changing the directory to the temporary earlier to allow tar to extract the file with permissions intact
" changing the directory to the temporary earlier to allow tar to extract the file with permissions intact
if !exists("*mkdir")
redraw!
echohl Error | echo "***error*** (tar#Write) sorry, mkdir() doesn't work on your system" | echohl None
@@ -333,8 +312,6 @@ fun! tar#Read(fname,mode)
" assuming cygwin
let tarfile=substitute(system("cygpath -u ".shellescape(tarfile,0)),'\n$','','e')
endif
" call Decho("tarfile<".tarfile.">")
" call Decho("fname<".fname.">")
if fname =~ '\.bz2$' && executable("bzcat")
let decmp= "|bzcat"
@@ -351,6 +328,9 @@ fun! tar#Read(fname,mode)
elseif fname =~ '\.zst$' && executable("zstdcat")
let decmp= "|zstdcat"
let doro = 1
elseif fname =~ '\.lz4$' && executable("lz4cat")
let decmp= "|lz4cat"
let doro = 1
else
let decmp=""
let doro = 0
@@ -400,12 +380,14 @@ fun! tar#Read(fname,mode)
elseif tarfile =~# '\.\(xz\|txz\)$'
exe "sil! r! xz --decompress --stdout -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp
exe "read ".fname
elseif tarfile =~# '\.\(lz4\|tlz4\)$'
exe "sil! r! lz4 --decompress --stdout -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp
exe "read ".fname
else
if tarfile =~ '^\s*-'
" A file name starting with a dash is taken as an option. Prepend ./ to avoid that.
let tarfile = substitute(tarfile, '-', './-', '')
endif
" call Decho("8: exe silent r! ".g:tar_cmd." -".g:tar_readoptions.tar_secure.shellescape(tarfile,1)." ".shellescape(fname,1).decmp)
exe "silent r! ".g:tar_cmd." -".g:tar_readoptions.shellescape(tarfile,1)." ".tar_secure.shellescape(fname,1).decmp
exe "read ".fname
endif
@@ -432,16 +414,13 @@ if v:shell_error != 0
set nomod
let &report= repkeep
" call Dret("tar#Read : b:tarfile<".b:tarfile.">")
endfun
" ---------------------------------------------------------------------
" tar#Write: {{{2
fun! tar#Write(fname)
" call Dfunc("tar#Write(fname<".a:fname.">) b:tarfile<".b:tarfile."> tblfile_".winnr()."<".s:tblfile_{winnr()}.">")
let repkeep= &report
set report=10
" temporary buffer variable workaround because too fucking tired. but it works now
let curdir= b:curdir
let tmpdir= b:tmpdir
@@ -449,16 +428,13 @@ fun! tar#Write(fname)
if !exists("g:tar_secure") && a:fname =~ '^\s*-\|\s\+-'
redraw!
echohl WarningMsg | echo '***warning*** (tar#Write) rejecting tarfile member<'.a:fname.'> because of embedded "-"'
" call Dret('tar#Write : rejecting tarfile member<'.fname.'> because of embedded "-"')
return
endif
" sanity checks
if !executable(g:tar_cmd)
redraw!
" call Decho('***error*** (tar#Browse) "'.g:tar_cmd.'" not available on your system')
let &report= repkeep
" call Dret("tar#Write")
return
endif
@@ -470,43 +446,38 @@ fun! tar#Write(fname)
call system("bzip2 -d -- ".shellescape(tarfile,0))
let tarfile = substitute(tarfile,'\.bz2','','e')
let compress= "bzip2 -- ".shellescape(tarfile,0)
" call Decho("compress<".compress.">")
elseif tarfile =~# '\.gz'
call system("gzip -d -- ".shellescape(tarfile,0))
let tarfile = substitute(tarfile,'\.gz','','e')
let compress= "gzip -- ".shellescape(tarfile,0)
" call Decho("compress<".compress.">")
elseif tarfile =~# '\.tgz'
call system("gzip -d -- ".shellescape(tarfile,0))
let tarfile = substitute(tarfile,'\.tgz','.tar','e')
let compress= "gzip -- ".shellescape(tarfile,0)
let tgz = 1
" call Decho("compress<".compress.">")
elseif tarfile =~# '\.xz'
call system("xz -d -- ".shellescape(tarfile,0))
let tarfile = substitute(tarfile,'\.xz','','e')
let compress= "xz -- ".shellescape(tarfile,0)
" call Decho("compress<".compress.">")
elseif tarfile =~# '\.zst'
call system("zstd --decompress --rm -- ".shellescape(tarfile,0))
let tarfile = substitute(tarfile,'\.zst','','e')
let compress= "zstd --rm -- ".shellescape(tarfile,0)
elseif tarfile =~# '\.lz4'
call system("lz4 --decompress --rm -- ".shellescape(tarfile,0))
let tarfile = substitute(tarfile,'\.lz4','','e')
let compress= "lz4 --rm -- ".shellescape(tarfile,0)
elseif tarfile =~# '\.lzma'
call system("lzma -d -- ".shellescape(tarfile,0))
let tarfile = substitute(tarfile,'\.lzma','','e')
let compress= "lzma -- ".shellescape(tarfile,0)
" call Decho("compress<".compress.">")
endif
" call Decho("tarfile<".tarfile.">")
if v:shell_error != 0
redraw!
" call Decho("***error*** (tar#Write) sorry, unable to update ".tarfile." with ".fname)
echohl Error | echo "***error*** (tar#Write) sorry, unable to update ".tarfile." with ".fname | echohl None
else
" call Decho("tarfile<".tarfile."> fname<".fname.">")
if fname =~ '/'
let dirpath = substitute(fname,'/[^/]\+$','','e')
if has("win32unix") && executable("cygpath")
@@ -521,7 +492,6 @@ fun! tar#Write(fname)
" A file name starting with a dash may be taken as an option. Prepend ./ to avoid that.
let tarfile = substitute(tarfile, '-', './-', '')
endif
" call Decho("tarfile<".tarfile."> fname<".fname.">")
if exists("g:tar_secure")
let tar_secure= " -- "
@@ -534,26 +504,20 @@ fun! tar#Write(fname)
endif
" delete old file from tarfile
" call Decho("system(".g:tar_cmd." ".g:tar_delfile." ".shellescape(tarfile,0)." -- ".shellescape(fname,0).")")
call system(g:tar_cmd." ".g:tar_delfile." ".shellescape(tarfile,0).tar_secure.shellescape(fname,0))
if v:shell_error != 0
redraw!
" call Decho("***error*** (tar#Write) sorry, unable to update ".fnameescape(tarfile)." with ".fnameescape(fname))
echohl Error | echo "***error*** (tar#Write) sorry, unable to update ".fnameescape(tarfile)." with ".fnameescape(fname) | echohl None
else
" update tarfile with new file
" call Decho(g:tar_cmd." -".g:tar_writeoptions." ".shellescape(tarfile,0).tar_secure.shellescape(fname,0))
call system(g:tar_cmd." -".g:tar_writeoptions." ".shellescape(tarfile,0).tar_secure.shellescape(fname,0))
if v:shell_error != 0
redraw!
" call Decho("***error*** (tar#Write) sorry, unable to update ".fnameescape(tarfile)." with ".fnameescape(fname))
echohl Error | echo "***error*** (tar#Write) sorry, unable to update ".fnameescape(tarfile)." with ".fnameescape(fname) | echohl None
elseif exists("compress")
" call Decho("call system(".compress.")")
call system(compress)
if exists("tgz")
" call Decho("rename(".tarfile.".gz,".substitute(tarfile,'\.tar$','.tgz','e').")")
call rename(tarfile.".gz",substitute(tarfile,'\.tar$','.tgz','e'))
endif
endif
@@ -561,7 +525,6 @@ fun! tar#Write(fname)
" support writing tarfiles across a network
if s:tblfile_{winnr()} =~ '^\a\+://'
" call Decho("handle writing <".tarfile."> across network to <".s:tblfile_{winnr()}.">")
let tblfile= s:tblfile_{winnr()}
1split|noswapfile enew
let binkeep= &l:binary
@@ -583,13 +546,11 @@ fun! tar#Write(fname)
setlocal nomod
let &report= repkeep
" call Dret("tar#Write")
endfun
" ---------------------------------------------------------------------
" tar#Diff: {{{2
fun! tar#Diff(userfname,fname)
" call Dfunc("tar#Diff(userfname<".a:userfname."> fname<".a:fname.")")
let fname= a:fname
if a:userfname != ""
let fname= a:userfname
@@ -607,133 +568,126 @@ fun! tar#Diff(userfname,fname)
redraw!
echo "***warning*** unable to read file<".fname.">"
endif
" call Dret("tar#Diff")
endfun
" ---------------------------------------------------------------------
" tar#Extract: extract a file from a (possibly compressed) tar archive {{{2
fun! tar#Extract()
" call Dfunc("tar#Extract()")
let repkeep= &report
set report=10
let fname= getline(".")
" call Decho("fname<".fname.">")
if !exists("g:tar_secure") && fname =~ '^\s*-\|\s\+-'
redraw!
echohl WarningMsg | echo '***warning*** (tar#BrowseSelect) rejecting tarfile member<'.fname.'> because of embedded "-"'
" call Dret('tar#BrowseSelect : rejecting tarfile member<'.fname.'> because of embedded "-"')
return
endif
" sanity check
if fname =~ '^"'
let &report= repkeep
" call Dret("TarBrowseSelect")
return
endif
let tarball = expand("%")
" call Decho("tarball<".tarball.">")
let tarbase = substitute(tarball,'\..*$','','')
" call Decho("tarbase<".tarbase.">")
let extractcmd= netrw#WinPath(g:tar_extractcmd)
if filereadable(tarbase.".tar")
" call Decho("system(".extractcmd." ".shellescape(tarbase).".tar ".shellescape(fname).")")
call system(extractcmd." ".shellescape(tarbase).".tar ".shellescape(fname))
if v:shell_error != 0
echohl Error | echo "***error*** ".extractcmd." ".tarbase.".tar ".fname.": failed!" | echohl NONE
" call Decho("***error*** ".extractcmd." ".tarbase.".tar ".fname.": failed!")
else
echo "***note*** successfully extracted ".fname
endif
elseif filereadable(tarbase.".tgz")
let extractcmd= substitute(extractcmd,"-","-z","")
" call Decho("system(".extractcmd." ".shellescape(tarbase).".tgz ".shellescape(fname).")")
call system(extractcmd." ".shellescape(tarbase).".tgz ".shellescape(fname))
if v:shell_error != 0
echohl Error | echo "***error*** ".extractcmd." ".tarbase.".tgz ".fname.": failed!" | echohl NONE
" call Decho("***error*** ".extractcmd."t ".tarbase.".tgz ".fname.": failed!")
else
echo "***note*** successfully extracted ".fname
endif
elseif filereadable(tarbase.".tar.gz")
let extractcmd= substitute(extractcmd,"-","-z","")
" call Decho("system(".extractcmd." ".shellescape(tarbase).".tar.gz ".shellescape(fname).")")
call system(extractcmd." ".shellescape(tarbase).".tar.gz ".shellescape(fname))
if v:shell_error != 0
echohl Error | echo "***error*** ".extractcmd." ".tarbase.".tar.gz ".fname.": failed!" | echohl NONE
" call Decho("***error*** ".extractcmd." ".tarbase.".tar.gz ".fname.": failed!")
else
echo "***note*** successfully extracted ".fname
endif
elseif filereadable(tarbase.".tbz")
let extractcmd= substitute(extractcmd,"-","-j","")
" call Decho("system(".extractcmd." ".shellescape(tarbase).".tbz ".shellescape(fname).")")
call system(extractcmd." ".shellescape(tarbase).".tbz ".shellescape(fname))
if v:shell_error != 0
echohl Error | echo "***error*** ".extractcmd."j ".tarbase.".tbz ".fname.": failed!" | echohl NONE
" call Decho("***error*** ".extractcmd."j ".tarbase.".tbz ".fname.": failed!")
else
echo "***note*** successfully extracted ".fname
endif
elseif filereadable(tarbase.".tar.bz2")
let extractcmd= substitute(extractcmd,"-","-j","")
" call Decho("system(".extractcmd." ".shellescape(tarbase).".tar.bz2 ".shellescape(fname).")")
call system(extractcmd." ".shellescape(tarbase).".tar.bz2 ".shellescape(fname))
if v:shell_error != 0
echohl Error | echo "***error*** ".extractcmd."j ".tarbase.".tar.bz2 ".fname.": failed!" | echohl NONE
" call Decho("***error*** ".extractcmd."j ".tarbase.".tar.bz2 ".fname.": failed!")
else
echo "***note*** successfully extracted ".fname
endif
elseif filereadable(tarbase.".txz")
let extractcmd= substitute(extractcmd,"-","-J","")
" call Decho("system(".extractcmd." ".shellescape(tarbase).".txz ".shellescape(fname).")")
call system(extractcmd." ".shellescape(tarbase).".txz ".shellescape(fname))
if v:shell_error != 0
echohl Error | echo "***error*** ".extractcmd." ".tarbase.".txz ".fname.": failed!" | echohl NONE
" call Decho("***error*** ".extractcmd." ".tarbase.".txz ".fname.": failed!")
else
echo "***note*** successfully extracted ".fname
endif
elseif filereadable(tarbase.".tar.xz")
let extractcmd= substitute(extractcmd,"-","-J","")
" call Decho("system(".extractcmd." ".shellescape(tarbase).".tar.xz ".shellescape(fname).")")
call system(extractcmd." ".shellescape(tarbase).".tar.xz ".shellescape(fname))
if v:shell_error != 0
echohl Error | echo "***error*** ".extractcmd." ".tarbase.".tar.xz ".fname.": failed!" | echohl NONE
" call Decho("***error*** ".extractcmd." ".tarbase.".tar.xz ".fname.": failed!")
else
echo "***note*** successfully extracted ".fname
endif
elseif filereadable(tarbase.".tzst")
let extractcmd= substitute(extractcmd,"-","--zstd","")
" call Decho("system(".extractcmd." ".shellescape(tarbase).".tzst ".shellescape(fname).")")
call system(extractcmd." ".shellescape(tarbase).".tzst ".shellescape(fname))
if v:shell_error != 0
echohl Error | echo "***error*** ".extractcmd." ".tarbase.".tzst ".fname.": failed!" | echohl NONE
" call Decho("***error*** ".extractcmd." ".tarbase.".tzst ".fname.": failed!")
else
echo "***note*** successfully extracted ".fname
endif
elseif filereadable(tarbase.".tar.zst")
let extractcmd= substitute(extractcmd,"-","--zstd","")
" call Decho("system(".extractcmd." ".shellescape(tarbase).".tar.zst ".shellescape(fname).")")
call system(extractcmd." ".shellescape(tarbase).".tar.zst ".shellescape(fname))
if v:shell_error != 0
echohl Error | echo "***error*** ".extractcmd." ".tarbase.".tar.zst ".fname.": failed!" | echohl NONE
" call Decho("***error*** ".extractcmd." ".tarbase.".tar.zst ".fname.": failed!")
else
echo "***note*** successfully extracted ".fname
endif
elseif filereadable(tarbase.".tlz4")
let extractcmd= substitute(extractcmd,"-","-I lz4","")
call system(extractcmd." ".shellescape(tarbase).".tlz4 ".shellescape(fname))
if v:shell_error != 0
echohl Error | echo "***error*** ".extractcmd." ".tarbase.".tlz4 ".fname.": failed!" | echohl NONE
else
echo "***note*** successfully extracted ".fname
endif
elseif filereadable(tarbase.".tar.lz4")
let extractcmd= substitute(extractcmd,"-","-I lz4","")
call system(extractcmd." ".shellescape(tarbase).".tar.lz4".shellescape(fname))
if v:shell_error != 0
echohl Error | echo "***error*** ".extractcmd." ".tarbase.".tar.lz4 ".fname.": failed!" | echohl NONE
else
echo "***note*** successfully extracted ".fname
endif
@@ -741,14 +695,11 @@ fun! tar#Extract()
" restore option
let &report= repkeep
" call Dret("tar#Extract")
endfun
" ---------------------------------------------------------------------
" s:Rmdir: {{{2
fun! s:Rmdir(fname)
" call Dfunc("Rmdir(fname<".a:fname.">)")
if has("unix")
call system("/bin/rm -rf -- ".shellescape(a:fname,0))
elseif has("win32") || has("win95") || has("win64") || has("win16")
@@ -758,44 +709,32 @@ fun! s:Rmdir(fname)
call system("del /S ".shellescape(a:fname,0))
endif
endif
" call Dret("Rmdir")
endfun
" ---------------------------------------------------------------------
" tar#Vimuntar: installs a tarball in the user's .vim / vimfiles directory {{{2
fun! tar#Vimuntar(...)
" call Dfunc("tar#Vimuntar() a:0=".a:0." a:1<".(exists("a:1")? a:1 : "-n/a-").">")
let tarball = expand("%")
" call Decho("tarball<".tarball.">")
let tarbase = substitute(tarball,'\..*$','','')
" call Decho("tarbase<".tarbase.">")
let tarhome = expand("%:p")
if has("win32") || has("win95") || has("win64") || has("win16")
let tarhome= substitute(tarhome,'\\','/','g')
endif
let tarhome= substitute(tarhome,'/[^/]*$','','')
" call Decho("tarhome<".tarhome.">")
let tartail = expand("%:t")
" call Decho("tartail<".tartail.">")
let curdir = getcwd()
" call Decho("curdir <".curdir.">")
" set up vimhome
if a:0 > 0 && a:1 != ""
let vimhome= a:1
else
let vimhome= vimball#VimballHome()
endif
" call Decho("vimhome<".vimhome.">")
" call Decho("curdir<".curdir."> vimhome<".vimhome.">")
if simplify(curdir) != simplify(vimhome)
" copy (possibly compressed) tarball to .vim/vimfiles
" call Decho(netrw#WinPath(g:tar_copycmd)." ".shellescape(tartail)." ".shellescape(vimhome))
call system(netrw#WinPath(g:tar_copycmd)." ".shellescape(tartail)." ".shellescape(vimhome))
" call Decho("exe cd ".fnameescape(vimhome))
exe "cd ".fnameescape(vimhome)
endif
" call Decho("getcwd<".getcwd().">")
" if necessary, decompress the tarball; then, extract it
if tartail =~ '\.tgz'
@@ -807,24 +746,19 @@ fun! tar#Vimuntar(...)
echoerr "unable to decompress<".tartail."> on this system"
if simplify(curdir) != simplify(tarhome)
" remove decompressed tarball, restore directory
" call Decho("delete(".tartail.".tar)")
call delete(tartail.".tar")
" call Decho("exe cd ".fnameescape(curdir))
exe "cd ".fnameescape(curdir)
endif
" call Dret("tar#Vimuntar")
return
endif
else
call vimball#Decompress(tartail,0)
endif
let extractcmd= netrw#WinPath(g:tar_extractcmd)
" call Decho("system(".extractcmd." ".shellescape(tarbase.".tar").")")
call system(extractcmd." ".shellescape(tarbase.".tar"))
" set up help
if filereadable("doc/".tarbase.".txt")
" call Decho("exe helptags ".getcwd()."/doc")
exe "helptags ".getcwd()."/doc"
endif
@@ -833,8 +767,6 @@ fun! tar#Vimuntar(...)
call delete(vimhome."/".tarbase.".tar")
exe "cd ".fnameescape(curdir)
endif
" call Dret("tar#Vimuntar")
endfun
" =====================================================================
+5 -1
View File
@@ -4,7 +4,7 @@
" Maintainer: Original maintainer Steven Vertigan <steven@vertigan.wattle.id.au>
" Website: https://github.com/vim/colorschemes
" License: Same as Vim
" Last Change: 2024 Aug 15
" Last Change: 2025 Jan 07
" Generated by Colortemplate v2.2.3
@@ -77,6 +77,7 @@ hi Type guifg=#ffa500 guibg=NONE gui=bold cterm=NONE
hi Underlined guifg=NONE guibg=NONE gui=underline ctermfg=NONE ctermbg=NONE cterm=underline
hi Label guifg=#ffd700 guibg=NONE gui=NONE cterm=NONE
hi! link Terminal Normal
hi! link PopupSelected PmenuSel
hi! link Debug Special
hi! link Added String
hi! link Removed WarningMsg
@@ -189,6 +190,7 @@ if s:t_Co >= 256
hi Underlined ctermfg=NONE ctermbg=NONE cterm=underline
hi Label ctermfg=220 ctermbg=NONE cterm=NONE
hi! link Terminal Normal
hi! link PopupSelected PmenuSel
hi! link Debug Special
hi! link Added String
hi! link Removed WarningMsg
@@ -304,6 +306,7 @@ if s:t_Co >= 16
hi Underlined ctermfg=NONE ctermbg=NONE cterm=underline
hi Label ctermfg=yellow ctermbg=NONE cterm=NONE
hi! link Terminal Normal
hi! link PopupSelected PmenuSel
hi! link Debug Special
hi! link Added String
hi! link Removed WarningMsg
@@ -418,6 +421,7 @@ if s:t_Co >= 8
hi Underlined ctermfg=NONE ctermbg=NONE cterm=underline
hi Label ctermfg=yellow ctermbg=NONE cterm=NONE
hi! link Terminal Normal
hi! link PopupSelected PmenuSel
hi! link Debug Special
hi! link Added String
hi! link Removed WarningMsg
+3 -1
View File
@@ -4,7 +4,7 @@
" Maintainer: Original author Bohdan Vlasyuk <bohdan@vstu.edu.ua>
" Website: https://github.com/vim/colorschemes
" License: Same as Vim
" Last Change: 2024 Aug 15
" Last Change: 2025 Jan 07
" Generated by Colortemplate v2.2.3
@@ -19,6 +19,7 @@ if (has('termguicolors') && &termguicolors) || has('gui_running')
let g:terminal_ansi_colors = ['#000000', '#8b0000', '#90f020', '#ffa500', '#00008b', '#8b008b', '#008b8b', '#c0c0c0', '#808080', '#ffa0a0', '#90f020', '#ffff60', '#0030ff', '#ff00ff', '#90fff0', '#ffffff']
endif
hi! link Terminal Normal
hi! link PopupSelected PmenuSel
hi! link CursorColumn CursorLine
hi! link CursorIM Cursor
hi! link EndOfBuffer NonText
@@ -129,6 +130,7 @@ hi DiffDelete guifg=#ffffff guibg=#af5faf gui=NONE cterm=NONE
if s:t_Co >= 256
hi! link Terminal Normal
hi! link PopupSelected PmenuSel
hi! link CursorColumn CursorLine
hi! link CursorIM Cursor
hi! link EndOfBuffer NonText
+3 -1
View File
@@ -4,7 +4,7 @@
" Maintainer: Original maintainer David Schweikert <david@schweikert.ch>
" Website: https://github.com/vim/colorschemes
" License: Same as Vim
" Last Change: 2024 Aug 15
" Last Change: 2025 Jan 07
" Generated by Colortemplate v2.2.3
@@ -19,6 +19,7 @@ if (has('termguicolors') && &termguicolors) || has('gui_running')
let g:terminal_ansi_colors = ['#ffffff', '#0000ff', '#00cd00', '#cd00cd', '#008b8b', '#0000ff', '#ff1493', '#bcbcbc', '#ee0000', '#0000ff', '#00cd00', '#cd00cd', '#008b8b', '#0000ff', '#ff1493', '#000000']
endif
hi! link Terminal Normal
hi! link PopupSelected PmenuSel
hi! link LineNrAbove LineNr
hi! link LineNrBelow LineNr
hi! link CurSearch Search
@@ -95,6 +96,7 @@ hi DiffDelete guifg=#ffffff guibg=#af5faf gui=NONE cterm=NONE
if s:t_Co >= 256
hi! link Terminal Normal
hi! link PopupSelected PmenuSel
hi! link LineNrAbove LineNr
hi! link LineNrBelow LineNr
hi! link CurSearch Search
+3 -1
View File
@@ -4,7 +4,7 @@
" Maintainer: Original maintainer Hans Fugal <hans@fugal.net>
" Website: https://github.com/vim/colorschemes
" License: Same as Vim
" Last Change: 2024 Aug 15
" Last Change: 2025 Jan 07
" Generated by Colortemplate v2.2.3
@@ -27,6 +27,7 @@ hi! link CursorLineSign CursorLine
hi! link EndOfBuffer NonText
hi! link MessageWindow Pmenu
hi! link PopupNotification Todo
hi! link PopupSelected PmenuSel
hi Normal guifg=#ffffff guibg=#333333 gui=NONE cterm=NONE
hi StatusLine guifg=#333333 guibg=#c2bfa5 gui=NONE cterm=NONE
hi StatusLineNC guifg=#7f7f8c guibg=#c2bfa5 gui=NONE cterm=NONE
@@ -103,6 +104,7 @@ if s:t_Co >= 256
hi! link EndOfBuffer NonText
hi! link MessageWindow Pmenu
hi! link PopupNotification Todo
hi! link PopupSelected PmenuSel
hi Normal ctermfg=231 ctermbg=236 cterm=NONE
hi StatusLine ctermfg=236 ctermbg=144 cterm=NONE
hi StatusLineNC ctermfg=242 ctermbg=144 cterm=NONE
+4 -1
View File
@@ -4,7 +4,7 @@
" Maintainer: Original maintainer Steven Vertigan <steven@vertigan.wattle.id.au>
" Website: https://github.com/vim/colorschemes
" License: Same as Vim
" Last Change: 2024 Aug 15
" Last Change: 2025 Jan 07
" Generated by Colortemplate v2.2.3
@@ -19,6 +19,7 @@ if (has('termguicolors') && &termguicolors) || has('gui_running')
let g:terminal_ansi_colors = ['#000000', '#cd0000', '#00cd00', '#cdcd00', '#0087ff', '#cd00cd', '#00cdcd', '#e5e5e5', '#7f7f7f', '#ff0000', '#00ff00', '#ffff00', '#5c5cff', '#ff00ff', '#00ffff', '#ffffff']
endif
hi! link VertSplit StatusLineNC
hi! link PopupSelected PmenuSel
hi! link StatusLineTerm StatusLine
hi! link StatusLineTermNC StatusLineNC
hi! link TabLineFill TabLine
@@ -129,6 +130,7 @@ hi DiffDelete guifg=#ffffff guibg=#af5faf gui=NONE cterm=NONE
if s:t_Co >= 256
hi! link VertSplit StatusLineNC
hi! link PopupSelected PmenuSel
hi! link StatusLineTerm StatusLine
hi! link StatusLineTermNC StatusLineNC
hi! link TabLineFill TabLine
@@ -242,6 +244,7 @@ endif
if s:t_Co >= 16
hi! link VertSplit StatusLineNC
hi! link PopupSelected PmenuSel
hi! link StatusLineTerm StatusLine
hi! link StatusLineTermNC StatusLineNC
hi! link TabLineFill TabLine
+3 -1
View File
@@ -4,7 +4,7 @@
" Maintainer: Maxim Kim <habamax@gmail.com>
" Website: https://github.com/vim/colorschemes
" License: Same as Vim
" Last Change: 2024 Aug 15
" Last Change: 2025 Jan 07
" Generated by Colortemplate v2.2.3
@@ -22,6 +22,7 @@ hi! link Terminal Normal
hi! link StatuslineTerm Statusline
hi! link StatuslineTermNC StatuslineNC
hi! link MessageWindow Pmenu
hi! link PopupSelected PmenuSel
hi! link javaScriptFunction Statement
hi! link javaScriptIdentifier Statement
hi! link sqlKeyword Statement
@@ -117,6 +118,7 @@ if s:t_Co >= 256
hi! link StatuslineTerm Statusline
hi! link StatuslineTermNC StatuslineNC
hi! link MessageWindow Pmenu
hi! link PopupSelected PmenuSel
hi! link javaScriptFunction Statement
hi! link javaScriptIdentifier Statement
hi! link sqlKeyword Statement
+4 -1
View File
@@ -4,7 +4,7 @@
" Maintainer: Original maintainer Shian Lee.
" Website: https://github.com/vim/colorschemes
" License: Same as Vim
" Last Change: 2024 Aug 15
" Last Change: 2025 Jan 07
" Generated by Colortemplate v2.2.3
@@ -81,6 +81,7 @@ hi Conceal guifg=#6c6c6c guibg=NONE gui=NONE cterm=NONE
hi Ignore guifg=NONE guibg=NONE gui=NONE ctermfg=NONE ctermbg=NONE cterm=NONE
hi Title guifg=#ff00ff guibg=NONE gui=bold cterm=bold
hi! link Terminal Normal
hi! link PopupSelected PmenuSel
hi! link LineNrAbove LineNr
hi! link LineNrBelow LineNr
hi! link CurSearch Search
@@ -157,6 +158,7 @@ if s:t_Co >= 256
hi Ignore ctermfg=NONE ctermbg=NONE cterm=NONE
hi Title ctermfg=201 ctermbg=NONE cterm=bold
hi! link Terminal Normal
hi! link PopupSelected PmenuSel
hi! link LineNrAbove LineNr
hi! link LineNrBelow LineNr
hi! link CurSearch Search
@@ -236,6 +238,7 @@ if s:t_Co >= 16
hi Ignore ctermfg=NONE ctermbg=NONE cterm=NONE
hi Title ctermfg=magenta ctermbg=NONE cterm=bold
hi! link Terminal Normal
hi! link PopupSelected PmenuSel
hi! link LineNrAbove LineNr
hi! link LineNrBelow LineNr
hi! link CurSearch Search
+3 -1
View File
@@ -4,7 +4,7 @@
" Maintainer: Maxim Kim <habamax@gmail.com>
" Website: https://www.github.com/vim/colorschemes
" License: Vim License (see `:help license`)
" Last Change: 2024 Aug 15
" Last Change: 2025 Jan 07
" Generated by Colortemplate v2.2.3
@@ -92,6 +92,7 @@ hi! link LineNrAbove LineNr
hi! link LineNrBelow LineNr
hi! link MessageWindow PMenu
hi! link PopupNotification Todo
hi! link PopupSelected PmenuSel
if &background ==# 'dark'
if (has('termguicolors') && &termguicolors) || has('gui_running')
let g:terminal_ansi_colors = ['#000000', '#af5f5f', '#5faf5f', '#af875f', '#5f87af', '#d787d7', '#5fafaf', '#c6c6c6', '#767676', '#ff5f5f', '#5fd75f', '#ffd787', '#5fafff', '#ff87ff', '#5fd7d7', '#ffffff']
@@ -360,6 +361,7 @@ if s:t_Co >= 256
hi! link LineNrBelow LineNr
hi! link MessageWindow PMenu
hi! link PopupNotification Todo
hi! link PopupSelected PmenuSel
if &background ==# 'dark'
hi Normal ctermfg=251 ctermbg=16 cterm=NONE
hi Statusline ctermfg=251 ctermbg=16 cterm=bold,reverse
+3 -1
View File
@@ -4,7 +4,7 @@
" Maintainer: Original maintainer Bram Moolenaar <Bram@vim.org>
" Website: https://github.com/vim/colorschemes
" License: Same as Vim
" Last Change: 2024 Aug 15
" Last Change: 2025 Jan 07
" Generated by Colortemplate v2.2.3
@@ -28,6 +28,7 @@ hi! link StatuslineTerm Statusline
hi! link StatuslineTermNC StatuslineNC
hi! link MessageWindow Pmenu
hi! link PopupNotification Todo
hi! link PopupSelected PmenuSel
hi Normal guifg=#000000 guibg=#e4e4e4 gui=NONE cterm=NONE
hi EndOfBuffer guifg=#0000ff guibg=#cccccc gui=bold cterm=bold
hi Folded guifg=#00008b guibg=#d3d3d3 gui=NONE cterm=NONE
@@ -102,6 +103,7 @@ if s:t_Co >= 256
hi! link StatuslineTermNC StatuslineNC
hi! link MessageWindow Pmenu
hi! link PopupNotification Todo
hi! link PopupSelected PmenuSel
hi Normal ctermfg=16 ctermbg=254 cterm=NONE
hi EndOfBuffer ctermfg=21 ctermbg=252 cterm=bold
hi Folded ctermfg=18 ctermbg=252 cterm=NONE
+3 -1
View File
@@ -4,7 +4,7 @@
" Maintainer: Original maintainer Ron Aaron <ron@ronware.org>.
" Website: https://github.com/vim/colorschemes
" License: Same as Vim
" Last Change: 2024 Aug 15
" Last Change: 2025 Jan 07
" Generated by Colortemplate v2.2.3
@@ -28,6 +28,7 @@ hi! link StatusLineTerm StatusLine
hi! link StatusLineTermNC StatusLineNC
hi! link MessageWindow Pmenu
hi! link PopupNotification Todo
hi! link PopupSelected PmenuSel
hi! link Added Constant
hi Normal guifg=#87ff87 guibg=#000000 gui=NONE cterm=NONE
hi EndOfBuffer guifg=#0000ff guibg=#000000 gui=NONE cterm=NONE
@@ -103,6 +104,7 @@ if s:t_Co >= 256
hi! link StatusLineTermNC StatusLineNC
hi! link MessageWindow Pmenu
hi! link PopupNotification Todo
hi! link PopupSelected PmenuSel
hi! link Added Constant
hi Normal ctermfg=120 ctermbg=16 cterm=NONE
hi EndOfBuffer ctermfg=21 ctermbg=16 cterm=NONE
+3 -1
View File
@@ -3,7 +3,7 @@
" Maintainer: Original maintainerRon Aaron <ron@ronware.org>
" Website: https://github.com/vim/colorschemes
" License: Same as Vim
" Last Change: 2024 Aug 15
" Last Change: 2025 Jan 07
" Generated by Colortemplate v2.2.3
@@ -25,6 +25,7 @@ hi! link CursorLineFold CursorLine
hi! link CursorLineSign CursorLine
hi! link MessageWindow Pmenu
hi! link PopupNotification Todo
hi! link PopupSelected PmenuSel
hi Normal guifg=#ffffff guibg=#000000 gui=NONE cterm=NONE
hi Comment guifg=#808080 guibg=NONE gui=NONE cterm=NONE
hi Constant guifg=#00ffff guibg=NONE gui=NONE cterm=NONE
@@ -100,6 +101,7 @@ if s:t_Co >= 256
hi! link CursorLineSign CursorLine
hi! link MessageWindow Pmenu
hi! link PopupNotification Todo
hi! link PopupSelected PmenuSel
hi Normal ctermfg=231 ctermbg=16 cterm=NONE
hi Comment ctermfg=244 ctermbg=NONE cterm=NONE
hi Constant ctermfg=51 ctermbg=NONE cterm=NONE
+3 -1
View File
@@ -4,7 +4,7 @@
" Maintainer: Original maintainer David Ne\v{c}as (Yeti) <yeti@physics.muni.cz>
" Website: https://github.com/vim/colorschemes
" License: Same as Vim
" Last Change: 2024 Aug 15
" Last Change: 2025 Jan 07
" Generated by Colortemplate v2.2.3
@@ -26,6 +26,7 @@ hi! link CursorLineFold CursorLine
hi! link CursorLineSign CursorLine
hi! link MessageWindow Pmenu
hi! link PopupNotification Todo
hi! link PopupSelected PmenuSel
hi Normal guifg=#000000 guibg=#ffdab9 gui=NONE cterm=NONE
hi Folded guifg=#000000 guibg=#e3c1a5 gui=NONE cterm=NONE
hi CursorLine guifg=NONE guibg=#f5c195 gui=NONE cterm=NONE
@@ -100,6 +101,7 @@ if s:t_Co >= 256
hi! link CursorLineSign CursorLine
hi! link MessageWindow Pmenu
hi! link PopupNotification Todo
hi! link PopupSelected PmenuSel
hi Normal ctermfg=16 ctermbg=223 cterm=NONE
hi Folded ctermfg=16 ctermbg=252 cterm=NONE
hi CursorLine ctermfg=NONE ctermbg=180 cterm=NONE
+2 -1
View File
@@ -4,7 +4,7 @@
" Maintainer: Maxence Weynans <neutaaaaan@gmail.com>
" Website: https://github.com/vim/colorschemes
" License: Vim License (see `:help license`)`
" Last Change: 2024 Aug 05
" Last Change: 2025 Jan 07
" Generated by Colortemplate v2.2.3
@@ -21,6 +21,7 @@ hi! link StatusLineTerm StatusLine
hi! link StatusLineTermNC StatusLineNC
hi! link MessageWindow Pmenu
hi! link PopupNotification Todo
hi! link PopupSelected PmenuSel
hi! link Boolean Constant
hi! link Character Constant
hi! link Conditional Statement
+4 -3
View File
@@ -4,7 +4,7 @@
" Maintainer: Maxim Kim <habamax@gmail.com>, ported from gruvbox8 of Lifepillar <lifepillar@lifepillar.me>
" Website: https://www.github.com/vim/colorschemes
" License: Vim License (see `:help license`)
" Last Change: 2024 Aug 15
" Last Change: 2025 Feb 15
" Generated by Colortemplate v2.2.3
@@ -21,6 +21,7 @@ hi! link Tag Special
hi! link lCursor Cursor
hi! link MessageWindow PMenu
hi! link PopupNotification Todo
hi! link PopupSelected PmenuSel
hi! link CurSearch IncSearch
hi! link Terminal Normal
@@ -149,7 +150,7 @@ else
hi StatusLine guifg=#bdae93 guibg=#3c3836 gui=bold,reverse cterm=bold,reverse
hi StatusLineNC guifg=#ebdbb2 guibg=#3c3836 gui=reverse cterm=reverse
hi TabLine guifg=#665c54 guibg=#ebdbb2 gui=NONE cterm=NONE
hi TabLineFill guifg=#ebdbb2 guibg=#ebdbb2 gui=NONE cterm=NONE
hi TabLineFill guifg=#3c3836 guibg=#ebdbb2 gui=NONE cterm=NONE
hi TabLineSel guifg=#282828 guibg=#fbf1c7 gui=bold cterm=bold
hi ToolbarButton guifg=#282828 guibg=#bdae93 gui=bold cterm=bold
hi ToolbarLine guifg=NONE guibg=NONE gui=NONE ctermfg=NONE ctermbg=NONE cterm=NONE
@@ -331,7 +332,7 @@ if s:t_Co >= 256
hi StatusLine ctermfg=144 ctermbg=237 cterm=bold,reverse
hi StatusLineNC ctermfg=187 ctermbg=237 cterm=reverse
hi TabLine ctermfg=59 ctermbg=187 cterm=NONE
hi TabLineFill ctermfg=187 ctermbg=187 cterm=NONE
hi TabLineFill ctermfg=237 ctermbg=187 cterm=NONE
hi TabLineSel ctermfg=235 ctermbg=230 cterm=bold
hi ToolbarButton ctermfg=235 ctermbg=144 cterm=bold
hi ToolbarLine ctermfg=NONE ctermbg=NONE cterm=NONE
+3 -1
View File
@@ -4,7 +4,7 @@
" Maintainer: Original maintainer is Yasuhiro Matsumoto <mattn@mail.goo.ne.jp>
" Website: https://github.com/vim/colorschemes
" License: Same as Vim
" Last Change: 2024 Aug 15
" Last Change: 2025 Jan 07
" Generated by Colortemplate v2.2.3
@@ -30,6 +30,7 @@ hi! link Tag Special
hi! link Operator Statement
hi! link MessageWindow Pmenu
hi! link PopupNotification Todo
hi! link PopupSelected PmenuSel
hi Normal guifg=#000000 guibg=#ffffff gui=NONE cterm=NONE
hi Folded guifg=#00008b guibg=#dadada gui=NONE cterm=NONE
hi CursorLine guifg=NONE guibg=#dadada gui=NONE cterm=NONE
@@ -110,6 +111,7 @@ if s:t_Co >= 256
hi! link Operator Statement
hi! link MessageWindow Pmenu
hi! link PopupNotification Todo
hi! link PopupSelected PmenuSel
hi Normal ctermfg=16 ctermbg=231 cterm=NONE
hi Folded ctermfg=18 ctermbg=253 cterm=NONE
hi CursorLine ctermfg=NONE ctermbg=253 cterm=NONE
+3 -1
View File
@@ -4,7 +4,7 @@
" Maintainer: Original maintainer Ralph Amissah <ralph@amissah.com>
" Website: https://github.com/vim/colorschemes
" License: Same as Vim
" Last Change: 2024 Aug 15
" Last Change: 2025 Jan 07
" Generated by Colortemplate v2.2.3
@@ -26,6 +26,7 @@ hi! link CursorLineFold CursorLine
hi! link CursorLineSign CursorLine
hi! link MessageWindow Pmenu
hi! link PopupNotification Todo
hi! link PopupSelected PmenuSel
hi Normal guifg=#ffffff guibg=#262626 gui=NONE cterm=NONE
hi EndOfBuffer guifg=#5f87d7 guibg=NONE gui=NONE cterm=NONE
hi StatusLine guifg=#000000 guibg=#afaf87 gui=NONE cterm=NONE
@@ -105,6 +106,7 @@ if s:t_Co >= 256
hi! link CursorLineSign CursorLine
hi! link MessageWindow Pmenu
hi! link PopupNotification Todo
hi! link PopupSelected PmenuSel
hi Normal ctermfg=231 ctermbg=235 cterm=NONE
hi EndOfBuffer ctermfg=68 ctermbg=NONE cterm=NONE
hi StatusLine ctermfg=16 ctermbg=144 cterm=NONE
+2 -1
View File
@@ -4,7 +4,7 @@
" Maintainer: Maxence Weynans <neutaaaaan@gmail.com>
" Website: https://github.com/vim/colorschemes
" License: Vim License (see `:help license`)`
" Last Change: 2024 Aug 05
" Last Change: 2025 Jan 07
" Generated by Colortemplate v2.2.3
@@ -20,6 +20,7 @@ hi! link StatusLineTerm StatusLine
hi! link StatusLineTermNC StatusLineNC
hi! link MessageWindow Pmenu
hi! link PopupNotification Todo
hi! link PopupSelected PmenuSel
hi! link Boolean Constant
hi! link Character Constant
hi! link Conditional Statement
+3 -1
View File
@@ -4,7 +4,7 @@
" Maintainer: Original maintainer Thorsten Maerz <info@netztorte.de>
" Website: https://github.com/vim/colorschemes
" License: Same as Vim
" Last Change: 2024 Aug 15
" Last Change: 2025 Jan 07
" Generated by Colortemplate v2.2.3
@@ -28,6 +28,7 @@ hi! link StatusLineTerm StatusLine
hi! link StatusLineTermNC StatusLineNC
hi! link MessageWindow Pmenu
hi! link PopupNotification Todo
hi! link PopupSelected PmenuSel
hi Normal guifg=#cccccc guibg=#000000 gui=NONE cterm=NONE
hi Comment guifg=#80a0ff guibg=NONE gui=NONE cterm=NONE
hi Constant guifg=#ffa0a0 guibg=NONE gui=NONE cterm=NONE
@@ -103,6 +104,7 @@ if s:t_Co >= 256
hi! link StatusLineTermNC StatusLineNC
hi! link MessageWindow Pmenu
hi! link PopupNotification Todo
hi! link PopupSelected PmenuSel
hi Normal ctermfg=251 ctermbg=16 cterm=NONE
hi Comment ctermfg=111 ctermbg=NONE cterm=NONE
hi Constant ctermfg=217 ctermbg=NONE cterm=NONE
+521
View File
@@ -0,0 +1,521 @@
" Name: unokai
" Description: Color scheme similar to Monokai originally created by Wimer Hazenberg for TextMate
" Author: k-37 <60838818+k-37@users.noreply.github.com>
" Maintainer: k-37 <60838818+k-37@users.noreply.github.com>
" Website: https://github.com/vim/colorschemes
" License: Vim License (see `:help license`)
" Last Change: 2024 Dec 15
" Generated by Colortemplate v2.2.3
set background=dark
hi clear
let g:colors_name = 'unokai'
let s:t_Co = has('gui_running') ? -1 : (&t_Co ?? 0)
let s:italics = has('gui_running') || (&t_ZH != '' && &t_ZH != '' && !has('win32'))
if (has('termguicolors') && &termguicolors) || has('gui_running')
let g:terminal_ansi_colors = ['#282923', '#c61e5c', '#81af24', '#fd971f', '#51aebe', '#ae81ff', '#80beb5', '#bababa', '#74705d', '#f92672', '#a6e22e', '#e6db74', '#66d9ef', '#fd5ff0', '#a1efe4', '#f8f8f2']
endif
hi! link CursorLineFold FoldColumn
hi! link CursorLineSign SignColumn
hi! link MessageWindow Pmenu
hi! link PopupNotification Todo
hi! link PopupSelected PmenuSel
hi! link StatusLineTerm StatusLine
hi! link StatusLineTermNC StatusLineNC
hi! link Terminal Normal
hi! link Delimiter PreProc
hi! link Operator PreProc
hi! link StorageClass PreProc
hi! link Structure PreProc
hi! link Define Identifier
hi! link Label String
hi! link markdownCode Comment
hi! link markdownCodeBlock markdownCode
hi! link markdownCodeDelimiter markdownCode
hi Normal guifg=#f8f8f2 guibg=#282923 gui=NONE cterm=NONE
hi StatusLine guifg=#282923 guibg=#bababa gui=NONE cterm=NONE
hi StatusLineNC guifg=#282923 guibg=#74705d gui=NONE cterm=NONE
hi VertSplit guifg=#74705d guibg=#74705d gui=NONE cterm=NONE
hi TabLine guifg=#282923 guibg=#74705d gui=NONE cterm=NONE
hi TabLineFill guifg=#282923 guibg=#74705d gui=NONE cterm=NONE
hi TabLineSel guifg=#282923 guibg=#bababa gui=bold cterm=bold
hi ToolbarLine guifg=NONE guibg=NONE gui=NONE ctermfg=NONE ctermbg=NONE cterm=NONE
hi ToolbarButton guifg=#74705d guibg=#f8f8f2 gui=bold,reverse cterm=bold,reverse
hi QuickFixLine guifg=#282923 guibg=#51aebe gui=NONE cterm=NONE
hi CursorLineNr guifg=#dadada guibg=NONE gui=bold cterm=bold
hi LineNr guifg=#8a8a8a guibg=NONE gui=NONE cterm=NONE
hi LineNrAbove guifg=#8a8a8a guibg=NONE gui=NONE cterm=NONE
hi LineNrBelow guifg=#8a8a8a guibg=NONE gui=NONE cterm=NONE
hi NonText guifg=#8a8a8a guibg=NONE gui=NONE cterm=NONE
hi EndOfBuffer guifg=#8a8a8a guibg=NONE gui=NONE cterm=NONE
hi SpecialKey guifg=#8a8a8a guibg=NONE gui=NONE cterm=NONE
hi FoldColumn guifg=#8a8a8a guibg=NONE gui=NONE cterm=NONE
hi Visual guifg=#a1efe4 guibg=#282923 gui=reverse cterm=reverse
hi VisualNOS guifg=#282923 guibg=#80beb5 gui=NONE cterm=NONE
hi Pmenu guifg=NONE guibg=#585858 gui=NONE cterm=NONE
hi PmenuThumb guifg=NONE guibg=#74705d gui=NONE cterm=NONE
hi PmenuSbar guifg=NONE guibg=NONE gui=NONE ctermfg=NONE ctermbg=NONE cterm=NONE
hi PmenuSel guifg=NONE guibg=#8a8a8a gui=NONE cterm=NONE
hi PmenuKind guifg=#80beb5 guibg=#585858 gui=NONE cterm=NONE
hi PmenuKindSel guifg=#80beb5 guibg=#8a8a8a gui=NONE cterm=NONE
hi PmenuExtra guifg=#bababa guibg=#585858 gui=NONE cterm=NONE
hi PmenuExtraSel guifg=#bababa guibg=#8a8a8a gui=NONE cterm=NONE
hi PmenuMatch guifg=#ffaf5f guibg=#585858 gui=NONE cterm=NONE
hi PmenuMatchSel guifg=#ffaf5f guibg=#8a8a8a gui=NONE cterm=NONE
hi SignColumn guifg=NONE guibg=NONE gui=NONE ctermfg=NONE ctermbg=NONE cterm=NONE
hi Error guifg=#f92672 guibg=#000000 gui=reverse cterm=reverse
hi ErrorMsg guifg=#f92672 guibg=#000000 gui=reverse cterm=reverse
hi ModeMsg guifg=NONE guibg=NONE gui=bold ctermfg=NONE ctermbg=NONE cterm=bold
hi MoreMsg guifg=#81af24 guibg=NONE gui=NONE cterm=NONE
hi Question guifg=#e6db74 guibg=NONE gui=NONE cterm=NONE
hi WarningMsg guifg=#f92672 guibg=NONE gui=NONE cterm=NONE
hi Todo guifg=#dadada guibg=NONE gui=bold cterm=bold
hi MatchParen guifg=#fd971f guibg=NONE gui=bold cterm=bold
hi Search guifg=#66d9ef guibg=#282923 gui=reverse cterm=reverse
hi IncSearch guifg=#ffaf5f guibg=#282923 gui=reverse cterm=reverse
hi CurSearch guifg=#ffaf5f guibg=#282923 gui=reverse cterm=reverse
hi WildMenu guifg=#282923 guibg=#e6db74 gui=bold cterm=bold
hi debugPC guifg=#282923 guibg=#51aebe gui=NONE cterm=NONE
hi debugBreakpoint guifg=#282923 guibg=#f92672 gui=NONE cterm=NONE
hi Cursor guifg=#000000 guibg=#dadada gui=NONE cterm=NONE
hi lCursor guifg=#282923 guibg=#5fff00 gui=NONE cterm=NONE
hi CursorLine guifg=NONE guibg=#3a392f gui=NONE cterm=NONE
hi CursorColumn guifg=NONE guibg=#3a392f gui=NONE cterm=NONE
hi Folded guifg=#bababa guibg=#414141 gui=NONE cterm=NONE
hi ColorColumn guifg=NONE guibg=#585858 gui=NONE cterm=NONE
hi SpellBad guifg=NONE guibg=NONE guisp=#d75f5f gui=undercurl ctermfg=NONE ctermbg=NONE cterm=underline
hi SpellCap guifg=NONE guibg=NONE guisp=#ffaf5f gui=undercurl ctermfg=NONE ctermbg=NONE cterm=underline
hi SpellLocal guifg=NONE guibg=NONE guisp=#5fd75f gui=undercurl ctermfg=NONE ctermbg=NONE cterm=underline
hi SpellRare guifg=NONE guibg=NONE guisp=#fd5ff0 gui=undercurl ctermfg=NONE ctermbg=NONE cterm=underline
hi Constant guifg=#ae81ff guibg=NONE gui=NONE cterm=NONE
hi Type guifg=#fd971f guibg=NONE gui=bold cterm=bold
hi Character guifg=#a6e22e guibg=NONE gui=NONE cterm=NONE
hi Comment guifg=#74705d guibg=NONE gui=NONE cterm=NONE
hi String guifg=#e6db74 guibg=NONE gui=NONE cterm=NONE
hi Function guifg=#a6e22e guibg=NONE gui=NONE cterm=NONE
hi Identifier guifg=#66d9ef guibg=NONE gui=NONE cterm=NONE
hi PreProc guifg=#f92672 guibg=NONE gui=NONE cterm=NONE
hi Special guifg=#80beb5 guibg=NONE gui=NONE cterm=NONE
hi Statement guifg=#f92672 guibg=NONE gui=bold cterm=bold
hi Underlined guifg=#66d9ef guibg=NONE gui=underline cterm=underline
hi Title guifg=NONE guibg=NONE gui=bold ctermfg=NONE ctermbg=NONE cterm=bold
hi Debug guifg=#80beb5 guibg=NONE gui=NONE cterm=NONE
hi Ignore guifg=NONE guibg=NONE gui=NONE ctermfg=NONE ctermbg=NONE cterm=NONE
hi Directory guifg=#a1efe4 guibg=NONE gui=bold cterm=bold
hi Conceal guifg=#8a8a8a guibg=NONE gui=NONE cterm=NONE
hi DiffAdd guifg=#5faf5f guibg=NONE gui=reverse cterm=reverse
hi DiffChange guifg=#5f87af guibg=NONE gui=reverse cterm=reverse
hi DiffText guifg=#af87af guibg=NONE gui=reverse cterm=reverse
hi DiffDelete guifg=#af5f5f guibg=NONE gui=reverse cterm=reverse
hi Added guifg=#5fd75f guibg=NONE gui=NONE cterm=NONE
hi Changed guifg=#ffaf5f guibg=NONE gui=NONE cterm=NONE
hi Removed guifg=#d75f5f guibg=NONE gui=NONE cterm=NONE
hi htmlBold guifg=#f8f8f2 guibg=NONE gui=bold cterm=bold
hi htmlItalic guifg=#f8f8f2 guibg=NONE gui=italic cterm=italic
hi markdownHeadingDelimiter guifg=#f8f8f2 guibg=NONE gui=NONE cterm=NONE
hi markdownH1Delimiter guifg=#f92672 guibg=NONE gui=NONE cterm=NONE
hi markdownH2Delimiter guifg=#e6db74 guibg=NONE gui=NONE cterm=NONE
hi markdownH4Delimiter guifg=#66d9ef guibg=NONE gui=NONE cterm=NONE
hi markdownH6Delimiter guifg=#a6e22e guibg=NONE gui=NONE cterm=NONE
hi markdownH3Delimiter guifg=#fd971f guibg=NONE gui=NONE cterm=NONE
hi markdownH5Delimiter guifg=#51aebe guibg=NONE gui=NONE cterm=NONE
if !s:italics
hi htmlItalic gui=NONE cterm=NONE
endif
if s:t_Co >= 256
hi! link CursorLineFold FoldColumn
hi! link CursorLineSign SignColumn
hi! link MessageWindow Pmenu
hi! link PopupNotification Todo
hi! link PopupSelected PmenuSel
hi! link StatusLineTerm StatusLine
hi! link StatusLineTermNC StatusLineNC
hi! link Terminal Normal
hi! link Delimiter PreProc
hi! link Operator PreProc
hi! link StorageClass PreProc
hi! link Structure PreProc
hi! link Define Identifier
hi! link Label String
hi! link markdownCode Comment
hi! link markdownCodeBlock markdownCode
hi! link markdownCodeDelimiter markdownCode
hi Normal ctermfg=255 ctermbg=235 cterm=NONE
hi StatusLine ctermfg=235 ctermbg=250 cterm=NONE
hi StatusLineNC ctermfg=235 ctermbg=244 cterm=NONE
hi VertSplit ctermfg=244 ctermbg=244 cterm=NONE
hi TabLine ctermfg=235 ctermbg=244 cterm=NONE
hi TabLineFill ctermfg=235 ctermbg=244 cterm=NONE
hi TabLineSel ctermfg=235 ctermbg=250 cterm=bold
hi ToolbarLine ctermfg=NONE ctermbg=NONE cterm=NONE
hi ToolbarButton ctermfg=244 ctermbg=255 cterm=bold,reverse
hi QuickFixLine ctermfg=235 ctermbg=141 cterm=NONE
hi CursorLineNr ctermfg=253 ctermbg=NONE cterm=bold
hi LineNr ctermfg=245 ctermbg=NONE cterm=NONE
hi LineNrAbove ctermfg=245 ctermbg=NONE cterm=NONE
hi LineNrBelow ctermfg=245 ctermbg=NONE cterm=NONE
hi NonText ctermfg=245 ctermbg=NONE cterm=NONE
hi EndOfBuffer ctermfg=245 ctermbg=NONE cterm=NONE
hi SpecialKey ctermfg=245 ctermbg=NONE cterm=NONE
hi FoldColumn ctermfg=245 ctermbg=NONE cterm=NONE
hi Visual ctermfg=116 ctermbg=235 cterm=reverse
hi VisualNOS ctermfg=235 ctermbg=73 cterm=NONE
hi Pmenu ctermfg=NONE ctermbg=240 cterm=NONE
hi PmenuThumb ctermfg=NONE ctermbg=244 cterm=NONE
hi PmenuSbar ctermfg=NONE ctermbg=NONE cterm=NONE
hi PmenuSel ctermfg=NONE ctermbg=245 cterm=NONE
hi PmenuKind ctermfg=73 ctermbg=240 cterm=NONE
hi PmenuKindSel ctermfg=73 ctermbg=245 cterm=NONE
hi PmenuExtra ctermfg=250 ctermbg=240 cterm=NONE
hi PmenuExtraSel ctermfg=250 ctermbg=245 cterm=NONE
hi PmenuMatch ctermfg=215 ctermbg=240 cterm=NONE
hi PmenuMatchSel ctermfg=215 ctermbg=245 cterm=NONE
hi SignColumn ctermfg=NONE ctermbg=NONE cterm=NONE
hi Error ctermfg=197 ctermbg=16 cterm=reverse
hi ErrorMsg ctermfg=197 ctermbg=16 cterm=reverse
hi ModeMsg ctermfg=NONE ctermbg=NONE cterm=bold
hi MoreMsg ctermfg=106 ctermbg=NONE cterm=NONE
hi Question ctermfg=185 ctermbg=NONE cterm=NONE
hi WarningMsg ctermfg=197 ctermbg=NONE cterm=NONE
hi Todo ctermfg=253 ctermbg=NONE cterm=bold
hi MatchParen ctermfg=208 ctermbg=NONE cterm=bold
hi Search ctermfg=81 ctermbg=235 cterm=reverse
hi IncSearch ctermfg=215 ctermbg=235 cterm=reverse
hi CurSearch ctermfg=215 ctermbg=235 cterm=reverse
hi WildMenu ctermfg=235 ctermbg=185 cterm=bold
hi debugPC ctermfg=235 ctermbg=73 cterm=NONE
hi debugBreakpoint ctermfg=235 ctermbg=197 cterm=NONE
hi CursorLine ctermfg=NONE ctermbg=237 cterm=NONE
hi CursorColumn ctermfg=NONE ctermbg=237 cterm=NONE
hi Folded ctermfg=250 ctermbg=238 cterm=NONE
hi ColorColumn ctermfg=NONE ctermbg=240 cterm=NONE
hi SpellBad ctermfg=167 ctermbg=NONE cterm=underline
hi SpellCap ctermfg=215 ctermbg=NONE cterm=underline
hi SpellLocal ctermfg=77 ctermbg=NONE cterm=underline
hi SpellRare ctermfg=207 ctermbg=NONE cterm=underline
hi Constant ctermfg=141 ctermbg=NONE cterm=NONE
hi Type ctermfg=208 ctermbg=NONE cterm=bold
hi Character ctermfg=112 ctermbg=NONE cterm=NONE
hi Comment ctermfg=244 ctermbg=NONE cterm=NONE
hi String ctermfg=185 ctermbg=NONE cterm=NONE
hi Function ctermfg=112 ctermbg=NONE cterm=NONE
hi Identifier ctermfg=81 ctermbg=NONE cterm=NONE
hi PreProc ctermfg=197 ctermbg=NONE cterm=NONE
hi Special ctermfg=73 ctermbg=NONE cterm=NONE
hi Statement ctermfg=197 ctermbg=NONE cterm=bold
hi Underlined ctermfg=81 ctermbg=NONE cterm=underline
hi Title ctermfg=NONE ctermbg=NONE cterm=bold
hi Debug ctermfg=73 ctermbg=NONE cterm=NONE
hi Ignore ctermfg=NONE ctermbg=NONE cterm=NONE
hi Directory ctermfg=116 ctermbg=NONE cterm=bold
hi Conceal ctermfg=245 ctermbg=NONE cterm=NONE
hi DiffAdd ctermfg=71 ctermbg=NONE cterm=reverse
hi DiffChange ctermfg=67 ctermbg=NONE cterm=reverse
hi DiffText ctermfg=139 ctermbg=NONE cterm=reverse
hi DiffDelete ctermfg=131 ctermbg=NONE cterm=reverse
hi Added ctermfg=77 ctermbg=NONE cterm=NONE
hi Changed ctermfg=215 ctermbg=NONE cterm=NONE
hi Removed ctermfg=167 ctermbg=NONE cterm=NONE
hi htmlBold ctermfg=255 ctermbg=NONE cterm=bold
hi htmlItalic ctermfg=255 ctermbg=NONE cterm=underline
hi markdownHeadingDelimiter ctermfg=255 ctermbg=NONE cterm=NONE
hi markdownH1Delimiter ctermfg=197 ctermbg=NONE cterm=NONE
hi markdownH2Delimiter ctermfg=185 ctermbg=NONE cterm=NONE
hi markdownH4Delimiter ctermfg=81 ctermbg=NONE cterm=NONE
hi markdownH6Delimiter ctermfg=112 ctermbg=NONE cterm=NONE
hi markdownH3Delimiter ctermfg=208 ctermbg=NONE cterm=NONE
hi markdownH5Delimiter ctermfg=73 ctermbg=NONE cterm=NONE
unlet s:t_Co s:italics
finish
endif
if s:t_Co >= 16
hi Normal ctermfg=white ctermbg=black cterm=NONE
hi StatusLine ctermfg=black ctermbg=gray cterm=NONE
hi StatusLineNC ctermfg=black ctermbg=darkgray cterm=NONE
hi VertSplit ctermfg=darkgray ctermbg=darkgray cterm=NONE
hi TabLine ctermfg=black ctermbg=darkgray cterm=NONE
hi TabLineFill ctermfg=black ctermbg=darkgray cterm=NONE
hi TabLineSel ctermfg=black ctermbg=gray cterm=bold
hi ToolbarLine ctermfg=NONE ctermbg=NONE cterm=NONE
hi ToolbarButton ctermfg=darkgray ctermbg=white cterm=bold,reverse
hi QuickFixLine ctermfg=black ctermbg=darkmagenta cterm=NONE
hi CursorLineNr ctermfg=white ctermbg=NONE cterm=bold
hi LineNr ctermfg=darkgrey ctermbg=NONE cterm=NONE
hi LineNrAbove ctermfg=darkgrey ctermbg=NONE cterm=NONE
hi LineNrBelow ctermfg=darkgrey ctermbg=NONE cterm=NONE
hi NonText ctermfg=darkgrey ctermbg=NONE cterm=NONE
hi EndOfBuffer ctermfg=darkgrey ctermbg=NONE cterm=NONE
hi SpecialKey ctermfg=darkgrey ctermbg=NONE cterm=NONE
hi FoldColumn ctermfg=darkgrey ctermbg=NONE cterm=NONE
hi Visual ctermfg=cyan ctermbg=black cterm=reverse
hi VisualNOS ctermfg=black ctermbg=darkcyan cterm=NONE
hi Pmenu ctermfg=black ctermbg=gray cterm=NONE
hi PmenuThumb ctermfg=gray ctermbg=black cterm=NONE
hi PmenuSbar ctermfg=NONE ctermbg=gray cterm=NONE
hi PmenuSel ctermfg=black ctermbg=darkyellow cterm=NONE
hi PmenuKind ctermfg=darkred ctermbg=gray cterm=NONE
hi PmenuKindSel ctermfg=darkred ctermbg=darkyellow cterm=NONE
hi PmenuExtra ctermfg=darkgray ctermbg=gray cterm=NONE
hi PmenuExtraSel ctermfg=black ctermbg=darkyellow cterm=NONE
hi PmenuMatch ctermfg=black ctermbg=gray cterm=bold
hi PmenuMatchSel ctermfg=black ctermbg=darkyellow cterm=bold
hi SignColumn ctermfg=NONE ctermbg=NONE cterm=NONE
hi Error ctermfg=red ctermbg=black cterm=reverse
hi ErrorMsg ctermfg=red ctermbg=black cterm=reverse
hi ModeMsg ctermfg=NONE ctermbg=NONE cterm=bold
hi MoreMsg ctermfg=darkgreen ctermbg=NONE cterm=NONE
hi Question ctermfg=yellow ctermbg=NONE cterm=NONE
hi WarningMsg ctermfg=red ctermbg=NONE cterm=NONE
hi Todo ctermfg=white ctermbg=NONE cterm=bold
hi MatchParen ctermfg=darkyellow ctermbg=NONE cterm=bold
hi Search ctermfg=blue ctermbg=black cterm=reverse
hi IncSearch ctermfg=red ctermbg=black cterm=reverse
hi CurSearch ctermfg=red ctermbg=black cterm=reverse
hi WildMenu ctermfg=black ctermbg=yellow cterm=bold
hi debugPC ctermfg=black ctermbg=darkblue cterm=NONE
hi debugBreakpoint ctermfg=black ctermbg=red cterm=NONE
hi CursorLine ctermfg=NONE ctermbg=NONE cterm=underline
hi CursorColumn ctermfg=black ctermbg=darkyellow cterm=NONE
hi Folded ctermfg=black ctermbg=darkyellow cterm=NONE
hi ColorColumn ctermfg=black ctermbg=darkyellow cterm=NONE
hi SpellBad ctermfg=darkred ctermbg=NONE cterm=underline
hi SpellCap ctermfg=darkyellow ctermbg=NONE cterm=underline
hi SpellLocal ctermfg=darkgreen ctermbg=NONE cterm=underline
hi SpellRare ctermfg=magenta ctermbg=NONE cterm=underline
hi Constant ctermfg=darkmagenta ctermbg=NONE cterm=NONE
hi Type ctermfg=darkyellow ctermbg=NONE cterm=bold
hi Character ctermfg=green ctermbg=NONE cterm=NONE
hi Comment ctermfg=darkgray ctermbg=NONE cterm=NONE
hi String ctermfg=yellow ctermbg=NONE cterm=NONE
hi Function ctermfg=green ctermbg=NONE cterm=NONE
hi Identifier ctermfg=blue ctermbg=NONE cterm=NONE
hi PreProc ctermfg=red ctermbg=NONE cterm=NONE
hi Special ctermfg=darkcyan ctermbg=NONE cterm=NONE
hi Statement ctermfg=red ctermbg=NONE cterm=bold
hi Underlined ctermfg=blue ctermbg=NONE cterm=underline
hi Title ctermfg=NONE ctermbg=NONE cterm=bold
hi Debug ctermfg=darkcyan ctermbg=NONE cterm=NONE
hi Ignore ctermfg=NONE ctermbg=NONE cterm=NONE
hi Directory ctermfg=cyan ctermbg=NONE cterm=bold
hi Conceal ctermfg=darkgrey ctermbg=NONE cterm=NONE
hi DiffAdd ctermfg=darkgreen ctermbg=NONE cterm=reverse
hi DiffChange ctermfg=darkblue ctermbg=NONE cterm=reverse
hi DiffText ctermfg=darkmagenta ctermbg=NONE cterm=reverse
hi DiffDelete ctermfg=darkred ctermbg=NONE cterm=reverse
hi Added ctermfg=darkgreen ctermbg=NONE cterm=NONE
hi Changed ctermfg=darkyellow ctermbg=NONE cterm=NONE
hi Removed ctermfg=darkred ctermbg=NONE cterm=NONE
hi htmlBold ctermfg=white ctermbg=NONE cterm=bold
hi htmlItalic ctermfg=white ctermbg=NONE cterm=underline
hi markdownHeadingDelimiter ctermfg=white ctermbg=NONE cterm=NONE
hi markdownH1Delimiter ctermfg=red ctermbg=NONE cterm=NONE
hi markdownH2Delimiter ctermfg=yellow ctermbg=NONE cterm=NONE
hi markdownH4Delimiter ctermfg=blue ctermbg=NONE cterm=NONE
hi markdownH6Delimiter ctermfg=green ctermbg=NONE cterm=NONE
hi markdownH3Delimiter ctermfg=darkyellow ctermbg=NONE cterm=NONE
hi markdownH5Delimiter ctermfg=darkblue ctermbg=NONE cterm=NONE
unlet s:t_Co s:italics
finish
endif
if s:t_Co >= 8
hi Normal ctermfg=gray ctermbg=black cterm=NONE
hi StatusLine ctermfg=gray ctermbg=black cterm=bold,reverse
hi StatusLineNC ctermfg=gray ctermbg=black cterm=reverse
hi VertSplit ctermfg=gray ctermbg=gray cterm=NONE
hi TabLine ctermfg=black ctermbg=gray cterm=NONE
hi TabLineFill ctermfg=gray ctermbg=gray cterm=NONE
hi TabLineSel ctermfg=black ctermbg=gray cterm=bold
hi ToolbarLine ctermfg=NONE ctermbg=NONE cterm=NONE
hi ToolbarButton ctermfg=gray ctermbg=black cterm=reverse
hi QuickFixLine ctermfg=black ctermbg=darkyellow cterm=NONE
hi CursorLineNr ctermfg=darkyellow ctermbg=NONE cterm=bold
hi LineNr ctermfg=gray ctermbg=NONE cterm=bold
hi LineNrAbove ctermfg=gray ctermbg=NONE cterm=bold
hi LineNrBelow ctermfg=gray ctermbg=NONE cterm=bold
hi NonText ctermfg=gray ctermbg=NONE cterm=bold
hi EndOfBuffer ctermfg=gray ctermbg=NONE cterm=bold
hi SpecialKey ctermfg=gray ctermbg=NONE cterm=bold
hi FoldColumn ctermfg=gray ctermbg=NONE cterm=bold
hi Visual ctermfg=black ctermbg=darkcyan cterm=NONE
hi VisualNOS ctermfg=black ctermbg=darkcyan cterm=NONE
hi Pmenu ctermfg=black ctermbg=gray cterm=NONE
hi PmenuThumb ctermfg=gray ctermbg=black cterm=NONE
hi PmenuSbar ctermfg=NONE ctermbg=gray cterm=NONE
hi PmenuSel ctermfg=black ctermbg=darkyellow cterm=NONE
hi PmenuKind ctermfg=darkred ctermbg=gray cterm=NONE
hi PmenuKindSel ctermfg=darkred ctermbg=darkyellow cterm=NONE
hi PmenuExtra ctermfg=black ctermbg=gray cterm=NONE
hi PmenuExtraSel ctermfg=black ctermbg=darkyellow cterm=NONE
hi PmenuMatch ctermfg=black ctermbg=gray cterm=bold
hi PmenuMatchSel ctermfg=black ctermbg=darkyellow cterm=bold
hi SignColumn ctermfg=NONE ctermbg=NONE cterm=NONE
hi Error ctermfg=darkred ctermbg=gray cterm=bold,reverse
hi ErrorMsg ctermfg=darkred ctermbg=gray cterm=bold,reverse
hi ModeMsg ctermfg=NONE ctermbg=NONE cterm=bold
hi MoreMsg ctermfg=darkgreen ctermbg=NONE cterm=NONE
hi Question ctermfg=darkyellow ctermbg=NONE cterm=NONE
hi WarningMsg ctermfg=darkred ctermbg=NONE cterm=NONE
hi Todo ctermfg=gray ctermbg=NONE cterm=bold
hi MatchParen ctermfg=darkyellow ctermbg=NONE cterm=bold
hi Search ctermfg=black ctermbg=darkblue cterm=NONE
hi IncSearch ctermfg=black ctermbg=darkyellow cterm=NONE
hi CurSearch ctermfg=black ctermbg=darkyellow cterm=NONE
hi WildMenu ctermfg=black ctermbg=darkyellow cterm=NONE
hi debugPC ctermfg=black ctermbg=darkblue cterm=NONE
hi debugBreakpoint ctermfg=black ctermbg=darkcyan cterm=NONE
hi CursorLine ctermfg=NONE ctermbg=NONE cterm=underline
hi CursorColumn ctermfg=black ctermbg=darkyellow cterm=NONE
hi Folded ctermfg=black ctermbg=darkyellow cterm=NONE
hi ColorColumn ctermfg=black ctermbg=darkyellow cterm=NONE
hi SpellBad ctermfg=darkred ctermbg=gray cterm=reverse
hi SpellCap ctermfg=darkblue ctermbg=gray cterm=reverse
hi SpellLocal ctermfg=darkgreen ctermbg=black cterm=reverse
hi SpellRare ctermfg=darkmagenta ctermbg=gray cterm=reverse
hi Constant ctermfg=darkmagenta ctermbg=NONE cterm=NONE
hi Type ctermfg=darkyellow ctermbg=NONE cterm=bold
hi Character ctermfg=darkgreen ctermbg=NONE cterm=NONE
hi Comment ctermfg=gray ctermbg=NONE cterm=bold
hi String ctermfg=darkyellow ctermbg=NONE cterm=bold
hi Function ctermfg=darkgreen ctermbg=NONE cterm=NONE
hi Identifier ctermfg=darkblue ctermbg=NONE cterm=NONE
hi PreProc ctermfg=darkred ctermbg=NONE cterm=NONE
hi Special ctermfg=darkcyan ctermbg=NONE cterm=bold
hi Statement ctermfg=darkred ctermbg=NONE cterm=bold
hi Underlined ctermfg=darkblue ctermbg=NONE cterm=underline
hi Title ctermfg=NONE ctermbg=NONE cterm=bold
hi Debug ctermfg=darkcyan ctermbg=NONE cterm=NONE
hi Ignore ctermfg=NONE ctermbg=NONE cterm=NONE
hi Directory ctermfg=darkcyan ctermbg=NONE cterm=bold
hi Conceal ctermfg=gray ctermbg=NONE cterm=NONE
hi DiffAdd ctermfg=darkgreen ctermbg=NONE cterm=reverse
hi DiffChange ctermfg=darkblue ctermbg=NONE cterm=reverse
hi DiffText ctermfg=darkmagenta ctermbg=NONE cterm=reverse
hi DiffDelete ctermfg=darkred ctermbg=NONE cterm=reverse
hi Added ctermfg=darkgreen ctermbg=NONE cterm=NONE
hi Changed ctermfg=darkyellow ctermbg=NONE cterm=NONE
hi Removed ctermfg=darkred ctermbg=NONE cterm=NONE
hi htmlBold ctermfg=gray ctermbg=NONE cterm=bold
hi htmlItalic ctermfg=gray ctermbg=NONE cterm=underline
hi markdownHeadingDelimiter ctermfg=gray ctermbg=NONE cterm=NONE
hi markdownH1Delimiter ctermfg=darkred ctermbg=NONE cterm=NONE
hi markdownH2Delimiter ctermfg=darkyellow ctermbg=NONE cterm=NONE
hi markdownH4Delimiter ctermfg=darkblue ctermbg=NONE cterm=NONE
hi markdownH6Delimiter ctermfg=darkgreen ctermbg=NONE cterm=NONE
hi markdownH3Delimiter ctermfg=darkyellow ctermbg=NONE cterm=NONE
hi markdownH5Delimiter ctermfg=darkblue ctermbg=NONE cterm=NONE
unlet s:t_Co s:italics
finish
endif
if s:t_Co >= 0
hi Normal term=NONE
hi ColorColumn term=reverse
hi Conceal term=NONE
hi Cursor term=reverse
hi CursorColumn term=NONE
hi CursorLine term=underline
hi CursorLineNr term=bold
hi DiffAdd term=reverse
hi DiffChange term=NONE
hi DiffDelete term=reverse
hi DiffText term=reverse
hi Directory term=NONE
hi EndOfBuffer term=NONE
hi ErrorMsg term=bold,reverse
hi FoldColumn term=NONE
hi Folded term=NONE
hi IncSearch term=bold,reverse,underline
hi LineNr term=NONE
hi MatchParen term=bold,underline
hi ModeMsg term=bold
hi MoreMsg term=NONE
hi NonText term=NONE
hi Pmenu term=reverse
hi PmenuSbar term=reverse
hi PmenuSel term=bold
hi PmenuThumb term=NONE
hi Question term=standout
hi Search term=reverse
hi SignColumn term=reverse
hi SpecialKey term=bold
hi SpellBad term=underline
hi SpellCap term=underline
hi SpellLocal term=underline
hi SpellRare term=underline
hi StatusLine term=bold,reverse
hi StatusLineNC term=bold,underline
hi TabLine term=bold,underline
hi TabLineFill term=NONE
hi Terminal term=NONE
hi TabLineSel term=bold,reverse
hi Title term=NONE
hi VertSplit term=NONE
hi Visual term=reverse
hi VisualNOS term=NONE
hi WarningMsg term=standout
hi WildMenu term=bold
hi CursorIM term=NONE
hi ToolbarLine term=reverse
hi ToolbarButton term=bold,reverse
hi CurSearch term=reverse
hi CursorLineFold term=underline
hi CursorLineSign term=underline
hi Comment term=bold
hi Constant term=NONE
hi Error term=bold,reverse
hi Identifier term=NONE
hi Ignore term=NONE
hi PreProc term=NONE
hi Special term=NONE
hi Statement term=NONE
hi Todo term=bold,reverse
hi Type term=NONE
hi Underlined term=underline
unlet s:t_Co s:italics
finish
endif
" Background: dark
" Color: color00 #282923 235 black
" Color: color08 #74705d 244 darkgray
" Color: color01 #c61e5c 125 darkred
" Color: color09 #f92672 197 red
" Color: color02 #81af24 106 darkgreen
" Color: color10 #a6e22e 112 green
" Color: color03 #fd971f 208 darkyellow
" Color: color11 #e6db74 185 yellow
" Color: color04 #51aebe 73 darkblue
" Color: color12 #66d9ef 81 blue
" Color: color05 #ae81ff 141 darkmagenta
" Color: color13 #fd5ff0 207 magenta
" Color: color06 #80beb5 73 darkcyan
" Color: color14 #a1efe4 116 cyan
" Color: color07 #bababa 250 gray
" Color: color15 #f8f8f2 255 white
" Color: colorLine #3a392f 237 darkgrey
" Color: colorB #585858 240 darkgrey
" Color: colorF #414141 238 darkgrey
" Color: colorNonT #8a8a8a 245 darkgrey
" Color: colorC #ffaf5f 215 red
" Color: colorlC #5fff00 82 green
" Color: colorV #1f3f5f 109 cyan
" Color: colorMP #fd971f 208 darkyellow
" Color: diffAdd #5faf5f 71 darkgreen
" Color: diffDelete #af5f5f 131 darkred
" Color: diffChange #5f87af 67 darkblue
" Color: diffText #af87af 139 darkmagenta
" Color: black #000000 16 black
" Color: white #dadada 253 white
" Color: Added #5fd75f 77 darkgreen
" Color: Changed #ffaf5f 215 darkyellow
" Color: Removed #d75f5f 167 darkred
" Term colors: color00 color01 color02 color03 color04 color05 color06 color07
" Term colors: color08 color09 color10 color11 color12 color13 color14 color15
" vim: et ts=8 sw=2 sts=2
+3 -1
View File
@@ -4,7 +4,7 @@
" Maintainer: Maxim Kim <habamax@gmail.com>
" Website: https://github.com/vim/colorschemes
" License: Same as Vim
" Last Change: 2024 Aug 15
" Last Change: 2025 Jan 07
" Generated by Colortemplate v2.2.3
@@ -20,6 +20,7 @@ hi! link LineNrAbove LineNr
hi! link LineNrBelow LineNr
hi! link MessageWindow PMenu
hi! link PopupNotification Todo
hi! link PopupSelected PmenuSel
hi! link CurSearch IncSearch
if &background ==# 'dark'
if (has('termguicolors') && &termguicolors) || has('gui_running')
@@ -185,6 +186,7 @@ if s:t_Co >= 256
hi! link LineNrBelow LineNr
hi! link MessageWindow PMenu
hi! link PopupNotification Todo
hi! link PopupSelected PmenuSel
hi! link CurSearch IncSearch
if &background ==# 'dark'
hi Normal ctermfg=252 ctermbg=16 cterm=NONE
+5 -1
View File
@@ -4,7 +4,7 @@
" Maintainer: Romain Lafourcade <romainlafourcade@gmail.com>
" Website: https://github.com/vim/colorschemes
" License: Same as Vim
" Last Change: 2024 Aug 15
" Last Change: 2025 Jan 07
" Generated by Colortemplate v2.2.3
@@ -91,6 +91,7 @@ hi! link TabLineFill StatusLineNC
hi! link TabLineSel StatusLine
hi! link Terminal Normal
hi! link lCursor Cursor
hi! link PopupSelected PmenuSel
hi! link Boolean Constant
hi! link Character Constant
hi! link Conditional Statement
@@ -196,6 +197,7 @@ if s:t_Co >= 256
hi! link TabLineSel StatusLine
hi! link Terminal Normal
hi! link lCursor Cursor
hi! link PopupSelected PmenuSel
hi! link Boolean Constant
hi! link Character Constant
hi! link Conditional Statement
@@ -304,6 +306,7 @@ if s:t_Co >= 16
hi! link TabLineSel StatusLine
hi! link Terminal Normal
hi! link lCursor Cursor
hi! link PopupSelected PmenuSel
hi! link Boolean Constant
hi! link Character Constant
hi! link Conditional Statement
@@ -412,6 +415,7 @@ if s:t_Co >= 8
hi! link TabLineSel StatusLine
hi! link Terminal Normal
hi! link lCursor Cursor
hi! link PopupSelected PmenuSel
hi! link Boolean Constant
hi! link Character Constant
hi! link Conditional Statement
+3 -1
View File
@@ -4,7 +4,7 @@
" Maintainer: Original maintainer Ron Aaron <ron@ronware.org>
" Website: https://github.com/vim/colorschemes
" License: Same as Vim
" Last Change: 2024 Aug 15
" Last Change: 2025 Jan 07
" Generated by Colortemplate v2.2.3
@@ -26,6 +26,7 @@ hi! link CursorLineFold CursorLine
hi! link CursorLineSign CursorLine
hi! link MessageWindow Pmenu
hi! link PopupNotification Todo
hi! link PopupSelected PmenuSel
hi Normal guifg=#000000 guibg=#ffffff gui=NONE cterm=NONE
hi Folded guifg=#00008b guibg=#d3d3d3 gui=NONE cterm=NONE
hi CursorLine guifg=NONE guibg=#e5e5e5 gui=NONE cterm=NONE
@@ -101,6 +102,7 @@ if s:t_Co >= 256
hi! link CursorLineSign CursorLine
hi! link MessageWindow Pmenu
hi! link PopupNotification Todo
hi! link PopupSelected PmenuSel
hi Normal ctermfg=16 ctermbg=231 cterm=NONE
hi Folded ctermfg=18 ctermbg=252 cterm=NONE
hi CursorLine ctermfg=NONE ctermbg=254 cterm=NONE
+4 -13
View File
@@ -12,7 +12,7 @@
# Correct the following line for the where executable file vim is installed.
# Please do not put the path in quotes.
VIMPROG = D:\Programs\Vim\vim91\vim.exe
VIMPROG = ..\..\src\vim.exe
# Correct the following line for the directory where iconv installed.
# Please do not put the path in quotes.
@@ -54,7 +54,7 @@ tags : doctags $(DOCS)
doctags.exe $(DOCS) | sort /L C /O tags
$(PS) $(PSFLAGS) \
(Get-Content -Raw tags ^| Get-Unique ^| %%{$$_ -replace \"`r\", \"\"}) \
^| New-Item -Path . -Force -ItemType file -Name tags
^| New-Item -Path . -Name tags -ItemType file -Force
doctags : doctags.c
$(CC) doctags.c
@@ -65,15 +65,6 @@ doctags : doctags.c
vimtags : $(DOCS)
@"$(VIMPROG)" --clean -esX -V1 -u doctags.vim
uganda.nsis.txt : uganda.???
! $(PS) $(PSFLAGS) (Get-Content $? -Encoding UTF8 \
^| %%{$$_ -replace '[\t\s]*\*.*\*', '' -replace 'vim:tw=\d\d:.*', ''}) \
^| Set-Content \"$(@B)$$((Get-Item $?).Extension)\" -Encoding Unicode
! $(PS) $(PSFLAGS)\
(Get-Content $(@B)$$((Get-Item $?).Extension) -Raw).Trim() -replace '(\r\n){3,}', '$$1$$1' \
^| Set-Content \"$(@B)$$((Get-Item $?).Extension)\" -Encoding Unicode
# TODO:
#html: noerrors tags $(HTMLS)
# if exist errors.log (more errors.log)
@@ -108,8 +99,8 @@ test_urls :
"$(VIMPROG)" --clean -S test_urls.vim
clean :
$(RM) doctags.exe doctags.obj
$(RM) *.html vim-stylesheet.css
- $(RM) doctags.exe doctags.obj
- $(RM) *.html vim-stylesheet.css
arabic.txt :
-10
View File
@@ -49,16 +49,6 @@ vimtutor.man: vimtutor.1
xxd.man: xxd.1
nroff -man $? | sed -e s/.//g > $@
uganda.nsis.txt : uganda.???
for dpn in $?; do \
trg=$@; \
sed -e 's/[ ]*\*.*\*//g' -e 's/vim:tw=[[:digit:]][[:digit:]]:.*//' \
$${dpn} | uniq > $${trg%txt}$${dpn##*.}; \
done
# This files needs to be in dos fileformat for NSIS.
$(VIMPROG) -e -X -u NONE --cmd "set notitle noicon nocp noml viminfo=" \
-c "argdo write ++ff=dos" -c "qa" uganda.nsis.???
# Awk version of .txt to .html conversion.
html: noerrors tags $(HTMLS)
@if test -f errors.log; then more errors.log; fi
+4 -1
View File
@@ -1,4 +1,4 @@
*autocmd.txt* For Vim version 9.1. Last change: 2024 Dec 04
*autocmd.txt* For Vim version 9.1. Last change: 2025 Feb 08
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -2000,6 +2000,9 @@ To disable autocommands for some time use the 'eventignore' option. Note that
this may cause unexpected behavior, make sure you restore 'eventignore'
afterwards, using a |:try| block with |:finally|.
To disable autocmds indefinitely in a specific window use the 'eventignorewin'
option. This can only be used to ignore window and buffer related events.
*:noautocmd* *:noa*
To disable autocommands for just one command use the ":noautocmd" command
modifier. This will set 'eventignore' to "all" for the duration of the
+137 -22
View File
@@ -1,4 +1,4 @@
*builtin.txt* For Vim version 9.1. Last change: 2025 Jan 06
*builtin.txt* For Vim version 9.1. Last change: 2025 Feb 17
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -72,6 +72,7 @@ base64_encode({blob}) String base64 encode the bytes in {blob}
bindtextdomain({package}, {path})
Bool bind text domain to specified path
blob2list({blob}) List convert {blob} into a list of numbers
blob2str({blob} [, {options}]) List convert {blob} into a list of strings
browse({save}, {title}, {initdir}, {default})
String put up a file requester
browsedir({title}, {initdir}) String put up a directory requester
@@ -227,12 +228,12 @@ getbufvar({buf}, {varname} [, {def}])
getcellpixels() List get character cell pixel size
getcellwidths() List get character cell width overrides
getchangelist([{buf}]) List list of change list items
getchar([{expr}]) Number or String
getchar([{expr} [, {opts}]]) Number or String
get one character from the user
getcharmod() Number modifiers for the last typed character
getcharpos({expr}) List position of cursor, mark, etc.
getcharsearch() Dict last character search
getcharstr([{expr}]) String get one character from the user
getcharstr([{expr} [, {opts}]]) String get one character from the user
getcmdcomplpat() String return the completion pattern of the
current command-line completion
getcmdcompltype() String return the type of the current
@@ -415,6 +416,8 @@ mkdir({name} [, {flags} [, {prot}]])
mode([{expr}]) String current editing mode
mzeval({expr}) any evaluate |MzScheme| expression
nextnonblank({lnum}) Number line nr of non-blank line >= {lnum}
ngettext({single}, {plural}, {number}[, {domain}])
String translate text based on {number}
nr2char({expr} [, {utf8}]) String single char with ASCII/UTF-8 value {expr}
or({expr}, {expr}) Number bitwise OR
pathshorten({expr} [, {len}]) String shorten directory names in a path
@@ -611,6 +614,7 @@ split({expr} [, {pat} [, {keepempty}]])
sqrt({expr}) Float square root of {expr}
srand([{expr}]) List get seed for |rand()|
state([{what}]) String current state of Vim
str2blob({list} [, {options}]) Blob convert list of strings into a Blob
str2float({expr} [, {quoted}]) Float convert String to Float
str2list({expr} [, {utf8}]) List convert each character of {expr} to
ASCII/UTF-8 value
@@ -1243,7 +1247,7 @@ base64_decode({string}) *base64_decode()*
" Write the decoded contents to a binary file
call writefile(base64_decode(s), 'tools.bmp')
" Decode a base64-encoded string
echo list2str(blob2list(base64_decode(encodedstr)))
echo blob2str(base64_decode(encodedstr))
<
Can also be used as a |method|: >
GetEncodedString()->base64_decode()
@@ -1259,7 +1263,7 @@ base64_encode({blob}) *base64_encode()*
" Encode the contents of a binary file
echo base64_encode(readblob('somefile.bin'))
" Encode a string
echo base64_encode(list2blob(str2list(somestr)))
echo base64_encode(str2blob([somestr]))
<
Can also be used as a |method|: >
GetBinaryData()->base64_encode()
@@ -1291,6 +1295,42 @@ blob2list({blob}) *blob2list()*
<
Return type: list<any> or list<number>
blob2str({blob} [, {options}]) *blob2str()*
Return a List of Strings in the current 'encoding' by
converting the bytes in {blob} into characters.
Each <NL> byte in the blob is interpreted as the end of a
string and a new list item is added. Each <NUL> byte in the
blob is converted into a <NL> character.
If {options} is not supplied, the current 'encoding' value is
used to decode the bytes in {blob}.
The argument {options} is a |Dict| and supports the following
items:
encoding Decode the bytes in {blob} using this
encoding. The value is a |String|. See
|encoding-names| for the supported values.
*E1515*
An error is given and an empty List is returned if
an invalid byte sequence is encountered in {blob},
Returns an empty List if blob is empty.
See also |str2blob()|
Examples: >
blob2str(0z6162) returns ["ab"]
blob2str(0zC2ABC2BB) returns ["«»"]
blob2str(0zABBB, {'encoding': 'latin1'}) returns ["«»"]
<
Can also be used as a |method|: >
GetBlob()->blob2str()
<
Return type: list<string>
*browse()*
browse({save}, {title}, {initdir}, {default})
Put up a file requester. This only works when "has("browse")"
@@ -1913,7 +1953,8 @@ complete_info([{what}]) *complete_info()*
typed text only, or the last completion after
no item is selected when using the <Up> or
<Down> keys)
inserted Inserted string. [NOT IMPLEMENTED YET]
completed Return a dictionary containing the entries of
the currently selected index item.
*complete_info_mode*
mode values are:
@@ -2967,7 +3008,8 @@ extend({expr1}, {expr2} [, {expr3}]) *extend()*
When {expr3} is omitted then "force" is assumed.
{expr1} is changed when {expr2} is not empty. If necessary
make a copy of {expr1} first.
make a copy of {expr1} first or use |extendnew()| to return a
new List/Dictionary.
{expr2} remains unchanged.
When {expr1} is locked and {expr2} is not empty the operation
fails.
@@ -3844,6 +3886,8 @@ getcellpixels() *getcellpixels()*
On macOS, system Terminal.app returns sizes in points (before
Retina scaling), whereas third-party terminals return raw pixel
sizes (post Retina scaling).
In MacVim, there is a small delay after startup or changing
'guifont' before this will return the updated values.
Return type: list<any>
@@ -3879,14 +3923,16 @@ getchangelist([{buf}]) *getchangelist()*
Return type: list<any>
getchar([{expr}]) *getchar()*
getchar([{expr} [, {opts}]]) *getchar()*
Get a single character from the user or input stream.
If {expr} is omitted, wait until a character is available.
If {expr} is omitted or is -1, wait until a character is
available.
If {expr} is 0, only get a character when one is available.
Return zero otherwise.
If {expr} is 1, only check if a character is available, it is
not consumed. Return zero if no character available.
If you prefer always getting a string use |getcharstr()|.
If you prefer always getting a string use |getcharstr()|, or
specify |FALSE| as "number" in {opts}.
Without {expr} and when {expr} is 0 a whole character or
special key is returned. If it is a single character, the
@@ -3896,7 +3942,8 @@ getchar([{expr}]) *getchar()*
starting with 0x80 (decimal: 128). This is the same value as
the String "\<Key>", e.g., "\<Left>". The returned value is
also a String when a modifier (shift, control, alt) was used
that is not included in the character.
that is not included in the character. |keytrans()| can also
be used to convert a returned String into a readable form.
When {expr} is 0 and Esc is typed, there will be a short delay
while Vim waits to see if this is the start of an escape
@@ -3908,6 +3955,31 @@ getchar([{expr}]) *getchar()*
Use getcharmod() to obtain any additional modifiers.
The optional argument {opts} is a Dict and supports the
following items:
cursor A String specifying cursor behavior
when waiting for a character.
"hide": hide the cursor.
"keep": keep current cursor unchanged.
"msg": move cursor to message area.
(default: "msg")
number If |TRUE|, return a Number when getting
a single character.
If |FALSE|, the return value is always
converted to a String, and an empty
String (instead of 0) is returned when
no character is available.
(default: |TRUE|)
simplify If |TRUE|, include modifiers in the
character if possible. E.g., return
the same value for CTRL-I and <Tab>.
If |FALSE|, don't include modifiers in
the character.
(default: |TRUE|)
When the user clicks a mouse button, the mouse event will be
returned. The position can then be found in |v:mouse_col|,
|v:mouse_lnum|, |v:mouse_winid| and |v:mouse_win|.
@@ -4023,17 +4095,9 @@ getcharsearch() *getcharsearch()*
Return type: dict<any>
getcharstr([{expr}]) *getcharstr()*
Get a single character from the user or input stream as a
string.
If {expr} is omitted, wait until a character is available.
If {expr} is 0 or false, only get a character when one is
available. Return an empty string otherwise.
If {expr} is 1 or true, only check if a character is
available, it is not consumed. Return an empty string
if no character is available.
Otherwise this works like |getchar()|, except that a number
result is converted to a string.
getcharstr([{expr} [, {opts}]]) *getcharstr()*
The same as |getchar()|, except that this always returns a
String, and "number" isn't allowed in {opts}.
Return type: |String|
@@ -7650,6 +7714,20 @@ nextnonblank({lnum}) *nextnonblank()*
Return type: |Number|
ngettext({single}, {plural}, {number}[, {domain}) *ngettext()*
Return a string that contains the correct value for a
message based on the rules for plural form(s) in
a language. Examples: >
ngettext("File", "Files", 2) # returns "Files"
<
Can be used as a |method|: >
1->ngettext("File", "Files") # returns "File"
<
See |gettext()| for information on the domain parameter.
Return type: |String|
nr2char({expr} [, {utf8}]) *nr2char()*
Return a string with a single character, which has the number
value {expr}. Examples: >
@@ -10580,6 +10658,42 @@ state([{what}]) *state()*
Return type: |String|
str2blob({list} [, {options}]) *str2blob()*
Return a Blob by converting the characters in the List of
strings in {list} into bytes.
A <NL> byte is added to the blob after each list item. A
newline character in the string is translated into a <NUL>
byte in the blob.
If {options} is not supplied, the current 'encoding' value is
used to convert the characters into bytes.
The argument {options} is a |Dict| and supports the following
items:
encoding Encode the characters using this encoding.
The value is a |String|. See |encoding-names|
for the supported values.
An error is given and an empty blob is returned if the
character encoding fails.
Returns an empty Blob if {list} is empty.
See also |blob2str()|
Examples: >
str2blob(["ab"]) returns 0z6162
str2blob(["«»"]) returns 0zC2ABC2BB
str2blob(["a\nb"]) returns 0z610A62
str2blob(readfile('myfile.txt'))
str2blob(["«»"], {'encoding': 'latin1'}) returns 0zABBB
<
Can also be used as a |method|: >
GetListOfStrings()->str2blob()
<
Return type: |Blob|
str2float({string} [, {quoted}]) *str2float()*
Convert String {string} to a Float. This mostly works the
same as when using a floating point number in an expression,
@@ -12663,6 +12777,7 @@ gui_win32s idem, and Win32s system being used (Windows 3.1)
haiku Haiku version of Vim.
hangul_input Compiled with Hangul input support. |hangul|
hpux HP-UX version of Vim.
hurd GNU/Hurd version of Vim
iconv Can use iconv() for conversion.
insert_expand Compiled with support for CTRL-X expansion commands in
Insert mode. (always true)
+4 -3
View File
@@ -1,4 +1,4 @@
*digraph.txt* For Vim version 9.1. Last change: 2023 Oct 20
*digraph.txt* For Vim version 9.1. Last change: 2025 Feb 02
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -125,8 +125,8 @@ see them.
On most systems Vim uses the same digraphs. They work for the Unicode and
ISO-8859-1 character sets. These default digraphs are taken from the RFC1345
mnemonics. To make it easy to remember the mnemonic, the second character has
a standard meaning:
mnemonics (with some additions). To make it easy to remember the mnemonic,
the second character has a standard meaning:
char name char meaning ~
Exclamation mark ! Grave
@@ -1075,6 +1075,7 @@ char digraph hex dec official name ~
≅ ?= 2245 8773 APPROXIMATELY EQUAL TO
≈ ?2 2248 8776 ALMOST EQUAL TO
≌ =? 224C 8780 ALL EQUAL TO
≐ .= 2250 8784 APPROACHES THE LIMIT
≓ HI 2253 8787 IMAGE OF OR APPROXIMATELY EQUAL TO
≠ != 2260 8800 NOT EQUAL TO
≡ =3 2261 8801 IDENTICAL TO
+48 -1
View File
@@ -1,4 +1,4 @@
*eval.txt* For Vim version 9.1. Last change: 2025 Jan 02
*eval.txt* For Vim version 9.1. Last change: 2025 Jan 29
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -4922,5 +4922,52 @@ executable. It takes the following arguments:
filetype string
executable string
*dist#vim9#Open()* *:Open*
*g:Openprg* *gx*
dist#vim9#Open(file: string) ~
Opens `path` with the system default handler (macOS `open`, Windows
`explorer.exe`, Linux `xdg-open`, …). If the variable |g:Openprg| exists the
string specified in the variable is used instead.
This function is by default called using the gx mapping. In visual mode
tries to open the visually selected text.
Associated setting variables:
`g:gx_word`: control how gx picks up the text under the cursor. Uses
`g:netrw_gx` as a fallback for backward compatibility.
(default: `<cfile>`)
`g:nogx`: disables the gx mapping. Uses `g:netrw_nogx` as a fallback for
backward compatibility. (default: `unset`)
NOTE: Escaping of the path is automatically applied.
Usage: >vim
:call dist#vim9#Open(<path>)
:Open <path>
<
*dist#vim9#Launch()* *:Launch*
dist#vim9#Launch(file: string) ~
Launches <args> with the appropriate system programs. Intended for launching
GUI programs within Vim.
NOTE: escaping of <args> is left to the user
Examples: >vim
vim9script
import autoload 'dist/vim9.vim'
# Execute 'makeprg' into another xterm window
vim9.Launch('xterm ' .. expandcmd(&makeprg))
<
Usage: >vim
:call dist#vim9#Launch(<args>)
:Launch <app> <args>.
<
vim:tw=78:ts=8:noet:ft=help:norl:
+2 -2
View File
@@ -1,4 +1,4 @@
*filetype.txt* For Vim version 9.1. Last change: 2024 Dec 04
*filetype.txt* For Vim version 9.1. Last change: 2025 Feb 20
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -762,7 +762,7 @@ Options:
You can also format quoted text with |gq|.
Local mappings:
<LocalLeader>q or \\MailQuote
<LocalLeader>q or \MailQuote
Quotes the text selected in Visual mode, or from the cursor position
to the end of the file in Normal mode. This means "> " is inserted in
each line.
+14 -6
View File
@@ -290,6 +290,7 @@ KEY VALUE ~
*MMDialogsTrackPwd* open/save dialogs track the Vim pwd [bool]
*MMDisableLaunchAnimation* disable launch animation when opening a new
MacVim window [bool]
*MMDisableTablineAnimation* disable animation in GUI tabs [bool]
*MMFontPreserveLineSpacing* use the line-spacing as specified by font [bool]
*MMLoginShell* use login shell for launching Vim [bool]
*MMLoginShellArgument* login shell parameter [string]
@@ -309,10 +310,6 @@ KEY VALUE ~
*MMScrollOneDirectionOnly* scroll along one axis only when using trackpad [bool]
*MMSmoothResize* allow smooth resizing of MacVim window [bool]
*MMShareFindPboard* share search text to Find Pasteboard [bool]
*MMShowAddTabButton* enable "add tab" button on tabline [bool]
*MMTabMaxWidth* maximum width of a tab [int]
*MMTabMinWidth* minimum width of a tab [int]
*MMTabOptimumWidth* default width of a tab [int]
*MMTextInsetBottom* text area offset in pixels [int]
*MMTextInsetLeft* text area offset in pixels [int]
*MMTextInsetRight* text area offset in pixels [int]
@@ -325,6 +322,14 @@ KEY VALUE ~
*MMUpdaterPrereleaseChannel* opt-in to pre-release software update [bool]
*MMShowWhatsNewOnStartup* show "What's New" after updating to new version [bool]
Tabs ~
*MMTabColorsMode* use default/auto/colorscheme for tab colors [int]
*MMWindowUseTabBackgroundColor* use tabs background fill color as window color [bool]
*MMShowAddTabButton* enable "add tab" button on tabline [bool]
*MMShowTabScrollButtons* enable tab scroll buttons on tabline [bool]
*MMTabMinWidth* minimum width of a tab [int]
*MMTabOptimumWidth* default width of a tab [int]
As an example, if you have more than one mouse button and would wish to free
up Ctrl-click so you can bind it to something else, then the appropriate
command is: >
@@ -572,8 +577,11 @@ _cycleWindows: Select next window (similar to <D-`>)
_cycleWindowsBackwards: Select previous window (similar to <D-S-`>)
_removeWindowFromStageManagerSet Remove window from a Stage Manager Set. Same
as the "Remove Window from Set" menu item.
joinAllStageManagerSets Window will float among all Stage Manager sets
unjoinAllStageManagerSets Window will only show up in its own set
joinAllStageManagerSets: Window will float among all Stage Manager sets
unjoinAllStageManagerSets: Window will only show up in its own set
scrollToCurrentTab: Scroll to the selected tab in the GUI tab bar
scrollBackwardOneTab: Scroll backward by one tab in the tab bar
scrollForwardOneTab: Scroll forward by one tab in the tab bar
==============================================================================
7. Toolbar *macvim-toolbar*
+3 -3
View File
@@ -1,4 +1,4 @@
*helphelp.txt* For Vim version 9.1. Last change: 2024 Dec 26
*helphelp.txt* For Vim version 9.1. Last change: 2025 Jan 11
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -247,10 +247,10 @@ command: >
(requires write permission there): >
:helptags $VIMRUNTIME/doc
<
*:HelpToc* *help-TOC* *help-toc-install*
*:HelpToc* *help-TOC* *help-toc-install* *package-helptoc*
If you want to access an interactive table of contents, from any position in
the file, you can use the helptoc plugin. Load the plugin with: >
the file, you can use the helptoc plugin. Load the plugin with: >vim
packadd helptoc
-2
View File
@@ -803,8 +803,6 @@ tag char note action in Normal mode ~
|gu| gu{motion} 2 make Nmove text lowercase
|gv| gv reselect the previous Visual area
|gw| gw{motion} 2 format Nmove text and keep cursor
|netrw-gx| gx execute application for file name under the
cursor (only with |netrw| plugin)
|g@| g@{motion} call 'operatorfunc'
|g~| g~{motion} 2 swap case for Nmove text
|g<Down>| g<Down> 1 same as "gj"
+6 -1
View File
@@ -1,4 +1,4 @@
*insert.txt* For Vim version 9.1. Last change: 2024 Dec 31
*insert.txt* For Vim version 9.1. Last change: 2025 Feb 14
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -657,6 +657,11 @@ CTRL-N (next), and CTRL-P (previous).
To get the current completion information, |complete_info()| can be used.
Also see the 'infercase' option if you want to adjust the case of the match.
When inserting a selected candidate word from the |popup-menu|, the part of
the candidate word that does not match the query is highlighted using
|hl-ComplMatchIns|. If fuzzy is enabled in 'completopt', highlighting will not
be applied.
*complete_CTRL-E*
When completion is active you can use CTRL-E to stop it and go back to the
originally typed text. The CTRL-E will not be inserted.
+75 -46
View File
@@ -1,4 +1,4 @@
*options.txt* For Vim version 9.1. Last change: 2024 Dec 28
*options.txt* For Vim version 9.1. Last change: 2025 Feb 16
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1030,7 +1030,7 @@ A jump table for the options with a short description can be found at |Q_op|.
When the |t_RB| option is set, Vim will use it to request the background
color from the terminal. If the returned RGB value is dark/light and
'background' is not dark/light, 'background' will be set and the
screen is redrawn. This may have side effects, make t_BG empty in
screen is redrawn. This may have side effects, make |t_RB| empty in
your .vimrc if you suspect this problem. The response to |t_RB| can
be found in |v:termrbgresp|.
@@ -2179,6 +2179,16 @@ A jump table for the options with a short description can be found at |Q_op|.
characters can be skipped and matches can be found even
if the exact sequence is not typed.
nosort Disable sorting of completion candidates based on fuzzy
scores when "fuzzy" is enabled. Candidates will appear
in their original order.
preinsert
Preinsert the portion of the first candidate word that is
not part of the current completion leader and using the
|hl-ComplMatchIns| highlight group. Does not work when
"fuzzy" is also included.
*'completepopup'* *'cpp'*
'completepopup' 'cpp' string (default empty)
global
@@ -2895,11 +2905,20 @@ A jump table for the options with a short description can be found at |Q_op|.
Option settings for diff mode. It can consist of the following items.
All are optional. Items must be separated by a comma.
filler Show filler lines, to keep the text
synchronized with a window that has inserted
lines at the same position. Mostly useful
when windows are side-by-side and 'scrollbind'
is set.
algorithm:{text} Use the specified diff algorithm with the
internal diff engine. Currently supported
algorithms are:
myers the default algorithm
minimal spend extra time to generate the
smallest possible diff
patience patience diff algorithm
histogram histogram diff algorithm
closeoff When a window is closed where 'diff' is set
and there is only one window remaining in the
same tab page with 'diff' set, execute
`:diffoff` in that window. This undoes a
`:diffsplit` command.
context:{n} Use a context of {n} lines between a change
and a fold that contains unchanged lines.
@@ -2910,6 +2929,23 @@ A jump table for the options with a short description can be found at |Q_op|.
value (999999) to disable folding completely.
See |fold-diff|.
filler Show filler lines, to keep the text
synchronized with a window that has inserted
lines at the same position. Mostly useful
when windows are side-by-side and 'scrollbind'
is set.
foldcolumn:{n} Set the 'foldcolumn' option to {n} when
starting diff mode. Without this 2 is used.
followwrap Follow the 'wrap' option and leave as it is.
horizontal Start diff mode with horizontal splits (unless
explicitly specified otherwise).
hiddenoff Do not use diff mode for a buffer when it
becomes hidden.
iblank Ignore changes where lines are all blank. Adds
the "-B" flag to the "diff" command if
'diffexpr' is empty. Check the documentation
@@ -2923,6 +2959,17 @@ A jump table for the options with a short description can be found at |Q_op|.
are considered the same. Adds the "-i" flag
to the "diff" command if 'diffexpr' is empty.
indent-heuristic
Use the indent heuristic for the internal
diff library.
internal Use the internal diff library. This is
ignored when 'diffexpr' is set. *E960*
When running out of memory when writing a
buffer this item will be ignored for diffs
involving that buffer. Set the 'verbose'
option to see when this happens.
iwhite Ignore changes in amount of white space. Adds
the "-b" flag to the "diff" command if
'diffexpr' is empty. Check the documentation
@@ -2942,46 +2989,19 @@ A jump table for the options with a short description can be found at |Q_op|.
of the "diff" command for what this does
exactly.
horizontal Start diff mode with horizontal splits (unless
explicitly specified otherwise).
linematch:{n} Align and mark changes between the most
similar lines between the buffers. When the
total number of lines in the diff hunk exceeds
{n}, the lines will not be aligned because for
very large diff hunks there will be a
noticeable lag. A reasonable setting is
"linematch:60", as this will enable alignment
for a 2 buffer diff hunk of 30 lines each,
or a 3 buffer diff hunk of 20 lines each.
vertical Start diff mode with vertical splits (unless
explicitly specified otherwise).
closeoff When a window is closed where 'diff' is set
and there is only one window remaining in the
same tab page with 'diff' set, execute
`:diffoff` in that window. This undoes a
`:diffsplit` command.
hiddenoff Do not use diff mode for a buffer when it
becomes hidden.
foldcolumn:{n} Set the 'foldcolumn' option to {n} when
starting diff mode. Without this 2 is used.
followwrap Follow the 'wrap' option and leave as it is.
internal Use the internal diff library. This is
ignored when 'diffexpr' is set. *E960*
When running out of memory when writing a
buffer this item will be ignored for diffs
involving that buffer. Set the 'verbose'
option to see when this happens.
indent-heuristic
Use the indent heuristic for the internal
diff library.
algorithm:{text} Use the specified diff algorithm with the
internal diff engine. Currently supported
algorithms are:
myers the default algorithm
minimal spend extra time to generate the
smallest possible diff
patience patience diff algorithm
histogram histogram diff algorithm
Examples: >
:set diffopt=internal,filler,context:4
:set diffopt=
@@ -3278,6 +3298,13 @@ A jump table for the options with a short description can be found at |Q_op|.
Otherwise this is a comma-separated list of event names. Example: >
:set ei=WinEnter,WinLeave
<
*'eventignorewin'* *'eiw'*
'eventignorewin' 'eiw' string (default "")
window-local
Similar to 'eventignore' but applies to a particular window and its
buffers, for which window and buffer related autocommands can be
ignored indefinitely without affecting the global 'eventignore'.
*'expandtab'* *'et'* *'noexpandtab'* *'noet'*
'expandtab' 'et' boolean (default off)
local to buffer
@@ -4447,7 +4474,7 @@ A jump table for the options with a short description can be found at |Q_op|.
#:TabLineSel,_:TabLineFill,!:CursorColumn,
.:CursorLine,o:ColorColumn,q:QuickFixLine,
z:StatusLineTerm,Z:StatusLineTermNC,
g:MsgArea")
g:MsgArea,h:ComplMatchIns")
global
This option can be used to set highlighting mode for various
occasions. It is a comma-separated list of character pairs. The
@@ -4467,6 +4494,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|hl-MoreMsg| m |more-prompt|
|hl-ModeMsg| M Mode (e.g., "-- INSERT --")
|hl-MsgArea| g |Command-line| and message area
|hl-ComplMatchIns| h matched text of currently inserted completion
|hl-LineNr| n line number for ":number" and ":#" commands, and
when 'number' or 'relativenumber' option is set.
|hl-LineNrAbove| a line number above the cursor for when the
@@ -5174,7 +5202,7 @@ A jump table for the options with a short description can be found at |Q_op|.
set keyprotocol=kitty:kitty,foot:kitty,ghostty:kitty,wezterm:kitty
set keyprotocol+=xterm:mok2
< This means that when 'term' contains "kitty, "foot", "ghostty" or
< This means that when 'term' contains "kitty, "foot", "ghostty" or
"wezterm" somewhere, then the "kitty" protocol is used. When 'term'
contains "xterm" somewhere, then the "mok2" protocol is used.
@@ -8616,7 +8644,8 @@ A jump table for the options with a short description can be found at |Q_op|.
< You need to do this when your system has no locale support for UTF-8.
*'termguicolors'* *'tgc'* *'notermguicolors'* *'notgc'* *E954*
'termguicolors' 'tgc' boolean (default off)
'termguicolors' 'tgc' boolean (default off unless Vim detects that it runs
in a capable terminal)
global
{not available when compiled without the
|+termguicolors| feature}
+5 -4
View File
@@ -1,4 +1,4 @@
*pi_gzip.txt* For Vim version 9.1. Last change: 2023 Nov 14
*pi_gzip.txt* For Vim version 9.1. Last change: 2025 Feb 06
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -28,12 +28,13 @@ The plugin installs autocommands to intercept reading and writing of files
with these extensions:
extension compression ~
*.Z compress (Lempel-Ziv)
*.gz gzip
*.bz2 bzip2
*.gz gzip
*.lz lzip
*.lz4 lz4
*.lzma lzma
*.xz xz
*.lz lzip
*.Z compress (Lempel-Ziv)
*.zst zstd
That's actually the only thing you need to know. There are no options.
File diff suppressed because it is too large Load Diff
+1
View File
@@ -0,0 +1 @@
../pack/dist/opt/netrw/doc/netrw.txt
+3 -3
View File
@@ -1,4 +1,4 @@
*popup.txt* For Vim version 9.1. Last change: 2025 Jan 08
*popup.txt* For Vim version 9.1. Last change: 2025 Feb 20
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -504,7 +504,7 @@ popup_menu({what}, {options}) *popup_menu()*
\ mapping: 0,
\ })
< The current line is highlighted with a match using
"PopupSelected", or "PmenuSel" if that is not defined.
|hl-PopupSelected| which is linked to "PmenuSel" by default.
Use {options} to change the properties. Should at least set
"callback" to a function that handles the selected item.
@@ -559,7 +559,7 @@ popup_notification({what}, {options}) *popup_notification()*
\ close: 'click',
\ padding: [0,1,0,1],
\ })
< The PopupNotification highlight group is used instead of
< The |hl-PopupNotification| highlight group is used instead of
WarningMsg if it is defined.
Without the |+timers| feature the popup will not disappear
+3 -3
View File
@@ -1,4 +1,4 @@
*quickfix.txt* For Vim version 9.1. Last change: 2024 Dec 27
*quickfix.txt* For Vim version 9.1. Last change: 2025 Jan 11
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -550,9 +550,9 @@ EXECUTE A COMMAND IN ALL THE BUFFERS IN QUICKFIX OR LOCATION LIST:
< Otherwise it works the same as `:ldo`.
FILTERING A QUICKFIX OR LOCATION LIST:
*cfilter-plugin* *:Cfilter* *:Lfilter*
*cfilter-plugin* *:Cfilter* *:Lfilter* *package-cfilter*
If you have too many entries in a quickfix list, you can use the cfilter
plugin to reduce the number of entries. Load the plugin with: >
plugin to reduce the number of entries. Load the plugin with: >vim
packadd cfilter
+2 -1
View File
@@ -1,4 +1,4 @@
*quickref.txt* For Vim version 9.1. Last change: 2024 Nov 02
*quickref.txt* For Vim version 9.1. Last change: 2025 Feb 08
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -700,6 +700,7 @@ Short explanation of each option: *option-list*
'errorformat' 'efm' description of the lines in the error file
'esckeys' 'ek' recognize function keys in Insert mode
'eventignore' 'ei' autocommand events that are ignored
'eventignorewin' 'eiw' autocommand events that are ignored in a window
'expandtab' 'et' use spaces when <Tab> is inserted
'exrc' 'ex' read .vimrc and .exrc in the current directory
'fileencoding' 'fenc' file encoding for multibyte text
+23 -7
View File
@@ -1,4 +1,4 @@
*syntax.txt* For Vim version 9.1. Last change: 2024 Dec 16
*syntax.txt* For Vim version 9.1. Last change: 2025 Feb 20
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1062,6 +1062,7 @@ Variable Highlight ~
*c_no_cformat* don't highlight %-formats in strings
*c_no_c99* don't highlight C99 standard items
*c_no_c11* don't highlight C11 standard items
*c_no_c23* don't highlight C23 standard items
*c_no_bsd* don't highlight BSD specific types
*c_functions* highlight function calls and definitions
*c_function_pointers* highlight function pointers definitions
@@ -2217,6 +2218,16 @@ To disable numbers having their own color add the following to your vimrc: >
If you want quotes to have different highlighting than strings >
let g:jq_quote_highlight = 1
KCONFIG *ft-kconfig-syntax*
Kconfig syntax highlighting language. For syntax syncing, you can configure
the following variable (default: 50): >
let kconfig_minlines = 50
To configure a bit more (heavier) highlighting, set the following variable: >
let kconfig_syntax_heavy = 1
LACE *lace.vim* *ft-lace-syntax*
@@ -5820,8 +5831,8 @@ CursorLineSign Like SignColumn when 'cursorline' is set for the cursor line.
MatchParen Character under the cursor or just before it, if it
is a paired bracket, and its match. |pi_paren.txt|
*hl-MessageWindow*
MessageWindow Messages popup window used by `:echowindow`. If not defined
|hl-WarningMsg| is used.
MessageWindow Messages popup window used by `:echowindow`. Linked to
|hl-WarningMsg| by default.
*hl-ModeMsg*
ModeMsg 'showmode' message (e.g., "-- INSERT --").
*hl-MsgArea*
@@ -5854,15 +5865,20 @@ PmenuSbar Popup menu: Scrollbar.
*hl-PmenuThumb*
PmenuThumb Popup menu: Thumb of the scrollbar.
*hl-PmenuMatch*
PmenuMatch Popup menu: Matched text in normal item.
PmenuMatch Popup menu: Matched text in normal item. Applied in
combination with |hl-Pmenu|.
*hl-PmenuMatchSel*
PmenuMatchSel Popup menu: Matched text in selected item.
PmenuMatchSel Popup menu: Matched text in selected item. Applied in
combination with |hl-PmenuSel|.
*hl-ComplMatchIns*
ComplMatchIns Matched text of the currently inserted completion.
*hl-PopupSelected*
PopupSelected Popup window created with |popup_menu()|. Linked to
|hl-PmenuSel| by default.
*hl-PopupNotification*
PopupNotification
Popup window created with |popup_notification()|. If not
defined |hl-WarningMsg| is used.
Popup window created with |popup_notification()|. Linked to
|hl-WarningMsg| by default.
*hl-Question*
Question |hit-enter| prompt and yes/no questions.
*hl-QuickFixLine*
+32 -18
View File
@@ -234,6 +234,7 @@ $quote eval.txt /*$quote*
'ef' options.txt /*'ef'*
'efm' options.txt /*'efm'*
'ei' options.txt /*'ei'*
'eiw' options.txt /*'eiw'*
'ek' options.txt /*'ek'*
'emo' options.txt /*'emo'*
'emoji' options.txt /*'emoji'*
@@ -252,6 +253,7 @@ $quote eval.txt /*$quote*
'esckeys' options.txt /*'esckeys'*
'et' options.txt /*'et'*
'eventignore' options.txt /*'eventignore'*
'eventignorewin' options.txt /*'eventignorewin'*
'ex' options.txt /*'ex'*
'expandtab' options.txt /*'expandtab'*
'exrc' options.txt /*'exrc'*
@@ -2152,17 +2154,17 @@ $quote eval.txt /*$quote*
:GnatTags ft_ada.txt /*:GnatTags*
:HelpToc helphelp.txt /*:HelpToc*
:Hexplore pi_netrw.txt /*:Hexplore*
:Justify usr_25.txt /*:Justify*
:LP pi_logipat.txt /*:LP*
:LPE pi_logipat.txt /*:LPE*
:LPF pi_logipat.txt /*:LPF*
:Launch pi_netrw.txt /*:Launch*
:Launch eval.txt /*:Launch*
:Lexplore pi_netrw.txt /*:Lexplore*
:Lfilter quickfix.txt /*:Lfilter*
:LogiPat pi_logipat.txt /*:LogiPat*
:Man filetype.txt /*:Man*
:MkVimball pi_vimball.txt /*:MkVimball*
:N editing.txt /*:N*
:NetrwClean pi_netrw.txt /*:NetrwClean*
:Nexplore pi_netrw.txt /*:Nexplore*
:Next editing.txt /*:Next*
:NoMatchParen pi_paren.txt /*:NoMatchParen*
@@ -2173,7 +2175,7 @@ $quote eval.txt /*$quote*
:Ntree pi_netrw.txt /*:Ntree*
:Nw pi_netrw.txt /*:Nw*
:Nwrite pi_netrw.txt /*:Nwrite*
:Open pi_netrw.txt /*:Open*
:Open eval.txt /*:Open*
:Over terminal.txt /*:Over*
:P various.txt /*:P*
:Pexplore pi_netrw.txt /*:Pexplore*
@@ -4637,6 +4639,7 @@ E1511 options.txt /*E1511*
E1512 options.txt /*E1512*
E1513 message.txt /*E1513*
E1514 options.txt /*E1514*
E1515 builtin.txt /*E1515*
E152 helphelp.txt /*E152*
E153 helphelp.txt /*E153*
E154 helphelp.txt /*E154*
@@ -5623,6 +5626,7 @@ J change.txt /*J*
Japanese mbyte.txt /*Japanese*
Job eval.txt /*Job*
Jobs eval.txt /*Jobs*
Justify() usr_25.txt /*Justify()*
K various.txt /*K*
KDE gui_x11.txt /*KDE*
KVim gui_x11.txt /*KVim*
@@ -5644,6 +5648,7 @@ MMCellWidthMultiplier gui_mac.txt /*MMCellWidthMultiplier*
MMCmdLineAlignBottom gui_mac.txt /*MMCmdLineAlignBottom*
MMDialogsTrackPwd gui_mac.txt /*MMDialogsTrackPwd*
MMDisableLaunchAnimation gui_mac.txt /*MMDisableLaunchAnimation*
MMDisableTablineAnimation gui_mac.txt /*MMDisableTablineAnimation*
MMFontPreserveLineSpacing gui_mac.txt /*MMFontPreserveLineSpacing*
MMFullScreenFadeTime gui_mac.txt /*MMFullScreenFadeTime*
MMLoginShell gui_mac.txt /*MMLoginShell*
@@ -5658,9 +5663,10 @@ MMRendererClipToRow gui_mac.txt /*MMRendererClipToRow*
MMScrollOneDirectionOnly gui_mac.txt /*MMScrollOneDirectionOnly*
MMShareFindPboard gui_mac.txt /*MMShareFindPboard*
MMShowAddTabButton gui_mac.txt /*MMShowAddTabButton*
MMShowTabScrollButtons gui_mac.txt /*MMShowTabScrollButtons*
MMShowWhatsNewOnStartup gui_mac.txt /*MMShowWhatsNewOnStartup*
MMSmoothResize gui_mac.txt /*MMSmoothResize*
MMTabMaxWidth gui_mac.txt /*MMTabMaxWidth*
MMTabColorsMode gui_mac.txt /*MMTabColorsMode*
MMTabMinWidth gui_mac.txt /*MMTabMinWidth*
MMTabOptimumWidth gui_mac.txt /*MMTabOptimumWidth*
MMTextInsetBottom gui_mac.txt /*MMTextInsetBottom*
@@ -5673,6 +5679,7 @@ MMTranslateCtrlClick gui_mac.txt /*MMTranslateCtrlClick*
MMUpdaterPrereleaseChannel gui_mac.txt /*MMUpdaterPrereleaseChannel*
MMUseMouseTime gui_mac.txt /*MMUseMouseTime*
MMVerticalSplit gui_mac.txt /*MMVerticalSplit*
MMWindowUseTabBackgroundColor gui_mac.txt /*MMWindowUseTabBackgroundColor*
MMZoomBoth gui_mac.txt /*MMZoomBoth*
MS-DOS os_msdos.txt /*MS-DOS*
MS-Windows os_win32.txt /*MS-Windows*
@@ -6285,6 +6292,7 @@ blob-index eval.txt /*blob-index*
blob-literal eval.txt /*blob-literal*
blob-modification eval.txt /*blob-modification*
blob2list() builtin.txt /*blob2list()*
blob2str() builtin.txt /*blob2str()*
blockwise-examples visual.txt /*blockwise-examples*
blockwise-operators visual.txt /*blockwise-operators*
blockwise-put change.txt /*blockwise-put*
@@ -6451,6 +6459,7 @@ c_no_ansi syntax.txt /*c_no_ansi*
c_no_bracket_error syntax.txt /*c_no_bracket_error*
c_no_bsd syntax.txt /*c_no_bsd*
c_no_c11 syntax.txt /*c_no_c11*
c_no_c23 syntax.txt /*c_no_c23*
c_no_c99 syntax.txt /*c_no_c99*
c_no_cformat syntax.txt /*c_no_cformat*
c_no_curly_error syntax.txt /*c_no_curly_error*
@@ -6973,6 +6982,8 @@ disable-menus gui.txt /*disable-menus*
discard editing.txt /*discard*
dist#vim eval.txt /*dist#vim*
dist#vim9 eval.txt /*dist#vim9*
dist#vim9#Launch() eval.txt /*dist#vim9#Launch()*
dist#vim9#Open() eval.txt /*dist#vim9#Open()*
distribute-script usr_51.txt /*distribute-script*
distributed-plugins usr_05.txt /*distributed-plugins*
distribution intro.txt /*distribution*
@@ -7455,6 +7466,7 @@ ft-javascript-omni insert.txt /*ft-javascript-omni*
ft-jq-syntax syntax.txt /*ft-jq-syntax*
ft-json-plugin filetype.txt /*ft-json-plugin*
ft-json-syntax syntax.txt /*ft-json-syntax*
ft-kconfig-syntax syntax.txt /*ft-kconfig-syntax*
ft-ksh-syntax syntax.txt /*ft-ksh-syntax*
ft-lace-syntax syntax.txt /*ft-lace-syntax*
ft-lex-syntax syntax.txt /*ft-lex-syntax*
@@ -7621,6 +7633,7 @@ g:NetrwTopLvlMenu pi_netrw.txt /*g:NetrwTopLvlMenu*
g:Netrw_UserMaps pi_netrw.txt /*g:Netrw_UserMaps*
g:Netrw_corehandler pi_netrw.txt /*g:Netrw_corehandler*
g:Netrw_funcref pi_netrw.txt /*g:Netrw_funcref*
g:Openprg eval.txt /*g:Openprg*
g:actual_curbuf options.txt /*g:actual_curbuf*
g:actual_curwin options.txt /*g:actual_curwin*
g:ada#Comment ft_ada.txt /*g:ada#Comment*
@@ -7726,8 +7739,6 @@ g:netrw_altv pi_netrw.txt /*g:netrw_altv*
g:netrw_banner pi_netrw.txt /*g:netrw_banner*
g:netrw_bannerbackslash pi_netrw.txt /*g:netrw_bannerbackslash*
g:netrw_browse_split pi_netrw.txt /*g:netrw_browse_split*
g:netrw_browsex_support_remote pi_netrw.txt /*g:netrw_browsex_support_remote*
g:netrw_browsex_viewer pi_netrw.txt /*g:netrw_browsex_viewer*
g:netrw_bufsettings pi_netrw.txt /*g:netrw_bufsettings*
g:netrw_chgperm pi_netrw.txt /*g:netrw_chgperm*
g:netrw_chgwin pi_netrw.txt /*g:netrw_chgwin*
@@ -7756,7 +7767,6 @@ g:netrw_ftp_timelist_cmd pi_netrw.txt /*g:netrw_ftp_timelist_cmd*
g:netrw_ftpextracmd pi_netrw.txt /*g:netrw_ftpextracmd*
g:netrw_ftpmode pi_netrw.txt /*g:netrw_ftpmode*
g:netrw_glob_escape pi_netrw.txt /*g:netrw_glob_escape*
g:netrw_gx pi_netrw.txt /*g:netrw_gx*
g:netrw_hide pi_netrw.txt /*g:netrw_hide*
g:netrw_home pi_netrw.txt /*g:netrw_home*
g:netrw_http_cmd pi_netrw.txt /*g:netrw_http_cmd*
@@ -7782,7 +7792,6 @@ g:netrw_menu pi_netrw.txt /*g:netrw_menu*
g:netrw_mkdir_cmd pi_netrw.txt /*g:netrw_mkdir_cmd*
g:netrw_mousemaps pi_netrw.txt /*g:netrw_mousemaps*
g:netrw_nobeval pi_netrw.txt /*g:netrw_nobeval*
g:netrw_nogx pi_netrw.txt /*g:netrw_nogx*
g:netrw_preview pi_netrw.txt /*g:netrw_preview*
g:netrw_rcp_cmd pi_netrw.txt /*g:netrw_rcp_cmd*
g:netrw_remote_mkdir pi_netrw.txt /*g:netrw_remote_mkdir*
@@ -7808,7 +7817,6 @@ g:netrw_special_syntax pi_netrw.txt /*g:netrw_special_syntax*
g:netrw_ssh_browse_reject pi_netrw.txt /*g:netrw_ssh_browse_reject*
g:netrw_ssh_cmd pi_netrw.txt /*g:netrw_ssh_cmd*
g:netrw_sshport pi_netrw.txt /*g:netrw_sshport*
g:netrw_suppress_gx_mesg pi_netrw.txt /*g:netrw_suppress_gx_mesg*
g:netrw_timefmt pi_netrw.txt /*g:netrw_timefmt*
g:netrw_tmpfile_escape pi_netrw.txt /*g:netrw_tmpfile_escape*
g:netrw_uid pi_netrw.txt /*g:netrw_uid*
@@ -8026,6 +8034,7 @@ gf editing.txt /*gf*
gg motion.txt /*gg*
gh visual.txt /*gh*
gi insert.txt /*gi*
git-vimdumps terminal.txt /*git-vimdumps*
gj motion.txt /*gj*
gk motion.txt /*gk*
glob() builtin.txt /*glob()*
@@ -8152,6 +8161,7 @@ gvimrc gui.txt /*gvimrc*
gw change.txt /*gw*
gwgw change.txt /*gwgw*
gww change.txt /*gww*
gx eval.txt /*gx*
gzip pi_gzip.txt /*gzip*
gzip-autocmd pi_gzip.txt /*gzip-autocmd*
gzip-example autocmd.txt /*gzip-example*
@@ -8289,6 +8299,7 @@ hl-PmenuSbar syntax.txt /*hl-PmenuSbar*
hl-PmenuSel syntax.txt /*hl-PmenuSel*
hl-PmenuThumb syntax.txt /*hl-PmenuThumb*
hl-PopupNotification syntax.txt /*hl-PopupNotification*
hl-PopupSelected syntax.txt /*hl-PopupSelected*
hl-Question syntax.txt /*hl-Question*
hl-QuickFixLine syntax.txt /*hl-QuickFixLine*
hl-Scrollbar syntax.txt /*hl-Scrollbar*
@@ -8643,6 +8654,7 @@ jump-motions motion.txt /*jump-motions*
jumplist motion.txt /*jumplist*
jumplist-stack motion.txt /*jumplist-stack*
jumpto-diffs diff.txt /*jumpto-diffs*
justify usr_25.txt /*justify*
k motion.txt /*k*
kcc uganda.txt /*kcc*
kde gui_x11.txt /*kde*
@@ -9148,7 +9160,6 @@ netrw-call pi_netrw.txt /*netrw-call*
netrw-cb pi_netrw.txt /*netrw-cb*
netrw-cd pi_netrw.txt /*netrw-cd*
netrw-chgup pi_netrw.txt /*netrw-chgup*
netrw-clean pi_netrw.txt /*netrw-clean*
netrw-contents pi_netrw.txt /*netrw-contents*
netrw-copyright pi_netrw.txt /*netrw-copyright*
netrw-cr pi_netrw.txt /*netrw-cr*
@@ -9158,9 +9169,7 @@ netrw-ctrl-h pi_netrw.txt /*netrw-ctrl-h*
netrw-ctrl-l pi_netrw.txt /*netrw-ctrl-l*
netrw-ctrl-r pi_netrw.txt /*netrw-ctrl-r*
netrw-ctrl_l pi_netrw.txt /*netrw-ctrl_l*
netrw-curdir pi_netrw.txt /*netrw-curdir*
netrw-d pi_netrw.txt /*netrw-d*
netrw-debug pi_netrw.txt /*netrw-debug*
netrw-del pi_netrw.txt /*netrw-del*
netrw-delete pi_netrw.txt /*netrw-delete*
netrw-dir pi_netrw.txt /*netrw-dir*
@@ -9188,13 +9197,10 @@ netrw-gitignore pi_netrw.txt /*netrw-gitignore*
netrw-gn pi_netrw.txt /*netrw-gn*
netrw-gp pi_netrw.txt /*netrw-gp*
netrw-grep pi_netrw.txt /*netrw-grep*
netrw-gx pi_netrw.txt /*netrw-gx*
netrw-handler pi_netrw.txt /*netrw-handler*
netrw-help pi_netrw.txt /*netrw-help*
netrw-hexplore pi_netrw.txt /*netrw-hexplore*
netrw-hide pi_netrw.txt /*netrw-hide*
netrw-hiding pi_netrw.txt /*netrw-hiding*
netrw-history pi_netrw.txt /*netrw-history*
netrw-horiz pi_netrw.txt /*netrw-horiz*
netrw-i pi_netrw.txt /*netrw-i*
netrw-incompatible pi_netrw.txt /*netrw-incompatible*
@@ -9305,7 +9311,6 @@ netrw-starstarpat pi_netrw.txt /*netrw-starstarpat*
netrw-start pi_netrw.txt /*netrw-start*
netrw-t pi_netrw.txt /*netrw-t*
netrw-texplore pi_netrw.txt /*netrw-texplore*
netrw-todo pi_netrw.txt /*netrw-todo*
netrw-trailingslash pi_netrw.txt /*netrw-trailingslash*
netrw-transparent pi_netrw.txt /*netrw-transparent*
netrw-u pi_netrw.txt /*netrw-u*
@@ -9320,8 +9325,8 @@ netrw-vexplore pi_netrw.txt /*netrw-vexplore*
netrw-windows-netrc pi_netrw.txt /*netrw-windows-netrc*
netrw-windows-s pi_netrw.txt /*netrw-windows-s*
netrw-write pi_netrw.txt /*netrw-write*
netrw-x pi_netrw.txt /*netrw-x*
netrw-xfer pi_netrw.txt /*netrw-xfer*
netrw.txt pi_netrw.txt /*netrw.txt*
netrw.vim pi_netrw.txt /*netrw.vim*
netterm-mouse options.txt /*netterm-mouse*
network pi_netrw.txt /*network*
@@ -9425,6 +9430,7 @@ new-vimscript-8.2 version8.txt /*new-vimscript-8.2*
new-virtedit version6.txt /*new-virtedit*
news intro.txt /*news*
nextnonblank() builtin.txt /*nextnonblank()*
ngettext() builtin.txt /*ngettext()*
no-eval-feature eval.txt /*no-eval-feature*
no-type-checking eval.txt /*no-type-checking*
no_buffers_menu gui.txt /*no_buffers_menu*
@@ -9550,9 +9556,17 @@ out_name channel.txt /*out_name*
out_timeout channel.txt /*out_timeout*
p change.txt /*p*
pack-add repeat.txt /*pack-add*
package-cfilter quickfix.txt /*package-cfilter*
package-comment usr_05.txt /*package-comment*
package-create repeat.txt /*package-create*
package-doc repeat.txt /*package-doc*
package-documentation repeat.txt /*package-documentation*
package-editorconfig usr_05.txt /*package-editorconfig*
package-helptoc helphelp.txt /*package-helptoc*
package-justify usr_25.txt /*package-justify*
package-matchit usr_05.txt /*package-matchit*
package-nohlsearch usr_05.txt /*package-nohlsearch*
package-termdebug terminal.txt /*package-termdebug*
package-translate_example repeat.txt /*package-translate_example*
package-translation repeat.txt /*package-translation*
packages repeat.txt /*packages*
@@ -9630,7 +9644,6 @@ phtml.vim syntax.txt /*phtml.vim*
pi_getscript.txt pi_getscript.txt /*pi_getscript.txt*
pi_gzip.txt pi_gzip.txt /*pi_gzip.txt*
pi_logipat.txt pi_logipat.txt /*pi_logipat.txt*
pi_netrw.txt pi_netrw.txt /*pi_netrw.txt*
pi_paren.txt pi_paren.txt /*pi_paren.txt*
pi_spec.txt pi_spec.txt /*pi_spec.txt*
pi_tar.txt pi_tar.txt /*pi_tar.txt*
@@ -10407,6 +10420,7 @@ status-line windows.txt /*status-line*
statusmsg-variable eval.txt /*statusmsg-variable*
stl-%! options.txt /*stl-%!*
stl-%{ options.txt /*stl-%{*
str2blob() builtin.txt /*str2blob()*
str2float() builtin.txt /*str2float()*
str2list() builtin.txt /*str2list()*
str2nr() builtin.txt /*str2nr()*
+10 -3
View File
@@ -1,4 +1,4 @@
*terminal.txt* For Vim version 9.1. Last change: 2024 Dec 30
*terminal.txt* For Vim version 9.1. Last change: 2025 Feb 13
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -494,6 +494,12 @@ ConPTY problems have been fixed "winpty" will be preferred.
Environment variables are used to pass information to the running job:
VIM_SERVERNAME v:servername
*git-vimdumps*
There exists a git-difftool extension called `git-vimdumps` that can be used
to conveniently inspect screendump files and diff them. Please see in the Vim
Repository the file `src/testdir/commondumps.vim` on how to create and use
this git extension.
==============================================================================
2. Terminal functions *terminal-function-details*
@@ -993,7 +999,8 @@ term_wait({buf} [, {time}]) *term_wait()*
Wait for pending updates of {buf} to be handled.
{buf} is used as with |term_getsize()|.
{time} is how long to wait for updates to arrive in msec. If
not set then 10 msec will be used.
not set then 10 msec will be used. Queued messages will also
be processed similar to |:sleep|.
Can also be used as a |method|: >
GetBufnr()->term_wait()
@@ -1254,7 +1261,7 @@ Alternatively, press "s" to swap the first and second dump. Do this several
times so that you can spot the difference in the context of the text.
==============================================================================
6. Debugging *terminal-debug* *terminal-debugger*
6. Debugging *terminal-debug* *terminal-debugger* *package-termdebug*
The Terminal debugging plugin can be used to debug a program with gdb and view
the source code in a Vim window. Since this is completely contained inside
+1 -7
View File
@@ -1,4 +1,4 @@
*todo.txt* For Vim version 9.1. Last change: 2024 Dec 30
*todo.txt* For Vim version 9.1. Last change: 2025 Feb 02
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -309,9 +309,6 @@ Problem with Visual highlight when 'linebreak' and 'showbreak' are set.
GUI Scroll test fails on FreeBSD when using Motif. See FIXME in
Test_scrollbars in src/test_gui.vim
Selected index returned by complete_info() does not match the index in the
list of items. #12230
Support dark mode for MS-Windows: #12282
Remote command escapes single quote with backslash, should be doubling the
@@ -470,9 +467,6 @@ IDEA: when drawing the text, store the text byte index in ScreenLinesIdx[].
When converting screen column to text position use this.
The line number can be obtained from win->w_lines[].
Version of getchar() that does not move the cursor - #10603 Use a separate
argument for the new flag.
test_arglist func Test_all_not_allowed_from_cmdwin() hangs on MS-Windows.
Can we add highlighting to ":echowindow"?
-337
View File
@@ -1,337 +0,0 @@
*uganda.txt* для Vim version 9.1 редакция от 14 авг 2024 г.
СПРАВОЧНИК ПО РЕДАКТОРУ VIM
автор Брам Моленар
*uganda* *Uganda* *copying* *copyright* *license*
КРАТКОЕ ОПИСАНИЕ
*iccf* *ICCF*
Редактор Vim является благотворительным программным обеспечением.
Использование и копирование программы Vim не ограничено, однако
рекомендуется сделать добровольное пожертвование для нуждающихся детей в
Уганде. Ознакомьтесь с разделом |kcc| далее в этом документе или посетите
веб-сайт организации ICCF, доступный по указанным ниже адресам:
https://iccf-holland.org/
https://www.vim.org/iccf/
https://www.iccf.nl/
Также возможно оказание финансовой помощи для разработки программы Vim,
см. раздел |sponsor|. В любом случае деньги направляются в Уганду.
Документация, поставляемая в составе программы Vim, распространяется на
условиях лицензии на Открытые публикации, см. раздел |manual-copyright|.
=== начало лицензии ===
ЛИЦЕНЗИЯ VIM
I) Неизменённые копии программы Vim могут распространяться без ограничения
при условии включения данного текста лицензии. Распространение
неизменённых копий отдельных частей программы Vim также возможно при
соблюдении условия о включении данного текста лицензии. Подобным образом
разрешается добавлять исполняемые файлы, скомпилированные из
неизменённого исходного кода программы Vim, а также собственные примеры
использования и командные файлы редактора Vim.
II) Изменённую (или дополненную) версию программы Vim, включающую
исполняемые файлы и/или исходный код, допускается распространять при
соблюдении следующих четырёх условий:
1) Текст настоящей лицензии должен включаться в состав распространяемой
версии программы Vim без изменений.
2) Изменённая версия программы Vim должна распространяться одним из
следующих пяти способов:
a) При внесении изменений в программу Vim, в дистрибутиве должны
быть явно указаны контактные данные лица, внёсшего эти изменения.
Ответственному разработчику по его запросу (в любой форме) должна
быть безвозмездно предоставлена копия распространяемой изменённой
версии программы Vim, включая её исходный код. Ответственный
разработчик оставляет за собой право включать сделанные изменения
в официальную версию программы Vim. Конкретные действия
ответственного разработчика, относительно переданных изменений, а
также лицензионные условия, на основании которых будет
осуществляться их распространение, могут быть дополнительно
согласованы. Если согласование не проводилось, сделанные изменения
будут распространяться на условиях настоящей лицензии или более
поздней её версии. Лица, в данное время являющиеся ответственными
за разработку, указаны в перечне, размещённом по следующему адресу:
https://github.com/orgs/vim/people. В случае изменения этой
информации, актуальные данные будут опубликованы на
соответствующих ресурсах (вероятнее всего по интернет‐адресам
vim.sf.net, www.vim.org и/или comp.editors). В случае полной
невозможности установить контакт с ответственным разработчиком,
обязательства по отправке изменений утрачивают силу. После
передачи подтверждения о получении изменений от ответственного
разработчика, необходимость в повторной отправке копии изменённой
программы Vim неприменима.
b) Если лицом получена изменённая версия программа Vim,
распространяющаяся на условиях, указанных в ч. II) п. 2) пп. а)
допускается дальнейшее её распространение этим лицом без внесения
изменений и согласно ч. I) настоящей лицензии. В случае внесения
дополнительных изменений, на эти изменения будут распространяться
условия, указанные в ч. II) п. 2) пп. a).
c) Каждая копия распространяемой изменённой версии программы Vim
должна включать информацию обо всех произведённых изменениях,
включая исходный код. Эта информация может быть представлена в
виде построчного сравнения файлов. Выбор лицензии, по условиям
которой будет распространяться добавленный код, остаётся за
автором этих изменений. Изменения и лицензия на эти изменения не
должны запрещать другим лицам внесение своих собственных
изменений в официальную версию программы Vim.
d) Изменённая версия программы Vim, содержащая изменения в
соответствии с ч. II) п. 2 пп. c), может распространяться без
исходного кода для этих изменений, при соблюдении следующих трёх
условий:
- Лицензия, применяемая к внесённым изменениям, предоставляет
ответственному разработчику программы Vim возможность
безвозмездного и неограниченного распространения этих изменений,
а также право на безвозмездное и неограниченное включение этих
изменений в официальную версию программы Vim.
- Изменения должны сохраняться не менее трёх лет со времени
распространения соответствующей изменённой версии программы Vim.
В течение этого периода по запросу ответственного разработчика
или другого пользователя изменённой версии программы Vim
(в любой форме) необходимо предоставить исходный код данных
изменений.
- В дистрибутиве изменённой версии программы Vim должны быть явно
указаны контактные данные лица, внёсшего эти изменения.
Контактные данные должны сохранять актуальность в течение
не менее трёх лет со времени последнего распространения
соответствующей изменённой версии программы Vim или как можно
дольше.
e) Если к изменениям, внесённым в программу Vim, применимы условия
лицензии GNU General Public License (GNU GPL), допускается
распространение изменённой версия программы Vim на условиях
лицензии GNU GPL версии 2 или любой более поздней версии этой
лицензии.
3) Необходимо добавить соответствующую информацию, которая должна быть
выведена в результате выполнения команды ":version" в программе Vim,
а также на экране приветствия программы Vim, чтобы пользователь
изменённой версии программы Vim имел возможность определить, что он
пользуется изменённой версией. При распространении на условиях,
указанных в ч. II) п. 2) пп. e) такую информацию требуется добавлять
только в том случае, когда она не противоречит лицензии,
распространяющейся на эти изменения.
4) Контактная информация, которая указывается по требованию ч. II) п. 2)
пп. a) и ч. II) п. 2) пп. d) не должна удаляться или изменяться никем
другим, кроме лица, указавшего данную контактную информацию.
III) При распространении изменённой версии программы Vim рекомендуется
пользоваться лицензией Vim для произведённых изменений и обеспечить
доступ к этим изменениям ответственного разработчика, включая исходный
код изменений. Предпочтительным способом предоставления доступа к
произведённым изменениям является отправка этих изменений по
электронной почте или загрузка файлов на сервер с отправкой URL-адреса
по электронной почте. Если количество изменений незначительно
(например, изменения в файле Makefile) достаточно будет отправить по
электронной почте файл построчного сравнения. Изменения или URL-адреса
должны быть отправлены на адрес электронной почты maintainer@vim.org
IV) Не допускается удаление настоящей лицензия из дистрибутива исходного
кода программы Vim, его отдельных частей или изменённой версии.
Допускается использование настоящей лицензию для предыдущих изменённых
выпусков программы Vim, взамен тех лицензий, с которыми они
распространялись.
=== конец лицензии ===
Примечание.
- Если вам нравится программа Vim, дочитайте до конца и подумайте над
оказанием помощи нуждающимся детям в Уганде.
- При наличии желания поддержать дальнейшую разработку программы Vim,
рассмотрите возможность оказания финансовой поддержки (см. раздел
|sponsor|). В любом случае деньги отправляются в Уганду.
- Ричард Столлман (Richard Stallman) подтвердил, что лицензия Vim совместима
с лицензией GNU GPL. С момента его последней проверки были внесены
незначительные изменения, но они не должны оказать на это никакого влияния.
- Если сборка программы Vim осуществляется с использованием библиотеки, на
которую распространяется лицензия GNU GPL, дальнейшее распространение
программы может осуществляться только на условиях лицензии GNU GPL. Даже
если в саму программу Vim не было внесено никаких изменений.
- Если были внесены изменения, на которые распространяется лицензия GNU GPL,
все дальнейшие изменения также должны добавляться на условиях лицензии
GNU GPL или другой совместимой лицензии.
- При распространении изменённой версии программы Vim, своё имя и контактную
информацию можно добавлять с помощью аргумента конфигурации
"--with-modified-by" или директивы define MODIFIED_BY.
==============================================================================
Детский центр в Кибаале *kcc* *Kibaale* *charity*
Детский центр в Кибаале (Kibaale Children's Centre, KCC) находится в гор.
Кибаал. Это небольшой городок в восточной Африке на юге Уганды недалеко от
Танзании на территории округа Ракаи. Большая часть населения занимается
земледелием. Несмотря на бедность жителей, здесь обычно бывает достаточно
пищи. Однако по числу заболевших СПИД этот округ превосходит любую другую
точку планеты. Существует мнение, что именно отсюда началось распространение
этой смертельной болезни. По некоторым оценкам в прошлом от 10 до 30
процентов жителей Уганды были заражены ВИЧ. Высокая смертность родителей
стала причиной появления большого количества сирот. При населении округа
в 350 000 человек, 60 000 детей потеряло одного или обоих родителей. Однако
даже несомненные успехи в уменьшении масштабов распространения СПИД
не могут привести к полному исчезновению проблем.
Дети очень нуждаются в помощи. Организация KCC прилагает все усилия для
предоставления нуждающимся пищи, медицинской помощи и образования. Пища и
медицинская помощь предоставляются для поддержания здоровья, а образование
даёт возможность позаботиться о себе в будущем. Организация KCC работает на
базе христианской миссии, но помощь оказывается всем детям независимо от их
приверженности к какой-либо религии.
В данном случае ключом к решению проблем является возможность получения
образования. В последнее время при правлении президента Иди Амина (Idi Amin
Dada Oumee), а также в ходе последовавших гражданских войн, этой проблеме не
уделялось достаточно внимания. Однако сейчас после стабилизации деятельности
правительства детям и их родителям нужно учиться жить и заботиться самим о
себе, избегая при этом риска заражения инфекционными заболеваниями. Поэтому
наряду с оказанием помощи больным и голодающим, основной целью миссии
является предупреждение заболеваемости и прививание навыков по употреблению
здоровой пищи.
Большинство сирот проживают у близких родственников, воспитываются дядями
или старшими сёстрами. Вследствие больших размеров семей и низких доходов
(если таковые имеются), большим везением для ребёнка будет обеспечение
здоровым питанием. Про одежду, медицинскую помощь и школьное обучение
говорить уже не приходится. Для оказания помощи таким нуждающимся детям была
организована программа оказания финансовой помощи. Она позволяет взять
ребёнка на финансовое обеспечение. За несколько долларов в месяц организация
KCC обеспечит его необходимыми предметами обихода, будет следить за его
здоровьем, организует школьное обучение, а также сделает всё необходимое для
ребёнка и семьи, которая поддерживает его развитие.
Помимо непосредственного оказания помощи ребёнку, необходимо также проводить
комплексное развитие среды, в которой живут дети. С этой целью организация
KCC предоставляет школам помощь по улучшению методов обучения. На базе
центра имеется показательная школа, в которой организуется обучение для
учителей. Также проводится обучение медицинских работников, прививаются
санитарно-гигиенические нормы, пропагандируется постройка туалетов
надлежащей конструкции в местах проживания. Также лично мною была оказана
помощь в постройке производственного объекта по созданию железобетонных плит,
которые применяются при постройке туалетов и продаются по сниженным ценам.
На балансе проекта содержится клиника, в которой предоставляется медицинская
помощь детям и их семьям. В 2020 году было открыто родильное отделение и
пункт круглосуточного оказания медицинской помощи. При необходимости
осуществляется доставка в больницу. Проводятся программы иммунизации
населения, и предоставляется помощь при вспышках эпидемии (случаются вспышки
кори и холеры).
*donate*
С лета 1994 года до лета 1995 года мне целый год довелось провести в центре,
работая там в качестве волонтёра. Я помогал в расширении центра и трудился в
сфере водоснабжения и санитарно-гигиенического контроля. Там я убедился в
эффективности той помощи, которую оказывает организация KCC. По возвращении
в Нидерланды утвердилось желание продолжить поддержку организации KCC.
С этой целью я провожу сбор средств и организую программу оказания
финансовой помощи. Поэтому предлагаю вам рассмотреть одну из следующих
возможностей:
1. Предоставить финансовую помощь ребёнку в начальной школе — 17 евро в
месяц (или больше).
2. Предоставить финансовую помощь ребёнку в средней школе — 25 евро в месяц
(или больше).
3. Предоставить финансовую помощь клинике — любая сумма раз в месяц или
в квартал.
4. Единовременное пожертвование.
По сравнению с другими программами оказания финансовой поддержки детям,
указанные выше суммы выглядят весьма скромно. Причина столь небольшого
размера пожертвований заключается в том, что деньги направляются
непосредственно в центр. На администрацию тратиться менее 5 %, что стало
возможным благодаря малым размерам организации и привлечению волонтёров.
Если вы предполагаете взять на финансовое обеспечение ребёнка, то важно
понимать, что регулярное оказание помощи должно осуществляться на протяжении
не менее одного года.
Я понимаю, что вам нужны гарантии поступления средств по адресу. Прежде
всего, я готов предоставить свои личные гарантии, как автор программы Vim.
Я доверяю людям, работающим в этом центре, и знаю их лично. Кроме того,
финансирование и инспектирование центра осуществлялось совместно с такими
общеизвестными благотворительными организациями, как «World Vision»,
«Save the Children», а теперь центр находится на попечении организации
«Pacific Academy Outreach Society». Посещение центра осуществляется (за свой
собственный счёт) примерно раз в год для проверки хода выполнения текущих
задач. Я сам неоднократно посещал этот центр, начиная с 1993 года. Отчёты о
посещениях размещаются на веб-сайте организации ICCF.
Если у вас остались вопросы, можете задать их по электронной почте
<Bram@vim.org>.
Адрес центра:
Kibaale Children's Centre
p.o. box 1658
Masaka, Uganda, East Africa
Перечисление средств *iccf-donations*
Самая свежая информация доступна на веб-сайте организации ICCF!
См. раздел |iccf|.
США
Можно использовать методы, перечисленные ниже. Если
требуется отправить чек, то отправьте его нашему партнёру в
Канаде, адрес: https://www.kuwasha.net/
Канада
Свяжитесь с командой Kuwasha в гор. Сарри, Канада. Они
могут оказать содействие благотворителям из Канады для
помощи детям в гор. Кибаале. Команда Kuwasha переводит 100%
средств, поступивших в пользу проекта в Уганде.
Единовременное пожертвование может быть отправлено им
напрямую.
На их веб-сайте также можно ознакомиться с информацией по
оказанию финансовой поддержки https://www.kuwasha.net/
При отправке пожертвований через Kuwasha вы получите
налоговое уведомление, которое можно будет подать вместе с
налоговой декларацией.
Нидерланды
Перевод на счёт «Stichting ICCF Holland», Amersfoort. Можно
будет получить налоговый вычет, если вы проживаете в
Нидерландах. Банк ING, IBAN: NL95 INGB 0004 5487 74
Германия
Можно сделать пожертвование, дающее право на налоговый
вычет. Ознакомьтесь с последней информацией на веб-сайте
организации ICCF
https://iccf-holland.org/germany.html
Европа
Банковский перевод. См. далее «Другие варианты»,
где указан код Swift и номер IBAN.
Любые другие платёжные методы также должны работать.
Проконсультируйтесь по вопросу отправки средств на
благотворительные цели.
Банковская карта
Можно воспользоваться платёжной системой PayPal для
отправки денег с банковской карты. Это наиболее
распространённая и чрезвычайно простая в использовании
платёжная система на основе сети Интернет. Больше информации
можно найти по адресу
https://www.paypal.com/en_US/mrb/pal=XAC62PML3GF8Q
Адрес электронной почты для обсуждения вопросов по
отправке средств
Bram@iccf-holland.org
Другие варианты
Средства можно отправить на указанный ниже счёт.
Банк ING. IBAN: NL95 INGB 0004 5487 74
Код SWIFT: INGBNL2A
на имя «stichting ICCF Holland», Amersfoort
Чеки не принимаются.
=============================================================================
© Казорин Сергей, перевод на русский язык, 2022, <kazorin@basealt.ru>
© Restorer, редакторская правка, 2024, <restorer@mail2k.ru>
vim:tw=78:ts=8:noet:ft=help:norl:
+8 -1
View File
@@ -1,4 +1,4 @@
*usr_02.txt* For Vim version 9.1. Last change: 2024 Oct 05
*usr_02.txt* For Vim version 9.1. Last change: 2025 Feb 01
VIM USER MANUAL - by Bram Moolenaar
@@ -694,6 +694,13 @@ Summary: *help-summary* >
:help E128
< takes you to the |:function| command
27) Documentation for packages distributed with Vim have the form
package-<name>. So >
:help package-comment
<
will bring you to the help section for the included comment plugin and how
to enable it.
==============================================================================
+5 -5
View File
@@ -1,4 +1,4 @@
*usr_05.txt* For Vim version 9.1. Last change: 2024 Oct 05
*usr_05.txt* For Vim version 9.1. Last change: 2025 Jan 11
VIM USER MANUAL - by Bram Moolenaar
@@ -392,7 +392,7 @@ The ":map" command (with no arguments) lists your current mappings. At
least the ones for Normal mode. More about mappings in section |40.1|.
==============================================================================
*05.5* Adding a package *add-package* *matchit-install*
*05.5* Adding a package *add-package* *matchit-install* *package-matchit*
A package is a set of files that you can add to Vim. There are two kinds of
packages: optional and automatically loaded on startup.
@@ -427,7 +427,7 @@ an archive or as a repository. For an archive you can follow these steps:
Here "fancytext" is the name of the package, it can be anything
else.
Adding the editorconfig package *editorconfig-install*
Adding the editorconfig package *editorconfig-install* *package-editorconfig*
Similar to the matchit package, to load the distributed editorconfig plugin
when Vim starts, add the following line to your vimrc file: >
@@ -437,7 +437,7 @@ After restarting your Vim, the plugin is active and you can read about it at: >
:h editorconfig.txt
Adding comment package *comment-install*
Adding comment package *comment-install* *package-comment*
Load the plugin with this command: >
packadd comment
@@ -450,7 +450,7 @@ the package loaded. Once the package is loaded, read about it at: >
:h comment.txt
Adding nohlsearch package *nohlsearch-install*
Adding nohlsearch package *nohlsearch-install* *package-nohlsearch*
Load the plugin with this command: >
packadd nohlsearch
+4 -4
View File
@@ -1,4 +1,4 @@
*usr_25.txt* For Vim version 9.1. Last change: 2016 Mar 28
*usr_25.txt* For Vim version 9.1. Last change: 2025 Feb 01
VIM USER MANUAL - by Bram Moolenaar
@@ -190,15 +190,15 @@ This results in the following:
story. ~
JUSTIFYING TEXT
JUSTIFYING TEXT *justify* *:Justify* *Justify()* *package-justify*
Vim has no built-in way of justifying text. However, there is a neat macro
package that does the job. To use this package, execute the following
command: >
command: >vim
:packadd justify
Or put this line in your |vimrc|: >
Or put this line in your |vimrc|: >vim
packadd! justify
+4 -1
View File
@@ -1,4 +1,4 @@
*usr_41.txt* For Vim version 9.1. Last change: 2025 Jan 02
*usr_41.txt* For Vim version 9.1. Last change: 2025 Feb 01
VIM USER MANUAL - by Bram Moolenaar
@@ -801,6 +801,9 @@ String manipulation: *string-functions*
trim() trim characters from a string
bindtextdomain() set message lookup translation base path
gettext() lookup message translation
ngettext() lookup single/plural message translation
str2blob() convert a list of strings into a blob
blob2str() convert a blob into a list of strings
List manipulation: *list-functions*
get() get an item without error for wrong index
+3 -4
View File
@@ -1,4 +1,4 @@
*various.txt* For Vim version 9.1. Last change: 2024 Dec 16
*various.txt* For Vim version 9.1. Last change: 2025 Feb 13
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -768,9 +768,8 @@ K Run a program to lookup the keyword under the
MS-Windows). "gs" stands for "goto sleep".
While sleeping the cursor is positioned in the text,
if at a visible position.
Also process the received netbeans messages. {only
available when compiled with the |+netbeans_intg|
feature}
Queued messages and timers (|+timers|) are processed
during the sleep as well.
*:sl!* *:sleep!*
:[N]sl[eep]! [N][m] Same as above, but hide the cursor.
+35 -17
View File
@@ -1,4 +1,4 @@
*version9.txt* For Vim version 9.1. Last change: 2025 Jan 02
*version9.txt* For Vim version 9.1. Last change: 2025 Feb 11
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -41551,6 +41551,8 @@ Add support for internal builtin functions with vim9 objects, see
Enum support for Vim9 script |:enum|
Support for protected _new() method
*new-other-9.2*
Other new features ~
------------------
@@ -41560,15 +41562,28 @@ Support for Wayland UI.
Support for the XDG Desktop Specification |xdg-base-dir|
Support highlighting the matched text for insert-mode completion and
command-line completion in |ins-completion-menu|.
Support highlighting the completion kind in |ins-completion-menu|, see
|complete-items|.
Support for translating messages in Vim script plugins using the |gettext()|
and |bindtextdomain()| functions.
Support highlighting the matched text and the completion kind for insert-mode
completion and command-line completion in |ins-completion-menu|, see
|complete-items|
Include the "linematch" algorithm for the 'diffopt' setting. This aligns
changes between buffers on similar lines improving the diff highlighting in
Vim
Adjusted default values ~
-----------------------
- the default 'history' option value has been increased to 200 and removed
from |defaults.vim|
- the default 'backspace' option for Vim has been set to "indent,eol,start"
and removed from |defaults.vim|
- the default fontsize for the GTK builds of Vim (Windows and Unix) has been
increased to 12pt to accomodate modern high-dpi monitors
- the default value of the 'keyprotocol' option has been updated and support
for the ghostty terminal emulator (using kitty protocol) has been added
*changed-9.2*
Changed~
-------
@@ -41609,22 +41624,21 @@ Changed~
- allow to pass local Vim script variables to python interpreter |py3eval()|
- |getwininfo()| now also returns the "leftcol" property for a window
- 'rulerformat' now supports the |stl-%!| item
- the default 'history' option value has been increased to 200 and removed
from |defaults.vim|
- the default 'backspace' option for Vim has been set to "indent,eol,start"
and removed from |defaults.vim|
- the completed word and completion type are provided when handling the
|CompleteDone| autocommand in the |v:event| dictionary
- the default fontsize for the GTK builds of Vim (Windows and Unix) has been
increased to 12pt to accomodate modern high-dpi monitors
- filetype detection now detects bash scripts as a separate "bash" filetype
instead of the "sh" filetype
- the default value of the 'keyprotocol' option has been updated by support
for the ghostty terminal emulator (using kitty protocol)
- |complete_info()| returns the list of matches shown in the poppu menu via
the "matches" key
- |v:stacktrace| The stack trace of the exception most recently caught and
not finished
- New option value for 'completeopt':
"nosort" - do not sort completion results
"preinsert" - highlight to be inserted values
- add |dist#vim9#Launch()| and |dist#vim9#Open()| to the |vim-script-library|
and decouple it from |netrw|
- new digraph "APPROACHES THE LIMIT" using ".="
- Add the optional {opts} |Dict| argument to |getchar()| to control: cursor
behaviour, return type and whether or not to simplify the returned key
- handle multi-line completion as expected
*added-9.2*
Added ~
@@ -41635,6 +41649,7 @@ Functions: ~
|base64_decode()| decode a base64 string into a blob
|base64_encode()| encode a blob into a base64 string
|blob2str()| convert a blob into a List of strings
|bindtextdomain()| set message lookup translation base path
|diff()| diff two Lists of strings
|filecopy()| copy a file {from} to {to}
@@ -41649,7 +41664,9 @@ Functions: ~
Channel or Blob variable
|matchbufline()| all the matches of a pattern in a buffer
|matchstrlist()| all the matches of a pattern in a List of strings
|ngettext()| lookup single/plural message translation
|popup_setbuf()| switch to a different buffer in a popup
|str2blob()| convert a List of strings into a blob
Autocommands: ~
@@ -41680,6 +41697,7 @@ Options: ~
'completeitemalign' Order of |complete-items| in Insert mode completion
popup
'eventignorewin' autocommand events that are ignored in a window
'findfunc' Vim function to obtain the results for a |:find|
command
'messagesopt' configure |:messages| and |hit-enter| prompt
+4 -3
View File
@@ -1,4 +1,4 @@
*vim9.txt* For Vim version 9.1. Last change: 2024 Dec 23
*vim9.txt* For Vim version 9.1. Last change: 2025 Jan 21
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1938,9 +1938,10 @@ Exporting an item can be written as: >
export def MyFunc() ...
export class MyClass ...
export interface MyClass ...
export enum MyEnum ...
< *E1043* *E1044*
As this suggests, only constants, variables, `:def` functions and classes can
be exported.
As this suggests, only constants, variables, `:def` functions, classes,
interfaces and enums can be exported.
*E1042*
`:export` can only be used in Vim9 script, at the script level.
+14 -22
View File
@@ -1,4 +1,4 @@
*vim9class.txt* For Vim version 9.1. Last change: 2024 Dec 29
*vim9class.txt* For Vim version 9.1. Last change: 2025 Feb 16
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -52,7 +52,6 @@ An interface is used to specify properties of an object:
The class hierarchy allows for single inheritance. Otherwise interfaces are
to be used where needed.
Class modeling ~
You can model classes any way you like. Keep in mind what you are building,
@@ -122,7 +121,6 @@ using the object name followed by a dot following by the member: >
A class name cannot be used as an expression. A class name cannot be used in
the left-hand-side of an assignment.
Object variable write access ~
*read-only-variable*
Now try to change an object variable directly: >
@@ -272,6 +270,9 @@ no need to call "super()" or "new()" on the parent.
When defining the new() method the return type should not be specified. It
always returns an object of the class.
The new() method can be made a protected method by using "_new()". This can
be used to support the singleton design pattern.
*E1386*
When invoking an object method, the method name should be preceded by the
object variable name. An object method cannot be invoked using the class
@@ -623,13 +624,15 @@ once. They can appear in any order, although this order is recommended: >
extends ClassName
implements InterfaceName, OtherInterface
specifies SomeInterface
< *E1355* *E1369*
<
The "specifies" feature is currently not implemented.
*E1355* *E1369*
Each variable and method name can be used only once. It is not possible to
define a method with the same name and different type of arguments. It is not
possible to use a public and protected member variable with the same name. An
object variable name used in a super class cannot be reused in a child class.
Object Variable Initialization ~
If the type of a variable is not explicitly specified in a class, then it is
@@ -686,13 +689,12 @@ A class can implement one or more interfaces. The "implements" keyword can
only appear once *E1350* . Multiple interfaces can be specified, separated by
commas. Each interface name can appear only once. *E1351*
A class defining an interface ~
*specifies*
A class can declare its interface, the object variables and methods, with a
named interface. This avoids the need for separately specifying the
interface, which is often done in many languages, especially Java.
TODO: This is currently not implemented.
Items in a class ~
*E1318* *E1325* *E1388*
@@ -733,25 +735,25 @@ Some of the builtin functions like |empty()|, |len()| and |string()| can be
used with an object. An object can implement a method with the same name as
these builtin functions to return an object-specific value.
*E1412*
*E1412*
The following builtin methods are supported:
*object-empty()*
*object-empty()*
empty() Invoked by the |empty()| function to check whether an object is
empty. If this method is missing, then true is returned. This
method should not accept any arguments and must return a boolean.
*object-len()*
*object-len()*
len() Invoked by the |len()| function to return the length of an
object. If this method is missing in the class, then an error is
given and zero is returned. This method should not accept any
arguments and must return a number.
*object-string()*
*object-string()*
string() Invoked by the |string()| function to get a textual
representation of an object. Also used by the |:echo| command
for an object. If this method is missing in the class, then a
built-in default textual representation is used. This method
should not accept any arguments and must return a string.
*E1413*
*E1413*
A class method cannot be used as a builtin method.
Defining an interface ~
@@ -783,7 +785,6 @@ An interface can only be defined in a |Vim9| script file. *E1342*
An interface cannot "implement" another interface but it can "extend" another
interface. *E1381*
null object ~
When a variable is declared to have the type of an object, but it is not
@@ -792,7 +793,6 @@ does not know what class was supposed to be used. Vim then cannot check if
a variable name is correct and you will get a "Using a null object" error,
even when the variable name is invalid. *E1360* *E1362*
Default constructor ~
*default-constructor*
In case you define a class without a new() method, one will be automatically
@@ -1115,7 +1115,6 @@ For |Vim9| script using the same method name for all constructors seemed like
the right choice, and by calling it new() the relation between the caller and
the method being called is obvious.
No overloading of the constructor ~
In Vim script, both legacy and |Vim9| script, there is no overloading of
@@ -1136,7 +1135,6 @@ That way multiple constructors with different arguments are possible, while it
is very easy to see which constructor is being used. And the type of
arguments can be properly checked.
No overloading of methods ~
Same reasoning as for the constructor: It is often not obvious what type
@@ -1145,7 +1143,6 @@ actually being called. Better just give the methods a different name, then
type checking will make sure it works as you intended. This rules out
polymorphism, which we don't really need anyway.
Single inheritance and interfaces ~
Some languages support multiple inheritance. Although that can be useful in
@@ -1161,7 +1158,6 @@ it will be checked if that change was also changed. The mechanism to assume a
class implements an interface just because the methods happen to match is
brittle and leads to obscure problems, let's not do that.
Using "this.variable" everywhere ~
The object variables in various programming languages can often be accessed in
@@ -1180,7 +1176,6 @@ variables. Simple and consistent. When looking at the code inside a class
it's also directly clear which variable references are object variables and
which aren't.
Using class variables ~
Using "static variable" to declare a class variable is very common, nothing
@@ -1194,7 +1189,6 @@ the class. This has two problems: The class name can be rather long, taking
up quite a bit of space, and when the class is renamed all these places need
to be changed too.
Declaring object and class variables ~
The main choice is whether to use "var" as with variable declarations.
@@ -1248,7 +1242,6 @@ function declaration syntax for class/object variables and methods. Vim9 also
reuses the general function declaration syntax for methods. So, for the sake
of consistency, we require "var" in these declarations.
Using "ClassName.new()" to construct an object ~
Many languages use the "new" operator to create an object, which is actually
@@ -1312,7 +1305,6 @@ An alternative would have been using the "protected" keyword, just like
"public" changes the access in the other direction. Well, that's just to
reduce the number of keywords.
No private object variables ~
Some languages provide several ways to control access to object variables.
+16 -5
View File
@@ -1,7 +1,7 @@
" Vim support file to detect file types
"
" Maintainer: The Vim Project <https://github.com/vim/vim>
" Last Change: 2025 Jan 08
" Last Change: 2025 Feb 08
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
" Listen very carefully, I will say this only once
@@ -951,6 +951,9 @@ au BufNewFile,BufRead */.config/git/attributes setf gitattributes
au BufNewFile,BufRead */etc/gitattributes setf gitattributes
au BufNewFile,BufRead .gitignore,*.git/info/exclude setf gitignore
au BufNewFile,BufRead */.config/git/ignore,*.prettierignore setf gitignore
au BufNewFile,BufRead */.config/fd/ignore,.fdignore,.ignore setf gitignore
au BufNewFile,BufRead .rgignore,.dockerignore setf gitignore
au BufNewFile,BufRead .npmignore,.vscodeignore setf gitignore
au BufNewFile,BufRead git-rebase-todo setf gitrebase
au BufRead,BufNewFile .gitsendemail.msg.?????? setf gitsendemail
au BufNewFile,BufRead *.git/*
@@ -1268,11 +1271,13 @@ au BufNewFile,BufRead *.ipynb,*.jupyterlab-settings setf json
au BufNewFile,BufRead *.sublime-project,*.sublime-settings,*.sublime-workspace setf json
" Other files that look like json
au BufNewFile,BufRead .prettierrc,.firebaserc,.stylelintrc,.lintstagedrc,flake.lock,deno.lock setf json
au BufNewFile,BufRead .prettierrc,.firebaserc,.stylelintrc,.lintstagedrc,flake.lock,deno.lock,.swcrc setf json
" JSONC (JSON with comments)
au BufNewFile,BufRead *.jsonc,.babelrc,.eslintrc,.jsfmtrc,bun.lock setf jsonc
au BufNewFile,BufRead .jshintrc,.jscsrc,.vsconfig,.hintrc,.swrc,[jt]sconfig*.json setf jsonc
" Visual Studio Code settings
au BufRead,BufNewFile ~/*/{Code,VSCodium}/User/*.json setf jsonc
" JSON
au BufNewFile,BufRead *.json,*.jsonp,*.webmanifest setf json
@@ -1287,7 +1292,7 @@ au BufNewFile,BufRead *.jsonnet,*.libsonnet setf jsonnet
au BufNewFile,BufRead *.jl setf julia
" Just
au BufNewFile,BufRead [jJ]ustfile,.justfile,*.just setf just
au BufNewFile,BufRead \c{,*.}justfile,\c*.just setf just
" KAREL
au BufNewFile,BufRead *.kl setf karel
@@ -1722,6 +1727,9 @@ au BufNewFile,BufRead *.nse setf lua
" NSIS
au BufNewFile,BufRead *.nsi,*.nsh setf nsis
" N-Triples
au BufNewFile,BufRead *.nt setf ntriples
" Nu
au BufNewFile,BufRead *.nu setf nu
@@ -2204,7 +2212,7 @@ au BufNewFile,BufRead *.sass setf sass
au BufNewFile,BufRead *.sa call dist#ft#FTsa()
" Scala
au BufNewFile,BufRead *.scala setf scala
au BufNewFile,BufRead *.scala,*.mill setf scala
" SBT - Scala Build Tool
au BufNewFile,BufRead *.sbt setf sbt
@@ -2318,6 +2326,9 @@ au BufNewFile,BufRead .tcshrc,*.tcsh,tcsh.tcshrc,tcsh.login call dist#ft#SetFile
" (patterns ending in a start further below)
au BufNewFile,BufRead .login,.cshrc,csh.cshrc,csh.login,csh.logout,*.csh,.alias call dist#ft#CSH()
" TriG
au BufNewFile,BufRead *.trig setf trig
" Zig and Zig Object Notation (ZON)
au BufNewFile,BufRead *.zig,*.zon setf zig
@@ -2635,7 +2646,7 @@ au BufNewFile,BufRead *.toml setf toml
au BufNewFile,BufRead *.tpp setf tpp
" TRACE32 Script Language
au BufNewFile,BufRead *.cmm,*.t32 setf trace32
au BufNewFile,BufRead *.cmm,*.cmmt,*.t32 setf trace32
" Treetop
au BufRead,BufNewFile *.treetop setf treetop
+1 -1
View File
@@ -44,7 +44,7 @@ endif
" When the matchit plugin is loaded, this makes the % command skip parens and
" braces in comments properly.
if !exists("b:match_words")
let b:match_words = '^\s*#\s*if\(\|def\|ndef\)\>:^\s*#\s*elif\>:^\s*#\s*else\>:^\s*#\s*endif\>'
let b:match_words = '^\s*#\s*if\%(\|def\|ndef\)\>:^\s*#\s*elif\%(\|def\|ndef\)\>:^\s*#\s*else\>:^\s*#\s*endif\>'
let b:match_skip = 's:comment\|string\|character\|special'
let b:undo_ftplugin ..= " | unlet! b:match_skip b:match_words"
endif
+11
View File
@@ -0,0 +1,11 @@
" Vim filetype plugin
" Language: dnsmasq
" Maintainer: dringsim <dringsim@qq.com>
" Last Change: 2025-02-18
if exists('b:did_ftplugin')
finish
endif
" Behaves mostly just like cfg
runtime! ftplugin/cfg.vim
+3 -2
View File
@@ -1,7 +1,8 @@
" Vim filetype plugin file
" Language: Configuration File (ini file) for MS-DOS/MS Windows
" Maintainer: This runtime file is looking for a new maintainer.
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-09
" Latest Revision: 2025 Feb 20
if exists("b:did_ftplugin")
finish
@@ -13,7 +14,7 @@ set cpo&vim
let b:undo_ftplugin = "setl com< cms< fo<"
setlocal comments=:; commentstring=;\ %s formatoptions-=t formatoptions+=croql
setlocal comments=:;,:# commentstring=;\ %s formatoptions-=t formatoptions+=croql
let &cpo = s:cpo_save
unlet s:cpo_save
+4 -2
View File
@@ -1,7 +1,7 @@
" Vim filetype plugin
" Language: EditorConfig
" Maintainer: Riley Bruins <ribru17@gmail.com>
" Last Change: 2024 Jul 06
" Last Change: 2025 Jan 10
if exists('b:did_ftplugin')
finish
@@ -10,4 +10,6 @@ let b:did_ftplugin = 1
setl comments=:#,:; commentstring=#\ %s
let b:undo_ftplugin = 'setl com< cms<'
setl omnifunc=syntaxcomplete#Complete
let b:undo_ftplugin = 'setl com< cms< ofu<'
+14
View File
@@ -0,0 +1,14 @@
" Vim filetype plugin
" Language: exports(5) configuration file
" Maintainer: Matt Perry <matt@mattperry.com>
" Last Change: 2025 Feb 13
if exists('b:did_ftplugin')
finish
endif
let b:did_ftplugin = 1
setlocal comments=:# commentstring=#\ %s
setlocal formatoptions-=t formatoptions+=croql
let b:undo_ftplugin = 'setl com< cms< fo<'
+17
View File
@@ -0,0 +1,17 @@
" Vim ftplugin file
" Language: Justfile
" Maintainer: Peter Benjamin <@pbnj>
" Last Change: 2025 Jan 19
" Credits: The original author, Noah Bogart <https://github.com/NoahTheDuke/vim-just/>
" Only do this when not done yet for this buffer
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1
setlocal iskeyword+=-
setlocal comments=n:#
setlocal commentstring=#\ %s
let b:undo_ftplugin = "setlocal iskeyword< comments< commentstring<"
+2 -1
View File
@@ -2,7 +2,7 @@
" Vim syntax file
" Maintainer: Christian Brabandt <cb@256bit.org>
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2024-04-12
" Latest Revision: 2025 Jan 20
" License: Vim (see :h license)
" Repository: https://github.com/chrisbra/vim-kconfig
@@ -19,4 +19,5 @@ setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql
" For matchit.vim
if exists("loaded_matchit")
let b:match_words = '^\<menu\>:\<endmenu\>,^\<if\>:\<endif\>,^\<choice\>:\<endchoice\>'
let b:undo_ftplugin .= "| unlet! b:match_words"
endif
+5 -2
View File
@@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: Mail
" Maintainer: The Vim Project <https://github.com/vim/vim>
" Last Change: 2023 Aug 10
" Last Change: 2025 Feb 20
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
" Only do this when not done yet for this buffer
@@ -10,7 +10,7 @@ if exists("b:did_ftplugin")
endif
let b:did_ftplugin = 1
let b:undo_ftplugin = "setl modeline< tw< fo< comments<"
let b:undo_ftplugin = "setl modeline< tw< fo< comments< commentstring<"
" Don't use modelines in e-mail messages, avoid trojan horses and nasty
" "jokes" (e.g., setting 'textwidth' to 5).
@@ -24,6 +24,9 @@ endif
" Set 'formatoptions' to break text lines and keep the comment leader ">".
setlocal fo+=tcql
" Set commentstring to quoting sign ">" so comment shortcuts can be used to
" edit quoted parts of mail
setlocal commentstring=>\ %s
" Add n:> to 'comments, in case it was removed elsewhere
setlocal comments+=n:>
+17 -2
View File
@@ -2,8 +2,11 @@
" Language: roff(7)
" Maintainer: Aman Verma
" Homepage: https://github.com/a-vrma/vim-nroff-ftplugin
" Document: https://www.gnu.org/software/groff/manual/groff.html
" Previous Maintainer: Chris Spiegel <cspiegel@gmail.com>
" 2024 May 24 by Riley Bruins <ribru17@gmail.com> ('commentstring')
" Last Changes:
" 2024 May 24 by Riley Bruins <ribru17@gmail.com> ('commentstring' #14843)
" 2025 Feb 12 by Wu, Zhenyu <wuzhenyu@ustc.edu> (matchit configuration #16619)
if exists("b:did_ftplugin")
finish
@@ -13,5 +16,17 @@ let b:did_ftplugin = 1
setlocal commentstring=.\\\"\ %s
setlocal comments=:.\\\"
setlocal sections+=Sh
setlocal define=.\s*de
let b:undo_ftplugin = 'setlocal commentstring< comments< sections<'
let b:undo_ftplugin = 'setlocal commentstring< comments< sections< define<'
if exists('loaded_matchit')
let b:match_words = '^\.\s*ie\>:^\.\s*el\>'
\ . ',^\.\s*LB\>:^\.\s*LI\>:^\.\s*LE\>'
\ . ',^\.\s*TS\>:^\.\s*TE\>'
\ . ',^\.\s*PS\>:^\.\s*P[EF]\>'
\ . ',^\.\s*EQ\>:^\.\s*EN\>'
\ . ',^\.\s*[\>:^\.\s*]\>'
\ . ',^\.\s*FS\>:^\.\s*FE\>'
let b:undo_ftplugin .= "| unlet b:match_words"
endif
+14
View File
@@ -0,0 +1,14 @@
" Vim filetype plugin
" Language: smb.conf(5) configuration file
" Maintainer: Matt Perry <matt@mattperry.com>
" Last Change: 2025 Feb 13
if exists('b:did_ftplugin')
finish
endif
let b:did_ftplugin = 1
setlocal comments=:;,:# commentstring=#\ %s
setlocal formatoptions-=t formatoptions+=croql
let b:undo_ftplugin = 'setl com< cms< fo<'
+51
View File
@@ -0,0 +1,51 @@
" Vim indent file
" Language: Justfile
" Maintainer: Peter Benjamin <@pbnj>
" Last Change: 2025 Jan 19
" Credits: The original author, Noah Bogart <https://github.com/NoahTheDuke/vim-just/>
" Only load this indent file when no other was loaded yet.
if exists("b:did_indent")
finish
endif
let b:did_indent = 1
setlocal indentexpr=GetJustfileIndent()
setlocal indentkeys=0},0),!^F,o,O,0=''',0=\"\"\"
let b:undo_indent = "setlocal indentexpr< indentkeys<"
if exists("*GetJustfileIndent")
finish
endif
function GetJustfileIndent()
if v:lnum < 2
return 0
endif
let prev_line = getline(v:lnum - 1)
let last_indent = indent(v:lnum - 1)
if getline(v:lnum) =~ "\\v^\\s+%([})]|'''$|\"\"\"$)"
return last_indent - shiftwidth()
elseif prev_line =~ '\V#'
return last_indent
elseif prev_line =~ "\\v%([:{(]|^.*\\S.*%([^']'''|[^\"]\"\"\"))\\s*$"
return last_indent + shiftwidth()
elseif prev_line =~ '\\$'
if v:lnum == 2 || getline(v:lnum - 2) !~ '\\$'
if prev_line =~ '\v:\=@!'
return last_indent + shiftwidth() + shiftwidth()
else
return last_indent + shiftwidth()
endif
endif
elseif v:lnum > 2 && getline(v:lnum - 2) =~ '\\$'
return last_indent - shiftwidth()
elseif prev_line =~ '\v:\s*%(\h|\()' && prev_line !~ '\V:='
return last_indent + shiftwidth()
endif
return last_indent
endfunction
-780
View File
@@ -113,284 +113,12 @@ echo 0
end
" END_INDENT
" START_INDENT
var result = Func(
arg1,
arg2
)
" END_INDENT
" START_INDENT
var result = Func(arg1,
arg2)
" END_INDENT
" START_INDENT
filter(list, (k, v) =>
v > 0)
" END_INDENT
" START_INDENT
filter(list, (k, v) => {
const x = get(list, k, 0)
return x > 0
})
" END_INDENT
" START_INDENT
if x > 0
filter(list, (k, v) => {
const x = get(list, k, 1)
return x > 0
})
endif
" END_INDENT
" START_INDENT
{
var temp = 'temp'
}
" END_INDENT
" START_INDENT
var text = lead
.. middle
.. end
" END_INDENT
" START_INDENT
var text = lead ..
middle ..
end
" END_INDENT
" START_INDENT
var total = start +
end -
correction
" END_INDENT
" START_INDENT
var result = start
:+ print
" END_INDENT
" START_INDENT
var result = positive
? PosFunc(arg)
: NegFunc(arg)
" END_INDENT
" START_INDENT
var result = GetBuilder()
->BuilderSetWidth(333)
->BuilderSetHeight(777)
->BuilderBuild()
" END_INDENT
" START_INDENT
var result = MyDict
.member
" END_INDENT
" START_INDENT
autocmd BufNewFile *.match if condition
| echo 'match'
| endif
" END_INDENT
" START_INDENT
set cpo+=C
var lines =<< trim END
| this works
END
set cpo-=C
" END_INDENT
" START_INDENT
syn region Text
\ start='foo'
#\ comment
\ end='bar'
" END_INDENT
" START_INDENT
au CursorHold * echom 'BEFORE bar'
#\ some comment
| echom 'AFTER bar'
" END_INDENT
" START_INDENT
def MyFunc(text: string,
separator = '-'
): string
enddef
" END_INDENT
" START_INDENT
def MyFunc(
text: string,
separator = '-'
): string
enddef
" END_INDENT
" START_INDENT
[var1, var2] =
Func()
" END_INDENT
" START_INDENT
const list = ['one',
'two']
" END_INDENT
" START_INDENT
const list = [
'one',
'two',
]
" END_INDENT
" START_INDENT
const dict = {one: 1,
two: 2
}
" END_INDENT
" START_INDENT
const dict = {
one: 1,
two: 2
}
" END_INDENT
" START_INDENT
if true
const dict =
{
one: 1,
two: 2
}
endif
" END_INDENT
" START_INDENT
def Func()
return {
one: 1
}
enddef
" END_INDENT
" START_INDENT
echo {
a: 0,
# b
# c
}
" END_INDENT
" START_INDENT
echo search(
# comment
'1'
.. '2'
)
" END_INDENT
" START_INDENT
if true
var v = ( # trailing "(" starts line continuation
3 + 4 # nothing special
) # end of expression indicates continued line
var x: number # needs to align with previous "var"
endif
" END_INDENT
" START_INDENT
def Func() # {{{
# comment
if true
return
endif
enddef
" END_INDENT
" START_INDENT
echo {
key:
'value',
}
" END_INDENT
" START_INDENT
var id = time
->timer_start((_) => {
n = 0
})
" END_INDENT
" START_INDENT
augroup Name
autocmd!
augroup END
" END_INDENT
" START_INDENT
var n =
# comment
1
+ 2
var s = ''
" END_INDENT
" START_INDENT
var keys = {
J: 'j',
"\<Home>": '1G',
"\<End>": 'G',
z: 'zz'
}
" END_INDENT
" START_INDENT
export def Func(
n: number,
s: string,
...l: list<bool>
)
enddef
" END_INDENT
" START_INDENT
var heredoc =<< trim ENDD
var nested_heredoc =<< trim END
END
ENDD
" END_INDENT
" START_INDENT
if true
else " comment
endif
" END_INDENT
" START_INDENT
if true | echo 'one' | endif
if true | echo 'two' | endif
if true | echo 'three' | endif
" END_INDENT
" START_INDENT
if true
:'<-1 mark <
else
echo ''
endif
" END_INDENT
" START_INDENT
substitute/pat /rep /
echo
@@ -404,92 +132,12 @@ echo 2
endtry
" END_INDENT
" START_INDENT
def Func()
Cmd %
enddef
" END_INDENT
" START_INDENT
if end == 'xxx' || end == 'yyy'
echo
endif
" END_INDENT
" START_INDENT
if true
popup_move(id, {col: 1,
line: 2})
endif
setwinvar(id, 'name', 3)
" END_INDENT
" START_INDENT
var d = [
{a: 'x',
b: 'y'},
FuncA(),
FuncB(),
]
" END_INDENT
" START_INDENT
var ll = [[
1,
2,
3], [
4,
5,
6], [
7,
8,
9]]
" END_INDENT
" START_INDENT
var ld = [{
a: 'xxx',
b: 'yyy'}, {
c: 'xxx',
d: 'yyy'}, {
e: 'xxx',
f: 'yyy'}, {
}]
" END_INDENT
" START_INDENT
var d = {
a: {
b: {
c: [{
d: 'e',
f: 'g',
h: 'i'
}],
j: 'k',
},
},
}
" END_INDENT
" START_INDENT
if true
var end: any
if true
end = 0
elseif true
echo
endif
endif
" END_INDENT
" START_INDENT
if true
var d = {
end: 0}
endif
" END_INDENT
" START_INDENT
nunmap <buffer> (
nunmap <buffer> )
@@ -499,224 +147,6 @@ silent! xunmap i{
silent! xunmap a{
" END_INDENT
" START_INDENT
def Func(
s: string,
n = 1,
m = 2
)
enddef
" END_INDENT
" START_INDENT
var h =<< END
text
END
def Func()
echo
enddef
" END_INDENT
" START_INDENT
def Func()
var h =<< END
text
END
echo 'test'
enddef
" END_INDENT
" START_INDENT
def Foo()
lcd -
enddef
def Bar()
echo
enddef
" END_INDENT
" START_INDENT
if true
n = Func(1, 2,
3)
endif
" END_INDENT
" START_INDENT
def Func(s: string,
n: number): bool
if true
return false
endif
enddef
" END_INDENT
" START_INDENT
def Func(
n: number)
#
echo
enddef
" END_INDENT
" START_INDENT
" INDENT_AT this-line
def Func(
n: number)
#
echo # this-line
enddef
" END_INDENT
" START_INDENT
if true
if true
normal! ==
endif
endif
" END_INDENT
" START_INDENT
var d = {
a: () => true,
b: () => true
&& true
&& Foo(),
c: () => Bar(),
e: () => Baz(),
}
" END_INDENT
" START_INDENT
def Select(Cont: func(func(any)), Pred: func(any): bool): func(func(any))
return (Emit: func(any)) => {
Cont((t: any) => {
if Pred(t)
Emit(t)
endif
})
}
enddef
" END_INDENT
" START_INDENT
" INDENT_EXE let g:vim_indent = {'more_in_bracket_block': v:true}
def Select(Cont: func(func(any)), Pred: func(any): bool): func(func(any))
return (Emit: func(any)) => {
Cont((t: any) => {
if Pred(t)
Emit(t)
endif
})
}
enddef
" END_INDENT
" START_INDENT
" INDENT_EXE unlet! g:vim_indent
" END_INDENT
" START_INDENT
g:lightline = {
'active': {
'left': [ [ 'mode', 'paste' ], [ 'readonly', 'relativepath', 'modified' ] ],
},
'inactive': {
'left': [ [ 'readonly', 'relativepath', 'modified' ] ],
}
}
" END_INDENT
" START_INDENT
if getline(1, 10)
->map((_, v: string): number => strcharlen(v))
->max() > 1'000
&l:breakindent = false
&l:linebreak = false
else
&l:breakindent = true
&l:linebreak = true
endif
" END_INDENT
" START_INDENT
var ext2cmd: dict<string> = {
doc: $'antiword {fname}',
docx: $'pandoc --from=docx --to=markdown {fname}',
epub: $'pandoc --from=epub --to=markdown {fname}',
odp: $'odt2txt {fname}',
odt: $'odt2txt {fname}',
pdf: $'pdftotext -nopgbrk -layout -q -eol unix {fname} -',
rtf: 'unrtf --text',
}
" END_INDENT
" START_INDENT
const ptybuf: number = term_start(&shell, {
hidden: true,
exit_cb: (_, _) => {
if true
close
else
help
endif
}
})
" END_INDENT
" START_INDENT
var d = {
a: 0,
# a ' quote {{{
#}}}
b: 0,
}
" END_INDENT
" START_INDENT
echo printf('%s () %s',
1,
2
)
" END_INDENT
" START_INDENT
prop_add(1, col('.'), {
length: 2,
type: 'test'
})
" END_INDENT
" START_INDENT
echo (() => " string starting with space")()
echo
" END_INDENT
" START_INDENT
var variables = deepcopy(g:)
->filter((k: string, _): bool =>
k =~ '\c\V' .. keyword->escape('\')
&& k !~ '\%(loaded\|did_plugin_\)')
->items()
->map((_, v): string => v[0] .. ' = ' .. string(v[1]))
new
" END_INDENT
" START_INDENT
var d = freq
->map((_, v) =>
v * (
1
+ 2
))
for item in d
->items()
->sort((a, b) => b[1] - a[1])
echo
endfor
" END_INDENT
" START_INDENT
make_job = job_start([&shell, &shellcmdflag, make_cmd], {
callback: function(MakeProcessOutput, [qfid]),
@@ -726,109 +156,16 @@ in_io: 'null'
})
" END_INDENT
" START_INDENT
var matching_abbrev: list<dict<string>> = copy(ABBREV)
->filter((_, v: dict<string>): bool =>
stridx(v.lhs, word_to_complete) == 0)
->map((_, v: dict<string>) => ({
word: v.lhs,
menu: AbbrevRhs(v.rhs)->stridx('expand_') >= 0
? AbbrevRhs(v.rhs)->matchstr('.*,\s*''\zs.*\ze'')')
: AbbrevRhs(v.rhs)
}))
" END_INDENT
" START_INDENT
def Func()
if true
vimgrep /^\C\s*\%(fu\%[nction]\|def\)\s\+/ file
endif
enddef
" END_INDENT
" START_INDENT
setlocal iskeyword+=[
cword = expand('<cword>')
" END_INDENT
" START_INDENT
silent if true
echo
endif
" END_INDENT
" START_INDENT
def Func()
sort :^.*[\/]:
enddef
" END_INDENT
" START_INDENT
def Func()
d = {
}
hd =<< trim END
['
]'
END
enddef
" END_INDENT
" START_INDENT
def Func()
if true
var hd =<< trim END
if get(b:, 'current_syntax', '')
endif
END
elseif true
echo
endif
enddef
" END_INDENT
" START_INDENT
# test for control-flow keyword followed by commented fold marker {{{
if true
echo
endif #}}}
" END_INDENT
" START_INDENT
if winsz == 0|let winsz= ""|endif
exe "noswapfile ".winsz."wincmd s"
" END_INDENT
" START_INDENT
if true
if true
windo if true | echo | endif
augroup Name
autocmd WinLeave * if true | eval 1 + 2 | endif
augroup END
endif
endif
" END_INDENT
" START_INDENT
if true
echo ' =<< trim END'
->len()
endif
" END_INDENT
" START_INDENT
function Func()
if true
if true
if true | echo com | endif
if true | echo com | endif
endif
else
endif
endfunction
" END_INDENT
" START_INDENT
function Func()
if v:true
@@ -839,128 +176,11 @@ endif
endfunction
" END_INDENT
" START_INDENT
var matchpairs: string = &matchpairs
var pairs: dict<list<string>>
for [opening: string, closing: string]
in matchpairs
->split(',')
->map((_, v: string): list<string> => split(v, ':'))
pairs[opening] = [escape(opening, '[]'), escape(closing, '[]'), 'nW', 'w$']
pairs[closing] = [escape(opening, '[]'), escape(closing, '[]'), 'bnW', 'w0']
endfor
" END_INDENT
" START_INDENT
{
echo []
+ []
+ [{a: 1,
b: 2}]
}
" END_INDENT
" START_INDENT
silent! argdel *
edit file
" END_INDENT
" START_INDENT
def Foo()
Bar(1,
[]->filter((_, v) => {
return true
}),
() => {
echo
})
enddef
" END_INDENT
" START_INDENT
echo {
k: () => {
if true
echo
popup_setoptions(id,
{title: 'title'})
endif
}
}
" END_INDENT
" START_INDENT
if true
elseif
endif
" END_INDENT
" START_INDENT
if (
true)
&& true
echo
endif
" END_INDENT
" START_INDENT
abstract class Shape
var color = Color.Black
var thickness = 10
endclass
" END_INDENT
" START_INDENT
class OtherThing
var size: number
static var totalSize: number
static def ClearTotalSize(): number
var prev = totalSize
totalSize = 0
return prev
enddef
endclass
" END_INDENT
" START_INDENT
interface HasSurface
var size: number
def Surface(): number
endinterface
" END_INDENT
" START_INDENT
interface EnterExit
def Enter(): void
def Exit(): void
endinterface
" END_INDENT
" START_INDENT
enum Color
White,
Red,
Green,
Blue,
Black
endenum
" END_INDENT
" START_INDENT
enum Digits
INVALID(v:numbermax), # The null value.
ZERO(0 * v:numbermin), ONE(2 - 1),
TWO(1 + 1), THREE(9 / 3), FOUR(1 * 4),
FIVE(1 + 2 + 2), SIX(36 / 3 / 2), SEVEN(7), EIGHT(2 * 2 * 2),
NINE(3 + 3 + 3)
const value: number
def new(value: number)
this.value = value
enddef
endenum
" END_INDENT
" START_INDENT
call prop_type_add('indent_after_literal_dict', #{ foo: 'bar' })
call prop_type_delete('indent_after_literal_dict')

Some files were not shown because too many files have changed in this diff Show More