mirror of
https://github.com/macvim-dev/macvim.git
synced 2026-06-02 11:19:22 +02:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 22d572d0ef |
@@ -1,5 +0,0 @@
|
||||
# Security Policy
|
||||
|
||||
**Please do not report security vulnerabilities through public GitHub issues.**
|
||||
|
||||
To report a security vulnerability for MacVim, please either email security@macvim.org, or visit https://github.com/macvim-dev/macvim/security/advisories/new.
|
||||
@@ -11,7 +11,6 @@ runs:
|
||||
using: 'composite'
|
||||
steps:
|
||||
- name: Set up formula
|
||||
id: setup-formula
|
||||
shell: bash
|
||||
run: |
|
||||
echo '::group::Set up formula'
|
||||
@@ -24,11 +23,6 @@ runs:
|
||||
|
||||
# Uninstall the already installed formula because we want to build our own
|
||||
brew uninstall --ignore-dependencies ${formula} || true
|
||||
|
||||
# Extract Xcode version to serve as part of the key for caching
|
||||
xcode_version=$(xcodebuild -version | tail -1 | sed -E 's/Build version (.*)/\1/')
|
||||
echo "xcode_version=$xcode_version" >> $GITHUB_OUTPUT
|
||||
|
||||
echo '::endgroup::'
|
||||
|
||||
- name: Cache keg
|
||||
@@ -36,10 +30,12 @@ runs:
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: /usr/local/Cellar/${{ inputs.formula }}
|
||||
key: ${{ inputs.formula }}-homebrew-cache-patched-unified-xcode${{ steps.setup-formula.outputs.xcode_version }}-${{ hashFiles(format('{0}.rb', inputs.formula)) }}
|
||||
key: ${{ inputs.formula }}-homebrew-cache-patched-unified-${{ hashFiles(format('{0}.rb', inputs.formula)) }}
|
||||
|
||||
- name: Install formula
|
||||
shell: bash
|
||||
env:
|
||||
HOMEBREW_NO_AUTO_UPDATE: '1'
|
||||
run: |
|
||||
echo '::group::Install formula'
|
||||
formula=${{ inputs.formula }}
|
||||
|
||||
@@ -62,7 +62,7 @@ jobs:
|
||||
|
||||
# Most up to date OS and Xcode. Used to publish release for the main build.
|
||||
- os: macos-12
|
||||
xcode: '14.2'
|
||||
xcode: '14.1'
|
||||
publish: true
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
@@ -82,13 +82,6 @@ jobs:
|
||||
# Later, we pass the --enable-sparkle_1 flag to configure to set the corresponding ifdef.
|
||||
ln -fhs Sparkle_1.framework src/MacVim/Sparkle.framework
|
||||
|
||||
- name: Set up Xcode
|
||||
if: matrix.xcode != ''
|
||||
run: |
|
||||
sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer
|
||||
xcode-select -p
|
||||
xcodebuild -version
|
||||
|
||||
# Set up, install, and cache gettext library for localization.
|
||||
#
|
||||
# Instead of using the default binary installed by Homebrew, need to build our own because gettext is statically
|
||||
@@ -122,6 +115,8 @@ jobs:
|
||||
|
||||
- name: Install packages
|
||||
if: matrix.publish
|
||||
env:
|
||||
HOMEBREW_NO_AUTO_UPDATE: 1
|
||||
run: |
|
||||
brew install python3
|
||||
brew install ruby
|
||||
@@ -138,6 +133,12 @@ jobs:
|
||||
brew unlink perl
|
||||
fi
|
||||
|
||||
- name: Set up Xcode
|
||||
if: matrix.xcode != ''
|
||||
run: |
|
||||
sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer
|
||||
xcode-select -p
|
||||
|
||||
# All set up steps are done. Build and test MacVim below.
|
||||
|
||||
- name: Configure
|
||||
@@ -241,26 +242,6 @@ jobs:
|
||||
${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
|
||||
|
||||
- name: Smoketest (publish)
|
||||
if: matrix.publish
|
||||
run: |
|
||||
set -o verbose
|
||||
@@ -282,6 +263,12 @@ jobs:
|
||||
# Check that libsodium is working
|
||||
macvim_excmd -c 'set cryptmethod=xchacha20'
|
||||
|
||||
# Make sure there isn't any dynamic linkage to third-party dependencies in the built binary, as we should only use
|
||||
# static linkage to avoid dependency hell. Test that all those dylib's are in /usr/lib which is bundled with macOS and not third-party.
|
||||
if otool -L ${VIM_BIN} | grep '\.dylib\s' | grep -v '^\s*/usr/lib/'; then
|
||||
echo 'Found external dynamic linkage!'; false
|
||||
fi
|
||||
|
||||
# Make sure we are building universal x86_64 / arm64 builds and didn't accidentally create a thin app.
|
||||
check_arch() {
|
||||
local archs=($(lipo -archs "$1"))
|
||||
|
||||
@@ -68,7 +68,6 @@ src/tags
|
||||
/GPATH
|
||||
/GTAGS
|
||||
/GRTAGS
|
||||
nsis/tags
|
||||
|
||||
# Generated by "make test"
|
||||
src/po/*.ck
|
||||
|
||||
@@ -7,9 +7,9 @@ src/xxd/xxd
|
||||
src/auto/if_perl.c
|
||||
src/auto/gui_gtk_gresources.c
|
||||
src/auto/gui_gtk_gresources.h
|
||||
src/auto/os_haiku.rdef
|
||||
src/objects/.dirstamp
|
||||
src/objects
|
||||
src/tags
|
||||
src/types.vim
|
||||
|
||||
# We do need src/auto/configure.
|
||||
@@ -46,15 +46,12 @@ gvimext.lib
|
||||
gvim.lib
|
||||
runtime/doc/uganda.nsis.txt
|
||||
nsis/icons/*
|
||||
/vim90/
|
||||
.vscode/
|
||||
|
||||
# NetBeans
|
||||
nbproject/*
|
||||
|
||||
# Mac OSX
|
||||
src/xxd/xxd.dSYM
|
||||
.DS_Store
|
||||
|
||||
# All platforms
|
||||
*.rej
|
||||
@@ -65,12 +62,6 @@ src/xxd/xxd.dSYM
|
||||
*.pyc
|
||||
*.log
|
||||
src/po/vim.pot
|
||||
src/tags
|
||||
/tags
|
||||
/GPATH
|
||||
/GTAGS
|
||||
/GRTAGS
|
||||
nsis/tags
|
||||
|
||||
# Generated by "make test"
|
||||
src/po/*.ck
|
||||
@@ -87,16 +78,14 @@ src/testdir/dostmp/*
|
||||
src/testdir/messages
|
||||
src/testdir/viminfo
|
||||
src/testdir/opt_test.vim
|
||||
src/testdir/failed
|
||||
src/testdir/starttime
|
||||
runtime/indent/testdir/*.out
|
||||
runtime/indent/testdir/*.fail
|
||||
src/memfile_test
|
||||
src/json_test
|
||||
src/message_test
|
||||
src/kword_test
|
||||
|
||||
# Generated by "make install"
|
||||
runtime/doc/tags
|
||||
runtime/doc/doctags
|
||||
|
||||
# Generated by "make shadow". The directory names could be anything but we
|
||||
@@ -106,10 +95,5 @@ src/shadow-*
|
||||
src/runtime
|
||||
src/pixmaps
|
||||
|
||||
# other files possibly created by tools
|
||||
# other possible files build by tools
|
||||
src/cscope.out
|
||||
|
||||
# Linter/language server files
|
||||
/.cache/clangd/
|
||||
/.ccls-cache/
|
||||
/compile_commands.json
|
||||
|
||||
+10
-33
@@ -228,28 +228,6 @@ FunctionEnd
|
||||
!insertmacro GetParent ""
|
||||
!insertmacro GetParent "un."
|
||||
|
||||
# Get home directory
|
||||
!macro GetHomeDir un
|
||||
Function ${un}GetHomeDir
|
||||
Push $0
|
||||
Push $1
|
||||
ReadEnvStr $0 "HOME"
|
||||
${If} $0 == ""
|
||||
ReadEnvStr $0 "HOMEDRIVE"
|
||||
ReadEnvStr $1 "HOMEPATH"
|
||||
StrCpy $0 "$0$1"
|
||||
${If} $0 == ""
|
||||
ReadEnvStr $0 "USERPROFILE"
|
||||
${EndIf}
|
||||
${EndIf}
|
||||
Pop $1
|
||||
Exch $0 # put $0 on top of stack, restore $0 to original value
|
||||
FunctionEnd
|
||||
!macroend
|
||||
|
||||
!insertmacro GetHomeDir ""
|
||||
!insertmacro GetHomeDir "un."
|
||||
|
||||
# Check if Vim is already installed.
|
||||
# return: Installed directory. If not found, it will be empty.
|
||||
Function CheckOldVim
|
||||
@@ -542,8 +520,7 @@ SectionGroup $(str_group_plugin) id_group_plugin
|
||||
Section "$(str_section_plugin_home)" id_section_pluginhome
|
||||
SectionIn 1 3
|
||||
|
||||
# use ShellExecAsUser below instead
|
||||
# StrCpy $1 "$1 -create-directories home"
|
||||
StrCpy $1 "$1 -create-directories home"
|
||||
SectionEnd
|
||||
|
||||
Section "$(str_section_plugin_vim)" id_section_pluginvim
|
||||
@@ -617,13 +594,6 @@ Section -call_install_exe
|
||||
DetailPrint "$(str_msg_registering)"
|
||||
nsExec::Exec "$0\install.exe $1"
|
||||
Pop $3
|
||||
|
||||
${If} ${SectionIsSelected} ${id_section_pluginhome}
|
||||
ReadEnvStr $3 "COMSPEC"
|
||||
Call GetHomeDir
|
||||
Pop $4
|
||||
ShellExecAsUser::ShellExecAsUser "" "$3" '/c "cd /d "$4" & mkdir vimfiles & cd vimfiles & mkdir colors compiler doc ftdetect ftplugin indent keymap plugin syntax"' SW_HIDE
|
||||
${EndIf}
|
||||
SectionEnd
|
||||
|
||||
##########################################################
|
||||
@@ -1072,8 +1042,15 @@ SectionEnd
|
||||
SectionGroup "un.$(str_ungroup_plugin)" id_ungroup_plugin
|
||||
Section /o "un.$(str_unsection_plugin_home)" id_unsection_plugin_home
|
||||
# get the home dir
|
||||
Call un.GetHomeDir
|
||||
Pop $0
|
||||
ReadEnvStr $0 "HOME"
|
||||
${If} $0 == ""
|
||||
ReadEnvStr $0 "HOMEDRIVE"
|
||||
ReadEnvStr $1 "HOMEPATH"
|
||||
StrCpy $0 "$0$1"
|
||||
${If} $0 == ""
|
||||
ReadEnvStr $0 "USERPROFILE"
|
||||
${EndIf}
|
||||
${EndIf}
|
||||
|
||||
${If} $0 != ""
|
||||
!insertmacro RemoveVimfiles $0
|
||||
|
||||
Vendored
+7
-2
@@ -1121,8 +1121,13 @@ def Is_IN_KeywordForLoop(line_1: string, line_2: string): bool # {{{3
|
||||
enddef
|
||||
|
||||
def InCommentOrString(): bool # {{{3
|
||||
return synstack('.', col('.'))
|
||||
->indexof((_, id: number): bool => synIDattr(id, 'name') =~ '\ccomment\|string\|heredoc') >= 0
|
||||
for synID: number in synstack('.', col('.'))
|
||||
if synIDattr(synID, 'name') =~ '\ccomment\|string\|heredoc'
|
||||
return true
|
||||
endif
|
||||
endfor
|
||||
|
||||
return false
|
||||
enddef
|
||||
|
||||
def AlsoClosesBlock(line_B: dict<any>): bool # {{{3
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
vim9script
|
||||
# Support scripts for MacVim-specific functionality
|
||||
# Maintainer: Yee Cheng Chin (macvim-dev@macvim.org)
|
||||
# Last Change: 2023-03-15
|
||||
# Last Change: 2022-10-14
|
||||
|
||||
# Retrieves the text under the selection, without polluting the registers.
|
||||
# This is easier if we could yank, but we don't know what the user has been
|
||||
@@ -76,44 +76,4 @@ export def ShowDefinitionUnderCursor()
|
||||
endif
|
||||
enddef
|
||||
|
||||
# Print functionality. We simply show the file in Preview and let the user
|
||||
# decide what to do. This allows for more control instead of immediately
|
||||
# piping the file to lpr which will actually print the file.
|
||||
#
|
||||
# PreviewConvertPostScript:
|
||||
# Convert the provided PostScript file to PDF, then show in Preview. This is
|
||||
# necessary in macOS 13+ as Preview doesn't support .ps files anymore.
|
||||
# PreviewPostScript:
|
||||
# Directly open PostScript file in Preview. Can use this if
|
||||
# PreviewConvertPostScript doesn't work.
|
||||
export def PreviewConvertPostScript(deltimer = 10000): number
|
||||
# Convert PS to PDF because Preview can't use PS files in macOS 13+
|
||||
system($"pstopdf {v:fname_in} -o {v:fname_in}.pdf")
|
||||
if v:shell_error != 0
|
||||
return v:shell_error
|
||||
endif
|
||||
system($"open -a Preview {v:fname_in}.pdf")
|
||||
delete(v:fname_in)
|
||||
|
||||
# Delete the file after it's opened in Preview for privacy. We don't have an
|
||||
# easy way to detect that Preview has opened the file already, so we just
|
||||
# use a generous 10 secs timer.
|
||||
# Note that we can't use `open -W` instead because 1) it will block
|
||||
# synchronously, and 2) it will only return if Preview.app has closed, which
|
||||
# may not happen for a while if it has other unrelated documents opened.
|
||||
var to_delete_file = $"{v:fname_in}.pdf"
|
||||
timer_start(deltimer, (timer) => delete(to_delete_file))
|
||||
|
||||
return v:shell_error
|
||||
enddef
|
||||
|
||||
export def PreviewPostScript(deltimer = 10000): number
|
||||
system($"open -a Preview {v:fname_in}")
|
||||
|
||||
var to_delete_file = v:fname_in
|
||||
timer_start(deltimer, (timer) => delete(to_delete_file))
|
||||
|
||||
return v:shell_error
|
||||
enddef
|
||||
|
||||
# vim: set sw=2 ts=2 et :
|
||||
|
||||
@@ -22,7 +22,8 @@ let s:maxoff = 50 " maximum number of lines to look backwards for ()
|
||||
function s:SearchBracket(fromlnum, flags)
|
||||
return searchpairpos('[[({]', '', '[])}]', a:flags,
|
||||
\ {-> synstack('.', col('.'))
|
||||
\ ->indexof({_, id -> synIDattr(id, 'name') =~ '\%(Comment\|Todo\|String\)$'}) >= 0},
|
||||
\ ->map({_, id -> id->synIDattr('name')})
|
||||
\ ->match('\%(Comment\|Todo\|String\)$') >= 0},
|
||||
\ [0, a:fromlnum - s:maxoff]->max(), g:python_indent.searchpair_timeout)
|
||||
endfunction
|
||||
|
||||
@@ -156,13 +157,15 @@ function python#GetIndent(lnum, ...)
|
||||
" the start of the comment. synID() is slow, a linear search would take
|
||||
" too long on a long line.
|
||||
if synstack(plnum, pline_len)
|
||||
\ ->indexof({_, id -> synIDattr(id, 'name') =~ '\%(Comment\|Todo\)$'}) >= 0
|
||||
\ ->map({_, id -> id->synIDattr('name')})
|
||||
\ ->match('\%(Comment\|Todo\)$') >= 0
|
||||
let min = 1
|
||||
let max = pline_len
|
||||
while min < max
|
||||
let col = (min + max) / 2
|
||||
if synstack(plnum, col)
|
||||
\ ->indexof({_, id -> synIDattr(id, 'name') =~ '\%(Comment\|Todo\)$'}) >= 0
|
||||
\ ->map({_, id -> id->synIDattr('name')})
|
||||
\ ->match('\%(Comment\|Todo\)$') >= 0
|
||||
let max = col
|
||||
else
|
||||
let min = col + 1
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*autocmd.txt* For Vim version 9.0. Last change: 2023 Feb 18
|
||||
*autocmd.txt* For Vim version 9.0. Last change: 2022 Dec 12
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -64,7 +64,7 @@ Example in Vim9 script: >
|
||||
In legacy script: >
|
||||
call autocmd_add(#{replace: v:true,
|
||||
\ group: 'DemoGroup',
|
||||
\ event: 'BufEnter',
|
||||
\ event: 'BufEnter',
|
||||
\ pattern: '*.txt',
|
||||
\ cmd: 'call DemoBufEnter()'
|
||||
\ })
|
||||
@@ -334,7 +334,7 @@ Name triggered by ~
|
||||
|EncodingChanged| after the 'encoding' option has been changed
|
||||
|TermChanged| after the value of 'term' has changed
|
||||
|OptionSet| after setting any option
|
||||
|OSAppearanceChanged| after the variable |v:os_appearance| has changed
|
||||
|OSAppearanceChanged| after the variable |v:os_appearance| has changed
|
||||
{only in MacVim GUI}
|
||||
|
||||
Startup and exit
|
||||
@@ -400,7 +400,7 @@ Name triggered by ~
|
||||
|InsertEnter| starting Insert mode
|
||||
|InsertChange| when typing <Insert> while in Insert or Replace mode
|
||||
|InsertLeave| when leaving Insert mode
|
||||
|InsertLeavePre| just before leaving Insert mode
|
||||
|InsertLeavePre| just before leaving Insert mode
|
||||
|InsertCharPre| when a character was typed in Insert mode, before
|
||||
inserting it
|
||||
|
||||
@@ -613,11 +613,9 @@ CmdlineEnter After moving the cursor to the command line,
|
||||
where the user can type a command or search
|
||||
string; including non-interactive use of ":"
|
||||
in a mapping, but not when using |<Cmd>|.
|
||||
The pattern is matched against the character
|
||||
representing the type of command-line.
|
||||
|cmdwin-char|
|
||||
<afile> is set to a single character,
|
||||
indicating the type of command-line.
|
||||
|cmdwin-char|
|
||||
*CmdlineLeave*
|
||||
CmdlineLeave Before leaving the command line; including
|
||||
non-interactive use of ":" in a mapping, but
|
||||
@@ -1042,7 +1040,7 @@ OptionSet After setting an option. The pattern is
|
||||
When using |:set| in the autocommand the event
|
||||
is not triggered again.
|
||||
*OSAppearanceChanged*
|
||||
OSAppearanceChanged After changing the variable |v:os_appearance|.
|
||||
OSAppearanceChanged After changing the variable |v:os_appearance|.
|
||||
This change happens only if the OS changes
|
||||
its appearance and Vim is running with a GUI.
|
||||
{only in MacVim GUI}
|
||||
|
||||
+16
-21
@@ -1,4 +1,4 @@
|
||||
*builtin.txt* For Vim version 9.0. Last change: 2023 Feb 27
|
||||
*builtin.txt* For Vim version 9.0. Last change: 2023 Jan 17
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -266,7 +266,7 @@ gettabwinvar({tabnr}, {winnr}, {name} [, {def}])
|
||||
gettagstack([{nr}]) Dict get the tag stack of window {nr}
|
||||
gettext({text}) String lookup translation of {text}
|
||||
getwininfo([{winid}]) List list of info about each window
|
||||
getwinpos([{timeout}]) List X and Y coord in pixels of Vim window
|
||||
getwinpos([{timeout}]) List X and Y coord in pixels of the Vim window
|
||||
getwinposx() Number X coord in pixels of the Vim window
|
||||
getwinposy() Number Y coord in pixels of the Vim window
|
||||
getwinvar({nr}, {varname} [, {def}])
|
||||
@@ -382,7 +382,7 @@ matchstrpos({expr}, {pat} [, {start} [, {count}]])
|
||||
max({expr}) Number maximum value of items in {expr}
|
||||
menu_info({name} [, {mode}]) Dict get menu item information
|
||||
min({expr}) Number minimum value of items in {expr}
|
||||
mkdir({name} [, {flags} [, {prot}]])
|
||||
mkdir({name} [, {path} [, {prot}]])
|
||||
Number create directory {name}
|
||||
mode([expr]) String current editing mode
|
||||
mzeval({expr}) any evaluate |MzScheme| expression
|
||||
@@ -2571,7 +2571,8 @@ extend({expr1}, {expr2} [, {expr3}]) *extend()*
|
||||
extendnew({expr1}, {expr2} [, {expr3}]) *extendnew()*
|
||||
Like |extend()| but instead of adding items to {expr1} a new
|
||||
List or Dictionary is created and returned. {expr1} remains
|
||||
unchanged.
|
||||
unchanged. Items can still be changed by {expr2}, if you
|
||||
don't want that use |deepcopy()| first.
|
||||
|
||||
|
||||
feedkeys({string} [, {mode}]) *feedkeys()*
|
||||
@@ -2996,7 +2997,7 @@ funcref({name} [, {arglist}] [, {dict}])
|
||||
Can also be used as a |method|: >
|
||||
GetFuncname()->funcref([arg])
|
||||
<
|
||||
*function()* *partial* *E700* *E923*
|
||||
*function()* *partial* *E700* *E922* *E923*
|
||||
function({name} [, {arglist}] [, {dict}])
|
||||
Return a |Funcref| variable that refers to function {name}.
|
||||
{name} can be the name of a user defined function or an
|
||||
@@ -6262,20 +6263,17 @@ min({expr}) Return the minimum value of all items in {expr}. Example: >
|
||||
mylist->min()
|
||||
|
||||
< *mkdir()* *E739*
|
||||
mkdir({name} [, {flags} [, {prot}]])
|
||||
mkdir({name} [, {path} [, {prot}]])
|
||||
Create directory {name}.
|
||||
|
||||
When {flags} is present it must be a string. An empty string
|
||||
has no effect.
|
||||
If {path} contains "p" then intermediate directories are
|
||||
created as necessary. Otherwise it must be "".
|
||||
|
||||
If {flags} contains "p" then intermediate directories are
|
||||
created as necessary.
|
||||
|
||||
If {flags} contains "D" then {name} is deleted at the end of
|
||||
If {path} contains "D" then {name} is deleted at the end of
|
||||
the current function, as with: >
|
||||
defer delete({name}, 'd')
|
||||
<
|
||||
If {flags} contains "R" then {name} is deleted recursively at
|
||||
If {path} contains "R" then {name} is deleted recursively at
|
||||
the end of the current function, as with: >
|
||||
defer delete({name}, 'rf')
|
||||
< Note that when {name} has more than one part and "p" is used
|
||||
@@ -7962,7 +7960,7 @@ setcellwidths({list}) *setcellwidths()*
|
||||
terminal, counted in screen cells. The values override
|
||||
'ambiwidth'. Example: >
|
||||
call setcellwidths([
|
||||
\ [0x111, 0x111, 1],
|
||||
\ [0x111, 0x111, 1],
|
||||
\ [0x2194, 0x2199, 2],
|
||||
\ ])
|
||||
|
||||
@@ -7976,7 +7974,7 @@ setcellwidths({list}) *setcellwidths()*
|
||||
{width} must be either 1 or 2, indicating the character width
|
||||
in screen cells. *E1112*
|
||||
An error is given if the argument is invalid, also when a
|
||||
range overlaps with another. *E1113*
|
||||
range overlaps with another. *E1113*
|
||||
|
||||
If the new value causes 'fillchars' or 'listchars' to become
|
||||
invalid it is rejected and an error is given.
|
||||
@@ -8665,9 +8663,8 @@ sort({list} [, {how} [, {dict}]]) *sort()* *E702*
|
||||
|
||||
When {how} is given and it is 'n' then all items will be
|
||||
sorted numerical (Implementation detail: this uses the
|
||||
strtod() function to parse numbers. Strings, Lists, Dicts and
|
||||
Funcrefs will be considered as being 0). Note that this won't
|
||||
sort a list of strings with numbers!
|
||||
strtod() function to parse numbers, Strings, Lists, Dicts and
|
||||
Funcrefs will be considered as being 0).
|
||||
|
||||
When {how} is given and it is 'N' then all items will be
|
||||
sorted numerical. This is like 'n' but a string containing
|
||||
@@ -9835,8 +9832,6 @@ timer_start({time}, {callback} [, {options}])
|
||||
{time} is the waiting time in milliseconds. This is the
|
||||
minimum time before invoking the callback. When the system is
|
||||
busy or Vim is not waiting for input the time will be longer.
|
||||
Zero can be used to execute the callback when Vim is back in
|
||||
the main loop.
|
||||
|
||||
{callback} is the function to call. It can be the name of a
|
||||
function or a |Funcref|. It is called with one argument, which
|
||||
@@ -10580,7 +10575,7 @@ writefile({object}, {fname} [, {flags}])
|
||||
<
|
||||
'D' Delete the file when the current function ends. This
|
||||
works like: >
|
||||
:defer delete({fname})
|
||||
:defer delete({fname})
|
||||
< Fails when not in a function. Also see |:defer|.
|
||||
|
||||
's' fsync() is called after writing the file. This flushes
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*change.txt* For Vim version 9.0. Last change: 2023 Feb 27
|
||||
*change.txt* For Vim version 9.0. Last change: 2022 Nov 20
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -296,9 +296,7 @@ gr{char} Replace the virtual characters under the cursor with
|
||||
{char}. This replaces in screen space, not file
|
||||
space. See |gR| and |Virtual-Replace-mode| for more
|
||||
details. As with |r| a count may be given.
|
||||
{char} can be entered like with |r|, but characters
|
||||
that have a special meaning in Insert mode, such as
|
||||
most CTRL-keys, cannot be used.
|
||||
{char} can be entered like with |r|.
|
||||
|
||||
*digraph-arg*
|
||||
The argument for Normal mode commands like |r| and |t| is a single character.
|
||||
@@ -1035,7 +1033,7 @@ inside of strings can change! Also see 'softtabstop' option. >
|
||||
< to display registers '1' and 'a'. Spaces are allowed
|
||||
in {arg}.
|
||||
|
||||
*:di* *:dis* *:display*
|
||||
*:di* *:display*
|
||||
:di[splay] [arg] Same as :registers.
|
||||
|
||||
*y* *yank*
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*cmdline.txt* For Vim version 9.0. Last change: 2023 Feb 08
|
||||
*cmdline.txt* For Vim version 9.0. Last change: 2022 Nov 11
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -617,7 +617,6 @@ followed by another Vim command:
|
||||
:read !
|
||||
:scscope
|
||||
:sign
|
||||
:tabdo
|
||||
:tcl
|
||||
:tcldo
|
||||
:tclfile
|
||||
|
||||
@@ -181,7 +181,7 @@ possible to view the changes you have made to a buffer since the file was
|
||||
loaded. Since Vim doesn't allow having two buffers for the same file, you
|
||||
need another buffer. This command is useful: >
|
||||
command DiffOrig vert new | set bt=nofile | r ++edit # | 0d_
|
||||
\ | diffthis | wincmd p | diffthis
|
||||
\ | diffthis | wincmd p | diffthis
|
||||
(this is in |defaults.vim|). Use ":DiffOrig" to see the differences between
|
||||
the current buffer and the file it was loaded from.
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*eval.txt* For Vim version 9.0. Last change: 2023 Feb 25
|
||||
*eval.txt* For Vim version 9.0. Last change: 2023 Jan 12
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -1372,7 +1372,7 @@ Note that the dot is also used for String concatenation. To avoid confusion
|
||||
always put spaces around the dot for String concatenation.
|
||||
|
||||
|
||||
expr10(expr1, ...) |Funcref| function call *E1085*
|
||||
expr10(expr1, ...) |Funcref| function call *E1085*
|
||||
|
||||
When expr10 is a |Funcref| type variable, invoke the function it refers to.
|
||||
|
||||
@@ -1654,7 +1654,7 @@ See below |functions|.
|
||||
|
||||
lambda expression *expr-lambda* *lambda*
|
||||
-----------------
|
||||
{args -> expr1} legacy lambda expression *E451*
|
||||
{args -> expr1} legacy lambda expression *E451*
|
||||
(args) => expr1 |Vim9| lambda expression
|
||||
|
||||
A lambda expression creates a new unnamed function which returns the result of
|
||||
@@ -2361,9 +2361,9 @@ v:operator The last operator given in Normal mode. This is a single
|
||||
|
||||
*v:os_appearance* *os-appearance-variable*
|
||||
v:os_appearance The current OS appearance mode. Useful if you want to change
|
||||
options |background| or |colorscheme| according to the
|
||||
options |background| or |colorscheme| according to the
|
||||
appearance of the GUI frontend. See also |OSAppearanceChanged|.
|
||||
value description ~
|
||||
value description ~
|
||||
0 Light Mode (always 0 on unsupported platforms)
|
||||
1 Dark Mode
|
||||
2 High-Contrast Light Mode
|
||||
@@ -4593,10 +4593,10 @@ The input is in the variable "line", the results in the variables "file",
|
||||
|
||||
getting the scriptnames in a Dictionary ~
|
||||
*scriptnames-dictionary*
|
||||
The `:scriptnames` command can be used to get a list of all script files that
|
||||
have been sourced. There is also the `getscriptinfo()` function, but the
|
||||
information returned is not exactly the same. In case you need to manipulate
|
||||
the output of `scriptnames` this code can be used: >
|
||||
The |:scriptnames| command can be used to get a list of all script files that
|
||||
have been sourced. There is no equivalent function or variable for this
|
||||
(because it's rarely needed). In case you need to manipulate the list this
|
||||
code can be used: >
|
||||
" Get the output of ":scriptnames" in the scriptnames_output variable.
|
||||
let scriptnames_output = ''
|
||||
redir => scriptnames_output
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*filetype.txt* For Vim version 9.0. Last change: 2023 Feb 15
|
||||
*filetype.txt* For Vim version 9.0. Last change: 2022 Apr 09
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -679,10 +679,7 @@ MARKDOWN *ft-markdown-plugin*
|
||||
|
||||
To enable folding use this: >
|
||||
let g:markdown_folding = 1
|
||||
|
||||
'expandtab' will be set by default. If you do not want that use this: >
|
||||
let g:markdown_recommended_style = 0
|
||||
|
||||
<
|
||||
|
||||
PDF *ft-pdf-plugin*
|
||||
|
||||
|
||||
+5
-5
@@ -1,4 +1,4 @@
|
||||
*gui.txt* For Vim version 9.0. Last change: 2023 Feb 26
|
||||
*gui.txt* For Vim version 9.0. Last change: 2022 Nov 17
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -96,11 +96,11 @@ terminal version.
|
||||
|
||||
Recommended place for your personal GUI initializations:
|
||||
Unix and macOS $HOME/.gvimrc or $HOME/.vim/gvimrc
|
||||
Win32 $HOME/_gvimrc, $HOME/vimfiles/gvimrc
|
||||
Win32 $HOME/_gvimrc, $HOME/vimfiles/gvimrc
|
||||
or $VIM/_gvimrc
|
||||
Amiga s:.gvimrc, home:.gvimrc, home:vimfiles:gvimrc
|
||||
or $VIM/.gvimrc
|
||||
Haiku $HOME/config/settings/vim/gvimrc
|
||||
Haiku $HOME/config/settings/vim/gvimrc
|
||||
|
||||
The personal initialization files are searched in the order specified above
|
||||
and only the first one that is found is read.
|
||||
@@ -861,7 +861,7 @@ Example for debugger tools: >
|
||||
nnoremenu 1.20 WinBar.Next :Next<CR>
|
||||
nnoremenu 1.30 WinBar.Finish :Finish<CR>
|
||||
nnoremenu 1.40 WinBar.Cont :Continue<CR>
|
||||
< *hl-ToolbarLine* *hl-ToolbarButton*
|
||||
<
|
||||
The window toolbar uses the ToolbarLine and ToolbarButton highlight groups.
|
||||
|
||||
When splitting the window the window toolbar is not copied to the new window.
|
||||
@@ -1202,7 +1202,7 @@ MacVim performs automatic font substitution. If 'guifontwide' is set, that
|
||||
font will be used for all wide fonts. However, if a glyph is not available in
|
||||
the wide font, then font substitution is still used.
|
||||
|
||||
GTK+ GUI only: *guifontwide_gtk*
|
||||
GTK+ GUI only: *guifontwide_gtk*
|
||||
|
||||
If set and valid, 'guifontwide' is always used for double width characters,
|
||||
even if 'encoding' is not set to "utf-8".
|
||||
|
||||
+41
-44
@@ -1,6 +1,8 @@
|
||||
*gui_mac.txt*
|
||||
*gui_mac.txt* For Vim version 8.2. Last change: 2020 Aug 13
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bjorn Winckler
|
||||
|
||||
MACVIM REFERENCE MANUAL
|
||||
|
||||
The MacVim Graphical User Interface *macvim* *gui-macvim*
|
||||
|
||||
@@ -186,36 +188,34 @@ The advantage of using the latter method is that the settings relating to file
|
||||
opening in the settings panel are respected, and files open instantly if
|
||||
|Quickstart| is enabled.
|
||||
|
||||
Starting MacVim from a terminal ~
|
||||
Starting MacVim from a terminal~
|
||||
|
||||
*mvim* *macvim-cmdline*
|
||||
*mvim* *macvim-PATH* *macvim-cmdline*
|
||||
MacVim comes bundled with a shell script called "mvim" that can be used to
|
||||
launch MacVim from the terminal. It's located at: >
|
||||
/Applications/MacVim.app/Contents/bin/mvim
|
||||
<
|
||||
*macvim-PATH*
|
||||
|
||||
To be able to easily use it, put this folder in your path: >
|
||||
/Applications/MacVim.app/Contents/bin
|
||||
For example, if you use zsh, you can put the following in `~/.zprofile`: >
|
||||
export PATH="/Applications/MacVim.app/Contents/bin:$PATH"
|
||||
<
|
||||
|
||||
After that, type "mvim" to start MacVim from Terminal. >
|
||||
$ mvim
|
||||
You can also specify files to open with. >
|
||||
$ mvim file ...
|
||||
Also the bin folder has convenient scripts for diffing and opening file as the
|
||||
file is read-only. >
|
||||
Also the bin folder has convenient scripts for diffing and opening file as the file is read-only. >
|
||||
* Diff: mvimdiff
|
||||
* Read-only: mview
|
||||
<
|
||||
|
||||
You can still use the normal "vim", "vimdiff", and "view" commands if you want
|
||||
to use non-GUI Vim, and "gvim" to launch MacVim ("gvim" works the same way as
|
||||
"mvim").
|
||||
|
||||
Going from terminal to GUI mode ~
|
||||
Going from terminal to GUI mode~
|
||||
|
||||
Once in terminal Vim it is possible to start the MacVim GUI by using the
|
||||
following command (see |:gui|): >
|
||||
following command (see |:gui|):
|
||||
:gui [++opt] [+cmd] [-f|-b] [files...]
|
||||
Note: Forking ("-b") currently does not work.
|
||||
|
||||
@@ -238,8 +238,8 @@ history as the window you just closed (however the next window you open will).
|
||||
For these reasons Quickstart is disabled by default.
|
||||
|
||||
*odbeditor* *external-editor*
|
||||
MacVim can act as an "external editor" for macOS applications that support the
|
||||
ODB Editor Protocol (or the "external editor" protocol). Each application has
|
||||
MacVim can act as an 'external editor' for macOS applications that support the
|
||||
ODB Editor Protocol (or the 'external editor' protocol). Each application has
|
||||
different ways of configuring this option, check the application's
|
||||
documentation. Once configured properly MacVim can be used to open files in
|
||||
such an application.
|
||||
@@ -277,7 +277,6 @@ KEY VALUE ~
|
||||
*MMDisableLaunchAnimation* disable launch animation when opening a new
|
||||
MacVim window [bool]
|
||||
*MMFontPreserveLineSpacing* use the line-spacing as specified by font [bool]
|
||||
*MMLoginShell* use login shell for launching Vim [bool]
|
||||
*MMLoginShellArgument* login shell parameter [string]
|
||||
*MMLoginShellCommand* which shell to use to launch Vim [string]
|
||||
*MMFullScreenFadeTime* fade delay for non-native fullscreen [float]
|
||||
@@ -313,7 +312,7 @@ 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: >
|
||||
defaults write org.vim.MacVim MMTranslateCtrlClick 0
|
||||
<
|
||||
|
||||
If you wish to restore all user defaults to their starting values, open
|
||||
Terminal and type: >
|
||||
defaults delete org.vim.MacVim
|
||||
@@ -327,15 +326,13 @@ new Vim processes via a login shell so that all environment variables are set.
|
||||
|
||||
By default MacVim uses the $SHELL environment variable to determine which
|
||||
shell to use (if $SHELL is not set "/bin/bash" is used). It is possible to
|
||||
override this choice by setting the user default |MMLoginShellCommand| to the
|
||||
override this choice by setting the user default MMLoginShellCommand to the
|
||||
shell that should be used (e.g. "/bin/tcsh"). MacVim tries to make the shell
|
||||
a login shell by prepending argv[0] with a dash. If you use an exotic shell
|
||||
and need to pass it a parameter to make it a login shell then you can set the
|
||||
user default |MMLoginShellArgument| (e.g. to "-l"). Finally, if the "bash"
|
||||
user default MMLoginShellArgument (e.g. to "-l"). Finally, if the "bash"
|
||||
shell is used, then "-l" is automatically added as an argument. To override
|
||||
this behaviour set |MMLoginShellArgument| to "--".
|
||||
|
||||
To turn off using a login shell, you can set |MMLoginShell| to 0.
|
||||
this behaviour set MMLoginShellArgument to "--".
|
||||
|
||||
==============================================================================
|
||||
4. MacVim appearance *macvim-appearance*
|
||||
@@ -392,7 +389,7 @@ a Cocoa application when it is not in focus.
|
||||
|
||||
*Colors.plist*
|
||||
Apart from the system colors, it is also possible to use the standard X11
|
||||
color names (see https://en.wikipedia.org/wiki/X11_color_names) which usually
|
||||
color names (see http://en.wikipedia.org/wiki/X11_color_names) which usually
|
||||
come in a file called "rgb.txt". MacVim does not have such a file, instead it
|
||||
keeps these colors in a dictionary called "Colors.plist". The key in this
|
||||
dictionary is the name of the color and the value is an RGB value on the form
|
||||
@@ -421,16 +418,16 @@ highlight color when a window becomes inactive.
|
||||
==============================================================================
|
||||
6. Menus *macvim-menus*
|
||||
|
||||
Default Menus ~
|
||||
Default Menus~
|
||||
|
||||
See |macvim-default-menus|.
|
||||
|
||||
Icons ~
|
||||
Icons~
|
||||
|
||||
Unlike regular Vim, MacVim menus can be customized with an icon. Simply use
|
||||
the "icon=" parameter similar to toolbar. See |macvim-toolbar-icon| for usage.
|
||||
|
||||
Customization ~
|
||||
Customization~
|
||||
|
||||
Menus in macOS behave slightly different from other platforms. For that
|
||||
reason two new commands have been added to Vim. To understand what these
|
||||
@@ -625,7 +622,7 @@ The separators work similar to how toolbars work: >
|
||||
:an TouchBar.-Sep- <Nop>
|
||||
:an TouchBar.-space1- <Nop>
|
||||
:an TouchBar.-flexspace2- <Nop>
|
||||
<
|
||||
|
||||
The first example is a Vim separator (see |menu-separator|) and injects a
|
||||
space between two buttons. The second creates a smaller space than a normal
|
||||
separator and are specified by names that begin with "-space" and ends with
|
||||
@@ -673,7 +670,7 @@ ExitFullScreen |'fullscreen'| mode. To disable, add the following to
|
||||
and emojis in insert and terminal modes. To disable,
|
||||
add the following to your vimrc file: >
|
||||
let g:macvim_default_touchbar_characterpicker=0
|
||||
<
|
||||
|
||||
==============================================================================
|
||||
9. Looking up data *macvim-lookup*
|
||||
|
||||
@@ -726,10 +723,10 @@ to work, MacVim.app should be located in the /Applications folder. (You might
|
||||
have to logout and then login again before macOS detects the MacVim services.)
|
||||
|
||||
These are the currently supported services:
|
||||
* `New MacVim Buffer With Selection`: Create a new buffer and paste the
|
||||
currently selected text.
|
||||
* `New MacVim Buffer Here`: Create a new buffer and set the current
|
||||
directory to the file or folder that is selected in the Finder.
|
||||
* New MacVim Buffer With Selection: Create a new buffer and paste the
|
||||
currently selected text.
|
||||
* New MacVim Buffer Here: Create a new buffer and set the current
|
||||
directory to the file or folder that is selected in the Finder.
|
||||
|
||||
The services respect the "Open files from applications" setting in the general
|
||||
settings.
|
||||
@@ -738,8 +735,8 @@ settings.
|
||||
12. mvim:// URL handler *mvim://* *macvim-url-handler*
|
||||
|
||||
MacVim supports a custom URL handler for "mvim://" URLs. The handler is
|
||||
supposed to be compatible to TextMate's URL scheme as documented at:
|
||||
https://macromates.com/blog/2007/the-textmate-url-scheme/
|
||||
supposed to be compatible to TextMate's URL scheme as documented at >
|
||||
http://blog.macromates.com/2007/the-textmate-url-scheme/.
|
||||
|
||||
Currently, this means that the format is >
|
||||
mvim://open?<arguments>
|
||||
@@ -758,7 +755,7 @@ characters to be encoded twice. For example, a space should be encoded into
|
||||
"%2520" instead of "%20". A file "/tmp/file name?.txt" would need the
|
||||
following link: >
|
||||
mvim://open?url=file:///tmp/file%2520name%253F.txt
|
||||
<
|
||||
|
||||
MacVim will try to be smart and detect cases where a user has erroneously only
|
||||
encoded once, but for best results use double-encoding as described above.
|
||||
|
||||
@@ -782,7 +779,7 @@ Cmd-. Interrupt Vim. Unlike Ctrl-C which is sent as normal
|
||||
|
||||
*Cmd-`* *<D-`>*
|
||||
Cmd-` Cycle to the next window. On an American keyboard the
|
||||
key "`" is located under the Esc-key. On European
|
||||
`-key is located under the Esc-key. On European
|
||||
keyboards this key is often adjacent to the left
|
||||
Shift-key and it may be not even be marked with "`".
|
||||
This Cmd-key combination can only be unmapped via the
|
||||
@@ -877,12 +874,12 @@ to the previous/next tab in normal mode: >
|
||||
|
||||
nmap <SwipeLeft> gT
|
||||
nmap <SwipeRight> gt
|
||||
<
|
||||
|
||||
As another example, here is how to switch buffers by swiping left/right: >
|
||||
|
||||
nmap <SwipeLeft> :bN<CR>
|
||||
nmap <SwipeRight> :bn<CR>
|
||||
<
|
||||
|
||||
See the section on |key-mapping| for more help on how to map keys.
|
||||
|
||||
==============================================================================
|
||||
@@ -930,20 +927,20 @@ prominent bugs/missing features.
|
||||
- Sometimes multibyte characters look "too wide", i.e. they overlap the
|
||||
following character. It might help to change 'ambiwidth', or override the
|
||||
automatic font substitution by setting 'guifontwide' manually.
|
||||
- Built-in printing. |:hardcopy| / <D-p> creates a PDF file which is then
|
||||
opened in Preview where it may be printed. See |pexpr-option|.
|
||||
- Printing. As a temporary solution <D-p> creates a PostScript file which is
|
||||
then opened in Preview where it may be printed. See |hardcopy|.
|
||||
|
||||
General bugs and issues are tracked on Github. If you find new bugs or have
|
||||
feature requests then please file an issue there:
|
||||
feature requests then please file an issue there: >
|
||||
https://github.com/macvim-dev/macvim/issues
|
||||
|
||||
For general discussions, asking questions, you could use the Github
|
||||
discussions page:
|
||||
discussions page: >
|
||||
https://github.com/macvim-dev/macvim/discussions
|
||||
|
||||
There is also a vim_mac mailing list. You can also post your findings of bugs
|
||||
and issues there as well: *vim_mac_group*
|
||||
https://groups.google.com/group/vim_mac
|
||||
and issues there as well: *vim_mac_group* >
|
||||
http://groups.google.com/group/vim_mac
|
||||
|
||||
==============================================================================
|
||||
17. Hints *macvim-hints*
|
||||
@@ -1022,7 +1019,7 @@ If you have not installed the "mvim" script in your path you can provide the
|
||||
path to the Vim binary instead. Thus, if "MacVim.app" resides in the
|
||||
Applications folder then you would use the following line: >
|
||||
export EDITOR='/Applications/MacVim.app/Contents/MacOS/Vim -g -f'
|
||||
<
|
||||
|
||||
Scenario: ~
|
||||
You have set MacVim to open from an external program and when you finish
|
||||
editing (by closing the MacVim window) you want the external program to regain
|
||||
|
||||
@@ -17,7 +17,7 @@ Vim's Win32 Graphical User Interface *gui-w32* *win32-gui*
|
||||
|
||||
Other relevant documentation:
|
||||
|gui.txt| For generic items of the GUI.
|
||||
|os_win32.txt| For Win32 specific items.
|
||||
|os_win32.txt| For Win32 specific items.
|
||||
|
||||
|
||||
==============================================================================
|
||||
|
||||
@@ -101,7 +101,7 @@ Help on help files *helphelp*
|
||||
find a tag in a file with the same language as the
|
||||
current file. See |help-translated|.
|
||||
|
||||
*:helpc* *:helpclose*
|
||||
*:helpc* *:helpclose*
|
||||
:helpc[lose] Close one help window, if there is one.
|
||||
Vim will try to restore the window layout (including
|
||||
cursor position) to the same layout it was before
|
||||
|
||||
@@ -857,7 +857,7 @@ You can test what Python version is available with: >
|
||||
if has('python')
|
||||
echo 'there is Python 2.x'
|
||||
endif
|
||||
if has('python3')
|
||||
if has('python3')
|
||||
echo 'there is Python 3.x'
|
||||
endif
|
||||
|
||||
@@ -874,7 +874,7 @@ python support: >
|
||||
echo 'Python 2.x dynamically loaded'
|
||||
endif
|
||||
endif
|
||||
if has('python3_compiled')
|
||||
if has('python3_compiled')
|
||||
echo 'compiled with Python 3.x support'
|
||||
if has('python3_dynamic')
|
||||
echo 'Python 3.x dynamically loaded'
|
||||
|
||||
@@ -236,7 +236,7 @@ tag char note action in Normal mode ~
|
||||
|CTRL-\_CTRL-N| CTRL-\ CTRL-N go to Normal mode (no-op)
|
||||
|CTRL-\_CTRL-G| CTRL-\ CTRL-G go to mode specified with 'insertmode'
|
||||
CTRL-\ a - z reserved for extensions
|
||||
CTRL-\ others not used
|
||||
CTRL-\ others not used
|
||||
|CTRL-]| CTRL-] :ta to ident under cursor
|
||||
|CTRL-^| CTRL-^ edit Nth alternate file (equivalent to
|
||||
":e #N")
|
||||
@@ -247,7 +247,7 @@ tag char note action in Normal mode ~
|
||||
2 filter Nmove text through the {filter}
|
||||
command
|
||||
|!!| !!{filter} 2 filter N lines through the {filter} command
|
||||
|quote| "{register} use {register} for next delete, yank or put
|
||||
|quote| "{register} use {register} for next delete, yank or put
|
||||
({.%#:} only work with put)
|
||||
|#| # 1 search backward for the Nth occurrence of
|
||||
the ident under the cursor
|
||||
|
||||
@@ -877,7 +877,7 @@ Groß): >
|
||||
|
||||
func Thesaur(findstart, base)
|
||||
if a:findstart
|
||||
return searchpos('\<', 'bnW', line('.'))[1] - 1
|
||||
return searchpos('\<', 'bnW', line('.'))[1] - 1
|
||||
endif
|
||||
let res = []
|
||||
let h = ''
|
||||
@@ -1118,8 +1118,8 @@ cursor column will be replaced with the matches. If the returned value is
|
||||
larger than the cursor column, the cursor column is used.
|
||||
|
||||
Negative return values:
|
||||
-2 To cancel silently and stay in completion mode.
|
||||
-3 To cancel silently and leave completion mode.
|
||||
-2 To cancel silently and stay in completion mode.
|
||||
-3 To cancel silently and leave completion mode.
|
||||
Another negative value: completion starts at the cursor column
|
||||
|
||||
On the second invocation the arguments are:
|
||||
@@ -1176,7 +1176,7 @@ items:
|
||||
item with the same word is already present.
|
||||
empty when non-zero this match will be added even when it is
|
||||
an empty string
|
||||
user_data custom data which is associated with the item and
|
||||
user_data custom data which is associated with the item and
|
||||
available in |v:completed_item|; it can be any type;
|
||||
defaults to an empty string
|
||||
|
||||
|
||||
+9
-15
@@ -1,4 +1,4 @@
|
||||
*map.txt* For Vim version 9.0. Last change: 2023 Feb 27
|
||||
*map.txt* For Vim version 9.0. Last change: 2023 Jan 09
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -845,7 +845,7 @@ option). After that it assumes that the 'q' is to be interpreted as such. If
|
||||
you type slowly, or your system is slow, reset the 'timeout' option. Then you
|
||||
might want to set the 'ttimeout' option.
|
||||
|
||||
*map-precedence*
|
||||
*map-precedence*
|
||||
Buffer-local mappings (defined using |:map-<buffer>|) take precedence over
|
||||
global mappings. When a buffer-local mapping is the same as a global mapping,
|
||||
Vim will use the buffer-local mapping. In addition, Vim will use a complete
|
||||
@@ -923,11 +923,6 @@ in the original Vi, you would get back the text before the first undo).
|
||||
|
||||
1.10 MAPPING ALT-KEYS *:map-alt-keys*
|
||||
|
||||
For a readable mapping command the <A-k> form can be used. Note that <A-k>
|
||||
and <A-K> are different, the latter will use an upper case letter. Actually,
|
||||
<A-K> and <A-S-K> are the same. Instead of "A" you can use "M". If you have
|
||||
an actual Meta modifier key, please see |:map-meta-keys|.
|
||||
|
||||
In the GUI Vim handles the Alt key itself, thus mapping keys with ALT should
|
||||
always work. But in a terminal Vim gets a sequence of bytes and has to figure
|
||||
out whether ALT was pressed or not.
|
||||
@@ -1033,7 +1028,7 @@ enabled when it spots an escape sequence that must have been created by it.
|
||||
To see if Vim detected such an escape sequence use `:verbose map`, the first
|
||||
line will then show "Seen modifyOtherKeys: true" (possibly translated).
|
||||
|
||||
This automatic detection depends on receiving an escape code starting with
|
||||
This automatic detection depends on receiving an escape code starting with
|
||||
"<1b>[27;". This is the normal way xterm sends these key codes. However, if
|
||||
the *formatOtherKeys* resource is set another form is used that is not
|
||||
recognized, therefore you must not set formatOtherKeys.
|
||||
@@ -1073,8 +1068,8 @@ translated). The meaning of {value}:
|
||||
On protocol is used
|
||||
Disabled protocol was used but expected to have been disabled
|
||||
by 't_TE'
|
||||
Cleared protocol expected to have been disabled by 't_TE',
|
||||
previous state is unknown
|
||||
Cleared protocol expected to have beeen disabled by 't_TE',
|
||||
previous state is unknown
|
||||
|
||||
|
||||
1.14 MAPPING AN OPERATOR *:map-operator*
|
||||
@@ -1217,7 +1212,7 @@ non-id The "non-id" type ends in a non-keyword character, the other
|
||||
Examples of strings that cannot be abbreviations: "a.b", "#def", "a b", "_$r"
|
||||
|
||||
An abbreviation is only recognized when you type a non-keyword character.
|
||||
This can also be the <Esc> that ends Insert mode or the <CR> that ends a
|
||||
This can also be the <Esc> that ends insert mode or the <CR> that ends a
|
||||
command. The non-keyword character which ends the abbreviation is inserted
|
||||
after the expanded abbreviation. An exception to this is the character <C-]>,
|
||||
which is used to expand an abbreviation without inserting any extra
|
||||
@@ -1421,13 +1416,12 @@ this, they can be made local to the script.
|
||||
|
||||
*<SID>* *<SNR>* *E81*
|
||||
The string "<SID>" can be used in a mapping or menu. This requires that the
|
||||
'<' flag is not present in 'cpoptions'. This is useful if you have a
|
||||
script-local function that you want to call from a mapping in the same script.
|
||||
'<' flag is not present in 'cpoptions'.
|
||||
When executing the map command, Vim will replace "<SID>" with the special
|
||||
key code <SNR>, followed by a number that's unique for the script, and an
|
||||
underscore. Example: >
|
||||
:map <SID>Add
|
||||
would define a mapping "<SNR>23_Add".
|
||||
could define a mapping "<SNR>23_Add".
|
||||
|
||||
When defining a function in a script, "s:" can be prepended to the name to
|
||||
make it local to the script (in |Vim9| script functions without a prefix are
|
||||
@@ -1729,7 +1723,7 @@ by default correspond to the current line, last line and the whole buffer,
|
||||
relate to arguments, (loaded) buffers, windows or tab pages.
|
||||
|
||||
Possible values are (second column is the short name used in listing):
|
||||
-addr=lines Range of lines (this is the default for -range)
|
||||
-addr=lines Range of lines (this is the default for -range)
|
||||
-addr=arguments arg Range for arguments
|
||||
-addr=buffers buf Range for buffers (also not loaded buffers)
|
||||
-addr=loaded_buffers load Range for loaded buffers
|
||||
|
||||
+22
-28
@@ -1,4 +1,4 @@
|
||||
*options.txt* For Vim version 9.0. Last change: 2023 Feb 17
|
||||
*options.txt* For Vim version 9.0. Last change: 2023 Feb 01
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -1552,7 +1552,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
case mapping, the current locale is not effective.
|
||||
This probably only matters for Turkish.
|
||||
|
||||
*'cdhome'* *'cdh'* *'nocdhome'* *'nocdh'*
|
||||
*'cdhome'* *'cdh'*
|
||||
'cdhome' 'cdh' boolean (default: off)
|
||||
global
|
||||
When on, |:cd|, |:tcd| and |:lcd| without an argument changes the
|
||||
@@ -3804,7 +3804,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
|
||||
Custom / non-native full screen configuration:~
|
||||
|
||||
See 'fuoptions' for how Vim resizes and colors the background when
|
||||
See 'fuoptions' for how Vim resizes and colors the background when
|
||||
entering and leaving fullscreen mode.
|
||||
|
||||
There is an optional fade-to-black effect while transitioning that
|
||||
@@ -3818,6 +3818,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
they are determined by the size of the window. 'fuoptions' allows you
|
||||
to override part of that behavior if using custom full screen.
|
||||
|
||||
|
||||
*'fuoptions'* *'fuopt'*
|
||||
'fuoptions' 'fuopt' string (default "maxvert,maxhorz")
|
||||
global
|
||||
@@ -3827,10 +3828,10 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
In non-native fullscreen mode, MacVim can be configured to either show
|
||||
all the content filling up the whole screen, or only use part of the
|
||||
screen to show the content, centered. This option controls the size
|
||||
of the Vim control as well as the color of the unused screen area.
|
||||
of the Vim control as well as the color of the unused screen area.
|
||||
value effect ~
|
||||
maxvert When entering fullscreen, 'lines' is set to the maximum number
|
||||
of lines fitting on the screen in fullscreen mode. If unset,
|
||||
of lines fitting on the screen in fullscreen mode. If unset,
|
||||
'lines' will be unchanged when entering fullscreen mode.
|
||||
maxhorz When entering fullscreen, 'columns' is set to the maximum number
|
||||
of columns fitting on the screen in fullscreen mode. If unset,
|
||||
@@ -3846,7 +3847,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
group's background color, as defined by the current color
|
||||
scheme.
|
||||
|
||||
Examples:
|
||||
Examples:
|
||||
Don't change size when entering fullscreen: >
|
||||
:set fuoptions=
|
||||
< Only maximize vertically when entering fullscreen: >
|
||||
@@ -3857,7 +3858,9 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
< Don't change size when entering fullscreen, and color the background
|
||||
like the current text background: >
|
||||
:set fuoptions=background:Normal
|
||||
<
|
||||
|
||||
|
||||
|
||||
*'gdefault'* *'gd'* *'nogdefault'* *'nogd'*
|
||||
'gdefault' 'gd' boolean (default off)
|
||||
global
|
||||
@@ -4290,8 +4293,6 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
T:DiffText,>:SignColumn,-:Conceal,
|
||||
B:SpellBad,P:SpellCap,R:SpellRare,
|
||||
L:SpellLocal,+:Pmenu,=:PmenuSel,
|
||||
[:PmenuKind,]:PmenuKindSel,
|
||||
{:PmenuExtra,}:PmenuExtraSel,
|
||||
x:PmenuSbar,X:PmenuThumb,*:TabLine,
|
||||
#:TabLineSel,_:TabLineFill,!:CursorColumn,
|
||||
.:CursorLine,o:ColorColumn,q:QuickFixLine,
|
||||
@@ -4348,10 +4349,6 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
|hl-SpellLocal| L word from other region |spell|
|
||||
|hl-Pmenu| + popup menu normal line
|
||||
|hl-PmenuSel| = popup menu selected line
|
||||
|hl-PmenuKind| [ popup menu "kind" normal line
|
||||
|hl-PmenuKindSel| ] popup menu "kind" selected line
|
||||
|hl-PmenuExtra| { popup menu "kind" normal line
|
||||
|hl-PmenuExtraSel| } popup menu "kind" selected line
|
||||
|hl-PmenuSbar| x popup menu scrollbar
|
||||
|hl-PmenuThumb| X popup menu scrollbar thumb
|
||||
|
||||
@@ -5009,7 +5006,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
|
||||
< This means that when 'term' contains "kitty, "foot" or "wezterm"
|
||||
somewhere then the "kitty" protocol is used. When 'term' contains
|
||||
"xterm" somewhere, then the "mok2" protocol is used.
|
||||
"xterm" somewhere, then the "mok2" protocol is used.
|
||||
|
||||
The first match is used, thus if you want to have "kitty" use the
|
||||
kitty protocol, but "badkitty" not, then you should match "badkitty"
|
||||
@@ -5389,7 +5386,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
No longer supported, as the Mac OS X GUI code was removed.
|
||||
|
||||
*'macligatures'* *'nomacligatures'*
|
||||
'macligatures' boolean (default off)
|
||||
'macligatures' boolean (default off)
|
||||
global
|
||||
{not in Vi}
|
||||
{only available when compiled with GUI enabled on
|
||||
@@ -5402,7 +5399,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
'Use Core Text renderer' is enabled in the GUI preferences pane.
|
||||
|
||||
*'macthinstrokes'* *'nomacthinstrokes'*
|
||||
'macthinstrokes' boolean (default off)
|
||||
'macthinstrokes' boolean (default off)
|
||||
global
|
||||
{not in Vi}
|
||||
{only available when compiled with GUI enabled on
|
||||
@@ -5800,7 +5797,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
|
||||
The 'mousemodel' option is set by the |:behave| command.
|
||||
|
||||
*'mousemoveevent'* *'mousemev'* *'nomousemoveevent'* *'nomousemev'*
|
||||
*'mousemoveevent'* *'mousemev'*
|
||||
'mousemoveevent' 'mousemev' boolean (default off)
|
||||
global
|
||||
{only works in the GUI}
|
||||
@@ -7292,7 +7289,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
A don't give the "ATTENTION" message when an existing *shm-A*
|
||||
swap file is found
|
||||
I don't give the intro message when starting Vim, *shm-I*
|
||||
see |:intro|
|
||||
see |:intro|
|
||||
c don't give |ins-completion-menu| messages; for *shm-c*
|
||||
example, "-- XXX completion (YYY)", "match 1 of 2", "The only
|
||||
match", "Pattern not found", "Back at original", etc.
|
||||
@@ -7302,8 +7299,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
F don't give the file info when editing a file, like *shm-F*
|
||||
`:silent` was used for the command; note that this also
|
||||
affects messages from autocommands
|
||||
S do not show search count message when searching, e.g. *shm-S*
|
||||
"[1/5]"
|
||||
S do not show search count message when searching, e.g. *shm-S*
|
||||
"[1/5]"
|
||||
|
||||
This gives you the opportunity to avoid that a change between buffers
|
||||
requires you to hit <Enter>, but still gives as useful a message as
|
||||
@@ -7480,9 +7477,9 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
{not available when compiled without the |+signs|
|
||||
feature}
|
||||
Whether or not to draw the signcolumn. Valid values are:
|
||||
"auto" only when there is a sign to display
|
||||
"no" never
|
||||
"yes" always
|
||||
"auto" only when there is a sign to display
|
||||
"no" never
|
||||
"yes" always
|
||||
"number" display signs in the 'number' column. If the number
|
||||
column is not present, then behaves like "auto".
|
||||
|
||||
@@ -7911,10 +7908,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
mark. This information is used for mouse clicks.
|
||||
< - Where to truncate line if too long. Default is at the start.
|
||||
No width fields allowed.
|
||||
= - Separation point between alignment sections. Each section will
|
||||
be separated by an equal number of spaces. With one %= what
|
||||
comes after it will be right-aligned. With two %= there is a
|
||||
middle part, with white space left and right of it.
|
||||
= - Separation point between left and right aligned items.
|
||||
No width fields allowed.
|
||||
# - Set highlight group. The name must follow and then a # again.
|
||||
Thus use %#HLname# for highlight group HLname. The same
|
||||
@@ -8370,7 +8364,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
:set encoding=utf-8
|
||||
< You need to do this when your system has no locale support for UTF-8.
|
||||
|
||||
*'termguicolors'* *'tgc'* *'notermguicolors'* *'notgc'* *E954*
|
||||
*'termguicolors'* *'tgc'* *E954*
|
||||
'termguicolors' 'tgc' boolean (default off)
|
||||
global
|
||||
{not available when compiled without the
|
||||
|
||||
@@ -10,7 +10,7 @@ This file contains the particulars for the z/OS UNIX version of Vim.
|
||||
2. Putty and Colors |zOS-PuTTY|
|
||||
3. Motif Problems |zOS-Motif|
|
||||
4. Bugs |zOS-Bugs|
|
||||
5. Limitations |zOS-limitations|
|
||||
5. Limitations |zOS-limitations|
|
||||
6. Open source on z/OS UNIX |zOS-open-source|
|
||||
|
||||
Contributors: ~
|
||||
@@ -75,7 +75,7 @@ There is no solution for this yet.
|
||||
this occurs in both the terminal and gui versions.
|
||||
|
||||
==============================================================================
|
||||
5. Limitations *OS390-limitations* *zOS-limitations*
|
||||
5. Limitations *OS390-limitations* *zOS-limitations*
|
||||
|
||||
- No binary search in tag files.
|
||||
The program /bin/sort sorts by ASCII value by default. This program is
|
||||
|
||||
@@ -203,7 +203,7 @@ You can check that everything is at the right place with the :version command.
|
||||
|
||||
Example LOGIN.COM: >
|
||||
|
||||
$ define/nolog VIM DKA0:[UTIL.VIM81]
|
||||
$ define/nolog VIM DKA0:[UTIL.VIM81]
|
||||
$ vi*m :== mcr VIM:VIM.EXE
|
||||
$ gv*im:== spawn/nowait/input=NLA0 mcr VIM:VIM.EXE -g -GEOMETRY 80x40
|
||||
$ set disp/create/node=192.168.10.202/trans=tcpip
|
||||
|
||||
+8
-10
@@ -1,4 +1,4 @@
|
||||
*pattern.txt* For Vim version 9.0. Last change: 2023 Feb 04
|
||||
*pattern.txt* For Vim version 9.0. Last change: 2022 Sep 24
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -101,8 +101,6 @@ g# Like "#", but don't put "\<" and "\>" around the word.
|
||||
*gd*
|
||||
gd Goto local Declaration. When the cursor is on a local
|
||||
variable, this command will jump to its declaration.
|
||||
This was made to work for C code, in other languages
|
||||
it may not work well.
|
||||
First Vim searches for the start of the current
|
||||
function, just like "[[". If it is not found the
|
||||
search stops in line 1. If it is found, Vim goes back
|
||||
@@ -1144,21 +1142,21 @@ x A single character, with no special meaning, matches itself
|
||||
are supported:
|
||||
Name Func Contents ~
|
||||
*[:alnum:]* [:alnum:] isalnum ASCII letters and digits
|
||||
*[:alpha:]* [:alpha:] isalpha ASCII letters
|
||||
*[:blank:]* [:blank:] space and tab
|
||||
*[:cntrl:]* [:cntrl:] iscntrl ASCII control characters
|
||||
*[:digit:]* [:digit:] decimal digits '0' to '9'
|
||||
*[:alpha:]* [:alpha:] isalpha ASCII letters
|
||||
*[:blank:]* [:blank:] space and tab
|
||||
*[:cntrl:]* [:cntrl:] iscntrl ASCII control characters
|
||||
*[:digit:]* [:digit:] decimal digits '0' to '9'
|
||||
*[:graph:]* [:graph:] isgraph ASCII printable characters excluding
|
||||
space
|
||||
*[:lower:]* [:lower:] (1) lowercase letters (all letters when
|
||||
'ignorecase' is used)
|
||||
*[:print:]* [:print:] (2) printable characters including space
|
||||
*[:print:]* [:print:] (2) printable characters including space
|
||||
*[:punct:]* [:punct:] ispunct ASCII punctuation characters
|
||||
*[:space:]* [:space:] whitespace characters: space, tab, CR,
|
||||
*[:space:]* [:space:] whitespace characters: space, tab, CR,
|
||||
NL, vertical tab, form feed
|
||||
*[:upper:]* [:upper:] (3) uppercase letters (all letters when
|
||||
'ignorecase' is used)
|
||||
*[:xdigit:]* [:xdigit:] hexadecimal digits: 0-9, a-f, A-F
|
||||
*[:xdigit:]* [:xdigit:] hexadecimal digits: 0-9, a-f, A-F
|
||||
*[:return:]* [:return:] the <CR> character
|
||||
*[:tab:]* [:tab:] the <Tab> character
|
||||
*[:escape:]* [:escape:] the <Esc> character
|
||||
|
||||
@@ -24,7 +24,7 @@ get the latest versions of scripts listed therein from http://vim.sf.net/.
|
||||
|
||||
==============================================================================
|
||||
1. Contents *glvs-contents* *glvs* *getscript*
|
||||
*GetLatestVimScripts*
|
||||
*GetLatestVimScripts*
|
||||
|
||||
1. Contents........................................: |glvs-contents|
|
||||
2. GetLatestVimScripts -- Getting Started..........: |glvs-install|
|
||||
@@ -116,7 +116,7 @@ reflect the latest version of script(s) so downloaded.
|
||||
|
||||
==============================================================================
|
||||
4. GetLatestVimScripts Data File *getscript-data* *glvs-data*
|
||||
*:GetLatestVimScripts_dat*
|
||||
*:GetLatestVimScripts_dat*
|
||||
The data file <GetLatestVimScripts.dat> must have for its first two lines
|
||||
the following text:
|
||||
>
|
||||
@@ -330,7 +330,7 @@ after/syntax/c.vim contained in it to overwrite a user's c.vim.
|
||||
This variable holds the options to be used with the
|
||||
g:GetLatestVimScripts_wget command.
|
||||
>
|
||||
g:GetLatestVimScripts_allowautoinstall
|
||||
g:GetLatestVimScripts_allowautoinstall
|
||||
< default= 1
|
||||
This variable indicates whether GetLatestVimScripts is allowed
|
||||
to attempt to automatically install scripts. Furthermore, the
|
||||
|
||||
+19
-19
@@ -1085,8 +1085,8 @@ QUICK REFERENCE: MAPS *netrw-browse-maps* {{{2
|
||||
<c-tab> Shrink/expand a netrw/explore window |netrw-c-tab|
|
||||
- Makes Netrw go up one directory |netrw--|
|
||||
a Cycles between normal display, |netrw-a|
|
||||
hiding (suppress display of files matching g:netrw_list_hide)
|
||||
and showing (display only files which match g:netrw_list_hide)
|
||||
hiding (suppress display of files matching g:netrw_list_hide)
|
||||
and showing (display only files which match g:netrw_list_hide)
|
||||
cd Make browsing directory the current directory |netrw-cd|
|
||||
C Setting the editing window |netrw-C|
|
||||
d Make a directory |netrw-d|
|
||||
@@ -1118,7 +1118,7 @@ QUICK REFERENCE: MAPS *netrw-browse-maps* {{{2
|
||||
mX Apply arbitrary shell command to marked files en bloc|netrw-mX|
|
||||
mz Compress/decompress marked files |netrw-mz|
|
||||
o Enter the file/directory under the cursor in a new |netrw-o|
|
||||
browser window. A horizontal split is used.
|
||||
browser window. A horizontal split is used.
|
||||
O Obtain a file specified by cursor |netrw-O|
|
||||
p Preview the file |netrw-p|
|
||||
P Browse in the previously used window |netrw-P|
|
||||
@@ -1134,7 +1134,7 @@ QUICK REFERENCE: MAPS *netrw-browse-maps* {{{2
|
||||
u Change to recently-visited directory |netrw-u|
|
||||
U Change to subsequently-visited directory |netrw-U|
|
||||
v Enter the file/directory under the cursor in a new |netrw-v|
|
||||
browser window. A vertical split is used.
|
||||
browser window. A vertical split is used.
|
||||
x View file with an associated program |netrw-x|
|
||||
X Execute filename under cursor via |system()| |netrw-X|
|
||||
|
||||
@@ -2271,7 +2271,7 @@ Example:
|
||||
...
|
||||
|
||||
|
||||
MARKED FILES, ARBITRARY SHELL COMMAND, EN BLOC *netrw-mX* {{{2
|
||||
MARKED FILES, ARBITRARY SHELL COMMAND, EN BLOC *netrw-mX* {{{2
|
||||
(See |netrw-mf| and |netrw-mr| for how to mark files)
|
||||
(uses the global marked-file list)
|
||||
|
||||
@@ -2620,7 +2620,7 @@ your browsing preferences. (see also: |netrw-settings|)
|
||||
Used to change access permission for a file.
|
||||
|
||||
*g:netrw_clipboard* =1
|
||||
By default, netrw will attempt to insure that
|
||||
By default, netrw will attempt to insure that
|
||||
the clipboard's values will remain unchanged.
|
||||
However, some users report that they have
|
||||
speed problems with this; consequently, this
|
||||
@@ -2768,7 +2768,7 @@ your browsing preferences. (see also: |netrw-settings|)
|
||||
escaped before applying glob()
|
||||
|
||||
*g:netrw_gx* ="<cfile>"
|
||||
This option controls how gx (|netrw-gx|) picks
|
||||
This option controls how gx (|netrw-gx|) picks
|
||||
up the text under the cursor. See |expand()|
|
||||
for possibilities.
|
||||
|
||||
@@ -2834,11 +2834,11 @@ your browsing preferences. (see also: |netrw-settings|)
|
||||
directory (|netrw-mt|, |netrw-mc|)
|
||||
|
||||
*g:netrw_localcopycmdopt* ='' Linux/Unix/MacOS/Cygwin
|
||||
=' \c copy' Windows
|
||||
=' \c copy' Windows
|
||||
Options for the |g:netrw_localcopycmd|
|
||||
|
||||
*g:netrw_localcopydircmd* ="cp" Linux/Unix/MacOS/Cygwin
|
||||
=expand("$COMSPEC") Windows
|
||||
=expand("$COMSPEC") Windows
|
||||
Copies directories to target directory.
|
||||
(|netrw-mc|, |netrw-mt|)
|
||||
|
||||
@@ -2864,7 +2864,7 @@ your browsing preferences. (see also: |netrw-settings|)
|
||||
Options for |g:netrw_localmovecmd|
|
||||
|
||||
*g:netrw_localrmdir* ="rmdir" Linux/Unix/MacOS/Cygwin
|
||||
=expand("$COMSPEC") Windows
|
||||
=expand("$COMSPEC") Windows
|
||||
Remove directory command (rmdir)
|
||||
This variable is only used if your vim is
|
||||
earlier than 7.4 or if your vim doesn't
|
||||
@@ -2900,10 +2900,10 @@ your browsing preferences. (see also: |netrw-settings|)
|
||||
(see |'ballooneval'|)
|
||||
|
||||
*g:netrw_sizestyle* not defined: actual bytes (default)
|
||||
="b" : actual bytes (default)
|
||||
="h" : human-readable (ex. 5k, 4m, 3g)
|
||||
="b" : actual bytes (default)
|
||||
="h" : human-readable (ex. 5k, 4m, 3g)
|
||||
uses 1000 base
|
||||
="H" : human-readable (ex. 5K, 4M, 3G)
|
||||
="H" : human-readable (ex. 5K, 4M, 3G)
|
||||
uses 1024 base
|
||||
The long listing (|netrw-i|) and query-file
|
||||
maps (|netrw-qf|) will display file size
|
||||
@@ -2951,7 +2951,7 @@ your browsing preferences. (see also: |netrw-settings|)
|
||||
default: "NETRWSERVER"
|
||||
|
||||
*g:netrw_sort_by* sort by "name", "time", "size", or
|
||||
"exten".
|
||||
"exten".
|
||||
default: "name"
|
||||
|
||||
*g:netrw_sort_direction* sorting direction: "normal" or "reverse"
|
||||
@@ -3008,7 +3008,7 @@ your browsing preferences. (see also: |netrw-settings|)
|
||||
.vim/after/syntax/netrw.vim.
|
||||
< The netrwGray highlighting is set up by
|
||||
netrw when >
|
||||
* netrwGray has not been previously
|
||||
* netrwGray has not been previously
|
||||
defined
|
||||
* the gui is running
|
||||
< As an example, I myself use a dark-background
|
||||
@@ -3266,7 +3266,7 @@ If there are marked files: (see |netrw-mf|)
|
||||
name, applying that substitute, and renaming each file to the result.
|
||||
As an example : >
|
||||
|
||||
mr [query: reply with *.c]
|
||||
mr [query: reply with *.c]
|
||||
R [query: reply with s/^\(.*\)\.c$/\1.cpp/]
|
||||
<
|
||||
This example will mark all *.c files and then rename them to *.cpp
|
||||
@@ -3275,7 +3275,7 @@ If there are marked files: (see |netrw-mf|)
|
||||
|
||||
The ctrl-X character has special meaning for renaming files: >
|
||||
|
||||
<c-x> : a single ctrl-x tells netrw to ignore the portion of the response
|
||||
<c-x> : a single ctrl-x tells netrw to ignore the portion of the response
|
||||
lying between the last '/' and the ctrl-x.
|
||||
|
||||
<c-x><c-x> : a pair of contiguous ctrl-x's tells netrw to ignore any
|
||||
@@ -3843,7 +3843,7 @@ netrw:
|
||||
Decho.vim is provided as a "vimball"; see |vimball-intro|. You
|
||||
should edit the Decho.vba.gz file and source it in: >
|
||||
|
||||
vim Decho.vba.gz
|
||||
vim Decho.vba.gz
|
||||
:so %
|
||||
:q
|
||||
<
|
||||
@@ -3885,7 +3885,7 @@ netrw:
|
||||
To save the file: under linux, the output will be in a separate
|
||||
remote server window; in it, just save the file with >
|
||||
|
||||
:w! DBG
|
||||
:w! DBG
|
||||
|
||||
< Under a vim that doesn't support clientserver, your debugging
|
||||
output will appear in another tab: >
|
||||
|
||||
@@ -770,7 +770,7 @@ The second argument of |popup_create()| is a dictionary with options:
|
||||
cursorline TRUE: Highlight the cursor line. Also scrolls the
|
||||
text to show this line (only works properly
|
||||
when 'wrap' is off).
|
||||
zero: Do not highlight the cursor line.
|
||||
zero: Do not highlight the cursor line.
|
||||
Default is zero, except for |popup_menu()|.
|
||||
filter A callback that can filter typed characters, see
|
||||
|popup-filter|.
|
||||
|
||||
@@ -47,8 +47,6 @@ Note: If you have problems printing with |:hardcopy|, an alternative is to use
|
||||
paper size, duplex, etc.
|
||||
Note: If you want PDF, there are tools such as
|
||||
"ps2pdf" that can convert the PostScript to PDF.
|
||||
On macOS, you can also use "pstopdf" which comes
|
||||
bundled with the system.
|
||||
|
||||
:[range]ha[rdcopy][!] >{filename}
|
||||
As above, but write the resulting PostScript in file
|
||||
@@ -138,13 +136,8 @@ The arguments to the ":hardcopy" command are in |v:cmdarg|.
|
||||
The expression must take care of deleting the file after printing it.
|
||||
When there is an error, the expression must return a non-zero number.
|
||||
If there is no error, return zero or an empty string.
|
||||
|
||||
The default for MacVim is to convert the PostScript file to PDF and then open
|
||||
it in Preview.app where you can print from there, using the function
|
||||
`macvim#PreviewConvertPostScript()`.
|
||||
|
||||
The default for other non MS-Windows or VMS systems is to simply use "lpr" to
|
||||
print the file: >
|
||||
The default for non MS-Windows or VMS systems is to simply use "lpr" to print
|
||||
the file: >
|
||||
|
||||
system('lpr' .. (&printdevice == '' ? '' : ' -P' .. &printdevice)
|
||||
.. ' ' .. v:fname_in) .. delete(v:fname_in) + v:shell_error
|
||||
|
||||
@@ -1277,7 +1277,7 @@ The .NET CLI compiler outputs both errors and warnings by default. The output
|
||||
may be limited to include only errors, by setting the g:dotnet_errors_only
|
||||
variable to |v:true|.
|
||||
|
||||
The associated project name is included in each error and warning. To suppress
|
||||
The associated project name is included in each error and warning. To supress
|
||||
the project name, set the g:dotnet_show_project_file variable to |v:false|.
|
||||
|
||||
Example: limit output to only display errors, and suppress the project name: >
|
||||
|
||||
@@ -65,7 +65,7 @@ The following command line arguments are available:
|
||||
below). The name used will be uppercase.
|
||||
*--remote-send*
|
||||
--remote-send {keys} Send {keys} to server and exit. The {keys}
|
||||
are not mapped. Special key names are
|
||||
are not mapped. Special key names are
|
||||
recognized, e.g., "<CR>" results in a CR
|
||||
character.
|
||||
*--remote-expr*
|
||||
|
||||
+11
-12
@@ -1,4 +1,4 @@
|
||||
*repeat.txt* For Vim version 9.0. Last change: 2023 Feb 25
|
||||
*repeat.txt* For Vim version 9.0. Last change: 2022 Sep 22
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -267,7 +267,7 @@ For writing a Vim script, see chapter 41 of the user manual |usr_41.txt|.
|
||||
When [where] is omitted only 'runtimepath' is used.
|
||||
Other values:
|
||||
START search under "start" in 'packpath'
|
||||
OPT search under "opt" in 'packpath'
|
||||
OPT search under "opt" in 'packpath'
|
||||
PACK search under "start" and "opt" in
|
||||
'packpath'
|
||||
ALL first use 'runtimepath', then search
|
||||
@@ -423,7 +423,6 @@ For writing a Vim script, see chapter 41 of the user manual |usr_41.txt|.
|
||||
after resolving symbolic links got sourced with
|
||||
another name the other script is after "->". E.g.
|
||||
"20->22" means script 20 was sourced as script 22.
|
||||
Also see `getscriptinfo()`.
|
||||
{not available when compiled without the |+eval|
|
||||
feature}
|
||||
|
||||
@@ -730,15 +729,15 @@ up-to-date easily, but it requires a program like "git" to be available.
|
||||
You can do both, github can automatically create an archive for a release.
|
||||
|
||||
Your directory layout would be like this:
|
||||
start/foobar/plugin/foo.vim " always loaded, defines commands
|
||||
start/foobar/plugin/bar.vim " always loaded, defines commands
|
||||
start/foobar/autoload/foo.vim " loaded when foo command used
|
||||
start/foobar/doc/foo.txt " help for foo.vim
|
||||
start/foobar/doc/tags " help tags
|
||||
opt/fooextra/plugin/extra.vim " optional plugin, defines commands
|
||||
opt/fooextra/autoload/extra.vim " loaded when extra command used
|
||||
opt/fooextra/doc/extra.txt " help for extra.vim
|
||||
opt/fooextra/doc/tags " help tags
|
||||
start/foobar/plugin/foo.vim " always loaded, defines commands
|
||||
start/foobar/plugin/bar.vim " always loaded, defines commands
|
||||
start/foobar/autoload/foo.vim " loaded when foo command used
|
||||
start/foobar/doc/foo.txt " help for foo.vim
|
||||
start/foobar/doc/tags " help tags
|
||||
opt/fooextra/plugin/extra.vim " optional plugin, defines commands
|
||||
opt/fooextra/autoload/extra.vim " loaded when extra command used
|
||||
opt/fooextra/doc/extra.txt " help for extra.vim
|
||||
opt/fooextra/doc/tags " help tags
|
||||
|
||||
This allows for the user to do: >
|
||||
mkdir ~/.vim/pack
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*sign.txt* For Vim version 9.0. Last change: 2023 Feb 21
|
||||
*sign.txt* For Vim version 9.0. Last change: 2022 Dec 20
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Gordon Prieur
|
||||
@@ -614,23 +614,23 @@ sign_placelist({list})
|
||||
|sign_place()| function. The {list} argument specifies the
|
||||
List of signs to place. Each list item is a dict with the
|
||||
following sign attributes:
|
||||
buffer Buffer name or number. For the accepted
|
||||
buffer buffer name or number. For the accepted
|
||||
values, see |bufname()|.
|
||||
group Sign group. {group} functions as a namespace
|
||||
group sign group. {group} functions as a namespace
|
||||
for {id}, thus two groups can use the same
|
||||
IDs. If not specified or set to an empty
|
||||
string, then the global group is used. See
|
||||
|sign-group| for more information.
|
||||
id Sign identifier. If not specified or zero,
|
||||
id sign identifier. If not specified or zero,
|
||||
then a new unique identifier is allocated.
|
||||
Otherwise the specified number is used. See
|
||||
|sign-identifier| for more information.
|
||||
lnum Line number in the buffer where the sign is to
|
||||
lnum line number in the buffer where the sign is to
|
||||
be placed. For the accepted values, see
|
||||
|line()|.
|
||||
name Name of the sign to place. See |sign_define()|
|
||||
for more information.
|
||||
priority Priority of the sign. When multiple signs are
|
||||
name name of the sign to place. See |sign_define()|
|
||||
for more information.
|
||||
priority priority of the sign. When multiple signs are
|
||||
placed on a line, the sign with the highest
|
||||
priority is used. If not specified, the
|
||||
default value of 10 is used. See
|
||||
|
||||
+15
-45
@@ -1,4 +1,4 @@
|
||||
*syntax.txt* For Vim version 9.0. Last change: 2023 Feb 26
|
||||
*syntax.txt* For Vim version 9.0. Last change: 2022 Dec 26
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -1307,32 +1307,18 @@ When not set 4 is used.
|
||||
|
||||
DOSBATCH *dosbatch.vim* *ft-dosbatch-syntax*
|
||||
|
||||
Select the set of Windows Command interpreter extensions that should be
|
||||
supported with the variable dosbatch_cmdextversion. For versions of Windows
|
||||
NT (before Windows 2000) this should have the value of 1. For Windows 2000
|
||||
and later it should be 2.
|
||||
There is one option with highlighting DOS batch files. This covers new
|
||||
extensions to the Command Interpreter introduced with Windows 2000 and
|
||||
is controlled by the variable dosbatch_cmdextversion. For Windows NT
|
||||
this should have the value 1, and for Windows 2000 it should be 2.
|
||||
Select the version you want with the following line: >
|
||||
|
||||
:let dosbatch_cmdextversion = 1
|
||||
|
||||
If this variable is not defined it defaults to a value of 2 to support
|
||||
Windows 2000 and later.
|
||||
Windows 2000.
|
||||
|
||||
The original MS-DOS supports an idiom of using a double colon (::) as an
|
||||
alternative way to enter a comment line. This idiom can be used with the
|
||||
current Windows Command Interpreter, but it can lead to problems when used
|
||||
inside ( ... ) command blocks. You can find a discussion about this on
|
||||
Stack Overflow -
|
||||
|
||||
https://stackoverflow.com/questions/12407800/which-comment-style-should-i-use-in-batch-files
|
||||
|
||||
To allow the use of the :: idiom for comments in the Windows Command
|
||||
Interpreter or working with MS-DOS bat files, set the
|
||||
dosbatch_colons_comment variable to anything: >
|
||||
|
||||
:let dosbatch_colons_comment = 1
|
||||
|
||||
There is an option that covers whether *.btm files should be detected as type
|
||||
A second option covers whether *.btm files should be detected as type
|
||||
"dosbatch" (MS-DOS batch files) or type "btm" (4DOS batch files). The latter
|
||||
is used by default. You may select the former with the following line: >
|
||||
|
||||
@@ -2791,25 +2777,17 @@ For highlighted doctests and code inside: >
|
||||
:let python_no_doctest_highlight = 1
|
||||
or >
|
||||
:let python_no_doctest_code_highlight = 1
|
||||
The first option implies the second one.
|
||||
(first option implies second one).
|
||||
|
||||
For highlighted trailing whitespace and mix of spaces and tabs: >
|
||||
:let python_space_error_highlight = 1
|
||||
|
||||
If you want all possible Python highlighting:
|
||||
If you want all possible Python highlighting (the same as setting the
|
||||
preceding last option and unsetting all other ones): >
|
||||
:let python_highlight_all = 1
|
||||
This has the same effect as setting python_space_error_highlight and
|
||||
unsetting all the other ones.
|
||||
|
||||
If you use Python 2 or straddling code (Python 2 and 3 compatible),
|
||||
you can enforce the use of an older syntax file with support for
|
||||
Python 2 and up to Python 3.5.
|
||||
: let python_use_python2_syntax = 1
|
||||
This option will exclude all modern Python 3.6 or higher features.
|
||||
|
||||
Note: Only existence of these options matters, not their value.
|
||||
You can replace 1 above with anything.
|
||||
|
||||
Note: Only existence of these options matter, not their value. You can replace
|
||||
1 above with anything.
|
||||
|
||||
QUAKE *quake.vim* *ft-quake-syntax*
|
||||
|
||||
@@ -3858,7 +3836,7 @@ SYNTAX ISKEYWORD SETTING *:syn-iskeyword*
|
||||
|
||||
clear: Syntax specific iskeyword setting is disabled and the
|
||||
buffer-local 'iskeyword' setting is used.
|
||||
{option} Set the syntax 'iskeyword' option to a new value.
|
||||
{option} Set the syntax 'iskeyword' option to a new value.
|
||||
|
||||
Example: >
|
||||
:syntax iskeyword @,48-57,192-255,$,_
|
||||
@@ -5305,7 +5283,7 @@ guisp={color-name} *highlight-guisp*
|
||||
(guisp) color to use in the GUI. "guisp" is used for undercurl and
|
||||
strikethrough.
|
||||
There are a few special names:
|
||||
NONE no color (transparent) *E1361*
|
||||
NONE no color (transparent)
|
||||
bg use normal background color
|
||||
background use normal background color
|
||||
fg use normal foreground color
|
||||
@@ -5378,7 +5356,7 @@ ColorColumn Used for the columns set with 'colorcolumn'.
|
||||
*hl-Conceal*
|
||||
Conceal Placeholder characters substituted for concealed
|
||||
text (see 'conceallevel').
|
||||
*hl-Cursor* *hl-lCursor*
|
||||
*hl-Cursor*
|
||||
Cursor Character under the cursor.
|
||||
lCursor Character under the cursor when |language-mapping|
|
||||
is used (see 'guicursor').
|
||||
@@ -5452,14 +5430,6 @@ Normal Normal text.
|
||||
Pmenu Popup menu: Normal item.
|
||||
*hl-PmenuSel*
|
||||
PmenuSel Popup menu: Selected item.
|
||||
*hl-PmenuKind*
|
||||
PmenuKind Popup menu: Normal item "kind".
|
||||
*hl-PmenuKindSel*
|
||||
PmenuKindSel Popup menu: Selected item "kind".
|
||||
*hl-PmenuExtra*
|
||||
PmenuExtra Popup menu: Normal item "extra text".
|
||||
*hl-PmenuExtraSel*
|
||||
PmenuExtraSel Popup menu: Selected item "extra text".
|
||||
*hl-PmenuSbar*
|
||||
PmenuSbar Popup menu: Scrollbar.
|
||||
*hl-PmenuThumb*
|
||||
|
||||
@@ -580,8 +580,6 @@ $quote eval.txt /*$quote*
|
||||
'nobreakindent' options.txt /*'nobreakindent'*
|
||||
'nobri' options.txt /*'nobri'*
|
||||
'nobuflisted' options.txt /*'nobuflisted'*
|
||||
'nocdh' options.txt /*'nocdh'*
|
||||
'nocdhome' options.txt /*'nocdhome'*
|
||||
'nocf' options.txt /*'nocf'*
|
||||
'noci' options.txt /*'noci'*
|
||||
'nocin' options.txt /*'nocin'*
|
||||
@@ -696,8 +694,6 @@ $quote eval.txt /*$quote*
|
||||
'nomousef' options.txt /*'nomousef'*
|
||||
'nomousefocus' options.txt /*'nomousefocus'*
|
||||
'nomousehide' options.txt /*'nomousehide'*
|
||||
'nomousemev' options.txt /*'nomousemev'*
|
||||
'nomousemoveevent' options.txt /*'nomousemoveevent'*
|
||||
'nonu' options.txt /*'nonu'*
|
||||
'nonumber' options.txt /*'nonumber'*
|
||||
'noodev' options.txt /*'noodev'*
|
||||
@@ -767,12 +763,10 @@ $quote eval.txt /*$quote*
|
||||
'notbidi' options.txt /*'notbidi'*
|
||||
'notbs' options.txt /*'notbs'*
|
||||
'notermbidi' options.txt /*'notermbidi'*
|
||||
'notermguicolors' options.txt /*'notermguicolors'*
|
||||
'noterse' options.txt /*'noterse'*
|
||||
'notextauto' options.txt /*'notextauto'*
|
||||
'notextmode' options.txt /*'notextmode'*
|
||||
'notf' options.txt /*'notf'*
|
||||
'notgc' options.txt /*'notgc'*
|
||||
'notgst' options.txt /*'notgst'*
|
||||
'notildeop' options.txt /*'notildeop'*
|
||||
'notimeout' options.txt /*'notimeout'*
|
||||
@@ -2482,7 +2476,6 @@ $quote eval.txt /*$quote*
|
||||
:diffupdate diff.txt /*:diffupdate*
|
||||
:dig digraph.txt /*:dig*
|
||||
:digraphs digraph.txt /*:digraphs*
|
||||
:dis change.txt /*:dis*
|
||||
:disa vim9.txt /*:disa*
|
||||
:disassemble vim9.txt /*:disassemble*
|
||||
:display change.txt /*:display*
|
||||
@@ -2876,7 +2869,6 @@ $quote eval.txt /*$quote*
|
||||
:map-commands map.txt /*:map-commands*
|
||||
:map-expression map.txt /*:map-expression*
|
||||
:map-local map.txt /*:map-local*
|
||||
:map-meta-keys map.txt /*:map-meta-keys*
|
||||
:map-modes map.txt /*:map-modes*
|
||||
:map-nowait map.txt /*:map-nowait*
|
||||
:map-operator map.txt /*:map-operator*
|
||||
@@ -4486,9 +4478,6 @@ E1357 vim9class.txt /*E1357*
|
||||
E1358 vim9class.txt /*E1358*
|
||||
E1359 vim9class.txt /*E1359*
|
||||
E136 starting.txt /*E136*
|
||||
E1360 vim9class.txt /*E1360*
|
||||
E1361 syntax.txt /*E1361*
|
||||
E1362 vim9class.txt /*E1362*
|
||||
E137 starting.txt /*E137*
|
||||
E138 starting.txt /*E138*
|
||||
E139 message.txt /*E139*
|
||||
@@ -5509,7 +5498,6 @@ MMDialogsTrackPwd gui_mac.txt /*MMDialogsTrackPwd*
|
||||
MMDisableLaunchAnimation gui_mac.txt /*MMDisableLaunchAnimation*
|
||||
MMFontPreserveLineSpacing gui_mac.txt /*MMFontPreserveLineSpacing*
|
||||
MMFullScreenFadeTime gui_mac.txt /*MMFullScreenFadeTime*
|
||||
MMLoginShell gui_mac.txt /*MMLoginShell*
|
||||
MMLoginShellArgument gui_mac.txt /*MMLoginShellArgument*
|
||||
MMLoginShellCommand gui_mac.txt /*MMLoginShellCommand*
|
||||
MMNativeFullScreen gui_mac.txt /*MMNativeFullScreen*
|
||||
@@ -8003,8 +7991,6 @@ hl-TabLineFill syntax.txt /*hl-TabLineFill*
|
||||
hl-TabLineSel syntax.txt /*hl-TabLineSel*
|
||||
hl-Terminal syntax.txt /*hl-Terminal*
|
||||
hl-Title syntax.txt /*hl-Title*
|
||||
hl-ToolbarButton gui.txt /*hl-ToolbarButton*
|
||||
hl-ToolbarLine gui.txt /*hl-ToolbarLine*
|
||||
hl-Tooltip syntax.txt /*hl-Tooltip*
|
||||
hl-User1 syntax.txt /*hl-User1*
|
||||
hl-User1..9 syntax.txt /*hl-User1..9*
|
||||
@@ -8016,7 +8002,6 @@ hl-WarningMsg syntax.txt /*hl-WarningMsg*
|
||||
hl-WildMenu syntax.txt /*hl-WildMenu*
|
||||
hl-debugBreakpoint terminal.txt /*hl-debugBreakpoint*
|
||||
hl-debugPC terminal.txt /*hl-debugPC*
|
||||
hl-lCursor syntax.txt /*hl-lCursor*
|
||||
hlID() builtin.txt /*hlID()*
|
||||
hlexists() builtin.txt /*hlexists()*
|
||||
hlget() builtin.txt /*hlget()*
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*tagsrch.txt* For Vim version 9.0. Last change: 2023 Feb 13
|
||||
*tagsrch.txt* For Vim version 9.0. Last change: 2020 Dec 19
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -98,7 +98,7 @@ The ignore-case matches are found when:
|
||||
- when 'tagcase' is "followscs" and 'ignorecase' is on or the 'smartcase'
|
||||
option is on and the pattern does not contain an upper case character
|
||||
- when 'tagcase' is "ignore"
|
||||
- when 'tagcase' is "smart" and the pattern does not contain an upper case
|
||||
- when 'tagcase' is "smart" and the patter does not contain an upper case
|
||||
character
|
||||
|
||||
Note that using ignore-case tag searching disables binary searching in the
|
||||
|
||||
@@ -30,9 +30,9 @@ If the result is "1" you have it.
|
||||
Using the client-server feature |terminal-client-server|
|
||||
4. Remote testing |terminal-testing|
|
||||
5. Diffing screen dumps |terminal-diff|
|
||||
Writing a screen dump test for Vim |terminal-dumptest|
|
||||
Creating a screen dump |terminal-screendump|
|
||||
Comparing screen dumps |terminal-diffscreendump|
|
||||
Writing a screen dump test for Vim |terminal-dumptest|
|
||||
Creating a screen dump |terminal-screendump|
|
||||
Comparing screen dumps |terminal-diffscreendump|
|
||||
6. Debugging |terminal-debug|
|
||||
Starting |termdebug-starting|
|
||||
Example session |termdebug-example|
|
||||
@@ -240,7 +240,7 @@ Command syntax ~
|
||||
in a session file.
|
||||
++shell Instead of executing {command}
|
||||
directly, use a shell, like with
|
||||
`:!command` *E279*
|
||||
`:!command` *E279*
|
||||
{only works on Unix and MS-Windows}
|
||||
++kill={how} When trying to close the terminal
|
||||
window kill the job with {how}. See
|
||||
|
||||
@@ -197,7 +197,7 @@ test_gui_event({event}, {args})
|
||||
Inject an event to select a tabline menu entry. The
|
||||
supported items in {args} are:
|
||||
tabnr: tab page number
|
||||
item: tab page menu item number. 1 for the first
|
||||
item: tab page menu item number. 1 for the first
|
||||
menu item, 2 for the second item and so on.
|
||||
|
||||
After injecting the GUI events you probably should call
|
||||
@@ -369,7 +369,7 @@ test_override({name}, {val}) *test_override()*
|
||||
string is detected
|
||||
ui_delay time in msec to use in ui_delay(); overrules a
|
||||
wait time of up to 3 seconds for messages
|
||||
uptime overrules sysinfo.uptime
|
||||
uptime overrules sysinfo.uptime
|
||||
vterm_title setting the window title by a job running in a
|
||||
terminal window
|
||||
ALL clear all overrides, except alloc_lines ({val} is
|
||||
|
||||
@@ -56,7 +56,7 @@ how to highlight the text. The property type can have these entries:
|
||||
priority will be used.
|
||||
"start_incl" when TRUE inserts at the start position will be
|
||||
included in the text property
|
||||
"end_incl" when TRUE inserts at the end position will be
|
||||
"end_incl" when TRUE inserts at the end position will be
|
||||
included in the text property
|
||||
|
||||
|
||||
@@ -107,14 +107,14 @@ prop_type_list([{props}]) get list of property types
|
||||
|
||||
Manipulating text properties:
|
||||
|
||||
prop_add({lnum}, {col}, {props}) add a text property
|
||||
prop_add({lnum}, {col}, {props}) add a text property
|
||||
prop_add_list({props}, [{item}, ...])
|
||||
add a text property at multiple
|
||||
positions.
|
||||
prop_clear({lnum} [, {lnum-end} [, {bufnr}]])
|
||||
remove all text properties
|
||||
prop_find({props} [, {direction}]) search for a text property
|
||||
prop_list({lnum} [, {props}]) text properties in {lnum}
|
||||
prop_list({lnum} [, {props}]) text properties in {lnum}
|
||||
prop_remove({props} [, {lnum} [, {lnum-end}]])
|
||||
remove a text property
|
||||
|
||||
@@ -149,7 +149,7 @@ prop_add({lnum}, {col}, {props})
|
||||
highlighting; cannot be used with "length",
|
||||
"end_lnum" and "end_col"
|
||||
See |virtual-text| for more information.
|
||||
*E1294*
|
||||
*E1294*
|
||||
text_align when "text" is present and {col} is zero;
|
||||
specifies where to display the text:
|
||||
after after the end of the line
|
||||
@@ -172,7 +172,7 @@ prop_add({lnum}, {col}, {props})
|
||||
fit:
|
||||
wrap wrap the text to the next line
|
||||
truncate truncate the text to make it fit
|
||||
When omitted "truncate" is used.
|
||||
When omitted "truncate" is used.
|
||||
Note that this applies to the individual text
|
||||
property, the 'wrap' option sets the overall
|
||||
behavior
|
||||
|
||||
+27
-34
@@ -1,4 +1,4 @@
|
||||
*todo.txt* For Vim version 9.0. Last change: 2023 Feb 26
|
||||
*todo.txt* For Vim version 9.0. Last change: 2023 Feb 02
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -38,18 +38,6 @@ browser use: https://github.com/vim/vim/issues/1234
|
||||
*known-bugs*
|
||||
-------------------- Known bugs and current work -----------------------
|
||||
|
||||
Crash when splitting window: #11961. Set RedrawingDisabled in
|
||||
win_split_ins().
|
||||
|
||||
CI: include #12008 end of February.
|
||||
|
||||
In runtime/autoload/dist/script.vim change "set ft=" to "setlocal ft=" ?
|
||||
|
||||
CTRL-J mapping is not used if halfway another mapping. #12002
|
||||
Is simplified mapping not used but escape code has been simplified?
|
||||
|
||||
Include #11952 after a runtime files update.
|
||||
|
||||
Errors when running tests with valgrind:
|
||||
- test_codestyle.vim: e.g.:
|
||||
command line..script /home/mool/vim/vim90/src/testdir/runtest.vim[569]..function RunTheTest[52]..Test_test_files line 6: keycode_check.vim: space before tab: Expected 0 but got 7
|
||||
@@ -75,24 +63,18 @@ Further Vim9 improvements, possibly after launch:
|
||||
- implement :class and :interface: See |vim9-classes
|
||||
- Change access: public by default, private by prefixing "_".
|
||||
Check for error: can't have same name twice (ignoring "_" prefix).
|
||||
- Make ":defcompile ClassName" compile all functions and methods in the
|
||||
class.
|
||||
- Private methods?
|
||||
either: private def Func()
|
||||
or: def _Func()
|
||||
Perhaps use "private" keyword instead of "_" prefix?
|
||||
- "final" object members - can only be set in the constructor.
|
||||
- accept line breaks in member initialization. #11957
|
||||
- object empty(), len() - can class define a method to be used for them?
|
||||
- add to help: when using a default new() method then reordering object
|
||||
members may cause trouble. Can define new() without arguments to avoid.
|
||||
- TODO items: check types for "implements" - members and methods
|
||||
- how about lock/unlock?
|
||||
- When checking "implements" also check types of members and function args.
|
||||
- For chaining, allow using the class name as type for function return
|
||||
value.
|
||||
- Implement generics
|
||||
- Add "instanceof" (exact class name). And "assignable" (class or child)?
|
||||
- Add "instanceof"
|
||||
- More efficient way for interface member index than iterating over list?
|
||||
- a variant of type() that returns a different type for each class?
|
||||
list<number> and list<string> should also differ.
|
||||
@@ -100,7 +82,6 @@ Further Vim9 improvements, possibly after launch:
|
||||
this at runtime.
|
||||
- implement :type
|
||||
- implement :enum
|
||||
- Promise class, could be used to wait on a popup close callback?
|
||||
- class local to a function
|
||||
- Use Vim9 for more runtime files.
|
||||
- Inline call to map() and filter(), better type checking.
|
||||
@@ -109,8 +90,6 @@ Further Vim9 improvements, possibly after launch:
|
||||
- Implement as part of an expression: ++expr, --expr, expr++, expr--.
|
||||
|
||||
Information missing in terminfo:
|
||||
- Accept "hyper" and "meta" modifiers (16 and 32) from Kitty like Meta?
|
||||
8 is actually "super".
|
||||
- t_RV request terminal version string; xterm: "\033[>c"
|
||||
change in terminfo for "RV" uses the wrong escape sequence 7 - 14 Jan only
|
||||
Codes used for focus gained and lost (currently using use_xterm_like_mouse())
|
||||
@@ -122,6 +101,7 @@ Codes used for focus gained and lost (currently using use_xterm_like_mouse())
|
||||
- t_fe enable focus-event tracking
|
||||
- t_fd disable focus-event tracking
|
||||
Modifiers for various keys
|
||||
- Decode kitty key protocol Meta and use MOD_MASK_META. Document <T-k>
|
||||
- flag to indicate "xterm compatible modifiers" ?
|
||||
Underline and similar:
|
||||
- t_AU - Set underline color: like "AF" and "AB" entries.
|
||||
@@ -165,6 +145,8 @@ Probably Vim internal, not in terminfo:
|
||||
- t_RK request terminal keyboard protocol state; sent after |t_TI|
|
||||
Already working, not properly documented:
|
||||
- t_u7 request cursor position
|
||||
Also, with Alt-b we get â, with Alt-Shift-b we should bet another character.
|
||||
That does not appear to work with Kitty. #11913
|
||||
|
||||
Popup windows:
|
||||
- Add a function to redraw a specific popup window. Esp. to be used when
|
||||
@@ -319,15 +301,11 @@ Can we not request XT key sequences, or reduce them drastically?
|
||||
Issue #10512: Dynamic loading broken with Perl 5.36
|
||||
Damien has a patch (2022 Dec 4)
|
||||
|
||||
Request #11965: Allow severaql "%=" items in 'statusline', makes it possible
|
||||
to have text in the center.
|
||||
|
||||
Add some kind of ":whathappend" command and functions to make visible what the
|
||||
last few typed keys and executed commands are. To be used when the user
|
||||
wonders what went wrong. Could also be used for statistics #12046.
|
||||
wonders what went wrong.
|
||||
- typed keys - Normal mode command - like what is recorded in a register and
|
||||
displayed by 'showcmd'.
|
||||
- register used - #12063
|
||||
- executed command lines
|
||||
- with more verbosity: what scripts/functions/autocommands were executed
|
||||
|
||||
@@ -362,7 +340,7 @@ Better terminal emulator support:
|
||||
"xterm" and then add "kitty" entries.
|
||||
|
||||
Using "A" and "o" in manually created fold (in empty buffer) does not behave
|
||||
consistently (James McCoy, #10698)
|
||||
consistenly (James McCoy, #10698)
|
||||
|
||||
In a timer callback, when using ":echo" and then input() the message is
|
||||
overwritten. Could use ":echowin" and call redraw_cmd() in get_user_input().
|
||||
@@ -407,6 +385,8 @@ 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[].
|
||||
|
||||
MS-Windows: did path modifier :p:8 stop working? #8600
|
||||
|
||||
Version of getchar() that does not move the cursor - #10603 Use a separate
|
||||
argument for the new flag.
|
||||
|
||||
@@ -488,9 +468,6 @@ Any way to convert "$" back by using a special value? (#6901)
|
||||
Can we detect true color support? https://gist.github.com/XVilka/8346728
|
||||
Try setting a color then request the current color, like using t_u7.
|
||||
|
||||
Add a v:register_used variable, which has the name of the register used for
|
||||
the last command, e.g. put. #12003
|
||||
|
||||
Make the jumplist behave like a tag stack. (#7738) Should there be a more
|
||||
time bound navigation, like with undo?
|
||||
|
||||
@@ -706,7 +683,6 @@ Added tests (James McCoy, 2016 Aug 3, #958). Still needs more work.
|
||||
|
||||
Would be nice to set tab-local values for 'diffexpr' and 'diffopt'. Use
|
||||
t:diffexpr_option t:diffopt_option? (#4782)
|
||||
Also make 'scrollopt' tab-local, remove "hor" only for the current tab page.
|
||||
|
||||
Internal diff doesn't handle binary file like external diff does. (Mike
|
||||
Williams, 2018 Oct 30)
|
||||
@@ -1197,6 +1173,9 @@ Avoids exceptions, e.g. when using the b: namespace as a dict.
|
||||
Patch to make v:shell_error writable. (Christian Brabandt, 2016 Sep 27)
|
||||
Useful to restore it. Is there another solution?
|
||||
|
||||
"ci[" does not look for next [ like ci" does look for next ".
|
||||
(J.F. 2017 Jan 7)
|
||||
|
||||
Patch for wrong cursor position on wrapped line, involving breakindent.
|
||||
(Ozaki Kiichi, 2016 Nov 25)
|
||||
|
||||
@@ -1220,6 +1199,9 @@ Should :vmap in matchit.vim be :xmap? (Tony Mechelynck)
|
||||
|
||||
Problem with whitespace in errorformat. (Gerd Wachsmuth, 2016 May 15, #807)
|
||||
|
||||
Add "unicode true" to NSIS installer. Doesn't work with Windows 95, which we
|
||||
no longer support.
|
||||
|
||||
Support sort(l, 'F'), convert strings to float. (#7857)
|
||||
|
||||
sort() is not stable when using numeric/float sort (Nikolay Pavlov, 2016 Sep
|
||||
@@ -1405,6 +1387,9 @@ Do not include the linebreak at the start?
|
||||
Feature request: add the "al" text object, to manipulate a screen line.
|
||||
Especially useful when using 'linebreak'
|
||||
|
||||
":cd C:\Windows\System32\drivers\etc*" does not work, even though the
|
||||
directory exists. (Sergio Gallelli, 2013 Dec 29)
|
||||
|
||||
Patch to avoid redrawing tabline when the popup menu is visible.
|
||||
(Christian Brabandt, 2016 Jan 28)
|
||||
|
||||
@@ -2989,6 +2974,10 @@ Win32 GUI known bugs:
|
||||
console, go back to Vim and click "reload" in the dialog for the changed
|
||||
file: Window moves with the cursor!
|
||||
Put focus event in input buffer and let generic Vim code handle it?
|
||||
8 Win32 GUI: With maximized window, ":set go-=r" doesn't use the space that
|
||||
comes available. (Poucet) It works OK on Win 98 but doesn't work on Win
|
||||
NT 4.0. Leaves a grey area where the scrollbar was. ":set go+=r" also
|
||||
doesn't work properly.
|
||||
8 When Vim is minimized and when maximizing it a file-changed dialog pops
|
||||
up, Vim isn't maximized. It should be done before the dialog, so that it
|
||||
appears in the right position. (Webb)
|
||||
@@ -3512,6 +3501,8 @@ Problems that will (probably) not be solved:
|
||||
input method called from GDK code. Without Perl it doesn't crash.
|
||||
- VMS: Vimdiff doesn't work with the VMS diff, because the output looks
|
||||
different. This makes test 47 fail. Install a Unix-compatible diff.
|
||||
- Win32 GUI: mouse wheel always scrolls rightmost window. The events arrive
|
||||
in Vim as if the rightmost scrollbar was used.
|
||||
- GTK with Gnome: Produces an error message when starting up:
|
||||
Gdk-WARNING **: locale not supported by C library
|
||||
This is caused by the gnome library gnome_init() setting $LC_CTYPE to
|
||||
@@ -4468,6 +4459,8 @@ Tags:
|
||||
Win32 GUI:
|
||||
8 Make debug mode work while starting up (vim -D). Open console window for
|
||||
the message and input?
|
||||
7 GvimExt: when there are several existing Vims, move the list to a submenu.
|
||||
(Mike McCollister)
|
||||
8 When using "Edit with Vim" for one file it changes directory, when several
|
||||
files are selected and using "Edit with single Vim" the directory isn't
|
||||
changed. At least change directory when the path is the same for all
|
||||
@@ -6012,7 +6005,7 @@ Various improvements:
|
||||
many percent down the windows).
|
||||
- Make it possible for the 'showbreak' to be displayed at the end of the
|
||||
line. Use a comma to separate the part at the end and the start of the
|
||||
line? #754 Highlight the linebreak characters, add flag in 'highlight'.
|
||||
line? Highlight the linebreak characters, add flag in 'highlight'.
|
||||
Make 'showbreak' local to a window.
|
||||
- Some string options should be expanded if they have wildcards, e.g.
|
||||
'dictionary' when it is "*.h".
|
||||
|
||||
@@ -250,7 +250,7 @@ Credit Card: You can use PayPal to send money with a Credit card. This is
|
||||
Bram@iccf-holland.org
|
||||
|
||||
Others: Transfer to this account if possible:
|
||||
ING bank: IBAN: NL95 INGB 0004 5487 74
|
||||
ING bank: IBAN: NL95 INGB 0004 5487 74
|
||||
Swift code: INGBNL2A
|
||||
under the name "stichting ICCF Holland", Amersfoort
|
||||
Checks are not accepted.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*userfunc.txt* For Vim version 9.0. Last change: 2023 Feb 02
|
||||
*userfunc.txt* For Vim version 9.0. Last change: 2023 Jan 09
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -211,8 +211,7 @@ See |:verbose-cmd| for more information.
|
||||
|
||||
*function-argument* *a:var*
|
||||
An argument can be defined by giving its name. In the function this can then
|
||||
be used as "a:name" ("a:" for argument) (in a `:def` function "a:" is not
|
||||
used).
|
||||
be used as "a:name" ("a:" for argument).
|
||||
*a:0* *a:1* *a:000* *E740* *...*
|
||||
Up to 20 arguments can be given, separated by commas. After the named
|
||||
arguments an argument "..." can be specified, which means that more arguments
|
||||
@@ -247,10 +246,9 @@ Example: >
|
||||
call Something('key', 20) "key: 20"
|
||||
|
||||
The argument default expressions are evaluated at the time of the function
|
||||
call, not when the function is defined. Thus it is possible to use an
|
||||
expression which is invalid the moment the function is defined. The
|
||||
expressions are also only evaluated when arguments are not specified during a
|
||||
call.
|
||||
call, not definition. Thus it is possible to use an expression which is
|
||||
invalid the moment the function is defined. The expressions are also only
|
||||
evaluated when arguments are not specified during a call.
|
||||
*none-function_argument*
|
||||
You can pass |v:none| to use the default expression. Note that this means you
|
||||
cannot pass v:none as an ordinary value when an argument has a default
|
||||
|
||||
@@ -505,7 +505,7 @@ You can use the error ID at the start to find help about it: >
|
||||
:help E37
|
||||
|
||||
|
||||
Summary: *help-summary* >
|
||||
Summary: *help-summary* >
|
||||
|
||||
1) Use Ctrl-D after typing a topic and let Vim show all available topics.
|
||||
Or press Tab to complete: >
|
||||
|
||||
@@ -409,7 +409,7 @@ an archive or as a repository. For an archive you can follow these steps:
|
||||
package.
|
||||
2. unpack the archive in that directory. This assumes the top
|
||||
directory in the archive is "start": >
|
||||
cd ~/.vim/pack/fancy
|
||||
cd ~/.vim/pack/fancy
|
||||
unzip /tmp/fancy.zip
|
||||
< If the archive layout is different make sure that you end up with a
|
||||
path like this:
|
||||
|
||||
+20
-20
@@ -77,25 +77,25 @@ browser. This is what you get: >
|
||||
9. Directory Browsing netrw-browse netrw-dir netrw-list netrw-help
|
||||
|
||||
MAPS netrw-maps
|
||||
<F1>.............Help.......................................|netrw-help|
|
||||
<cr>.............Browsing...................................|netrw-cr|
|
||||
<del>............Deleting Files or Directories..............|netrw-delete|
|
||||
-................Going Up...................................|netrw--|
|
||||
a................Hiding Files or Directories................|netrw-a|
|
||||
mb...............Bookmarking a Directory....................|netrw-mb|
|
||||
gb...............Changing to a Bookmarked Directory.........|netrw-gb|
|
||||
cd...............Make Browsing Directory The Current Dir....|netrw-c|
|
||||
d................Make A New Directory.......................|netrw-d|
|
||||
D................Deleting Files or Directories..............|netrw-D|
|
||||
<c-h>............Edit File/Directory Hiding List............|netrw-ctrl-h|
|
||||
i................Change Listing Style.......................|netrw-i|
|
||||
<c-l>............Refreshing the Listing.....................|netrw-ctrl-l|
|
||||
o................Browsing with a Horizontal Split...........|netrw-o|
|
||||
p................Use Preview Window.........................|netrw-p|
|
||||
P................Edit in Previous Window....................|netrw-p|
|
||||
q................Listing Bookmarks and History..............|netrw-qb|
|
||||
r................Reversing Sorting Order....................|netrw-r|
|
||||
< (etc)
|
||||
<F1>.............Help.......................................|netrw-help|
|
||||
<cr>.............Browsing...................................|netrw-cr|
|
||||
<del>............Deleting Files or Directories..............|netrw-delete|
|
||||
-................Going Up...................................|netrw--|
|
||||
a................Hiding Files or Directories................|netrw-a|
|
||||
mb...............Bookmarking a Directory....................|netrw-mb|
|
||||
gb...............Changing to a Bookmarked Directory.........|netrw-gb|
|
||||
cd...............Make Browsing Directory The Current Dir....|netrw-c|
|
||||
d................Make A New Directory.......................|netrw-d|
|
||||
D................Deleting Files or Directories..............|netrw-D|
|
||||
<c-h>............Edit File/Directory Hiding List............|netrw-ctrl-h|
|
||||
i................Change Listing Style.......................|netrw-i|
|
||||
<c-l>............Refreshing the Listing.....................|netrw-ctrl-l|
|
||||
o................Browsing with a Horizontal Split...........|netrw-o|
|
||||
p................Use Preview Window.........................|netrw-p|
|
||||
P................Edit in Previous Window....................|netrw-p|
|
||||
q................Listing Bookmarks and History..............|netrw-qb|
|
||||
r................Reversing Sorting Order....................|netrw-r|
|
||||
< (etc)
|
||||
|
||||
The <F1> key thus brings you to a netrw directory browsing contents help page.
|
||||
It's a regular help page; use the usual |CTRL-]| to jump to tagged help items
|
||||
@@ -106,7 +106,7 @@ To select files for display and editing: (with the cursor is atop a filename)
|
||||
<enter> Open the file in the current window. |netrw-cr|
|
||||
o Horizontally split window and display file |netrw-o|
|
||||
v Vertically split window and display file |netrw-v|
|
||||
p Use the |preview-window| |netrw-p|
|
||||
p Use the |preview-window| |netrw-p|
|
||||
P Edit in the previous window |netrw-P|
|
||||
t Open file in a new tab |netrw-t|
|
||||
|
||||
|
||||
@@ -8125,7 +8125,7 @@ Files: src/message.c
|
||||
|
||||
Patch 7.2.119
|
||||
Problem: Status line is redrawn too often.
|
||||
Solution: Check ScreenLinesUC[] properly. (Yukihiro Nakadaira)
|
||||
Solution: Check ScreeenLinesUC[] properly. (Yukihiro Nakadaira)
|
||||
Files: src/screen.c
|
||||
|
||||
Patch 7.2.120
|
||||
@@ -9784,8 +9784,8 @@ Files: src/syntax.c
|
||||
|
||||
Patch 7.2.406
|
||||
Problem: Patch 7.2.119 introduces uninit mem read. (Dominique Pelle)
|
||||
Solution: Only used ScreenLinesC when ScreenLinesUC is not zero. (Yukihiro
|
||||
Nakadaira) Also clear ScreenLinesC when allocating.
|
||||
Solution: Only used ScreeenLinesC when ScreeenLinesUC is not zero. (Yukihiro
|
||||
Nakadaira) Also clear ScreeenLinesC when allocating.
|
||||
Files: src/screen.c
|
||||
|
||||
Patch 7.2.407
|
||||
|
||||
@@ -342,11 +342,11 @@ New Vim variables: ~
|
||||
|v:mouse_winid| Window ID for a mouse click obtained with |getchar()|
|
||||
|v:none| an empty String, used for JSON
|
||||
|v:null| an empty String, used for JSON
|
||||
|v:option_new| new value of the option, used by |OptionSet|
|
||||
|v:option_old| old value of the option, used by |OptionSet|
|
||||
|v:option_new| new value of the option, used by |OptionSet|
|
||||
|v:option_old| old value of the option, used by |OptionSet|
|
||||
|v:option_oldlocal| old local value of the option, used by |OptionSet|
|
||||
|v:option_oldglobal| old global value of the option, used by |OptionSet|
|
||||
|v:option_type| scope of the set command, used by |OptionSet|
|
||||
|v:option_type| scope of the set command, used by |OptionSet|
|
||||
|v:option_command| command used to set the option, used by |OptionSet|
|
||||
|v:progpath| the command with which Vim was invoked
|
||||
|v:t_bool| value of Boolean type
|
||||
|
||||
+9
-14
@@ -1,4 +1,4 @@
|
||||
*vim9.txt* For Vim version 9.0. Last change: 2023 Feb 21
|
||||
*vim9.txt* For Vim version 9.0. Last change: 2022 Dec 08
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -113,7 +113,7 @@ script and `:def` functions; details are below:
|
||||
:%s/this/that
|
||||
- Executing a register with "@r" does not work, you can prepend a colon or use
|
||||
`:exe`: >
|
||||
:exe @a
|
||||
:exe @a
|
||||
- Unless mentioned specifically, the highest |scriptversion| is used.
|
||||
- When defining an expression mapping, the expression will be evaluated in the
|
||||
context of the script where it was defined.
|
||||
@@ -340,7 +340,7 @@ function, the function does not need to be defined more than once: >
|
||||
|
||||
Variable declarations with :var, :final and :const ~
|
||||
*vim9-declaration* *:var* *E1079*
|
||||
*E1017* *E1020* *E1054* *E1087* *E1124*
|
||||
*E1017* *E1020* *E1054* *E1087* *E1108* *E1124*
|
||||
Local variables need to be declared with `:var`. Local constants need to be
|
||||
declared with `:final` or `:const`. We refer to both as "variables" in this
|
||||
section.
|
||||
@@ -622,7 +622,7 @@ Additionally, a lambda can contain statements in {}: >
|
||||
}
|
||||
This can be useful for a timer, for example: >
|
||||
var count = 0
|
||||
var timer = timer_start(500, (_) => {
|
||||
var timer = timer_start(500, (_) => {
|
||||
count += 1
|
||||
echom 'Handler called ' .. count
|
||||
}, {repeat: 3})
|
||||
@@ -824,7 +824,7 @@ White space is required around most operators.
|
||||
|
||||
White space is required in a sublist (list slice) around the ":", except at
|
||||
the start and end: >
|
||||
otherlist = mylist[v : count] # v:count has a different meaning
|
||||
otherlist = mylist[v : count] # v:count has a different meaning
|
||||
otherlist = mylist[:] # make a copy of the List
|
||||
otherlist = mylist[v :]
|
||||
otherlist = mylist[: v]
|
||||
@@ -879,7 +879,7 @@ This works for alphanumeric characters, underscore and dash. If you want to
|
||||
use another character, use a single or double quoted string: >
|
||||
var dict = {'key with space': value}
|
||||
var dict = {"key\twith\ttabs": value}
|
||||
var dict = {'': value} # empty key
|
||||
var dict = {'': value} # empty key
|
||||
< *E1139*
|
||||
In case the key needs to be an expression, square brackets can be used, just
|
||||
like in JavaScript: >
|
||||
@@ -1254,7 +1254,6 @@ level. They cannot be created in a function, also not in a legacy function.
|
||||
:defc[ompile] Compile functions defined in the current script that
|
||||
were not compiled yet.
|
||||
This will report any errors found during compilation.
|
||||
This excludes functions defined inside a class.
|
||||
|
||||
:defc[ompile] {func}
|
||||
:defc[ompile] debug {func}
|
||||
@@ -1262,10 +1261,6 @@ level. They cannot be created in a function, also not in a legacy function.
|
||||
Compile function {func}, if needed. Use "debug" and
|
||||
"profile" to specify the compilation mode.
|
||||
This will report any errors found during compilation.
|
||||
{func} call also be "ClassName.functionName" to
|
||||
compile a function or method in a class.
|
||||
{func} call also be "ClassName" to compile all
|
||||
functions and methods in a class.
|
||||
|
||||
*:disa* *:disassemble*
|
||||
:disa[ssemble] {func} Show the instructions generated for {func}.
|
||||
@@ -1407,7 +1402,7 @@ to a Vim9 function:
|
||||
echo line(1) .. line(2)
|
||||
|
||||
- line continuation does not always require a backslash: >
|
||||
echo ['one',
|
||||
echo ['one',
|
||||
\ 'two',
|
||||
\ 'three'
|
||||
\ ]
|
||||
@@ -1664,8 +1659,8 @@ type, it can not be used in Vim9 script.
|
||||
|
||||
*E1211* *E1217* *E1218* *E1219* *E1220* *E1221*
|
||||
*E1222* *E1223* *E1224* *E1225* *E1226* *E1227*
|
||||
*E1228* *E1238* *E1250* *E1251* *E1252* *E1256*
|
||||
*E1297* *E1298* *E1301*
|
||||
*E1228* *E1238* *E1250* *E1251* *E1252* *E1253*
|
||||
*E1256* *E1297* *E1298* *E1301*
|
||||
Types are checked for most builtin functions to make it easier to spot
|
||||
mistakes.
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*vim9class.txt* For Vim version 9.0. Last change: 2023 Feb 26
|
||||
*vim9class.txt* For Vim version 9.0. Last change: 2023 Jan 17
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -469,16 +469,16 @@ interface, which is often done in many languages, especially Java.
|
||||
|
||||
Items in a class ~
|
||||
*E1318* *E1325* *E1326*
|
||||
Inside a class, in between `:class` and `:endclass`, these items can appear:
|
||||
Inside a class, in betweeen `:class` and `:endclass`, these items can appear:
|
||||
- An object member declaration: >
|
||||
this._memberName: memberType
|
||||
this.memberName: memberType
|
||||
this._memberName: memberType
|
||||
this.memberName: memberType
|
||||
public this.memberName: memberType
|
||||
- A constructor method: >
|
||||
def new(arguments)
|
||||
def newName(arguments)
|
||||
def new(arguments)
|
||||
def newName(arguments)
|
||||
- An object method: >
|
||||
def SomeMethod(arguments)
|
||||
def SomeMethod(arguments)
|
||||
< *E1329*
|
||||
For the object member the type must be specified. The best way is to do this
|
||||
explicitly with ": {type}". For simple types you can also use an initializer,
|
||||
@@ -520,15 +520,6 @@ name, with a hint about what it provides.
|
||||
An interface can only be defined in a |Vim9| script file. *E1342*
|
||||
|
||||
|
||||
null object ~
|
||||
|
||||
When a variable is declared to have the type of an object, but it is not
|
||||
initialized, the value is null. When trying to use this null object Vim often
|
||||
does not know what class was supposed to be used. Vim then cannot check if
|
||||
a member name is correct and you will get an "Using a null object" error,
|
||||
even when the member name is invalid. *E1360* *E1362*
|
||||
|
||||
|
||||
Default constructor ~
|
||||
|
||||
In case you define a class without a new() method, one will be automatically
|
||||
|
||||
+8
-53
@@ -1,7 +1,7 @@
|
||||
" Vim support file to detect file types
|
||||
"
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2023 Feb 25
|
||||
" Last Change: 2023 Feb 02
|
||||
|
||||
" Listen very carefully, I will say this only once
|
||||
if exists("did_load_filetypes")
|
||||
@@ -205,9 +205,6 @@ au BufNewFile,BufRead *.mch,*.ref,*.imp setf b
|
||||
au BufNewFile,BufRead *.bas call dist#ft#FTbas()
|
||||
au BufNewFile,BufRead *.bi,*.bm call dist#ft#FTbas()
|
||||
|
||||
" Bass
|
||||
au BufNewFile,BufRead *.bass setf bass
|
||||
|
||||
" Visual Basic Script (close to Visual Basic) or Visual Basic .NET
|
||||
au BufNewFile,BufRead *.vb,*.vbs,*.dsm,*.ctl setf vb
|
||||
|
||||
@@ -277,9 +274,6 @@ endif
|
||||
au BufNewFile,BufRead *.c call dist#ft#FTlpc()
|
||||
au BufNewFile,BufRead *.lpc,*.ulpc setf lpc
|
||||
|
||||
" Cairo
|
||||
au BufNewFile,BufRead *.cairo setf cairo
|
||||
|
||||
" Calendar
|
||||
au BufNewFile,BufRead calendar setf calendar
|
||||
|
||||
@@ -316,9 +310,6 @@ au BufNewFile,BufRead *.cdl setf cdl
|
||||
" Conary Recipe
|
||||
au BufNewFile,BufRead *.recipe setf conaryrecipe
|
||||
|
||||
" ChainPack Object Notation (CPON)
|
||||
au BufNewFile,BufRead *.cpon setf cpon
|
||||
|
||||
" Controllable Regex Mutilator
|
||||
au BufNewFile,BufRead *.crm setf crm
|
||||
|
||||
@@ -445,9 +436,6 @@ au BufNewFile,BufRead *.csv setf csv
|
||||
" CUDA Compute Unified Device Architecture
|
||||
au BufNewFile,BufRead *.cu,*.cuh setf cuda
|
||||
|
||||
" Cue
|
||||
au BufNewFile,BufRead *.cue setf cue
|
||||
|
||||
" Dockerfile; Podman uses the same syntax with name Containerfile
|
||||
" Also see Dockerfile.* below.
|
||||
au BufNewFile,BufRead Containerfile,Dockerfile,dockerfile,*.[dD]ockerfile setf dockerfile
|
||||
@@ -531,9 +519,6 @@ au BufNewFile,BufRead */etc/apt/sources.list.d/*.list setf debsources
|
||||
" Deny hosts
|
||||
au BufNewFile,BufRead denyhosts.conf setf denyhosts
|
||||
|
||||
" Dhall
|
||||
au BufNewFile,BufRead *.dhall setf dhall
|
||||
|
||||
" dnsmasq(8) configuration files
|
||||
au BufNewFile,BufRead */etc/dnsmasq.conf setf dnsmasq
|
||||
|
||||
@@ -721,9 +706,6 @@ au BufNewFile,BufRead *.fsl setf framescript
|
||||
" FStab
|
||||
au BufNewFile,BufRead fstab,mtab setf fstab
|
||||
|
||||
" Func
|
||||
au BufNewFile,BufRead *.fc setf func
|
||||
|
||||
" Fusion
|
||||
au BufRead,BufNewFile *.fusion setf fusion
|
||||
|
||||
@@ -880,7 +862,7 @@ au BufNewFile,BufRead *.htpp setf hastepreproc
|
||||
au BufRead,BufNewFile *.hcl setf hcl
|
||||
|
||||
" Go checksum file (must be before *.sum Hercules)
|
||||
au BufNewFile,BufRead go.sum,go.work.sum setf gosum
|
||||
au BufNewFile,BufRead go.sum setf gosum
|
||||
|
||||
" Hercules
|
||||
au BufNewFile,BufRead *.vc,*.ev,*.sum,*.errsum setf hercules
|
||||
@@ -1044,7 +1026,7 @@ au BufNewFile,BufRead *.ipynb setf json
|
||||
au BufNewFile,BufRead .prettierrc,.firebaserc,.stylelintrc setf json
|
||||
|
||||
" JSONC (JSON with comments)
|
||||
au BufNewFile,BufRead *.jsonc,.babelrc,.eslintrc,.jsfmtrc setf jsonc
|
||||
au BufNewFile,BufRead *.jsonc,.babelrc,.eslintrc,.jsfmtrc setf jsonc
|
||||
au BufNewFile,BufRead .jshintrc,.hintrc,.swrc,[jt]sconfig*.json setf jsonc
|
||||
|
||||
" JSON
|
||||
@@ -1282,9 +1264,6 @@ au BufNewFile,BufRead *.[mi][3g] setf modula3
|
||||
" Larch/Modula-3
|
||||
au BufNewFile,BufRead *.lm3 setf modula3
|
||||
|
||||
" Modconf
|
||||
au BufNewFile,BufRead */etc/modules.conf,*/etc/modules,*/etc/conf.modules setf modconf
|
||||
|
||||
" Monk
|
||||
au BufNewFile,BufRead *.isc,*.monk,*.ssc,*.tsc setf monk
|
||||
|
||||
@@ -1294,8 +1273,8 @@ au BufNewFile,BufRead *.moo setf moo
|
||||
" Moonscript
|
||||
au BufNewFile,BufRead *.moon setf moonscript
|
||||
|
||||
" Move language
|
||||
au BufNewFile,BufRead *.move setf move
|
||||
" Modconf
|
||||
au BufNewFile,BufRead */etc/modules.conf,*/etc/modules,*/etc/conf.modules setf modconf
|
||||
|
||||
" MPD is based on XML
|
||||
au BufNewFile,BufRead *.mpd setf xml
|
||||
@@ -1402,9 +1381,6 @@ au BufNewFile,BufRead *.occ setf occam
|
||||
" Octave
|
||||
au BufNewFile,BufRead octave.conf,.octaverc,octaverc setf octave
|
||||
|
||||
" Odin
|
||||
au BufNewFile,BufRead *.odin setf odin
|
||||
|
||||
" Omnimark
|
||||
au BufNewFile,BufRead *.xom,*.xin setf omnimark
|
||||
|
||||
@@ -1650,7 +1626,7 @@ au BufNewFile,BufRead *.ptl,*.pyi,SConstruct setf python
|
||||
au BufRead,BufNewFile *.ql,*.qll setf ql
|
||||
|
||||
" Quarto
|
||||
au BufRead,BufNewFile *.qmd setf quarto
|
||||
au BufRead,BufNewFile *.qmd setf quarto
|
||||
|
||||
" Radiance
|
||||
au BufNewFile,BufRead *.rad,*.mat setf radiance
|
||||
@@ -1741,15 +1717,12 @@ au BufNewFile,BufRead *.robot,*.resource setf robot
|
||||
" Robots.txt
|
||||
au BufNewFile,BufRead robots.txt setf robots
|
||||
|
||||
" RON (Rusty Object Notation)
|
||||
au BufNewFile,BufRead *.ron setf ron
|
||||
" Rpcgen
|
||||
au BufNewFile,BufRead *.x setf rpcgen
|
||||
|
||||
" MikroTik RouterOS script
|
||||
au BufRead,BufNewFile *.rsc setf routeros
|
||||
|
||||
" Rpcgen
|
||||
au BufNewFile,BufRead *.x setf rpcgen
|
||||
|
||||
" reStructuredText Documentation Format
|
||||
au BufNewFile,BufRead *.rst setf rst
|
||||
|
||||
@@ -1938,9 +1911,6 @@ au BufNewFile,BufRead *.sst.meta,*.-sst.meta,*._sst.meta setf sisu
|
||||
" SKILL
|
||||
au BufNewFile,BufRead *.il,*.ils,*.cdf setf skill
|
||||
|
||||
" Cadence
|
||||
au BufNewFile,BufRead *.cdc setf cdc
|
||||
|
||||
" SLRN
|
||||
au BufNewFile,BufRead .slrnrc setf slrnrc
|
||||
au BufNewFile,BufRead *.score setf slrnsc
|
||||
@@ -2026,9 +1996,6 @@ au BufNewFile,BufRead *.sql call dist#ft#SQL()
|
||||
" SQLJ
|
||||
au BufNewFile,BufRead *.sqlj setf sqlj
|
||||
|
||||
" PRQL
|
||||
au BufNewFile,BufRead *.prql setf prql
|
||||
|
||||
" SQR
|
||||
au BufNewFile,BufRead *.sqr,*.sqi setf sqr
|
||||
|
||||
@@ -2043,9 +2010,6 @@ au BufNewFile,BufRead */etc/ssh/ssh_config.d/*.conf setf sshconfig
|
||||
au BufNewFile,BufRead sshd_config setf sshdconfig
|
||||
au BufNewFile,BufRead */etc/ssh/sshd_config.d/*.conf setf sshdconfig
|
||||
|
||||
" Starlark
|
||||
au BufNewFile,BufRead *.ipd,*.star,*.starlark setf starlark
|
||||
|
||||
" OpenVPN configuration
|
||||
au BufNewFile,BufRead *.ovpn setf openvpn
|
||||
au BufNewFile,BufRead */openvpn/*/*.conf setf openvpn
|
||||
@@ -2112,9 +2076,6 @@ au BufNewFile,BufRead tags setf tags
|
||||
" TAK
|
||||
au BufNewFile,BufRead *.tak setf tak
|
||||
|
||||
" Unx Tal
|
||||
au BufNewFile,BufRead *.tal setf tal
|
||||
|
||||
" Task
|
||||
au BufRead,BufNewFile {pending,completed,undo}.data setf taskdata
|
||||
au BufRead,BufNewFile *.task setf taskedit
|
||||
@@ -2229,9 +2190,6 @@ au BufNewFile,BufRead */etc/udev/permissions.d/*.permissions setf udevperm
|
||||
" Udev symlinks config
|
||||
au BufNewFile,BufRead */etc/udev/cdsymlinks.conf setf sh
|
||||
|
||||
" Ungrammar, AKA Un-grammar
|
||||
au BufNewFile,BufRead *.ungram setf ungrammar
|
||||
|
||||
" UnrealScript
|
||||
au BufNewFile,BufRead *.uc setf uc
|
||||
|
||||
@@ -2468,9 +2426,6 @@ au BufNewFile,BufRead */etc/yum.conf setf dosini
|
||||
" YANG
|
||||
au BufRead,BufNewFile *.yang setf yang
|
||||
|
||||
" Yuck
|
||||
au BufNewFile,BufRead *.yuck setf yuck
|
||||
|
||||
" Zimbu
|
||||
au BufNewFile,BufRead *.zu setf zimbu
|
||||
" Zimbu Templates
|
||||
|
||||
@@ -1,10 +1,7 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: MS-DOS/Windows .bat files
|
||||
" Maintainer: Mike Williams <mrmrdubya@gmail.com>
|
||||
" Last Change: 12th February 2023
|
||||
"
|
||||
" Options Flags:
|
||||
" dosbatch_colons_comment - any value to treat :: as comment line
|
||||
" Language: MS-DOS .bat files
|
||||
" Maintainer: Mike Williams <mrw@eandem.co.uk>
|
||||
" Last Change: 7th May 2020
|
||||
|
||||
" Only do this when not done yet for this buffer
|
||||
if exists("b:did_ftplugin")
|
||||
@@ -18,13 +15,8 @@ let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
" BAT comment formatting
|
||||
setlocal comments=b:rem,b:@rem,b:REM,b:@REM
|
||||
if exists("dosbatch_colons_comment")
|
||||
setlocal comments+=:::
|
||||
setlocal commentstring=::\ %s
|
||||
else
|
||||
setlocal commentstring=REM\ %s
|
||||
endif
|
||||
setlocal comments=b:rem,b:@rem,b:REM,b:@REM,:::
|
||||
setlocal commentstring=::\ %s
|
||||
setlocal formatoptions-=t formatoptions+=rol
|
||||
|
||||
" Lookup DOS keywords using Windows command help.
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: fish
|
||||
" Maintainer: Nicholas Boyle (github.com/nickeb96)
|
||||
" Repository: https://github.com/nickeb96/fish.vim
|
||||
" Last Change: February 1, 2023
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
setlocal iskeyword=@,48-57,_,192-255,-,.
|
||||
setlocal comments=:#
|
||||
setlocal commentstring=#%s
|
||||
setlocal formatoptions+=crjq
|
||||
@@ -1 +0,0 @@
|
||||
runtime ftplugin/rmd.vim
|
||||
@@ -2,7 +2,7 @@
|
||||
" Language: R
|
||||
" Maintainer: Jakson Alves de Aquino <jalvesaq@gmail.com>
|
||||
" Homepage: https://github.com/jalvesaq/R-Vim-runtime
|
||||
" Last Change: Sun Apr 24, 2022 09:14AM
|
||||
" Last Change: Sat Aug 15, 2020 11:37AM
|
||||
|
||||
" Only do this when not yet done for this buffer
|
||||
if exists("b:did_ftplugin")
|
||||
@@ -22,7 +22,7 @@ setlocal comments=:#',:###,:##,:#
|
||||
|
||||
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
|
||||
let b:browsefilter = "R Source Files (*.R)\t*.R\n" .
|
||||
\ "Files that include R (*.Rnw *.Rd *.Rmd *.Rrst *.qmd)\t*.Rnw;*.Rd;*.Rmd;*.Rrst;*.qmd\n" .
|
||||
\ "Files that include R (*.Rnw *.Rd *.Rmd *.Rrst)\t*.Rnw;*.Rd;*.Rmd;*.Rrst\n" .
|
||||
\ "All Files (*.*)\t*.*\n"
|
||||
endif
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
" Language: R help file
|
||||
" Maintainer: Jakson Alves de Aquino <jalvesaq@gmail.com>
|
||||
" Homepage: https://github.com/jalvesaq/R-Vim-runtime
|
||||
" Last Change: Sun Apr 24, 2022 09:12AM
|
||||
" Last Change: Sat Aug 15, 2020 12:01PM
|
||||
|
||||
" Only do this when not yet done for this buffer
|
||||
if exists("b:did_ftplugin")
|
||||
@@ -18,7 +18,7 @@ set cpo&vim
|
||||
setlocal iskeyword=@,48-57,_,.
|
||||
|
||||
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
|
||||
let b:browsefilter = "R Source Files (*.R *.Rnw *.Rd *.Rmd *.Rrst *.qmd)\t*.R;*.Rnw;*.Rd;*.Rmd;*.Rrst;*.qmd\n" .
|
||||
let b:browsefilter = "R Source Files (*.R *.Rnw *.Rd *.Rmd *.Rrst)\t*.R;*.Rnw;*.Rd;*.Rmd;*.Rrst\n" .
|
||||
\ "All Files (*.*)\t*.*\n"
|
||||
endif
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
" Language: R Markdown file
|
||||
" Maintainer: Jakson Alves de Aquino <jalvesaq@gmail.com>
|
||||
" Homepage: https://github.com/jalvesaq/R-Vim-runtime
|
||||
" Last Change: Sun Apr 24, 2022 09:12AM
|
||||
" Last Change: Sat Aug 15, 2020 12:03PM
|
||||
" Original work by Alex Zvoleff (adjusted from R help for rmd by Michel Kuhlmann)
|
||||
|
||||
" Only do this when not yet done for this buffer
|
||||
@@ -32,24 +32,13 @@ function! FormatRmd()
|
||||
return 1
|
||||
endfunction
|
||||
|
||||
function! SetRmdCommentStr()
|
||||
if (search("^[ \t]*```[ ]*{r", "bncW") > search("^[ \t]*```$", "bncW")) || ((search('^---$', 'Wn') || search('^\.\.\.$', 'Wn')) && search('^---$', 'bnW'))
|
||||
set commentstring=#\ %s
|
||||
else
|
||||
set commentstring=<!--\ %s\ -->
|
||||
endif
|
||||
endfunction
|
||||
|
||||
" If you do not want both 'comments' and 'commentstring' dynamically defined,
|
||||
" put in your vimrc: let g:rmd_dynamic_comments = 0
|
||||
" If you do not want 'comments' dynamically defined, put in your vimrc:
|
||||
" let g:rmd_dynamic_comments = 0
|
||||
if !exists("g:rmd_dynamic_comments") || (exists("g:rmd_dynamic_comments") && g:rmd_dynamic_comments == 1)
|
||||
setlocal formatexpr=FormatRmd()
|
||||
augroup RmdCStr
|
||||
autocmd!
|
||||
autocmd CursorMoved <buffer> call SetRmdCommentStr()
|
||||
augroup END
|
||||
endif
|
||||
|
||||
|
||||
" Enables pandoc if it is installed
|
||||
unlet! b:did_ftplugin
|
||||
runtime ftplugin/pandoc.vim
|
||||
@@ -58,7 +47,7 @@ runtime ftplugin/pandoc.vim
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
|
||||
let b:browsefilter = "R Source Files (*.R *.Rnw *.Rd *.Rmd *.Rrst *.qmd)\t*.R;*.Rnw;*.Rd;*.Rmd;*.Rrst;*.qmd\n" .
|
||||
let b:browsefilter = "R Source Files (*.R *.Rnw *.Rd *.Rmd *.Rrst)\t*.R;*.Rnw;*.Rd;*.Rmd;*.Rrst\n" .
|
||||
\ "All Files (*.*)\t*.*\n"
|
||||
endif
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
" Language: Rnoweb
|
||||
" Maintainer: Jakson Alves de Aquino <jalvesaq@gmail.com>
|
||||
" Homepage: https://github.com/jalvesaq/R-Vim-runtime
|
||||
" Last Change: Sun Apr 24, 2022 09:13AM
|
||||
" Last Change: Sat Aug 15, 2020 12:02PM
|
||||
|
||||
" Only do this when not yet done for this buffer
|
||||
if exists("b:did_ftplugin")
|
||||
@@ -25,27 +25,10 @@ setlocal suffixesadd=.bib,.tex
|
||||
setlocal comments=b:%,b:#,b:##,b:###,b:#'
|
||||
|
||||
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
|
||||
let b:browsefilter = "R Source Files (*.R *.Rnw *.Rd *.Rmd *.Rrst *.qmd)\t*.R;*.Rnw;*.Rd;*.Rmd;*.Rrst;*.qmd\n" .
|
||||
let b:browsefilter = "R Source Files (*.R *.Rnw *.Rd *.Rmd *.Rrst)\t*.R;*.Rnw;*.Rd;*.Rmd;*.Rrst\n" .
|
||||
\ "All Files (*.*)\t*.*\n"
|
||||
endif
|
||||
|
||||
function! SetRnwCommentStr()
|
||||
if (search("^\s*<<.*>>=", "bncW") > search("^@", "bncW"))
|
||||
set commentstring=#\ %s
|
||||
else
|
||||
set commentstring=%\ %s
|
||||
endif
|
||||
endfunction
|
||||
|
||||
" If you do not want both 'comments' and 'commentstring' dynamically defined,
|
||||
" put in your vimrc: let g:rnw_dynamic_comments = 0
|
||||
if !exists("g:rnw_dynamic_comments") || (exists("g:rnw_dynamic_comments") && g:rnw_dynamic_comments == 1)
|
||||
augroup RnwCStr
|
||||
autocmd!
|
||||
autocmd CursorMoved <buffer> call SetRnwCommentStr()
|
||||
augroup END
|
||||
endif
|
||||
|
||||
if exists('b:undo_ftplugin')
|
||||
let b:undo_ftplugin .= " | setl isk< sua< com< | unlet! b:browsefilter"
|
||||
else
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
" Language: reStructuredText documentation format with R code
|
||||
" Maintainer: Jakson Alves de Aquino <jalvesaq@gmail.com>
|
||||
" Homepage: https://github.com/jalvesaq/R-Vim-runtime
|
||||
" Last Change: Sun Apr 24, 2022 09:13AM
|
||||
" Last Change: Sat Aug 15, 2020 12:02PM
|
||||
" Original work by Alex Zvoleff
|
||||
|
||||
" Only do this when not yet done for this buffer
|
||||
@@ -38,7 +38,7 @@ if !exists("g:rrst_dynamic_comments") || (exists("g:rrst_dynamic_comments") && g
|
||||
endif
|
||||
|
||||
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
|
||||
let b:browsefilter = "R Source Files (*.R *.Rnw *.Rd *.Rmd *.Rrst *.qmd)\t*.R;*.Rnw;*.Rd;*.Rmd;*.Rrst;*.qmd\n" .
|
||||
let b:browsefilter = "R Source Files (*.R *.Rnw *.Rd *.Rmd *.Rrst)\t*.R;*.Rnw;*.Rd;*.Rmd;*.Rrst\n" .
|
||||
\ "All Files (*.*)\t*.*\n"
|
||||
endif
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim filetype plugin
|
||||
" Language: Vim
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2023 Feb 07
|
||||
" Last Change: 2022 Nov 27
|
||||
|
||||
" Only do this when not done yet for this buffer
|
||||
if exists("b:did_ftplugin")
|
||||
@@ -99,23 +99,18 @@ if exists("loaded_matchit")
|
||||
" func name
|
||||
" require a parenthesis following, then there can be an "endfunc".
|
||||
let b:match_words =
|
||||
\ '\<\%(fu\%[nction]\|def\)!\=\s\+\S\+\s*(:\%(\%(^\||\)\s*\)\@<=\<retu\%[rn]\>:\%(\%(^\||\)\s*\)\@<=\<\%(endf\%[unction]\|enddef\)\>,' ..
|
||||
\ '\<\%(wh\%[ile]\|for\)\>:\%(\%(^\||\)\s*\)\@<=\<brea\%[k]\>:\%(\%(^\||\)\s*\)\@<=\<con\%[tinue]\>:\%(\%(^\||\)\s*\)\@<=\<end\%(w\%[hile]\|fo\%[r]\)\>,' ..
|
||||
\ '\<if\>:\%(\%(^\||\)\s*\)\@<=\<el\%[seif]\>:\%(\%(^\||\)\s*\)\@<=\<en\%[dif]\>,' ..
|
||||
\ '{:},' ..
|
||||
\ '\<try\>:\%(\%(^\||\)\s*\)\@<=\<cat\%[ch]\>:\%(\%(^\||\)\s*\)\@<=\<fina\%[lly]\>:\%(\%(^\||\)\s*\)\@<=\<endt\%[ry]\>,' ..
|
||||
\ '\<aug\%[roup]\s\+\%(END\>\)\@!\S:\<aug\%[roup]\s\+END\>,' ..
|
||||
\ '\<class\>:\<endclass\>,' ..
|
||||
\ '\<inte\%[rface]\>:\<endinterface\>,' ..
|
||||
\ '\<enu\%[m]\>:\<endenum\>,'
|
||||
|
||||
\ '\<\%(fu\%[nction]\|def\)!\=\s\+\S\+\s*(:\%(\%(^\||\)\s*\)\@<=\<retu\%[rn]\>:\%(\%(^\||\)\s*\)\@<=\<\%(endf\%[unction]\|enddef\)\>,' .
|
||||
\ '\<\(wh\%[ile]\|for\)\>:\%(\%(^\||\)\s*\)\@<=\<brea\%[k]\>:\%(\%(^\||\)\s*\)\@<=\<con\%[tinue]\>:\%(\%(^\||\)\s*\)\@<=\<end\(w\%[hile]\|fo\%[r]\)\>,' .
|
||||
\ '\<if\>:\%(\%(^\||\)\s*\)\@<=\<el\%[seif]\>:\%(\%(^\||\)\s*\)\@<=\<en\%[dif]\>,' .
|
||||
\ '{:},' .
|
||||
\ '\<try\>:\%(\%(^\||\)\s*\)\@<=\<cat\%[ch]\>:\%(\%(^\||\)\s*\)\@<=\<fina\%[lly]\>:\%(\%(^\||\)\s*\)\@<=\<endt\%[ry]\>,' .
|
||||
\ '\<aug\%[roup]\s\+\%(END\>\)\@!\S:\<aug\%[roup]\s\+END\>,'
|
||||
" Ignore syntax region commands and settings, any 'en*' would clobber
|
||||
" if-endif.
|
||||
" - set spl=de,en
|
||||
" - au! FileType javascript syntax region foldBraces start=/{/ end=/}/ …
|
||||
" Also ignore here-doc and dictionary keys (vimVar).
|
||||
let b:match_skip = 'synIDattr(synID(line("."), col("."), 1), "name")
|
||||
\ =~? "comment\\|string\\|vimSynReg\\|vimSet\\|vimLetHereDoc\\|vimVar"'
|
||||
let b:match_skip = 'synIDattr(synID(line("."),col("."),1),"name")
|
||||
\ =~? "comment\\|string\\|vimLetHereDoc\\|vimSynReg\\|vimSet"'
|
||||
endif
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
|
||||
Vendored
-119
@@ -1,119 +0,0 @@
|
||||
vim9script
|
||||
|
||||
# Maintainer: github user lacygoill
|
||||
# Last Change: 2023 Mar 08
|
||||
|
||||
# Init {{{1
|
||||
|
||||
const LINK: string = '->'
|
||||
|
||||
# Interface {{{1
|
||||
export def HighlightTest() # {{{2
|
||||
# Open a new window if the current one isn't empty
|
||||
if line('$') != 1 || getline(1) != ''
|
||||
new
|
||||
endif
|
||||
|
||||
edit Highlight\ test
|
||||
|
||||
# `:help scratch-buffer`
|
||||
&l:bufhidden = 'hide'
|
||||
&l:buftype = 'nofile'
|
||||
&l:swapfile = false
|
||||
|
||||
var report: list<string> =<< trim END
|
||||
Highlighting groups for various occasions
|
||||
-----------------------------------------
|
||||
END
|
||||
|
||||
var various_groups: list<string> = GetVariousGroups()
|
||||
->filter((_, group: string): bool => group->hlexists() && !group->IsCleared())
|
||||
->sort()
|
||||
->uniq()
|
||||
|
||||
report->extend(various_groups->FollowChains())
|
||||
|
||||
var language_section: list<string> =<< trim END
|
||||
|
||||
Highlighting groups for language syntaxes
|
||||
-----------------------------------------
|
||||
END
|
||||
report->extend(language_section)
|
||||
|
||||
var syntax_groups: list<string> = getcompletion('', 'highlight')
|
||||
->filter((_, group: string): bool =>
|
||||
various_groups->index(group) == -1
|
||||
&& !group->IsCleared()
|
||||
&& group !~ '^HighlightTest')
|
||||
|
||||
# put the report
|
||||
report
|
||||
->extend(syntax_groups->FollowChains())
|
||||
->setline(1)
|
||||
|
||||
# highlight the group names
|
||||
execute $'silent! global /^\w\+\%(\%(\s*{LINK}\s*\)\w\+\)*$/ Highlight({bufnr('%')})'
|
||||
|
||||
cursor(1, 1)
|
||||
enddef
|
||||
# }}}1
|
||||
# Core {{{1
|
||||
def Highlight(buf: number) # {{{2
|
||||
var lnum: number = line('.')
|
||||
for group: string in getline('.')->split($'\s*{LINK}\s*')
|
||||
silent! prop_type_add($'highlight-test-{group}', {
|
||||
bufnr: buf,
|
||||
highlight: group,
|
||||
combine: false,
|
||||
})
|
||||
prop_add(lnum, col('.'), {
|
||||
length: group->strlen(),
|
||||
type: $'highlight-test-{group}'
|
||||
})
|
||||
search('\<\w\+\>', '', lnum)
|
||||
endfor
|
||||
enddef
|
||||
# }}}1
|
||||
# Util {{{1
|
||||
def IsCleared(name: string): bool # {{{2
|
||||
return name
|
||||
->hlget()
|
||||
->get(0, {})
|
||||
->get('cleared')
|
||||
enddef
|
||||
|
||||
def FollowChains(groups: list<string>): list<string> # {{{2
|
||||
# A group might be linked to another, which itself might be linked...
|
||||
# We want the whole chain, for every group.
|
||||
var chains: list<string>
|
||||
for group: string in groups
|
||||
var target: string = group->LinksTo()
|
||||
var chain: string = group
|
||||
while !target->empty()
|
||||
chain ..= $' {LINK} {target}'
|
||||
target = target->LinksTo()
|
||||
endwhile
|
||||
var a_link_is_cleared: bool = chain
|
||||
->split($'\s*{LINK}\s*')
|
||||
->indexof((_, g: string): bool => g->IsCleared()) >= 0
|
||||
if a_link_is_cleared
|
||||
continue
|
||||
endif
|
||||
chains->add(chain)
|
||||
endfor
|
||||
return chains
|
||||
enddef
|
||||
|
||||
def LinksTo(group: string): string # {{{2
|
||||
return group
|
||||
->hlget()
|
||||
->get(0, {})
|
||||
->get('linksto', '')
|
||||
enddef
|
||||
|
||||
def GetVariousGroups(): list<string> # {{{2
|
||||
return getcompletion('hl-', 'help')
|
||||
->filter((_, helptag: string): bool => helptag =~ '^hl-\w\+$')
|
||||
->map((_, helptag: string) => helptag->substitute('^hl-', '', ''))
|
||||
->extend(range(1, 9)->map((_, n: number) => $'User{n}'))
|
||||
enddef
|
||||
@@ -1,82 +0,0 @@
|
||||
" Vim indent file
|
||||
" Language: fish
|
||||
" Maintainer: Nicholas Boyle (github.com/nickeb96)
|
||||
" Repository: https://github.com/nickeb96/fish.vim
|
||||
" Last Change: February 4, 2023
|
||||
|
||||
if exists("b:did_indent")
|
||||
finish
|
||||
endif
|
||||
let b:did_indent = 1
|
||||
|
||||
setlocal indentexpr=GetFishIndent(v:lnum)
|
||||
setlocal indentkeys+==end,=else,=case
|
||||
|
||||
function s:PrevCmdStart(linenum)
|
||||
let l:linenum = a:linenum
|
||||
" look for the first line that isn't a line continuation
|
||||
while l:linenum > 1 && getline(l:linenum - 1) =~# '\\$'
|
||||
let l:linenum = l:linenum - 1
|
||||
endwhile
|
||||
return l:linenum
|
||||
endfunction
|
||||
|
||||
function GetFishIndent(lnum)
|
||||
let l:shiftwidth = shiftwidth()
|
||||
|
||||
let l:prevlnum = prevnonblank(a:lnum - 1)
|
||||
if l:prevlnum ==# 0
|
||||
return 0
|
||||
endif
|
||||
|
||||
" if the previous line ended with a line continuation
|
||||
if getline(a:lnum - 1) =~# '\\$'
|
||||
if a:lnum ==# 0 || getline(a:lnum - 2) !~# '\\$'
|
||||
" this is the first line continuation in a chain, so indent it
|
||||
return indent(a:lnum - 1) + l:shiftwidth
|
||||
else
|
||||
" use the same indentation as the previous continued line
|
||||
return indent(a:lnum - 1)
|
||||
endif
|
||||
endif
|
||||
|
||||
let l:prevlnum = s:PrevCmdStart(l:prevlnum)
|
||||
|
||||
let l:prevline = getline(l:prevlnum)
|
||||
if l:prevline =~# '^\s*\(begin\|if\|else\|while\|for\|function\|case\|switch\)\>'
|
||||
let l:indent = l:shiftwidth
|
||||
else
|
||||
let l:indent = 0
|
||||
endif
|
||||
|
||||
let l:line = getline(a:lnum)
|
||||
if l:line =~# '^\s*end\>'
|
||||
" find end's matching start
|
||||
let l:depth = 1
|
||||
let l:currentlnum = a:lnum
|
||||
while l:depth > 0 && l:currentlnum > 0
|
||||
let l:currentlnum = s:PrevCmdStart(prevnonblank(l:currentlnum - 1))
|
||||
let l:currentline = getline(l:currentlnum)
|
||||
if l:currentline =~# '^\s*end\>'
|
||||
let l:depth = l:depth + 1
|
||||
elseif l:currentline =~# '^\s*\(begin\|if\|while\|for\|function\|switch\)\>'
|
||||
let l:depth = l:depth - 1
|
||||
endif
|
||||
endwhile
|
||||
if l:currentline =~# '^\s*switch\>'
|
||||
return indent(l:currentlnum)
|
||||
else
|
||||
return indent(l:prevlnum) + l:indent - l:shiftwidth
|
||||
endif
|
||||
elseif l:line =~# '^\s*else\>'
|
||||
return indent(l:prevlnum) + l:indent - l:shiftwidth
|
||||
elseif l:line =~# '^\s*case\>'
|
||||
if getline(l:prevlnum) =~# '^\s*switch\>'
|
||||
return indent(l:prevlnum) + l:indent
|
||||
else
|
||||
return indent(l:prevlnum) + l:indent - l:shiftwidth
|
||||
endif
|
||||
else
|
||||
return indent(l:prevlnum) + l:indent
|
||||
endif
|
||||
endfunction
|
||||
@@ -1 +0,0 @@
|
||||
runtime indent/rmd.vim
|
||||
@@ -2,7 +2,7 @@
|
||||
" Language: R
|
||||
" Author: Jakson Alves de Aquino <jalvesaq@gmail.com>
|
||||
" Homepage: https://github.com/jalvesaq/R-Vim-runtime
|
||||
" Last Change: Wed Oct 26, 2022 12:04PM
|
||||
" Last Change: Sun Aug 19, 2018 09:13PM
|
||||
|
||||
|
||||
" Only load this indent file when no other was loaded.
|
||||
@@ -14,8 +14,6 @@ let b:did_indent = 1
|
||||
setlocal indentkeys=0{,0},:,!^F,o,O,e
|
||||
setlocal indentexpr=GetRIndent()
|
||||
|
||||
let b:undo_indent = "setl inde< indk<"
|
||||
|
||||
" Only define the function once.
|
||||
if exists("*GetRIndent")
|
||||
finish
|
||||
@@ -30,7 +28,7 @@ let g:r_indent_ess_comments = get(g:, 'r_indent_ess_comments', 0)
|
||||
let g:r_indent_comment_column = get(g:, 'r_indent_comment_column', 40)
|
||||
let g:r_indent_ess_compatible = get(g:, 'r_indent_ess_compatible', 0)
|
||||
let g:r_indent_op_pattern = get(g:, 'r_indent_op_pattern',
|
||||
\ '\(&\||\|+\|-\|\*\|/\|=\|\~\|%\|->\||>\)\s*$')
|
||||
\ '\(&\||\|+\|-\|\*\|/\|=\|\~\|%\|->\)\s*$')
|
||||
|
||||
function s:RDelete_quotes(line)
|
||||
let i = 0
|
||||
@@ -361,19 +359,17 @@ function GetRIndent()
|
||||
let olnum = s:Get_prev_line(lnum)
|
||||
let oline = getline(olnum)
|
||||
if olnum > 0
|
||||
if substitute(line, '#.*', '', '') =~ g:r_indent_op_pattern && s:Get_paren_balance(line, "(", ")") == 0
|
||||
if substitute(oline, '#.*', '', '') =~ g:r_indent_op_pattern && s:Get_paren_balance(line, "(", ")") == 0
|
||||
if line =~ g:r_indent_op_pattern && s:Get_paren_balance(line, "(", ")") == 0
|
||||
if oline =~ g:r_indent_op_pattern && s:Get_paren_balance(line, "(", ")") == 0
|
||||
return indent(lnum)
|
||||
else
|
||||
return indent(lnum) + shiftwidth()
|
||||
endif
|
||||
else
|
||||
if substitute(oline, '#.*', '', '') =~ g:r_indent_op_pattern && s:Get_paren_balance(line, "(", ")") == 0
|
||||
if oline =~ g:r_indent_op_pattern && s:Get_paren_balance(line, "(", ")") == 0
|
||||
return indent(lnum) - shiftwidth()
|
||||
endif
|
||||
endif
|
||||
elseif substitute(line, '#.*', '', '') =~ g:r_indent_op_pattern && s:Get_paren_balance(line, "(", ")") == 0
|
||||
return indent(lnum) + shiftwidth()
|
||||
endif
|
||||
|
||||
let post_fun = 0
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
" Language: R Documentation (Help), *.Rd
|
||||
" Author: Jakson Alves de Aquino <jalvesaq@gmail.com>
|
||||
" Homepage: https://github.com/jalvesaq/R-Vim-runtime
|
||||
" Last Change: Feb 25, 2023
|
||||
" Last Change: Tue Apr 07, 2015 04:38PM
|
||||
|
||||
|
||||
" Only load this indent file when no other was loaded.
|
||||
@@ -20,8 +20,6 @@ setlocal nolisp
|
||||
setlocal indentkeys=0{,0},:,!^F,o,O,e
|
||||
setlocal indentexpr=GetCorrectRHelpIndent()
|
||||
|
||||
let b:undo_indent = "setl ai< cin< inde< indk< <lisp <si"
|
||||
|
||||
" Only define the functions once.
|
||||
if exists("*GetRHelpIndent")
|
||||
finish
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
" Language: Rmd
|
||||
" Author: Jakson Alves de Aquino <jalvesaq@gmail.com>
|
||||
" Homepage: https://github.com/jalvesaq/R-Vim-runtime
|
||||
" Last Change: Wed Nov 09, 2022 09:44PM
|
||||
" Last Change: Sun Mar 28, 2021 08:05PM
|
||||
|
||||
|
||||
" Only load this indent file when no other was loaded.
|
||||
@@ -16,8 +16,6 @@ let b:did_indent = 1
|
||||
setlocal indentkeys=0{,0},<:>,!^F,o,O,e
|
||||
setlocal indentexpr=GetRmdIndent()
|
||||
|
||||
let b:undo_indent = "setl inde< indk<"
|
||||
|
||||
if exists("*GetRmdIndent")
|
||||
finish
|
||||
endif
|
||||
@@ -49,8 +47,6 @@ function s:GetMdIndent()
|
||||
return indent(v:lnum - 1) + 2
|
||||
elseif pline =~ '^\s*\d\+\.\s\+'
|
||||
return indent(v:lnum - 1) + 3
|
||||
elseif pline =~ '^\[\^\S\+\]: '
|
||||
return indent(v:lnum - 1) + shiftwidth()
|
||||
endif
|
||||
return indent(prevnonblank(v:lnum - 1))
|
||||
endfunction
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
" Language: Rnoweb
|
||||
" Author: Jakson Alves de Aquino <jalvesaq@gmail.com>
|
||||
" Homepage: https://github.com/jalvesaq/R-Vim-runtime
|
||||
" Last Change: Feb 25, 2023
|
||||
" Last Change: Fri Apr 15, 2016 10:58PM
|
||||
|
||||
|
||||
" Only load this indent file when no other was loaded.
|
||||
@@ -29,8 +29,6 @@ let b:did_indent = 1
|
||||
setlocal indentkeys=0{,0},!^F,o,O,e,},=\bibitem,=\item
|
||||
setlocal indentexpr=GetRnowebIndent()
|
||||
|
||||
let b:undo_indent = "setl inde< indk<"
|
||||
|
||||
if exists("*GetRnowebIndent")
|
||||
finish
|
||||
endif
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
" Language: Rrst
|
||||
" Author: Jakson Alves de Aquino <jalvesaq@gmail.com>
|
||||
" Homepage: https://github.com/jalvesaq/R-Vim-runtime
|
||||
" Last Change: Feb 25, 2023
|
||||
" Last Change: Tue Apr 07, 2015 04:38PM
|
||||
|
||||
|
||||
" Only load this indent file when no other was loaded.
|
||||
@@ -16,8 +16,6 @@ let b:did_indent = 1
|
||||
setlocal indentkeys=0{,0},:,!^F,o,O,e
|
||||
setlocal indentexpr=GetRrstIndent()
|
||||
|
||||
let b:undo_indent = "setl inde< indk<"
|
||||
|
||||
if exists("*GetRrstIndent")
|
||||
finish
|
||||
endif
|
||||
|
||||
@@ -3,7 +3,7 @@ vim9script
|
||||
# Vim indent file
|
||||
# Language: Vim script
|
||||
# Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
# Last Change: 2023 Feb 02
|
||||
# Last Change: 2022 Oct 5
|
||||
|
||||
# Only load this indent file when no other was loaded.
|
||||
if exists('b:did_indent')
|
||||
@@ -16,7 +16,7 @@ b:undo_indent = 'setlocal indentkeys< indentexpr<'
|
||||
import autoload '../autoload/dist/vimindent.vim'
|
||||
|
||||
setlocal indentexpr=vimindent.Expr()
|
||||
setlocal indentkeys+==endif,=enddef,=endfu,=endfor,=endwh,=endtry,=endclass,=endinterface,=endenum,=},=else,=cat,=finall,=END,0\\
|
||||
setlocal indentkeys+==endif,=enddef,=endfu,=endfor,=endwh,=endtry,=},=else,=cat,=finall,=END,0\\
|
||||
execute('setlocal indentkeys+=0=\"\\\ ,0=#\\\ ')
|
||||
setlocal indentkeys-=0#
|
||||
setlocal indentkeys-=:
|
||||
|
||||
@@ -108,9 +108,8 @@ func s:Highlight_Matching_Pair()
|
||||
" searchpairpos()'s skip argument.
|
||||
" We match "escape" for special items, such as lispEscapeSpecial, and
|
||||
" match "symbol" for lispBarSymbol.
|
||||
let s_skip = 'synstack(".", col("."))'
|
||||
\ . '->indexof({_, id -> synIDattr(id, "name") =~? '
|
||||
\ . '"string\\|character\\|singlequote\\|escape\\|symbol\\|comment"}) >= 0'
|
||||
let s_skip = '!empty(filter(map(synstack(line("."), col(".")), ''synIDattr(v:val, "name")''), ' .
|
||||
\ '''v:val =~? "string\\|character\\|singlequote\\|escape\\|symbol\\|comment"''))'
|
||||
" If executing the expression determines that the cursor is currently in
|
||||
" one of the syntax types, then we want searchpairpos() to find the pair
|
||||
" within those syntax types (i.e., not skip). Otherwise, the cursor is
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
" Language: Debian sources.list
|
||||
" Maintainer: Debian Vim Maintainers
|
||||
" Former Maintainer: Matthijs Mohlmann <matthijs@cacholong.nl>
|
||||
" Last Change: 2023 Feb 06
|
||||
" Last Change: 2023 Jan 16
|
||||
" URL: https://salsa.debian.org/vim-team/vim-debian/blob/main/syntax/debsources.vim
|
||||
|
||||
" Standard syntax initialization
|
||||
@@ -14,9 +14,7 @@ endif
|
||||
syn case match
|
||||
|
||||
" A bunch of useful keywords
|
||||
syn match debsourcesType /\(deb-src\|deb\)/
|
||||
syn match debsourcesFreeComponent /\(main\|universe\)/
|
||||
syn match debsourcesNonFreeComponent /\(contrib\|non-free-firmware\|non-free\|restricted\|multiverse\)/
|
||||
syn match debsourcesKeyword /\(deb-src\|deb\|main\|contrib\|non-free\|non-free-firmware\|restricted\|universe\|multiverse\)/
|
||||
|
||||
" Match comments
|
||||
syn match debsourcesComment /#.*/ contains=@Spell
|
||||
@@ -50,9 +48,7 @@ exe 'syn match debsourcesUnsupportedDistrKeyword +\([[:alnum:]_./]*\)\<\('. join
|
||||
|
||||
" Associate our matches and regions with pretty colours
|
||||
hi def link debsourcesLine Error
|
||||
hi def link debsourcesType Statement
|
||||
hi def link debsourcesFreeComponent Statement
|
||||
hi def link debsourcesNonFreeComponent Statement
|
||||
hi def link debsourcesKeyword Statement
|
||||
hi def link debsourcesDistrKeyword Type
|
||||
hi def link debsourcesUnsupportedDistrKeyword WarningMsg
|
||||
hi def link debsourcesComment Comment
|
||||
|
||||
+17
-22
@@ -1,12 +1,12 @@
|
||||
" Vim syntax file
|
||||
" Language: MS-DOS/Windows batch file (with NT command extensions)
|
||||
" Maintainer: Mike Williams <mrmrdubya@gmail.com>
|
||||
" Language: MS-DOS batch file (with NT command extensions)
|
||||
" Maintainer: Mike Williams <mrw@eandem.co.uk>
|
||||
" Filenames: *.bat
|
||||
" Last Change: 12th February 2023
|
||||
" Last Change: 6th September 2009
|
||||
" Web Page: http://www.eandem.co.uk/mrw/vim
|
||||
"
|
||||
" Options Flags:
|
||||
" dosbatch_cmdextversion - 1 = Windows NT, 2 = Windows 2000 [default]
|
||||
" dosbatch_colons_comment - any value to treat :: as comment line
|
||||
"
|
||||
|
||||
" quit when a syntax file was already loaded
|
||||
@@ -92,11 +92,7 @@ syn match dosbatchComment "^rem\($\|\s.*$\)"lc=3 contains=dosbatchTodo,dosbatchS
|
||||
syn match dosbatchComment "^@rem\($\|\s.*$\)"lc=4 contains=dosbatchTodo,@dosbatchNumber,dosbatchVariable,dosbatchArgument,@Spell
|
||||
syn match dosbatchComment "\srem\($\|\s.*$\)"lc=4 contains=dosbatchTodo,dosbatchSpecialChar,@dosbatchNumber,dosbatchVariable,dosbatchArgument,@Spell
|
||||
syn match dosbatchComment "\s@rem\($\|\s.*$\)"lc=5 contains=dosbatchTodo,@dosbatchNumber,dosbatchVariable,dosbatchArgument,@Spell
|
||||
if exists("dosbatch_colons_comment")
|
||||
syn match dosbatchComment "\s*:\s*:.*$" contains=dosbatchTodo,dosbatchSpecialChar,@dosbatchNumber,dosbatchVariable,dosbatchArgument,@Spell
|
||||
else
|
||||
syn match dosbatchError "\s*:\s*:.*$"
|
||||
endif
|
||||
syn match dosbatchComment "\s*:\s*:.*$" contains=dosbatchTodo,dosbatchSpecialChar,@dosbatchNumber,dosbatchVariable,dosbatchArgument,@Spell
|
||||
|
||||
" Comments in ()'s - still to handle spaces before rem
|
||||
syn match dosbatchComment "(rem\([^)]\|\^\@<=)\)*"lc=4 contains=dosbatchTodo,@dosbatchNumber,dosbatchVariable,dosbatchArgument,@Spell
|
||||
@@ -114,35 +110,34 @@ syn keyword dosbatchImplicit vol xcopy
|
||||
" Define the default highlighting.
|
||||
" Only when an item doesn't have highlighting yet
|
||||
|
||||
hi def link dosbatchTodo Todo
|
||||
hi def link dosbatchError Error
|
||||
hi def link dosbatchTodo Todo
|
||||
|
||||
hi def link dosbatchStatement Statement
|
||||
hi def link dosbatchCommands dosbatchStatement
|
||||
hi def link dosbatchLabel Label
|
||||
hi def link dosbatchLabel Label
|
||||
hi def link dosbatchConditional Conditional
|
||||
hi def link dosbatchRepeat Repeat
|
||||
hi def link dosbatchRepeat Repeat
|
||||
|
||||
hi def link dosbatchOperator Operator
|
||||
hi def link dosbatchEchoOperator dosbatchOperator
|
||||
hi def link dosbatchIfOperator dosbatchOperator
|
||||
hi def link dosbatchOperator Operator
|
||||
hi def link dosbatchEchoOperator dosbatchOperator
|
||||
hi def link dosbatchIfOperator dosbatchOperator
|
||||
|
||||
hi def link dosbatchArgument Identifier
|
||||
hi def link dosbatchIdentifier Identifier
|
||||
hi def link dosbatchIdentifier Identifier
|
||||
hi def link dosbatchVariable dosbatchIdentifier
|
||||
|
||||
hi def link dosbatchSpecialChar SpecialChar
|
||||
hi def link dosbatchString String
|
||||
hi def link dosbatchNumber Number
|
||||
hi def link dosbatchString String
|
||||
hi def link dosbatchNumber Number
|
||||
hi def link dosbatchInteger dosbatchNumber
|
||||
hi def link dosbatchHex dosbatchNumber
|
||||
hi def link dosbatchBinary dosbatchNumber
|
||||
hi def link dosbatchOctal dosbatchNumber
|
||||
hi def link dosbatchBinary dosbatchNumber
|
||||
hi def link dosbatchOctal dosbatchNumber
|
||||
|
||||
hi def link dosbatchComment Comment
|
||||
hi def link dosbatchImplicit Function
|
||||
|
||||
hi def link dosbatchSwitch Special
|
||||
hi def link dosbatchSwitch Special
|
||||
|
||||
hi def link dosbatchCmd PreProc
|
||||
|
||||
|
||||
@@ -1,225 +0,0 @@
|
||||
" Vim syntax file
|
||||
" Language: fish
|
||||
" Maintainer: Nicholas Boyle (github.com/nickeb96)
|
||||
" Repository: https://github.com/nickeb96/fish.vim
|
||||
" Last Change: February 1, 2023
|
||||
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
|
||||
" Statements
|
||||
syn cluster fishStatement contains=fishKeywordAndOr,fishNot,fishSelectStatement,fishKeyword,fishKeywordIf,fishCommand,fishVariable
|
||||
|
||||
syn keyword fishKeywordAndOr and or nextgroup=fishNot,fishSelectStatement,fishKeyword,fishKeywordIf,fishCommand
|
||||
hi def link fishKeywordAndOr fishOperator
|
||||
|
||||
syn keyword fishNot not skipwhite nextgroup=fishSelectStatement,fishKeyword,fishKeywordIf,fishCommand
|
||||
syn match fishNot /!/ skipwhite nextgroup=fishSelectStatement,fishKeyword,fishKeywordIf,fishCommand
|
||||
hi def link fishNot fishOperator
|
||||
|
||||
syn keyword fishSelectStatement command builtin skipwhite nextgroup=fishKeyword,fishKeywordIf,fishCommand,fishOption
|
||||
hi def link fishSelectStatement fishKeyword
|
||||
|
||||
syn keyword fishKeyword end skipwhite nextgroup=@fishTerminator
|
||||
|
||||
syn keyword fishKeywordIf if skipwhite nextgroup=@fishStatement
|
||||
syn keyword fishKeyword else skipwhite nextgroup=fishKeywordIf,fishSemicolon
|
||||
hi def link fishKeywordIf fishKeyword
|
||||
|
||||
syn keyword fishKeyword switch skipwhite nextgroup=@fishArgument
|
||||
syn keyword fishKeyword case skipwhite nextgroup=@fishArgument
|
||||
|
||||
syn keyword fishKeyword while skipwhite nextgroup=@fishStatement
|
||||
|
||||
syn keyword fishKeyword for skipwhite nextgroup=fishForVariable
|
||||
syn match fishForVariable /[[:alnum:]_]\+/ contained skipwhite nextgroup=fishKeywordIn
|
||||
syn keyword fishKeywordIn in contained skipwhite nextgroup=@fishArgument
|
||||
hi def link fishForVariable fishParameter
|
||||
hi def link fishKeywordIn fishKeyword
|
||||
|
||||
syn keyword fishKeyword _ abbr argparse begin bg bind block break breakpoint cd commandline
|
||||
\ complete continue count disown echo emit eval exec exit false fg function functions
|
||||
\ history jobs math printf pwd random read realpath return set set_color source status
|
||||
\ string test time true type ulimit wait
|
||||
\ skipwhite nextgroup=@fishNext
|
||||
syn match fishKeyword /\<contains\>/ skipwhite nextgroup=@fishNext
|
||||
|
||||
syn match fishCommand /[[:alnum:]_\/[][[:alnum:]+._-]*/ skipwhite nextgroup=@fishNext
|
||||
|
||||
|
||||
" Internally Nested Arguments
|
||||
|
||||
syn cluster fishSubscriptArgs contains=fishInnerVariable,fishIndexNum,fishIndexRange,fishInnerCommandSub
|
||||
|
||||
syn match fishInnerVariable /\$\+[[:alnum:]_]\+/ contained
|
||||
syn match fishInnerVariable /\$\+[[:alnum:]_]\+\[/me=e-1,he=e-1 contained nextgroup=fishInnerSubscript
|
||||
hi def link fishInnerVariable fishVariable
|
||||
|
||||
syn region fishInnerSubscript matchgroup=fishVariable start=/\[/ end=/]/ contained
|
||||
\ keepend contains=@fishSubscriptArgs
|
||||
hi def link fishInnerSubscript fishSubscript
|
||||
|
||||
syn match fishIndexNum /[+-]?[[:digit:]]\+/ contained
|
||||
hi def link fishIndexNum fishParameter
|
||||
|
||||
syn match fishIndexRange /\.\./ contained
|
||||
hi def link fishIndexRange fishParameter
|
||||
|
||||
syn region fishInnerCommandSub matchgroup=fishOperator start=/(/ start=/\$(/ end=/)/ contained
|
||||
\ contains=@fishStatement
|
||||
hi def link fishInnerCommandSub fishCommandSub
|
||||
|
||||
syn region fishQuotedCommandSub matchgroup=fishOperator start=/\$(/ end=/)/ contained
|
||||
\ contains=@fishStatement
|
||||
hi def link fishQuotedCommandSub fishCommandSub
|
||||
|
||||
syn match fishBraceExpansionComma /,/ contained
|
||||
hi def link fishBraceExpansionComma fishOperator
|
||||
|
||||
syn match fishBracedParameter '[[:alnum:]\u5b\u5d@:=+.%/!_-]\+' contained contains=fishInnerPathGlob
|
||||
hi def link fishBracedParameter fishParameter
|
||||
|
||||
syn region fishBracedQuote start=/'/ skip=/\\'/ end=/'/ contained
|
||||
\ contains=fishEscapedEscape,fishEscapedSQuote
|
||||
syn region fishBracedQuote start=/"/ skip=/\\"/ end=/"/ contained
|
||||
\ contains=fishEscapedEscape,fishEscapedDQuote,fishEscapedDollar,fishInnerVariable,fishInnerCommandSub
|
||||
hi def link fishBracedQuote fishQuote
|
||||
|
||||
|
||||
" Arguments
|
||||
|
||||
syn cluster fishArgument contains=fishParameter,fishOption,fishVariable,fishPathGlob,fishBraceExpansion,fishQuote,fishCharacter,fishCommandSub,fishRedirection,fishSelfPid
|
||||
|
||||
syn match fishParameter '[[:alnum:]\u5b\u5d@:=+.,%/!_-]\+' contained skipwhite nextgroup=@fishNext
|
||||
|
||||
syn match fishOption /-[[:alnum:]=_-]*/ contained skipwhite nextgroup=@fishNext
|
||||
|
||||
syn match fishPathGlob /\(\~\|*\|?\)/ contained skipwhite nextgroup=@fishNext
|
||||
|
||||
syn region fishBraceExpansion matchgroup=fishOperator start=/{/ end=/}/ contained
|
||||
\ contains=fishBraceExpansionComma,fishInnerVariable,fishInnerCommandSub,fishBracedParameter,fishBracedQuote
|
||||
\ skipwhite nextgroup=@fishNext
|
||||
|
||||
syn match fishVariable /\$\+[[:alnum:]_]\+/ skipwhite nextgroup=@fishNext
|
||||
syn match fishVariable /\$\+[[:alnum:]_]\+\[/me=e-1,he=e-1 nextgroup=fishSubscript
|
||||
|
||||
syn region fishSubscript matchgroup=fishVariable start=/\[/ end=/]/ contained
|
||||
\ keepend contains=@fishSubscriptArgs
|
||||
\ skipwhite nextgroup=@fishNext
|
||||
|
||||
syn region fishCommandSub matchgroup=fishOperator start=/(/ start=/\$(/ end=/)/ contained
|
||||
\ contains=@fishStatement
|
||||
\ skipwhite nextgroup=@fishNext
|
||||
|
||||
syn region fishQuote start=/'/ skip=/\\'/ end=/'/ contained
|
||||
\ contains=fishEscapedEscape,fishEscapedSQuote
|
||||
\ skipwhite nextgroup=@fishNext
|
||||
syn region fishQuote start=/"/ skip=/\\"/ end=/"/ contained
|
||||
\ contains=fishEscapedEscape,fishEscapedDQuote,fishEscapedDollar,fishInnerVariable,fishQuotedCommandSub
|
||||
\ skipwhite nextgroup=@fishNext
|
||||
|
||||
syn match fishEscapedEscape /\\\\/ contained
|
||||
syn match fishEscapedSQuote /\\'/ contained
|
||||
syn match fishEscapedDQuote /\\"/ contained
|
||||
syn match fishEscapedDollar /\\\$/ contained
|
||||
hi def link fishEscapedEscape fishCharacter
|
||||
hi def link fishEscapedSQuote fishCharacter
|
||||
hi def link fishEscapedDQuote fishCharacter
|
||||
hi def link fishEscapedDollar fishCharacter
|
||||
|
||||
syn match fishCharacter /\\[0-7]\{1,3}/ contained skipwhite nextgroup=@fishNext
|
||||
syn match fishCharacter /\\u[0-9a-fA-F]\{4}/ contained skipwhite nextgroup=@fishNext
|
||||
syn match fishCharacter /\\U[0-9a-fA-F]\{8}/ contained skipwhite nextgroup=@fishNext
|
||||
syn match fishCharacter /\\x[0-7][0-9a-fA-F]\|\\x[0-9a-fA-F]/ contained skipwhite nextgroup=@fishNext
|
||||
syn match fishCharacter /\\X[0-9a-fA-F]\{1,2}/ contained skipwhite nextgroup=@fishNext
|
||||
syn match fishCharacter /\\[abcefnrtv[\](){}<>\\*?~%#$|&;'" ]/ contained skipwhite nextgroup=@fishNext
|
||||
|
||||
syn match fishRedirection /</ contained skipwhite nextgroup=fishRedirectionTarget
|
||||
syn match fishRedirection /[0-9&]\?>[>?]\?/ contained skipwhite nextgroup=fishRedirectionTarget
|
||||
syn match fishRedirection /[0-9&]\?>&[0-9-]/ contained skipwhite nextgroup=@fishNext
|
||||
|
||||
syn match fishRedirectionTarget /[[:alnum:]$~*?{,}"'\/._-]\+/ contained contains=fishInnerVariable skipwhite nextgroup=@fishNext
|
||||
hi def link fishRedirectionTarget fishRedirection
|
||||
|
||||
syn match fishSelfPid /%self\>/ contained nextgroup=@fishNext
|
||||
hi def link fishSelfPid fishOperator
|
||||
|
||||
|
||||
" Terminators
|
||||
|
||||
syn cluster fishTerminator contains=fishPipe,fishBackgroundJob,fishSemicolon,fishSymbolicAndOr
|
||||
|
||||
syn match fishPipe /\(1>\|2>\|&\)\?|/ contained skipwhite nextgroup=@fishStatement
|
||||
hi def link fishPipe fishEnd
|
||||
|
||||
syn match fishBackgroundJob /&$/ contained skipwhite nextgroup=@fishStatement
|
||||
syn match fishBackgroundJob /&[^<>&|]/me=s+1,he=s+1 contained skipwhite nextgroup=@fishStatement
|
||||
hi def link fishBackgroundJob fishEnd
|
||||
|
||||
syn match fishSemicolon /;/ skipwhite nextgroup=@fishStatement
|
||||
hi def link fishSemicolon fishEnd
|
||||
|
||||
syn match fishSymbolicAndOr /\(&&\|||\)/ contained skipwhite skipempty nextgroup=@fishStatement
|
||||
hi def link fishSymbolicAndOr fishOperator
|
||||
|
||||
|
||||
" Other
|
||||
|
||||
syn cluster fishNext contains=fishEscapedNl,@fishArgument,@fishTerminator
|
||||
|
||||
syn match fishEscapedNl /\\$/ skipnl skipwhite contained nextgroup=@fishNext
|
||||
|
||||
syn match fishComment /#.*/ contains=fishTodo,@Spell
|
||||
|
||||
syn keyword fishTodo TODO contained
|
||||
|
||||
|
||||
|
||||
syn sync minlines=200
|
||||
syn sync maxlines=300
|
||||
|
||||
|
||||
" Intermediate highlight groups matching $fish_color_* variables
|
||||
|
||||
hi def link fishCommand fish_color_command
|
||||
hi def link fishComment fish_color_comment
|
||||
hi def link fishEnd fish_color_end
|
||||
hi def link fishCharacter fish_color_escape
|
||||
hi def link fishKeyword fish_color_keyword
|
||||
hi def link fishEscapedNl fish_color_normal
|
||||
hi def link fishOperator fish_color_operator
|
||||
hi def link fishVariable fish_color_operator
|
||||
hi def link fishInnerVariable fish_color_operator
|
||||
hi def link fishPathGlob fish_color_operator
|
||||
hi def link fishOption fish_color_option
|
||||
hi def link fishParameter fish_color_param
|
||||
hi def link fishQuote fish_color_quote
|
||||
hi def link fishRedirection fish_color_redirection
|
||||
|
||||
|
||||
" Default highlight groups
|
||||
|
||||
hi def link fish_color_param Normal
|
||||
hi def link fish_color_normal Normal
|
||||
hi def link fish_color_option Normal
|
||||
hi def link fish_color_command Function
|
||||
hi def link fish_color_keyword Keyword
|
||||
hi def link fish_color_end Delimiter
|
||||
hi def link fish_color_operator Operator
|
||||
hi def link fish_color_redirection Type
|
||||
hi def link fish_color_quote String
|
||||
hi def link fish_color_escape Character
|
||||
hi def link fish_color_comment Comment
|
||||
|
||||
hi def link fishTodo Todo
|
||||
|
||||
|
||||
let b:current_syntax = 'fish'
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
@@ -2,8 +2,8 @@
|
||||
" Language: fstab file
|
||||
" Maintainer: Radu Dineiu <radu.dineiu@gmail.com>
|
||||
" URL: https://raw.github.com/rid9/vim-fstab/master/syntax/fstab.vim
|
||||
" Last Change: 2023 Feb 19
|
||||
" Version: 1.6.3
|
||||
" Last Change: 2022 Dec 11
|
||||
" Version: 1.6.2
|
||||
"
|
||||
" Credits:
|
||||
" David Necas (Yeti) <yeti@physics.muni.cz>
|
||||
@@ -389,7 +389,7 @@ syn match fsFreqPassNumber /\d\+\s\+[012]\s*/ contained
|
||||
syn match fsDevice /^\s*\zs.\{-1,}\s/me=e-1 nextgroup=fsMountPoint contains=@fsDeviceCluster,@fsGeneralCluster
|
||||
syn match fsMountPoint /\s\+.\{-}\s/me=e-1 nextgroup=fsType contains=@fsMountPointCluster,@fsGeneralCluster contained
|
||||
syn match fsType /\s\+.\{-}\s/me=e-1 nextgroup=fsOptions contains=@fsTypeCluster,@fsGeneralCluster contained
|
||||
syn match fsOptions /\s\+.\{-}\%(\s\|$\)/ nextgroup=fsFreqPass contains=@fsOptionsCluster,@fsGeneralCluster contained
|
||||
syn match fsOptions /\s\+.\{-}\s/me=e-1 nextgroup=fsFreqPass contains=@fsOptionsCluster,@fsGeneralCluster contained
|
||||
syn match fsFreqPass /\s\+.\{-}$/ contains=@fsFreqPassCluster,@fsGeneralCluster contained
|
||||
|
||||
" Whole line comments
|
||||
@@ -491,4 +491,4 @@ let b:current_syntax = "fstab"
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
|
||||
" vim: ts=8 noet ft=vim
|
||||
" vim: ts=8 ft=vim
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
" go.vim: Vim syntax file for Go.
|
||||
" Language: Go
|
||||
" Maintainer: Billie Cleek <bhcleek@gmail.com>
|
||||
" Latest Revision: 2023-02-19
|
||||
" Latest Revision: 2022-11-17
|
||||
" License: BSD-style. See LICENSE file in source repository.
|
||||
" Repository: https://github.com/fatih/vim-go
|
||||
|
||||
@@ -136,11 +136,8 @@ syn keyword goBoolean true false
|
||||
syn keyword goPredefinedIdentifiers nil iota
|
||||
|
||||
hi def link goBuiltins Identifier
|
||||
hi def link goPredefinedIdentifiers Constant
|
||||
" Boolean links to Constant by default by vim: goBoolean and goPredefinedIdentifiers
|
||||
" will be highlighted the same, but having the separate groups allows users to
|
||||
" have separate highlighting for them if they desire.
|
||||
hi def link goBoolean Boolean
|
||||
hi def link goPredefinedIdentifiers goBoolean
|
||||
|
||||
" Comments; their contents
|
||||
syn keyword goTodo contained TODO FIXME XXX BUG
|
||||
|
||||
@@ -42,7 +42,6 @@ syn match helpNormal "|||"
|
||||
syn match helpNormal ":|vim:|" " for :help modeline
|
||||
syn match helpVim "\<Vim version [0-9][0-9.a-z]*"
|
||||
syn match helpVim "VIM REFERENCE.*"
|
||||
syn match helpVim "MACVIM REFERENCE.*"
|
||||
syn match helpOption "'[a-z]\{2,\}'"
|
||||
syn match helpOption "'t_..'"
|
||||
syn match helpNormal "'ab'"
|
||||
|
||||
+143
-4
@@ -1,10 +1,149 @@
|
||||
" Vim syntax file
|
||||
" Language: none; used to see highlighting
|
||||
" Maintainer: github user lacygoill
|
||||
" Last Change: 2023 Mar 08
|
||||
" Maintainer: Ronald Schild <rs@scutum.de>
|
||||
" Last Change: 2019 Jun 06
|
||||
" Version: 5.4n.1
|
||||
" Additional Changes By: Lifepillar, Bram
|
||||
|
||||
" To see your current highlight settings, do
|
||||
" :so $VIMRUNTIME/syntax/hitest.vim
|
||||
|
||||
import 'dist/vimhighlight.vim'
|
||||
call vimhighlight.HighlightTest()
|
||||
" save global options and registers
|
||||
let s:hidden = &hidden
|
||||
let s:lazyredraw = &lazyredraw
|
||||
let s:more = &more
|
||||
let s:report = &report
|
||||
let s:whichwrap = &whichwrap
|
||||
let s:shortmess = &shortmess
|
||||
let s:wrapscan = &wrapscan
|
||||
let s:register_a = @a
|
||||
let s:register_se = @/
|
||||
|
||||
" set global options
|
||||
set hidden lazyredraw nomore report=99999 shortmess=aoOstTW wrapscan
|
||||
set whichwrap&
|
||||
|
||||
" print current highlight settings into register a
|
||||
redir @a
|
||||
silent highlight
|
||||
redir END
|
||||
|
||||
" Open a new window if the current one isn't empty
|
||||
if line("$") != 1 || getline(1) != ""
|
||||
new
|
||||
endif
|
||||
|
||||
" edit temporary file
|
||||
edit Highlight\ test
|
||||
|
||||
" set local options
|
||||
setlocal autoindent noexpandtab formatoptions=t shiftwidth=18 noswapfile tabstop=18
|
||||
let &textwidth=&columns
|
||||
|
||||
" insert highlight settings
|
||||
% delete
|
||||
put a
|
||||
|
||||
" remove cleared groups
|
||||
silent! g/ cleared$/d
|
||||
|
||||
" remove the colored xxx items
|
||||
g/xxx /s///e
|
||||
|
||||
" remove color settings (not needed here)
|
||||
global! /links to/ substitute /\s.*$//e
|
||||
|
||||
" Move split 'links to' lines to the same line
|
||||
% substitute /^\(\w\+\)\n\s*\(links to.*\)/\1\t\2/e
|
||||
|
||||
" move linked groups to the end of file
|
||||
global /links to/ move $
|
||||
|
||||
" move linked group names to the matching preferred groups
|
||||
" TODO: this fails if the group linked to isn't defined
|
||||
% substitute /^\(\w\+\)\s*\(links to\)\s*\(\w\+\)$/\3\t\2 \1/e
|
||||
silent! global /links to/ normal mz3ElD0#$p'zdd
|
||||
|
||||
" delete empty lines
|
||||
global /^ *$/ delete
|
||||
|
||||
" precede syntax command
|
||||
% substitute /^[^ ]*/syn keyword &\t&/
|
||||
|
||||
" execute syntax commands
|
||||
syntax clear
|
||||
% yank a
|
||||
@a
|
||||
|
||||
" remove syntax commands again
|
||||
% substitute /^syn keyword //
|
||||
|
||||
" pretty formatting
|
||||
global /^/ exe "normal Wi\<CR>\t\eAA\ex"
|
||||
global /^\S/ join
|
||||
|
||||
" find out first syntax highlighting
|
||||
let b:various = &highlight.',:Normal,:Cursor,:,'
|
||||
let b:i = 1
|
||||
while b:various =~ ':'.substitute(getline(b:i), '\s.*$', ',', '')
|
||||
let b:i = b:i + 1
|
||||
if b:i > line("$") | break | endif
|
||||
endwhile
|
||||
|
||||
" insert headlines
|
||||
call append(0, "Highlighting groups for various occasions")
|
||||
call append(1, "-----------------------------------------")
|
||||
|
||||
if b:i < line("$")-1
|
||||
let b:synhead = "Syntax highlighting groups"
|
||||
if exists("hitest_filetypes")
|
||||
redir @a
|
||||
let
|
||||
redir END
|
||||
let @a = substitute(@a, 'did_\(\w\+\)_syn\w*_inits\s*#1', ', \1', 'g')
|
||||
let @a = substitute(@a, "\n\\w[^\n]*", '', 'g')
|
||||
let @a = substitute(@a, "\n", '', 'g')
|
||||
let @a = substitute(@a, '^,', '', 'g')
|
||||
if @a != ""
|
||||
let b:synhead = b:synhead." - filetype"
|
||||
if @a =~ ','
|
||||
let b:synhead = b:synhead."s"
|
||||
endif
|
||||
let b:synhead = b:synhead.":".@a
|
||||
endif
|
||||
endif
|
||||
call append(b:i+1, "")
|
||||
call append(b:i+2, b:synhead)
|
||||
call append(b:i+3, substitute(b:synhead, '.', '-', 'g'))
|
||||
endif
|
||||
|
||||
" remove 'hls' highlighting
|
||||
nohlsearch
|
||||
normal 0
|
||||
|
||||
" we don't want to save this temporary file
|
||||
set nomodified
|
||||
|
||||
" the following trick avoids the "Press RETURN ..." prompt
|
||||
0 append
|
||||
.
|
||||
|
||||
" restore global options and registers
|
||||
let &hidden = s:hidden
|
||||
let &lazyredraw = s:lazyredraw
|
||||
let &more = s:more
|
||||
let &report = s:report
|
||||
let &shortmess = s:shortmess
|
||||
let &whichwrap = s:whichwrap
|
||||
let &wrapscan = s:wrapscan
|
||||
let @a = s:register_a
|
||||
|
||||
" restore last search pattern
|
||||
call histdel("search", -1)
|
||||
let @/ = s:register_se
|
||||
|
||||
" remove variables
|
||||
unlet s:hidden s:lazyredraw s:more s:report s:shortmess
|
||||
unlet s:whichwrap s:wrapscan s:register_a s:register_se
|
||||
|
||||
" vim: ts=8
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
" Maintainer: Doug Kearns <dougkearns@gmail.com>
|
||||
" Previous Maintainers: Jorge Maldonado Ventura <jorgesumle@freakspot.net>
|
||||
" Claudio Fleiner <claudio@fleiner.com>
|
||||
" Last Change: 2023 Feb 20
|
||||
" Last Change: 2022 Nov 18
|
||||
|
||||
" Please check :help html.vim for some comments and a description of the options
|
||||
|
||||
@@ -221,7 +221,7 @@ if main_syntax != 'java' || exists("java_javascript")
|
||||
" JAVA SCRIPT
|
||||
syn include @htmlJavaScript syntax/javascript.vim
|
||||
unlet b:current_syntax
|
||||
syn region javaScript start=+<script\>\_[^>]*>+ keepend end=+</script\_[^>]*>+me=s-1 contains=@htmlJavaScript,htmlCssStyleComment,htmlScriptTag,@htmlPreproc
|
||||
syn region javaScript start=+<script\_[^>]*>+ keepend end=+</script\_[^>]*>+me=s-1 contains=@htmlJavaScript,htmlCssStyleComment,htmlScriptTag,@htmlPreproc
|
||||
syn region htmlScriptTag contained start=+<script+ end=+>+ fold contains=htmlTagN,htmlString,htmlArg,htmlValue,htmlTagError,htmlEvent
|
||||
hi def link htmlScriptTag htmlTag
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
" Language: PoE item filter
|
||||
" Maintainer: ObserverOfTime <chronobserver@disroot.org>
|
||||
" Filenames: *.filter
|
||||
" Last Change: 2023 Feb 10
|
||||
" Last Change: 2022 Oct 07
|
||||
|
||||
if exists('b:current_syntax')
|
||||
finish
|
||||
@@ -17,7 +17,7 @@ syn match poefilterCommentTag /\[[0-9A-Z\[\]]\+\]/ contained
|
||||
syn match poefilterComment /#.*$/ contains=poefilterTodo,poefilterCommentTag,@Spell
|
||||
|
||||
" Blocks
|
||||
syn keyword poefilterBlock Show Hide Minimal
|
||||
syn keyword poefilterBlock Show Hide
|
||||
|
||||
" Conditions
|
||||
syn keyword poefilterCondition
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim syntax file
|
||||
" Language: Python
|
||||
" Maintainer: Zvezdan Petkovic <zpetkovic@acm.org>
|
||||
" Last Change: 2023 Feb 26
|
||||
" Last Change: 2022 Jun 28
|
||||
" Credits: Neil Schemenauer <nas@python.ca>
|
||||
" Dmitry Vasiliev
|
||||
"
|
||||
@@ -35,26 +35,12 @@
|
||||
"
|
||||
" let python_highlight_all = 1
|
||||
"
|
||||
" The use of Python 2 compatible syntax highlighting can be enforced.
|
||||
" The straddling code (Python 2 and 3 compatible), up to Python 3.5,
|
||||
" will be also supported.
|
||||
"
|
||||
" let python_use_python2_syntax = 1
|
||||
"
|
||||
" This option will exclude all modern Python 3.6 or higher features.
|
||||
"
|
||||
|
||||
" quit when a syntax file was already loaded.
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
" Use of Python 2 and 3.5 or lower requested.
|
||||
if exists("python_use_python2_syntax")
|
||||
runtime! syntax/python2.vim
|
||||
finish
|
||||
endif
|
||||
|
||||
" We need nocompatible mode in order to continue lines with backslashes.
|
||||
" Original setting will be restored.
|
||||
let s:cpo_save = &cpo
|
||||
@@ -105,8 +91,8 @@ syn keyword pythonInclude from import
|
||||
syn keyword pythonAsync async await
|
||||
|
||||
" Soft keywords
|
||||
" These keywords do not mean anything unless used in the right context.
|
||||
" See https://docs.python.org/3/reference/lexical_analysis.html#soft-keywords
|
||||
" These keywords do not mean anything unless used in the right context
|
||||
" See https://docs.python.org/3/reference/lexical_analysis.html#soft-keywords
|
||||
" for more on this.
|
||||
syn match pythonConditional "^\s*\zscase\%(\s\+.*:.*$\)\@="
|
||||
syn match pythonConditional "^\s*\zsmatch\%(\s\+.*:\s*\%(#.*\)\=$\)\@="
|
||||
|
||||
@@ -1,345 +0,0 @@
|
||||
" Vim syntax file
|
||||
" Language: Python 2
|
||||
" Maintainer: Zvezdan Petkovic <zpetkovic@acm.org>
|
||||
" Last Change: 2016 Oct 29
|
||||
" Credits: Neil Schemenauer <nas@python.ca>
|
||||
" Dmitry Vasiliev
|
||||
"
|
||||
" This version is a major rewrite by Zvezdan Petkovic.
|
||||
"
|
||||
" - introduced highlighting of doctests
|
||||
" - updated keywords, built-ins, and exceptions
|
||||
" - corrected regular expressions for
|
||||
"
|
||||
" * functions
|
||||
" * decorators
|
||||
" * strings
|
||||
" * escapes
|
||||
" * numbers
|
||||
" * space error
|
||||
"
|
||||
" - corrected synchronization
|
||||
" - more highlighting is ON by default, except
|
||||
" - space error highlighting is OFF by default
|
||||
"
|
||||
" Optional highlighting can be controlled using these variables.
|
||||
"
|
||||
" let python_no_builtin_highlight = 1
|
||||
" let python_no_doctest_code_highlight = 1
|
||||
" let python_no_doctest_highlight = 1
|
||||
" let python_no_exception_highlight = 1
|
||||
" let python_no_number_highlight = 1
|
||||
" let python_space_error_highlight = 1
|
||||
"
|
||||
" All the options above can be switched on together.
|
||||
"
|
||||
" let python_highlight_all = 1
|
||||
"
|
||||
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" NOTE: This file is a copy of the last commit of runtime/syntax/python.vim
|
||||
" that still supported Python 2. There is support for Python 3, up to 3.5,
|
||||
" and it was kept in the file as is, because it supports the straddling code
|
||||
" (Python 2 and 3 compatible) better.
|
||||
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
|
||||
" quit when a syntax file was already loaded.
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
" We need nocompatible mode in order to continue lines with backslashes.
|
||||
" Original setting will be restored.
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
if exists("python_no_doctest_highlight")
|
||||
let python_no_doctest_code_highlight = 1
|
||||
endif
|
||||
|
||||
if exists("python_highlight_all")
|
||||
if exists("python_no_builtin_highlight")
|
||||
unlet python_no_builtin_highlight
|
||||
endif
|
||||
if exists("python_no_doctest_code_highlight")
|
||||
unlet python_no_doctest_code_highlight
|
||||
endif
|
||||
if exists("python_no_doctest_highlight")
|
||||
unlet python_no_doctest_highlight
|
||||
endif
|
||||
if exists("python_no_exception_highlight")
|
||||
unlet python_no_exception_highlight
|
||||
endif
|
||||
if exists("python_no_number_highlight")
|
||||
unlet python_no_number_highlight
|
||||
endif
|
||||
let python_space_error_highlight = 1
|
||||
endif
|
||||
|
||||
" Keep Python keywords in alphabetical order inside groups for easy
|
||||
" comparison with the table in the 'Python Language Reference'
|
||||
" https://docs.python.org/2/reference/lexical_analysis.html#keywords,
|
||||
" https://docs.python.org/3/reference/lexical_analysis.html#keywords.
|
||||
" Groups are in the order presented in NAMING CONVENTIONS in syntax.txt.
|
||||
" Exceptions come last at the end of each group (class and def below).
|
||||
"
|
||||
" Keywords 'with' and 'as' are new in Python 2.6
|
||||
" (use 'from __future__ import with_statement' in Python 2.5).
|
||||
"
|
||||
" Some compromises had to be made to support both Python 3 and 2.
|
||||
" We include Python 3 features, but when a definition is duplicated,
|
||||
" the last definition takes precedence.
|
||||
"
|
||||
" - 'False', 'None', and 'True' are keywords in Python 3 but they are
|
||||
" built-ins in 2 and will be highlighted as built-ins below.
|
||||
" - 'exec' is a built-in in Python 3 and will be highlighted as
|
||||
" built-in below.
|
||||
" - 'nonlocal' is a keyword in Python 3 and will be highlighted.
|
||||
" - 'print' is a built-in in Python 3 and will be highlighted as
|
||||
" built-in below (use 'from __future__ import print_function' in 2)
|
||||
" - async and await were added in Python 3.5 and are soft keywords.
|
||||
"
|
||||
syn keyword pythonStatement False None True
|
||||
syn keyword pythonStatement as assert break continue del exec global
|
||||
syn keyword pythonStatement lambda nonlocal pass print return with yield
|
||||
syn keyword pythonStatement class def nextgroup=pythonFunction skipwhite
|
||||
syn keyword pythonConditional elif else if
|
||||
syn keyword pythonRepeat for while
|
||||
syn keyword pythonOperator and in is not or
|
||||
syn keyword pythonException except finally raise try
|
||||
syn keyword pythonInclude from import
|
||||
syn keyword pythonAsync async await
|
||||
|
||||
" Decorators (new in Python 2.4)
|
||||
" A dot must be allowed because of @MyClass.myfunc decorators.
|
||||
syn match pythonDecorator "@" display contained
|
||||
syn match pythonDecoratorName "@\s*\h\%(\w\|\.\)*" display contains=pythonDecorator
|
||||
|
||||
" Python 3.5 introduced the use of the same symbol for matrix multiplication:
|
||||
" https://www.python.org/dev/peps/pep-0465/. We now have to exclude the
|
||||
" symbol from highlighting when used in that context.
|
||||
" Single line multiplication.
|
||||
syn match pythonMatrixMultiply
|
||||
\ "\%(\w\|[])]\)\s*@"
|
||||
\ contains=ALLBUT,pythonDecoratorName,pythonDecorator,pythonFunction,pythonDoctestValue
|
||||
\ transparent
|
||||
" Multiplication continued on the next line after backslash.
|
||||
syn match pythonMatrixMultiply
|
||||
\ "[^\\]\\\s*\n\%(\s*\.\.\.\s\)\=\s\+@"
|
||||
\ contains=ALLBUT,pythonDecoratorName,pythonDecorator,pythonFunction,pythonDoctestValue
|
||||
\ transparent
|
||||
" Multiplication in a parenthesized expression over multiple lines with @ at
|
||||
" the start of each continued line; very similar to decorators and complex.
|
||||
syn match pythonMatrixMultiply
|
||||
\ "^\s*\%(\%(>>>\|\.\.\.\)\s\+\)\=\zs\%(\h\|\%(\h\|[[(]\).\{-}\%(\w\|[])]\)\)\s*\n\%(\s*\.\.\.\s\)\=\s\+@\%(.\{-}\n\%(\s*\.\.\.\s\)\=\s\+@\)*"
|
||||
\ contains=ALLBUT,pythonDecoratorName,pythonDecorator,pythonFunction,pythonDoctestValue
|
||||
\ transparent
|
||||
|
||||
syn match pythonFunction "\h\w*" display contained
|
||||
|
||||
syn match pythonComment "#.*$" contains=pythonTodo,@Spell
|
||||
syn keyword pythonTodo FIXME NOTE NOTES TODO XXX contained
|
||||
|
||||
" Triple-quoted strings can contain doctests.
|
||||
syn region pythonString matchgroup=pythonQuotes
|
||||
\ start=+[uU]\=\z(['"]\)+ end="\z1" skip="\\\\\|\\\z1"
|
||||
\ contains=pythonEscape,@Spell
|
||||
syn region pythonString matchgroup=pythonTripleQuotes
|
||||
\ start=+[uU]\=\z('''\|"""\)+ end="\z1" keepend
|
||||
\ contains=pythonEscape,pythonSpaceError,pythonDoctest,@Spell
|
||||
syn region pythonRawString matchgroup=pythonQuotes
|
||||
\ start=+[uU]\=[rR]\z(['"]\)+ end="\z1" skip="\\\\\|\\\z1"
|
||||
\ contains=@Spell
|
||||
syn region pythonRawString matchgroup=pythonTripleQuotes
|
||||
\ start=+[uU]\=[rR]\z('''\|"""\)+ end="\z1" keepend
|
||||
\ contains=pythonSpaceError,pythonDoctest,@Spell
|
||||
|
||||
syn match pythonEscape +\\[abfnrtv'"\\]+ contained
|
||||
syn match pythonEscape "\\\o\{1,3}" contained
|
||||
syn match pythonEscape "\\x\x\{2}" contained
|
||||
syn match pythonEscape "\%(\\u\x\{4}\|\\U\x\{8}\)" contained
|
||||
" Python allows case-insensitive Unicode IDs: http://www.unicode.org/charts/
|
||||
syn match pythonEscape "\\N{\a\+\%(\s\a\+\)*}" contained
|
||||
syn match pythonEscape "\\$"
|
||||
|
||||
" It is very important to understand all details before changing the
|
||||
" regular expressions below or their order.
|
||||
" The word boundaries are *not* the floating-point number boundaries
|
||||
" because of a possible leading or trailing decimal point.
|
||||
" The expressions below ensure that all valid number literals are
|
||||
" highlighted, and invalid number literals are not. For example,
|
||||
"
|
||||
" - a decimal point in '4.' at the end of a line is highlighted,
|
||||
" - a second dot in 1.0.0 is not highlighted,
|
||||
" - 08 is not highlighted,
|
||||
" - 08e0 or 08j are highlighted,
|
||||
"
|
||||
" and so on, as specified in the 'Python Language Reference'.
|
||||
" https://docs.python.org/2/reference/lexical_analysis.html#numeric-literals
|
||||
" https://docs.python.org/3/reference/lexical_analysis.html#numeric-literals
|
||||
if !exists("python_no_number_highlight")
|
||||
" numbers (including longs and complex)
|
||||
syn match pythonNumber "\<0[oO]\=\o\+[Ll]\=\>"
|
||||
syn match pythonNumber "\<0[xX]\x\+[Ll]\=\>"
|
||||
syn match pythonNumber "\<0[bB][01]\+[Ll]\=\>"
|
||||
syn match pythonNumber "\<\%([1-9]\d*\|0\)[Ll]\=\>"
|
||||
syn match pythonNumber "\<\d\+[jJ]\>"
|
||||
syn match pythonNumber "\<\d\+[eE][+-]\=\d\+[jJ]\=\>"
|
||||
syn match pythonNumber
|
||||
\ "\<\d\+\.\%([eE][+-]\=\d\+\)\=[jJ]\=\%(\W\|$\)\@="
|
||||
syn match pythonNumber
|
||||
\ "\%(^\|\W\)\zs\d*\.\d\+\%([eE][+-]\=\d\+\)\=[jJ]\=\>"
|
||||
endif
|
||||
|
||||
" Group the built-ins in the order in the 'Python Library Reference' for
|
||||
" easier comparison.
|
||||
" https://docs.python.org/2/library/constants.html
|
||||
" https://docs.python.org/3/library/constants.html
|
||||
" http://docs.python.org/2/library/functions.html
|
||||
" http://docs.python.org/3/library/functions.html
|
||||
" http://docs.python.org/2/library/functions.html#non-essential-built-in-functions
|
||||
" http://docs.python.org/3/library/functions.html#non-essential-built-in-functions
|
||||
" Python built-in functions are in alphabetical order.
|
||||
if !exists("python_no_builtin_highlight")
|
||||
" built-in constants
|
||||
" 'False', 'True', and 'None' are also reserved words in Python 3
|
||||
syn keyword pythonBuiltin False True None
|
||||
syn keyword pythonBuiltin NotImplemented Ellipsis __debug__
|
||||
" built-in functions
|
||||
syn keyword pythonBuiltin abs all any bin bool bytearray callable chr
|
||||
syn keyword pythonBuiltin classmethod compile complex delattr dict dir
|
||||
syn keyword pythonBuiltin divmod enumerate eval filter float format
|
||||
syn keyword pythonBuiltin frozenset getattr globals hasattr hash
|
||||
syn keyword pythonBuiltin help hex id input int isinstance
|
||||
syn keyword pythonBuiltin issubclass iter len list locals map max
|
||||
syn keyword pythonBuiltin memoryview min next object oct open ord pow
|
||||
syn keyword pythonBuiltin print property range repr reversed round set
|
||||
syn keyword pythonBuiltin setattr slice sorted staticmethod str
|
||||
syn keyword pythonBuiltin sum super tuple type vars zip __import__
|
||||
" Python 2 only
|
||||
syn keyword pythonBuiltin basestring cmp execfile file
|
||||
syn keyword pythonBuiltin long raw_input reduce reload unichr
|
||||
syn keyword pythonBuiltin unicode xrange
|
||||
" Python 3 only
|
||||
syn keyword pythonBuiltin ascii bytes exec
|
||||
" non-essential built-in functions; Python 2 only
|
||||
syn keyword pythonBuiltin apply buffer coerce intern
|
||||
" avoid highlighting attributes as builtins
|
||||
syn match pythonAttribute /\.\h\w*/hs=s+1
|
||||
\ contains=ALLBUT,pythonBuiltin,pythonFunction,pythonAsync
|
||||
\ transparent
|
||||
endif
|
||||
|
||||
" From the 'Python Library Reference' class hierarchy at the bottom.
|
||||
" http://docs.python.org/2/library/exceptions.html
|
||||
" http://docs.python.org/3/library/exceptions.html
|
||||
if !exists("python_no_exception_highlight")
|
||||
" builtin base exceptions (used mostly as base classes for other exceptions)
|
||||
syn keyword pythonExceptions BaseException Exception
|
||||
syn keyword pythonExceptions ArithmeticError BufferError
|
||||
syn keyword pythonExceptions LookupError
|
||||
" builtin base exceptions removed in Python 3
|
||||
syn keyword pythonExceptions EnvironmentError StandardError
|
||||
" builtin exceptions (actually raised)
|
||||
syn keyword pythonExceptions AssertionError AttributeError
|
||||
syn keyword pythonExceptions EOFError FloatingPointError GeneratorExit
|
||||
syn keyword pythonExceptions ImportError IndentationError
|
||||
syn keyword pythonExceptions IndexError KeyError KeyboardInterrupt
|
||||
syn keyword pythonExceptions MemoryError NameError NotImplementedError
|
||||
syn keyword pythonExceptions OSError OverflowError ReferenceError
|
||||
syn keyword pythonExceptions RuntimeError StopIteration SyntaxError
|
||||
syn keyword pythonExceptions SystemError SystemExit TabError TypeError
|
||||
syn keyword pythonExceptions UnboundLocalError UnicodeError
|
||||
syn keyword pythonExceptions UnicodeDecodeError UnicodeEncodeError
|
||||
syn keyword pythonExceptions UnicodeTranslateError ValueError
|
||||
syn keyword pythonExceptions ZeroDivisionError
|
||||
" builtin OS exceptions in Python 3
|
||||
syn keyword pythonExceptions BlockingIOError BrokenPipeError
|
||||
syn keyword pythonExceptions ChildProcessError ConnectionAbortedError
|
||||
syn keyword pythonExceptions ConnectionError ConnectionRefusedError
|
||||
syn keyword pythonExceptions ConnectionResetError FileExistsError
|
||||
syn keyword pythonExceptions FileNotFoundError InterruptedError
|
||||
syn keyword pythonExceptions IsADirectoryError NotADirectoryError
|
||||
syn keyword pythonExceptions PermissionError ProcessLookupError
|
||||
syn keyword pythonExceptions RecursionError StopAsyncIteration
|
||||
syn keyword pythonExceptions TimeoutError
|
||||
" builtin exceptions deprecated/removed in Python 3
|
||||
syn keyword pythonExceptions IOError VMSError WindowsError
|
||||
" builtin warnings
|
||||
syn keyword pythonExceptions BytesWarning DeprecationWarning FutureWarning
|
||||
syn keyword pythonExceptions ImportWarning PendingDeprecationWarning
|
||||
syn keyword pythonExceptions RuntimeWarning SyntaxWarning UnicodeWarning
|
||||
syn keyword pythonExceptions UserWarning Warning
|
||||
" builtin warnings in Python 3
|
||||
syn keyword pythonExceptions ResourceWarning
|
||||
endif
|
||||
|
||||
if exists("python_space_error_highlight")
|
||||
" trailing whitespace
|
||||
syn match pythonSpaceError display excludenl "\s\+$"
|
||||
" mixed tabs and spaces
|
||||
syn match pythonSpaceError display " \+\t"
|
||||
syn match pythonSpaceError display "\t\+ "
|
||||
endif
|
||||
|
||||
" Do not spell doctests inside strings.
|
||||
" Notice that the end of a string, either ''', or """, will end the contained
|
||||
" doctest too. Thus, we do *not* need to have it as an end pattern.
|
||||
if !exists("python_no_doctest_highlight")
|
||||
if !exists("python_no_doctest_code_highlight")
|
||||
syn region pythonDoctest
|
||||
\ start="^\s*>>>\s" end="^\s*$"
|
||||
\ contained contains=ALLBUT,pythonDoctest,pythonFunction,@Spell
|
||||
syn region pythonDoctestValue
|
||||
\ start=+^\s*\%(>>>\s\|\.\.\.\s\|"""\|'''\)\@!\S\++ end="$"
|
||||
\ contained
|
||||
else
|
||||
syn region pythonDoctest
|
||||
\ start="^\s*>>>" end="^\s*$"
|
||||
\ contained contains=@NoSpell
|
||||
endif
|
||||
endif
|
||||
|
||||
" Sync at the beginning of class, function, or method definition.
|
||||
syn sync match pythonSync grouphere NONE "^\%(def\|class\)\s\+\h\w*\s*[(:]"
|
||||
|
||||
" The default highlight links. Can be overridden later.
|
||||
hi def link pythonStatement Statement
|
||||
hi def link pythonConditional Conditional
|
||||
hi def link pythonRepeat Repeat
|
||||
hi def link pythonOperator Operator
|
||||
hi def link pythonException Exception
|
||||
hi def link pythonInclude Include
|
||||
hi def link pythonAsync Statement
|
||||
hi def link pythonDecorator Define
|
||||
hi def link pythonDecoratorName Function
|
||||
hi def link pythonFunction Function
|
||||
hi def link pythonComment Comment
|
||||
hi def link pythonTodo Todo
|
||||
hi def link pythonString String
|
||||
hi def link pythonRawString String
|
||||
hi def link pythonQuotes String
|
||||
hi def link pythonTripleQuotes pythonQuotes
|
||||
hi def link pythonEscape Special
|
||||
if !exists("python_no_number_highlight")
|
||||
hi def link pythonNumber Number
|
||||
endif
|
||||
if !exists("python_no_builtin_highlight")
|
||||
hi def link pythonBuiltin Function
|
||||
endif
|
||||
if !exists("python_no_exception_highlight")
|
||||
hi def link pythonExceptions Structure
|
||||
endif
|
||||
if exists("python_space_error_highlight")
|
||||
hi def link pythonSpaceError Error
|
||||
endif
|
||||
if !exists("python_no_doctest_highlight")
|
||||
hi def link pythonDoctest Special
|
||||
hi def link pythonDoctestValue Define
|
||||
endif
|
||||
|
||||
let b:current_syntax = "python"
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
|
||||
" vim:set sw=2 sts=2 ts=8 noet:
|
||||
@@ -1,17 +0,0 @@
|
||||
" Language: Quarto (Markdown with chunks of R, Python and other languages)
|
||||
" Provisory Maintainer: Jakson Aquino <jalvesaq@gmail.com>
|
||||
" Homepage: https://github.com/jalvesaq/R-Vim-runtime
|
||||
" Last Change: Fri Feb 24, 2023 08:26AM
|
||||
"
|
||||
" The developers of tools for Quarto maintain Vim runtime files in their
|
||||
" Github repository and, if required, I will hand over the maintenance of
|
||||
" this script for them.
|
||||
|
||||
runtime syntax/rmd.vim
|
||||
|
||||
syn match quartoShortarg /\S\+/ contained
|
||||
syn keyword quartoShortkey var meta env pagebreak video include contained
|
||||
syn region quartoShortcode matchgroup=PreProc start='{{< ' end=' >}}' contains=quartoShortkey,quartoShortarg transparent keepend
|
||||
|
||||
hi def link quartoShortkey Include
|
||||
hi def link quartoShortarg String
|
||||
+25
-23
@@ -5,7 +5,7 @@
|
||||
" Tom Payne <tom@tompayne.org>
|
||||
" Contributor: Johannes Ranke <jranke@uni-bremen.de>
|
||||
" Homepage: https://github.com/jalvesaq/R-Vim-runtime
|
||||
" Last Change: Thu Nov 17, 2022 10:13PM
|
||||
" Last Change: Sun Mar 28, 2021 01:47PM
|
||||
" Filenames: *.R *.r *.Rhistory *.Rt
|
||||
"
|
||||
" NOTE: The highlighting of R functions might be defined in
|
||||
@@ -65,35 +65,41 @@ if g:r_syntax_hl_roxygen
|
||||
" roxygen line containing only a roxygen comment marker, optionally followed
|
||||
" by whitespace is called an empty roxygen line.
|
||||
|
||||
syn match rOCommentKey "^\s*#\{1,2}'" contained
|
||||
syn region rOExamples start="^\s*#\{1,2}' @examples.*"rs=e+1,hs=e+1 end="^\(#\{1,2}' @.*\)\@=" end="^\(#\{1,2}'\)\@!" contained contains=rOTag fold
|
||||
|
||||
" R6 classes may contain roxygen lines independent of roxygen blocks
|
||||
syn region rOR6Class start=/R6Class(/ end=/)/ transparent contains=ALLBUT,rError,rBraceError,rCurlyError fold
|
||||
syn match rOR6Block "#\{1,2}'.*" contains=rOTag,rOExamples,@Spell containedin=rOR6Class contained
|
||||
syn match rOR6Block "^\s*#\{1,2}'.*" contains=rOTag,rOExamples,@Spell containedin=rOR6Class contained
|
||||
|
||||
" First we match all roxygen blocks as containing only a title. In case an
|
||||
" empty roxygen line ending the title or a tag is found, this will be
|
||||
" overridden later by the definitions of rOBlock.
|
||||
syn match rOTitleBlock "\(\%^\|^\s*\n\)\@<=\(\s*#\{1,2}' .*\n\)\{1,}" contains=rOCommentKey,rOTitleTag
|
||||
syn match rOTitleBlock "\%^\(\s*#\{1,2}' .*\n\)\{1,}" contains=rOCommentKey,rOTitleTag
|
||||
syn match rOTitleBlock "^\s*\n\(\s*#\{1,2}' .*\n\)\{1,}" contains=rOCommentKey,rOTitleTag
|
||||
|
||||
" A title as part of a block is always at the beginning of the block, i.e.
|
||||
" either at the start of a file or after a completely empty line.
|
||||
syn match rOTitle "\(\%^\|^\s*\n\)\@<=\(\s*#\{1,2}' .*\n\)\{-1,}\s*#\{1,2}'\s*$" contained contains=rOCommentKey,rOTitleTag
|
||||
syn match rOTitle "\%^\(\s*#\{1,2}' .*\n\)\{-1,}\s*#\{1,2}'\s*$" contained contains=rOCommentKey,rOTitleTag
|
||||
syn match rOTitle "^\s*\n\(\s*#\{1,2}' .*\n\)\{-1,}\s*#\{1,2}'\s*$" contained contains=rOCommentKey,rOTitleTag
|
||||
syn match rOTitleTag contained "@title"
|
||||
|
||||
" When a roxygen block has a title and additional content, the title
|
||||
" consists of one or more roxygen lines (as little as possible are matched),
|
||||
" followed either by an empty roxygen line
|
||||
syn region rOBlock start="\(\%^\|^\s*\n\)\@<=\(\s*#\{1,2}' .*\n\)\{-1,}\s*#\{1,2}'\s*$" end="^\s*\(#\{1,2}'\)\@!" contains=rOTitle,rOTag,rOExamples,@Spell keepend fold
|
||||
syn region rOBlock start="\%^\(\s*#\{1,2}' .*\n\)\{-1,}\s*#\{1,2}'\s*$" end="^\s*\(#\{1,2}'\)\@!" contains=rOTitle,rOTag,rOExamples,@Spell keepend fold
|
||||
syn region rOBlock start="^\s*\n\(\s*#\{1,2}' .*\n\)\{-1,}\s*#\{1,2}'\s*$" end="^\s*\(#\{1,2}'\)\@!" contains=rOTitle,rOTag,rOExamples,@Spell keepend fold
|
||||
|
||||
" or by a roxygen tag (we match everything starting with @ but not @@ which is used as escape sequence for a literal @).
|
||||
syn region rOBlock start="\(\%^\|^\s*\n\)\@<=\(\s*#\{1,2}' .*\n\)\{-}\s*#\{1,2}' @\(@\)\@!" end="^\s*\(#\{1,2}'\)\@!" contains=rOTitle,rOTag,rOExamples,@Spell keepend fold
|
||||
syn region rOBlock start="\%^\(\s*#\{1,2}' .*\n\)\{-}\s*#\{1,2}' @\(@\)\@!" end="^\s*\(#\{1,2}'\)\@!" contains=rOTitle,rOTag,rOExamples,@Spell keepend fold
|
||||
syn region rOBlock start="^\s*\n\(\s*#\{1,2}' .*\n\)\{-}\s*#\{1,2}' @\(@\)\@!" end="^\s*\(#\{1,2}'\)\@!" contains=rOTitle,rOTag,rOExamples,@Spell keepend fold
|
||||
|
||||
" If a block contains an @rdname, @describeIn tag, it may have paragraph breaks, but does not have a title
|
||||
syn region rOBlockNoTitle start="\(\%^\|^\s*\n\)\@<=\(\s*#\{1,2}' .*\n\)\{-1,}\s*#\{1,2}'\s*\n\(\s*#\{1,2}'.*\n\)\{-}\s*#\{1,2}' @rdname" end="^\s*\(#\{1,2}'\)\@!" contains=rOTag,rOExamples,@Spell keepend fold
|
||||
syn region rOBlockNoTitle start="\(\%^\|^\s*\n\)\@<=\(\s*#\{1,2}' .*\n\)\{-1,}\s*#\{1,2}'\s*\n\(\s*#\{1,2}'.*\n\)\{-}\s*#\{1,2}' @describeIn" end="^\s*\(#\{1,2}'\)\@!" contains=rOTag,rOExamples,@Spell keepend fold
|
||||
syn region rOBlockNoTitle start="\%^\(\s*#\{1,2}' .*\n\)\{-1,}\s*#\{1,2}'\s*\n\(\s*#\{1,2}'.*\n\)\{-}\s*#\{1,2}' @rdname" end="^\s*\(#\{1,2}'\)\@!" contains=rOTag,rOExamples,@Spell keepend fold
|
||||
syn region rOBlockNoTitle start="^\s*\n\(\s*#\{1,2}' .*\n\)\{-1,}\s*#\{1,2}'\s*\n\(\s*#\{1,2}'.*\n\)\{-}\s*#\{1,2}' @rdname" end="^\s*\(#\{1,2}'\)\@!" contains=rOTag,rOExamples,@Spell keepend fold
|
||||
syn region rOBlockNoTitle start="\%^\(\s*#\{1,2}' .*\n\)\{-1,}\s*#\{1,2}'\s*\n\(\s*#\{1,2}'.*\n\)\{-}\s*#\{1,2}' @describeIn" end="^\s*\(#\{1,2}'\)\@!" contains=rOTag,rOExamples,@Spell keepend fold
|
||||
syn region rOBlockNoTitle start="^\s*\n\(\s*#\{1,2}' .*\n\)\{-1,}\s*#\{1,2}'\s*\n\(\s*#\{1,2}'.*\n\)\{-}\s*#\{1,2}' @describeIn" end="^\s*\(#\{1,2}'\)\@!" contains=rOTag,rOExamples,@Spell keepend fold
|
||||
|
||||
syn match rOCommentKey "^\s*#\{1,2}'" contained
|
||||
syn region rOExamples start="^\s*#\{1,2}' @examples.*"rs=e+1,hs=e+1 end="^\(#\{1,2}' @.*\)\@=" end="^\(#\{1,2}'\)\@!" contained contains=rOTag fold
|
||||
|
||||
" R6 classes may contain roxygen lines independent of roxygen blocks
|
||||
syn region rOR6Class start=/R6Class(/ end=/)/ transparent contains=ALLBUT,rError,rBraceError,rCurlyError fold
|
||||
syn match rOR6Block "#\{1,2}'.*" contains=rOTag,rOExamples,@Spell containedin=rOR6Class contained
|
||||
syn match rOR6Block "^\s*#\{1,2}'.*" contains=rOTag,rOExamples,@Spell containedin=rOR6Class contained
|
||||
|
||||
" rOTag list originally generated from the lists that were available in
|
||||
" https://github.com/klutometis/roxygen/R/rd.R and
|
||||
@@ -239,15 +245,14 @@ syn match rOperator "&"
|
||||
syn match rOperator '-'
|
||||
syn match rOperator '\*'
|
||||
syn match rOperator '+'
|
||||
if &filetype == "quarto" || &filetype == "rmd" || &filetype == "rrst"
|
||||
syn match rOperator "[|!<>^~`/:]"
|
||||
else
|
||||
if &filetype != "rmd" && &filetype != "rrst"
|
||||
syn match rOperator "[|!<>^~/:]"
|
||||
else
|
||||
syn match rOperator "[|!<>^~`/:]"
|
||||
endif
|
||||
syn match rOperator "%\{2}\|%\S\{-}%"
|
||||
syn match rOperator '\([!><]\)\@<=='
|
||||
syn match rOperator '=='
|
||||
syn match rOperator '|>'
|
||||
syn match rOpError '\*\{3}'
|
||||
syn match rOpError '//'
|
||||
syn match rOpError '&&&'
|
||||
@@ -313,13 +318,10 @@ if &filetype == "rhelp"
|
||||
endif
|
||||
|
||||
" Type
|
||||
syn match rType "\\"
|
||||
syn keyword rType array category character complex double function integer list logical matrix numeric vector data.frame
|
||||
|
||||
" Name of object with spaces
|
||||
if &filetype == "rmd" || &filetype == "rrst" || &filetype == "quarto"
|
||||
syn region rNameWSpace start="`" end="`" contains=rSpaceFun containedin=rmdrChunk
|
||||
else
|
||||
if &filetype != "rmd" && &filetype != "rrst"
|
||||
syn region rNameWSpace start="`" end="`" contains=rSpaceFun
|
||||
endif
|
||||
|
||||
|
||||
+85
-124
@@ -1,7 +1,7 @@
|
||||
" Language: Markdown with chunks of R, Python and other languages
|
||||
" Maintainer: Jakson Aquino <jalvesaq@gmail.com>
|
||||
" markdown Text with R statements
|
||||
" Language: markdown with R code chunks
|
||||
" Homepage: https://github.com/jalvesaq/R-Vim-runtime
|
||||
" Last Change: Fri Feb 24, 2023 08:28AM
|
||||
" Last Change: Wed Apr 21, 2021 09:55AM
|
||||
"
|
||||
" For highlighting pandoc extensions to markdown like citations and TeX and
|
||||
" many other advanced features like folding of markdown sections, it is
|
||||
@@ -13,120 +13,63 @@ if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
" Highlight the header of the chunks as R code
|
||||
let g:rmd_syn_hl_chunk = get(g:, 'rmd_syn_hl_chunk', 0)
|
||||
|
||||
" Pandoc-syntax has more features, but it is slower.
|
||||
" https://github.com/vim-pandoc/vim-pandoc-syntax
|
||||
|
||||
" Don't waste time loading syntax that will be discarded:
|
||||
let s:save_pandoc_lngs = get(g:, 'pandoc#syntax#codeblocks#embeds#langs', [])
|
||||
let g:pandoc#syntax#codeblocks#embeds#langs = []
|
||||
|
||||
" Step_1: Source pandoc.vim if it is installed:
|
||||
let g:pandoc#syntax#codeblocks#embeds#langs = get(g:, 'pandoc#syntax#codeblocks#embeds#langs', ['r'])
|
||||
runtime syntax/pandoc.vim
|
||||
if exists("b:current_syntax")
|
||||
if hlexists('pandocDelimitedCodeBlock')
|
||||
syn clear pandocDelimitedCodeBlock
|
||||
endif
|
||||
|
||||
if len(s:save_pandoc_lngs) > 0 && !exists('g:rmd_fenced_languages')
|
||||
let g:rmd_fenced_languages = deepcopy(s:save_pandoc_lngs)
|
||||
endif
|
||||
|
||||
" Recognize inline R code
|
||||
syn region rmdrInline matchgroup=rmdInlineDelim start="`r " end="`" contains=@Rmdr containedin=pandocLaTeXRegion,yamlFlowString keepend
|
||||
else
|
||||
" Step_2: Source markdown.vim if pandoc.vim is not installed
|
||||
syn region rmdrInline matchgroup=rmdInlineDelim start="`r " end="`" contains=@R containedin=pandocLaTeXRegion,yamlFlowString keepend
|
||||
hi def link rmdInlineDelim Delimiter
|
||||
|
||||
" Configuration if not using pandoc syntax:
|
||||
" Add syntax highlighting of YAML header
|
||||
let g:rmd_syn_hl_yaml = get(g:, 'rmd_syn_hl_yaml', 1)
|
||||
" Add syntax highlighting of citation keys
|
||||
let g:rmd_syn_hl_citations = get(g:, 'rmd_syn_hl_citations', 1)
|
||||
|
||||
" R chunks will not be highlighted by syntax/markdown because their headers
|
||||
" follow a non standard pattern: "```{lang" instead of "^```lang".
|
||||
" Make a copy of g:markdown_fenced_languages to highlight the chunks later:
|
||||
if exists('g:markdown_fenced_languages') && !exists('g:rmd_fenced_languages')
|
||||
let g:rmd_fenced_languages = deepcopy(g:markdown_fenced_languages)
|
||||
endif
|
||||
|
||||
if exists('g:markdown_fenced_languages') && len(g:markdown_fenced_languages) > 0
|
||||
let s:save_mfl = deepcopy(g:markdown_fenced_languages)
|
||||
endif
|
||||
" Don't waste time loading syntax that will be discarded:
|
||||
let g:markdown_fenced_languages = []
|
||||
runtime syntax/markdown.vim
|
||||
if exists('s:save_mfl') > 0
|
||||
let g:markdown_fenced_languages = deepcopy(s:save_mfl)
|
||||
unlet s:save_mfl
|
||||
endif
|
||||
syn region rmdrInline matchgroup=rmdInlineDelim start="`r " end="`" contains=@Rmdr keepend
|
||||
|
||||
" Step_2a: Add highlighting for both YAML and citations which are pandoc
|
||||
" specific, but also used in Rmd files
|
||||
|
||||
" You don't need this if either your markdown/syntax.vim already highlights
|
||||
" the YAML header or you are writing standard markdown
|
||||
if g:rmd_syn_hl_yaml
|
||||
" Basic highlighting of YAML header
|
||||
syn match rmdYamlFieldTtl /^\s*\zs\w\%(-\|\w\)*\ze:/ contained
|
||||
syn match rmdYamlFieldTtl /^\s*-\s*\zs\w\%(-\|\w\)*\ze:/ contained
|
||||
syn region yamlFlowString matchgroup=yamlFlowStringDelimiter start='"' skip='\\"' end='"' contains=yamlEscape,rmdrInline contained
|
||||
syn region yamlFlowString matchgroup=yamlFlowStringDelimiter start="'" skip="''" end="'" contains=yamlSingleEscape,rmdrInline contained
|
||||
syn match yamlEscape contained '\\\%([\\"abefnrtv\^0_ NLP\n]\|x\x\x\|u\x\{4}\|U\x\{8}\)'
|
||||
syn match yamlSingleEscape contained "''"
|
||||
syn match yamlComment /#.*/ contained
|
||||
" A second colon is a syntax error, unles within a string or following !expr
|
||||
syn match yamlColonError /:\s*[^'^"^!]*:/ contained
|
||||
if &filetype == 'quarto'
|
||||
syn region pandocYAMLHeader matchgroup=rmdYamlBlockDelim start=/\%(\%^\|\_^\s*\n\)\@<=\_^-\{3}\ze\n.\+/ end=/^---$/ keepend contains=rmdYamlFieldTtl,yamlFlowString,yamlComment,yamlColonError
|
||||
" Fix recognition of language chunks (code adapted from pandoc, 2021-03-28)
|
||||
" Knitr requires braces in the block's header
|
||||
for s:lng in g:pandoc#syntax#codeblocks#embeds#langs
|
||||
let s:nm = matchstr(s:lng, '^[^=]*')
|
||||
exe 'syn clear pandocDelimitedCodeBlock_'.s:nm
|
||||
exe 'syn clear pandocDelimitedCodeBlockinBlockQuote_'.s:nm
|
||||
if g:rmd_syn_hl_chunk
|
||||
exe 'syn region rmd'.s:nm.'ChunkDelim matchgroup=rmdCodeDelim start="^\s*```\s*{\s*'.s:nm.'\>" matchgroup=rmdCodeDelim end="}$" keepend containedin=rmd'.s:nm.'Chunk contains=@R'
|
||||
exe 'syn region rmd'.s:nm.'Chunk start="^\s*```\s*{\s*'.s:nm.'\>.*$" matchgroup=rmdCodeDelim end="^\s*```\ze\s*$" keepend contains=rmd'.s:nm.'ChunkDelim,@'.toupper(s:nm)
|
||||
else
|
||||
syn region pandocYAMLHeader matchgroup=rmdYamlBlockDelim start=/\%(\%^\|\_^\s*\n\)\@<=\_^-\{3}\ze\n.\+/ end=/^\([-.]\)\1\{2}$/ keepend contains=rmdYamlFieldTtl,yamlFlowString,yamlComment,yamlColonError
|
||||
exe 'syn region rmd'.s:nm.'Chunk matchgroup=rmdCodeDelim start="^\s*```\s*{\s*'.s:nm.'\>.*$" matchgroup=rmdCodeDelim end="^\s*```\ze\s*$" keepend contains=@'.toupper(s:nm)
|
||||
endif
|
||||
hi def link rmdYamlBlockDelim Delimiter
|
||||
hi def link rmdYamlFieldTtl Identifier
|
||||
hi def link yamlFlowString String
|
||||
hi def link yamlComment Comment
|
||||
hi def link yamlColonError Error
|
||||
endif
|
||||
|
||||
" You don't need this if either your markdown/syntax.vim already highlights
|
||||
" citations or you are writing standard markdown
|
||||
if g:rmd_syn_hl_citations
|
||||
" From vim-pandoc-syntax
|
||||
" parenthetical citations
|
||||
syn match pandocPCite /\^\@<!\[[^\[\]]\{-}-\{0,1}@[[:alnum:]_][[:alnum:]à-öø-ÿÀ-ÖØ-ß_:.#$%&\-+?<>~\/]*.\{-}\]/ contains=pandocEmphasis,pandocStrong,pandocLatex,pandocCiteKey,@Spell,pandocAmpersandEscape display
|
||||
" in-text citations with location
|
||||
syn match pandocICite /@[[:alnum:]_][[:alnum:]à-öø-ÿÀ-ÖØ-ß_:.#$%&\-+?<>~\/]*\s\[.\{-1,}\]/ contains=pandocCiteKey,@Spell display
|
||||
" cite keys
|
||||
syn match pandocCiteKey /\(-\=@[[:alnum:]_][[:alnum:]à-öø-ÿÀ-ÖØ-ß_:.#$%&\-+?<>~\/]*\)/ containedin=pandocPCite,pandocICite contains=@NoSpell display
|
||||
syn match pandocCiteAnchor /[-@]/ contained containedin=pandocCiteKey display
|
||||
syn match pandocCiteLocator /[\[\]]/ contained containedin=pandocPCite,pandocICite
|
||||
hi def link pandocPCite Operator
|
||||
hi def link pandocICite Operator
|
||||
hi def link pandocCiteKey Label
|
||||
hi def link pandocCiteAnchor Operator
|
||||
hi def link pandocCiteLocator Operator
|
||||
endif
|
||||
endfor
|
||||
unlet s:lng
|
||||
unlet s:nm
|
||||
hi def link rmdInlineDelim Delimiter
|
||||
hi def link rmdCodeDelim Delimiter
|
||||
let b:current_syntax = "rmd"
|
||||
finish
|
||||
endif
|
||||
|
||||
" Step_3: Highlight code blocks.
|
||||
" Configuration if not using pandoc syntax:
|
||||
" Add syntax highlighting of YAML header
|
||||
let g:rmd_syn_hl_yaml = get(g:, 'rmd_syn_hl_yaml', 1)
|
||||
" Add syntax highlighting of citation keys
|
||||
let g:rmd_syn_hl_citations = get(g:, 'rmd_syn_hl_citations', 1)
|
||||
|
||||
syn region rmdCodeBlock matchgroup=rmdCodeDelim start="^\s*```\s*{.*}$" matchgroup=rmdCodeDelim end="^\s*```\ze\s*$" keepend
|
||||
syn region rmdCodeBlock matchgroup=rmdCodeDelim start="^\s*```.+$" matchgroup=rmdCodeDelim end="^```$" keepend
|
||||
hi link rmdCodeBlock Special
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
" R chunks will not be highlighted by syntax/markdown because their headers
|
||||
" follow a non standard pattern: "```{lang" instead of "^```lang".
|
||||
" Make a copy of g:markdown_fenced_languages to highlight the chunks later:
|
||||
if exists('g:markdown_fenced_languages')
|
||||
if !exists('g:rmd_fenced_languages')
|
||||
let g:rmd_fenced_languages = deepcopy(g:markdown_fenced_languages)
|
||||
let g:markdown_fenced_languages = []
|
||||
endif
|
||||
else
|
||||
let g:rmd_fenced_languages = ['r']
|
||||
endif
|
||||
|
||||
runtime syntax/markdown.vim
|
||||
|
||||
" Now highlight chunks:
|
||||
syn region knitrBodyOptions start='^#| ' end='$' contained containedin=rComment,pythonComment contains=knitrBodyVar,knitrBodyValue transparent
|
||||
syn match knitrBodyValue ': \zs.*\ze$' keepend contained containedin=knitrBodyOptions
|
||||
syn match knitrBodyVar '| \zs\S\{-}\ze:' contained containedin=knitrBodyOptions
|
||||
|
||||
let g:rmd_fenced_languages = get(g:, 'rmd_fenced_languages', ['r'])
|
||||
for s:type in g:rmd_fenced_languages
|
||||
if s:type =~ '='
|
||||
let s:ft = substitute(s:type, '.*=', '', '')
|
||||
@@ -138,40 +81,58 @@ for s:type in g:rmd_fenced_languages
|
||||
unlet! b:current_syntax
|
||||
exe 'syn include @Rmd'.s:nm.' syntax/'.s:ft.'.vim'
|
||||
if g:rmd_syn_hl_chunk
|
||||
exe 'syn match knitrChunkDelim /```\s*{\s*'.s:nm.'/ contained containedin=knitrChunkBrace contains=knitrChunkLabel'
|
||||
exe 'syn match knitrChunkLabelDelim /```\s*{\s*'.s:nm.',\=\s*[-[:alnum:]]\{-1,}[,}]/ contained containedin=knitrChunkBrace'
|
||||
syn match knitrChunkDelim /}\s*$/ contained containedin=knitrChunkBrace
|
||||
exe 'syn match knitrChunkBrace /```\s*{\s*'.s:nm.'.*$/ contained containedin=rmd'.s:nm.'Chunk contains=knitrChunkDelim,knitrChunkLabelDelim,@Rmd'.s:nm
|
||||
exe 'syn region rmd'.s:nm.'Chunk start="^\s*```\s*{\s*=\?'.s:nm.'\>.*$" matchgroup=rmdCodeDelim end="^\s*```\ze\s*$" keepend contains=knitrChunkBrace,@Rmd'.s:nm
|
||||
|
||||
hi link knitrChunkLabel Identifier
|
||||
hi link knitrChunkDelim rmdCodeDelim
|
||||
hi link knitrChunkLabelDelim rmdCodeDelim
|
||||
exe 'syn region rmd'.s:nm.'ChunkDelim matchgroup=rmdCodeDelim start="^\s*```\s*{\s*'.s:nm.'\>" matchgroup=rmdCodeDelim end="}$" keepend containedin=rmd'.s:nm.'Chunk contains=@Rmdr'
|
||||
exe 'syn region rmd'.s:nm.'Chunk start="^\s*```\s*{\s*'.s:nm.'\>.*$" matchgroup=rmdCodeDelim end="^\s*```\ze\s*$" keepend contains=rmd'.s:nm.'ChunkDelim,@Rmd'.s:nm
|
||||
else
|
||||
exe 'syn region rmd'.s:nm.'Chunk matchgroup=rmdCodeDelim start="^\s*```\s*{\s*=\?'.s:nm.'\>.*$" matchgroup=rmdCodeDelim end="^\s*```\ze\s*$" keepend contains=@Rmd'.s:nm
|
||||
exe 'syn region rmd'.s:nm.'Chunk matchgroup=rmdCodeDelim start="^\s*```\s*{\s*'.s:nm.'\>.*$" matchgroup=rmdCodeDelim end="^\s*```\ze\s*$" keepend contains=@Rmd'.s:nm
|
||||
endif
|
||||
endfor
|
||||
unlet! s:type
|
||||
|
||||
" Step_4: Highlight code recognized by pandoc but not defined in pandoc.vim yet:
|
||||
syn match pandocDivBegin '^:::\+ {.\{-}}' contains=pandocHeaderAttr
|
||||
syn match pandocDivEnd '^:::\+$'
|
||||
" Recognize inline R code
|
||||
syn region rmdrInline matchgroup=rmdInlineDelim start="`r " end="`" contains=@Rmdr keepend
|
||||
|
||||
hi def link knitrBodyVar PreProc
|
||||
hi def link knitrBodyValue Constant
|
||||
hi def link knitrBodyOptions rComment
|
||||
hi def link pandocDivBegin Delimiter
|
||||
hi def link pandocDivEnd Delimiter
|
||||
hi def link rmdInlineDelim Delimiter
|
||||
hi def link rmdCodeDelim Delimiter
|
||||
|
||||
if len(s:save_pandoc_lngs)
|
||||
let g:pandoc#syntax#codeblocks#embeds#langs = s:save_pandoc_lngs
|
||||
" You don't need this if either your markdown/syntax.vim already highlights
|
||||
" the YAML header or you are writing standard markdown
|
||||
if g:rmd_syn_hl_yaml
|
||||
" Minimum highlighting of yaml header
|
||||
syn match rmdYamlFieldTtl /^\s*\zs\w*\ze:/ contained
|
||||
syn match rmdYamlFieldTtl /^\s*-\s*\zs\w*\ze:/ contained
|
||||
syn region yamlFlowString matchgroup=yamlFlowStringDelimiter start='"' skip='\\"' end='"' contains=yamlEscape,rmdrInline contained
|
||||
syn region yamlFlowString matchgroup=yamlFlowStringDelimiter start="'" skip="''" end="'" contains=yamlSingleEscape,rmdrInline contained
|
||||
syn match yamlEscape contained '\\\%([\\"abefnrtv\^0_ NLP\n]\|x\x\x\|u\x\{4}\|U\x\{8}\)'
|
||||
syn match yamlSingleEscape contained "''"
|
||||
syn region pandocYAMLHeader matchgroup=rmdYamlBlockDelim start=/\%(\%^\|\_^\s*\n\)\@<=\_^-\{3}\ze\n.\+/ end=/^\([-.]\)\1\{2}$/ keepend contains=rmdYamlFieldTtl,yamlFlowString
|
||||
hi def link rmdYamlBlockDelim Delimiter
|
||||
hi def link rmdYamlFieldTtl Identifier
|
||||
hi def link yamlFlowString String
|
||||
endif
|
||||
|
||||
" You don't need this if either your markdown/syntax.vim already highlights
|
||||
" citations or you are writing standard markdown
|
||||
if g:rmd_syn_hl_citations
|
||||
" From vim-pandoc-syntax
|
||||
" parenthetical citations
|
||||
syn match pandocPCite /\^\@<!\[[^\[\]]\{-}-\{0,1}@[[:alnum:]_][[:alnum:]à-öø-ÿÀ-ÖØ-ß_:.#$%&\-+?<>~\/]*.\{-}\]/ contains=pandocEmphasis,pandocStrong,pandocLatex,pandocCiteKey,@Spell,pandocAmpersandEscape display
|
||||
" in-text citations with location
|
||||
syn match pandocICite /@[[:alnum:]_][[:alnum:]à-öø-ÿÀ-ÖØ-ß_:.#$%&\-+?<>~\/]*\s\[.\{-1,}\]/ contains=pandocCiteKey,@Spell display
|
||||
" cite keys
|
||||
syn match pandocCiteKey /\(-\=@[[:alnum:]_][[:alnum:]à-öø-ÿÀ-ÖØ-ß_:.#$%&\-+?<>~\/]*\)/ containedin=pandocPCite,pandocICite contains=@NoSpell display
|
||||
syn match pandocCiteAnchor /[-@]/ contained containedin=pandocCiteKey display
|
||||
syn match pandocCiteLocator /[\[\]]/ contained containedin=pandocPCite,pandocICite
|
||||
hi def link pandocPCite Operator
|
||||
hi def link pandocICite Operator
|
||||
hi def link pandocCiteKey Label
|
||||
hi def link pandocCiteAnchor Operator
|
||||
hi def link pandocCiteLocator Operator
|
||||
endif
|
||||
unlet s:save_pandoc_lngs
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
|
||||
let b:current_syntax = "rmd"
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
|
||||
" vim: ts=8 sw=2
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
" Language: shell (sh) Korn shell (ksh) bash (sh)
|
||||
" Maintainer: Charles E. Campbell <NcampObell@SdrPchip.AorgM-NOSPAM>
|
||||
" Previous Maintainer: Lennart Schultz <Lennart.Schultz@ecmwf.int>
|
||||
" Last Change: Feb 11, 2023
|
||||
" Version: 207
|
||||
" Last Change: Nov 25, 2022
|
||||
" Version: 204
|
||||
" URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_SH
|
||||
" For options and settings, please use: :help ft-sh-syntax
|
||||
" This file includes many ideas from Eric Brunet (eric.brunet@ens.fr) and heredoc fixes from Felipe Contreras
|
||||
@@ -166,7 +166,7 @@ if exists("b:is_kornshell") || exists("b:is_bash")
|
||||
syn cluster shLoopoList add=shForPP
|
||||
endif
|
||||
syn cluster shPPSLeftList contains=shAlias,shArithmetic,shCmdParenRegion,shCommandSub,shCtrlSeq,shDeref,shDerefSimple,shDoubleQuote,shEcho,shEscape,shExDoubleQuote,shExpr,shExSingleQuote,shHereDoc,shNumber,shOperator,shOption,shPosnParm,shHereString,shRedir,shSingleQuote,shSpecial,shStatement,shSubSh,shTest,shVariable
|
||||
syn cluster shPPSRightList contains=shDeref,shDerefSimple,shEscape,shPosnParm
|
||||
syn cluster shPPSRightList contains=shComment,shDeref,shDerefSimple,shEscape,shPosnParm
|
||||
syn cluster shSubShList contains=@shCommandSubList,shCommandSubBQ,shCaseEsac,shColon,shCommandSub,shComment,shDo,shEcho,shExpr,shFor,shIf,shHereString,shRedir,shSetList,shSource,shStatement,shVariable,shCtrlSeq,shOperator
|
||||
syn cluster shTestList contains=shArithmetic,shCharClass,shCommandSub,shCommandSubBQ,shCtrlSeq,shDeref,shDerefSimple,shDoubleQuote,shSpecialDQ,shExDoubleQuote,shExpr,shExSingleQuote,shNumber,shOperator,shSingleQuote,shTest,shTestOpr
|
||||
syn cluster shNoZSList contains=shSpecialNoZS
|
||||
@@ -499,6 +499,7 @@ endif
|
||||
" ksh: ${.sh.*} variables: {{{1
|
||||
" ========================================
|
||||
if exists("b:is_kornshell")
|
||||
" syn match shDerefVar contained "[.]*" nextgroup=@shDerefVarList
|
||||
syn match shDerefVar contained "\.\+" nextgroup=@shDerefVarList
|
||||
endif
|
||||
|
||||
@@ -543,7 +544,6 @@ syn region shDerefVarArray contained matchgroup=shDeref start="\[" end="]" co
|
||||
" bash : ${parameter,pattern} Case modification
|
||||
" bash : ${parameter,,pattern} Case modification
|
||||
" bash : ${@:start:qty} display command line arguments from start to start+qty-1 (inferred)
|
||||
" bash : ${parameter@operator} transforms parameter (operator∈[uULqEPARa])
|
||||
syn cluster shDerefPatternList contains=shDerefPattern,shDerefString
|
||||
if !exists("g:sh_no_error")
|
||||
syn match shDerefOpError contained ":[[:punct:]]"
|
||||
@@ -559,7 +559,6 @@ if exists("b:is_bash") || exists("b:is_kornshell") || exists("b:is_posix")
|
||||
endif
|
||||
if exists("b:is_bash")
|
||||
syn match shDerefOp contained "[,^]\{1,2}" nextgroup=@shDerefPatternList
|
||||
syn match shDerefOp contained "@[uULQEPAKa]"
|
||||
endif
|
||||
syn region shDerefString contained matchgroup=shDerefDelim start=+\%(\\\)\@<!'+ end=+'+ contains=shStringSpecial
|
||||
syn region shDerefString contained matchgroup=shDerefDelim start=+\%(\\\)\@<!"+ skip=+\\"+ end=+"+ contains=@shDblQuoteList,shStringSpecial
|
||||
|
||||
@@ -1255,7 +1255,7 @@
|
||||
</dict>
|
||||
</array>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>176.1</string>
|
||||
<string>175</string>
|
||||
<key>LSApplicationCategoryType</key>
|
||||
<string>public.app-category.productivity</string>
|
||||
<key>NSAppTransportSecurity</key>
|
||||
|
||||
@@ -759,15 +759,6 @@ fsEventCallback(ConstFSEventStreamRef streamRef,
|
||||
andEventID:'MOD '];
|
||||
#endif
|
||||
|
||||
// We are hard shutting down the app here by terminating all Vim processes
|
||||
// and then just quit without cleanly removing each Vim controller. We
|
||||
// don't want the straggler controllers to still interact with the now
|
||||
// invalid connections, so we just mark them as uninitialized.
|
||||
for (NSUInteger i = 0, count = [vimControllers count]; i < count; ++i) {
|
||||
MMVimController *vc = [vimControllers objectAtIndex:i];
|
||||
[vc uninitialize];
|
||||
}
|
||||
|
||||
// This will invalidate all connections (since they were spawned from this
|
||||
// connection).
|
||||
[connection invalidate];
|
||||
|
||||
@@ -52,12 +52,8 @@
|
||||
@"CFBundleVersion"];
|
||||
NSString *marketingVersion = [[NSBundle mainBundle]
|
||||
objectForInfoDictionaryKey:@"CFBundleShortVersionString"];
|
||||
|
||||
BOOL isPrerelease = [version containsSubstring:@"."];
|
||||
NSString *prerelease = isPrerelease ? @"\npre-release" : @"";
|
||||
|
||||
NSString *title = [NSString stringWithFormat:
|
||||
@"MacVim r%@ (Vim %@)%@", version, marketingVersion, prerelease];
|
||||
@"Vim %@ (MacVim r%@)", marketingVersion, version];
|
||||
|
||||
[self orderFrontStandardAboutPanelWithOptions:
|
||||
[NSDictionary dictionaryWithObjectsAndKeys:
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
* See README.txt for an overview of the Vim source code.
|
||||
*/
|
||||
|
||||
#import "MacVim.h"
|
||||
#import "MMFindReplaceController.h"
|
||||
|
||||
|
||||
|
||||
@@ -1072,7 +1072,7 @@ KeyboardInputSourcesEqual(TISInputSourceRef a, TISInputSourceRef b)
|
||||
static NSCursor *ibeamCursor = nil;
|
||||
|
||||
if (!ibeamCursor) {
|
||||
if (AVAILABLE_MAC_OS(10, 14))
|
||||
if (floor(NSAppKitVersionNumber) >= NSAppKitVersionNumber10_14)
|
||||
{
|
||||
// macOS 10.14 (Mojave) introduced dark mode, and seems to have
|
||||
// added a thick white border around the system I-beam cursor,
|
||||
|
||||
@@ -57,7 +57,6 @@
|
||||
}
|
||||
|
||||
- (id)initWithBackend:(id)backend pid:(int)processIdentifier;
|
||||
- (void)uninitialize;
|
||||
- (unsigned)vimControllerId;
|
||||
- (id)backendProxy;
|
||||
- (int)pid;
|
||||
|
||||
@@ -177,7 +177,7 @@ static BOOL isUnsafeMessage(int msgid);
|
||||
popupMenuItems = [[NSMutableArray alloc] init];
|
||||
toolbarItemDict = [[NSMutableDictionary alloc] init];
|
||||
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_12_2
|
||||
if (AVAILABLE_MAC_OS_PATCH(10, 12, 2)) {
|
||||
if (@available(macos 10.12.2, *)) {
|
||||
touchbarInfo = [[MMTouchBarInfo alloc] init];
|
||||
}
|
||||
#endif
|
||||
@@ -248,15 +248,6 @@ static BOOL isUnsafeMessage(int msgid);
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
/// This should only be called by MMAppController when it's doing an app quit.
|
||||
/// We just wait for all Vim processes to terminate instad of individually
|
||||
/// closing each MMVimController. We simply unset isInitialized to prevent it
|
||||
/// from handling and sending messages to now invalid Vim connections.
|
||||
- (void)uninitialize
|
||||
{
|
||||
isInitialized = NO;
|
||||
}
|
||||
|
||||
- (unsigned)vimControllerId
|
||||
{
|
||||
return identifier;
|
||||
@@ -1425,7 +1416,7 @@ static BOOL isUnsafeMessage(int msgid);
|
||||
|
||||
if ([rootName isEqual:MMTouchbarMenuName]) {
|
||||
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_12_2
|
||||
if (AVAILABLE_MAC_OS_PATCH(10, 12, 2)) {
|
||||
if (@available(macos 10.12.2, *)) {
|
||||
if ([desc count] < 2) // Cannot be 1, as we need at least TouchBar.<menu_name>
|
||||
return;
|
||||
if ([desc count] >= 3) // Unfortunately currently Apple does not support nested popover's so we can only do one level nesting
|
||||
@@ -1509,7 +1500,7 @@ static BOOL isUnsafeMessage(int msgid);
|
||||
if ([desc count] >= 4) // Unfortunately currently Apple does not support nested popover's so we can only do one level nesting
|
||||
return;
|
||||
|
||||
if (AVAILABLE_MAC_OS_PATCH(10, 12, 2)) {
|
||||
if (@available(macos 10.12.2, *)) {
|
||||
MMTouchBarInfo *submenuTouchbar = nil;
|
||||
if (![self touchBarItemForDescriptor:desc touchBar:&submenuTouchbar touchBarItem:nil]) {
|
||||
return;
|
||||
@@ -1597,7 +1588,7 @@ static BOOL isUnsafeMessage(int msgid);
|
||||
}
|
||||
if ([rootName isEqual:MMTouchbarMenuName]){
|
||||
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_12_2
|
||||
if (AVAILABLE_MAC_OS_PATCH(10, 12, 2)) {
|
||||
if (@available(macos 10.12.2, *)) {
|
||||
MMTouchBarInfo *submenuTouchbar = nil;
|
||||
if (![self touchBarItemForDescriptor:desc touchBar:&submenuTouchbar touchBarItem:nil]) {
|
||||
return;
|
||||
@@ -1651,7 +1642,7 @@ static BOOL isUnsafeMessage(int msgid);
|
||||
|
||||
if ([rootName isEqual:MMTouchbarMenuName]) {
|
||||
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_12_2
|
||||
if (AVAILABLE_MAC_OS_PATCH(10, 12, 2)) {
|
||||
if (@available(macos 10.12.2, *)) {
|
||||
MMTouchBarItemInfo *touchbarItem = nil;
|
||||
if (![self touchBarItemForDescriptor:desc touchBar:nil touchBarItem:&touchbarItem]) {
|
||||
return;
|
||||
@@ -1695,7 +1686,7 @@ static BOOL isUnsafeMessage(int msgid);
|
||||
|
||||
if ([rootName isEqual:MMTouchbarMenuName]) {
|
||||
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_12_2
|
||||
if (AVAILABLE_MAC_OS_PATCH(10, 12, 2)) {
|
||||
if (@available(macos 10.12.2, *)) {
|
||||
MMTouchBarItemInfo *touchbarItem = nil;
|
||||
if (![self touchBarItemForDescriptor:desc touchBar:nil touchBarItem:&touchbarItem]) {
|
||||
return;
|
||||
|
||||
@@ -142,7 +142,7 @@
|
||||
// setting it in macOS 11+.
|
||||
BOOL usingTexturedBackground = NO;
|
||||
#if MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_VERSION_11_0
|
||||
if (AVAILABLE_MAC_OS(11, 0)) {
|
||||
if (@available(macos 11.0, *)) {
|
||||
// Don't set the textured background because it's been completely deprecated and won't do anything.
|
||||
} else {
|
||||
styleMask = styleMask | NSWindowStyleMaskTexturedBackground;
|
||||
@@ -592,7 +592,7 @@
|
||||
|
||||
// Transparent title bar setting
|
||||
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_10
|
||||
if (AVAILABLE_MAC_OS(10, 10)) {
|
||||
if (@available(macos 10.10, *)) {
|
||||
decoratedWindow.titlebarAppearsTransparent = [ud boolForKey:MMTitlebarAppearsTransparentKey];
|
||||
}
|
||||
#endif
|
||||
@@ -1800,7 +1800,7 @@
|
||||
// See initWithVimController: for textured background deprecation notes.
|
||||
BOOL windowTextured = NO;
|
||||
#if MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_VERSION_11_0
|
||||
if (AVAILABLE_MAC_OS(11, 0)) {
|
||||
if (@available(macos 11.0, *)) {
|
||||
} else {
|
||||
windowTextured = ([decoratedWindow styleMask] &
|
||||
NSWindowStyleMaskTexturedBackground) != 0;
|
||||
|
||||
@@ -62,34 +62,12 @@
|
||||
#ifndef NSAppKitVersionNumber10_12
|
||||
# define NSAppKitVersionNumber10_12 1504
|
||||
#endif
|
||||
#ifndef NSAppKitVersionNumber10_12_2
|
||||
# define NSAppKitVersionNumber10_12_2 1504.76
|
||||
#endif
|
||||
#ifndef NSAppKitVersionNumber10_13
|
||||
# define NSAppKitVersionNumber10_13 1561
|
||||
#endif
|
||||
#ifndef NSAppKitVersionNumber10_14
|
||||
# define NSAppKitVersionNumber10_14 1671
|
||||
#endif
|
||||
#ifndef NSAppKitVersionNumber11_0
|
||||
# define NSAppKitVersionNumber11_0 2022
|
||||
#endif
|
||||
|
||||
// Macro to detect runtime OS version. Ideally, we would just like to use
|
||||
// @available to test for this because the compiler can optimize it out
|
||||
// depending on your min/max OS configuration. However, it was added in Xcode 9
|
||||
// (macOS 10.13 SDK). For any code that we want to be compilable for Xcode 8
|
||||
// (macOS 10.12) or below, we need to use the macro below which will
|
||||
// selectively use NSAppKitVersionNumber instead.
|
||||
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_13
|
||||
// Xcode 9+, can use @available, which is more efficient.
|
||||
# define AVAILABLE_MAC_OS(MAJOR, MINOR) @available(macos MAJOR##.##MINOR, *)
|
||||
# define AVAILABLE_MAC_OS_PATCH(MAJOR, MINOR, PATCH) @available(macos MAJOR##.##MINOR##.##PATCH, *)
|
||||
#else
|
||||
// Xcode 8 or below. Use the old-school NSAppKitVersionNumber check.
|
||||
# define AVAILABLE_MAC_OS(MAJOR, MINOR) NSAppKitVersionNumber >= NSAppKitVersionNumber##MAJOR##_##MINOR
|
||||
# define AVAILABLE_MAC_OS_PATCH(MAJOR, MINOR, PATCH) NSAppKitVersionNumber >= NSAppKitVersionNumber##MAJOR##_##MINOR##_##PATCH
|
||||
#endif
|
||||
|
||||
// Deprecated constants. Since these are constants, we just need the compiler,
|
||||
// not the runtime to know about them. As such, we can use MAX_ALLOWED to
|
||||
@@ -133,10 +111,6 @@
|
||||
// Deprecated constants in 10.13 SDK
|
||||
#define NSControlStateValueOn NSOnState
|
||||
#define NSControlStateValueOff NSOffState
|
||||
|
||||
// Newly introduced symbols in 10.13 SDK
|
||||
typedef NSString* NSPasteboardType;
|
||||
typedef NSString* NSAttributedStringKey;
|
||||
#endif
|
||||
|
||||
// Deprecated runtime values. Since these are runtime values, we need to use the
|
||||
|
||||
@@ -890,7 +890,6 @@
|
||||
29B97313FDCFA39411CA2CEA /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
BuildIndependentTargetsInParallel = YES;
|
||||
LastUpgradeCheck = 0710;
|
||||
};
|
||||
buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "MacVim" */;
|
||||
@@ -1054,7 +1053,7 @@
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "./scripts/cleanup-after-build \"$BUILT_PRODUCTS_DIR/$WRAPPER_NAME\" \"$REMOVE_SPARKLE\"\n";
|
||||
shellScript = "./scripts/cleanup-after-build \"$BUILT_PRODUCTS_DIR/$WRAPPER_NAME\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
90BD4EF224E0E8B700BF29F2 /* Copy locale message translation files */ = {
|
||||
|
||||
@@ -476,11 +476,9 @@
|
||||
[[NSNotificationCenter defaultCenter] removeObserver:cell];
|
||||
if([cell closeButtonTrackingTag] != 0){
|
||||
[self removeTrackingRect:[cell closeButtonTrackingTag]];
|
||||
[cell setCloseButtonTrackingTag:0];
|
||||
}
|
||||
if([cell cellTrackingTag] != 0){
|
||||
[self removeTrackingRect:[cell cellTrackingTag]];
|
||||
[cell setCellTrackingTag:0];
|
||||
}
|
||||
|
||||
// pull from collection
|
||||
@@ -667,11 +665,9 @@
|
||||
[[NSNotificationCenter defaultCenter] removeObserver:cell];
|
||||
if([cell closeButtonTrackingTag] != 0){
|
||||
[self removeTrackingRect:[cell closeButtonTrackingTag]];
|
||||
[cell setCloseButtonTrackingTag:0];
|
||||
}
|
||||
if([cell cellTrackingTag] != 0){
|
||||
[self removeTrackingRect:[cell cellTrackingTag]];
|
||||
[cell setCellTrackingTag:0];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1364,15 +1364,6 @@ gui_mch_setmouse(int x UNUSED, int y UNUSED)
|
||||
ASLogInfo(@"Not implemented!");
|
||||
}
|
||||
|
||||
void
|
||||
gui_mch_mousehide(int hide UNUSED)
|
||||
{
|
||||
// We don't implement this. `insertVimStateMessage` already sends this to
|
||||
// MacVim, and we handle this in the parent process using NSCursor's
|
||||
// `setHiddenUntilMouseMoves` instead of letting Vim have manual control
|
||||
// over this.
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
mch_set_mouse_shape(int shape)
|
||||
|
||||
+3
-2
@@ -32,8 +32,9 @@ if empty(&guitablabel)
|
||||
set guitablabel=%M%t
|
||||
endif
|
||||
|
||||
" Send print jobs to Preview.app. The user can then print from it.
|
||||
set printexpr=macvim#PreviewConvertPostScript()
|
||||
" Send print jobs to Preview.app. This does not delete the temporary ps file
|
||||
" that is generated by :hardcopy.
|
||||
set printexpr=system('open\ -a\ Preview\ '.v:fname_in)\ +\ v:shell_error
|
||||
|
||||
" askpass
|
||||
let $SSH_ASKPASS = simplify($VIM . '/../../Resources') . '/macvim-askpass'
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user