Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into tabsidebar
Browse files Browse the repository at this point in the history
  • Loading branch information
rbtnn committed Oct 5, 2024
2 parents d328209 + b065a10 commit 47b23cb
Show file tree
Hide file tree
Showing 42 changed files with 249 additions and 126 deletions.
40 changes: 40 additions & 0 deletions runtime/compiler/cppcheck.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
" vim compiler file
" Compiler: cppcheck (C++ static checker)
" Maintainer: Vincent B. ([email protected])
" Last Change: 2024 Oct 4 by @Konfekt

if exists("cppcheck")
finish
endif
let current_compiler = "cppcheck"

let s:cpo_save = &cpo
set cpo-=C

if !exists('g:c_cppcheck_params')
let g:c_cppcheck_params = '--verbose --force --inline-suppr'
\ ..' '..'--enable=warning,style,performance,portability,information,missingInclude'
\ ..' '..(executable('getconf') ? '-j' .. systemlist('getconf _NPROCESSORS_ONLN')[0] : '')
let s:undo_compiler = 'unlet! g:c_cppcheck_params'
endif

let &l:makeprg = 'cppcheck --quiet'
\ ..' --template="{file}:{line}:{column}: {severity}: [{id}] {message} {callstack}"'
\ ..' '..get(b:, 'c_cppcheck_params',
\ g:c_cppcheck_params..' '..(&filetype ==# 'cpp' ? ' --language=c++' : ''))
\ ..' '..get(b:, 'c_cppcheck_includes', get(g:, 'c_cppcheck_includes',
\ (filereadable('compile_commands.json') ? '--project=compile_commands.json' :
\ (empty(&path) ? '' : '-I')..join(map(filter(split(&path, ','), 'isdirectory(v:val)'),'shellescape(v:val)'), ' -I'))))
silent CompilerSet makeprg

CompilerSet errorformat=
\%f:%l:%c:\ %tarning:\ %m,
\%f:%l:%c:\ %trror:\ %m,
\%f:%l:%c:\ %tnformation:\ %m,
\%f:%l:%c:\ %m,
\%.%#\ :\ [%f:%l]\ %m

exe get(s:, 'undo_compiler', '')

let &cpo = s:cpo_save
unlet s:cpo_save
6 changes: 3 additions & 3 deletions runtime/doc/cmdline.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*cmdline.txt* For Vim version 9.1. Last change: 2024 Aug 20
*cmdline.txt* For Vim version 9.1. Last change: 2024 Oct 05


VIM REFERENCE MANUAL by Bram Moolenaar
Expand Down Expand Up @@ -481,13 +481,13 @@ The 'wildignorecase' option can be set to ignore case in filenames. For
completing other texts (e.g. command names), the 'ignorecase' option is used
instead (fuzzy matching always ignores case, however).

If you like tcsh's autolist completion, you can use this mapping:
If you like tcsh's autolist completion, you can use this mapping: >
:cnoremap X <C-L><C-D>
(Where X is the command key to use, <C-L> is CTRL-L and <C-D> is CTRL-D)
This will find the longest match and then list all matching files.

If you like tcsh's autolist completion, you can use the 'wildmode' option to
emulate it. For example, this mimics autolist=ambiguous:
emulate it. For example, this mimics autolist=ambiguous: >
:set wildmode=longest,list
This will find the longest match with the first 'wildchar', then list all
matching files with the next.
Expand Down
4 changes: 2 additions & 2 deletions runtime/doc/filetype.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*filetype.txt* For Vim version 9.1. Last change: 2024 Sep 29
*filetype.txt* For Vim version 9.1. Last change: 2024 Oct 05


VIM REFERENCE MANUAL by Bram Moolenaar
Expand Down Expand Up @@ -776,7 +776,7 @@ Global mapping:
Local mappings:
<Plug>ManBS
<LocalLeader>h Clear backspace <BS> characters from the buffer
<LocalLeader>h Clear backspace <BS> characters from the buffer.
CTRL-] Jump to the manual page for the word under the cursor.
CTRL-T Jump back to the previous manual page.

Expand Down
16 changes: 8 additions & 8 deletions runtime/doc/if_tcl.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*if_tcl.txt* For Vim version 9.1. Last change: 2022 Jan 08
*if_tcl.txt* For Vim version 9.1. Last change: 2024 Oct 05


VIM REFERENCE MANUAL by Ingo Wilken
Expand Down Expand Up @@ -461,14 +461,14 @@ Input from stdin is currently not supported.
Here are a few small (and maybe useful) Tcl scripts.

This script sorts the lines of the entire buffer (assume it contains a list
of names or something similar):
of names or something similar): >
set buf $::vim::current(buffer)
set lines [$buf get top bottom]
set lines [lsort -dictionary $lines]
$buf set top bottom $lines
This script reverses the lines in the buffer. Note the use of "::vim::lbase"
and "$buf last" to work with any line number setting.
and "$buf last" to work with any line number setting: >
set buf $::vim::current(buffer)
set t $::vim::lbase
set b [$buf last]
Expand All @@ -481,7 +481,7 @@ and "$buf last" to work with any line number setting.
incr b -1
}
This script adds a consecutive number to each line in the current range:
This script adds a consecutive number to each line in the current range: >
set buf $::vim::current(buffer)
set i $::vim::range(start)
set n 1
Expand All @@ -491,25 +491,25 @@ This script adds a consecutive number to each line in the current range:
incr i ; incr n
}
The same can also be done quickly with two Ex commands, using ":tcldo":
The same can also be done quickly with two Ex commands, using ":tcldo": >
:tcl set n 1
:[range]tcldo set line "$n\t$line" ; incr n
This procedure runs an Ex command on each buffer (idea stolen from Ron Aaron):
This procedure runs an Ex command on each buffer (idea stolen from Ron Aaron): >
proc eachbuf { cmd } {
foreach b [::vim::buffer list] {
$b command $cmd
}
}
Use it like this:
Use it like this: >
:tcl eachbuf %s/foo/bar/g
Be careful with Tcl's string and backslash substitution, tough. If in doubt,
surround the Ex command with curly braces.


If you want to add some Tcl procedures permanently to vim, just place them in
a file (e.g. "~/.vimrc.tcl" on Unix machines), and add these lines to your
startup file (usually "~/.vimrc" on Unix):
startup file (usually "~/.vimrc" on Unix): >
if has("tcl")
tclfile ~/.vimrc.tcl
endif
Expand Down
4 changes: 2 additions & 2 deletions runtime/doc/indent.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*indent.txt* For Vim version 9.1. Last change: 2024 Feb 29
*indent.txt* For Vim version 9.1. Last change: 2024 Oct 05


VIM REFERENCE MANUAL by Bram Moolenaar
Expand Down Expand Up @@ -117,7 +117,7 @@ If you really want to reindent when you type 'o', 'O', 'e', '0', '<', '>',
"<!>", respectively, for those keys.

For an emacs-style indent mode where lines aren't indented every time you
press <Enter> but only if you press <Tab>, I suggest:
press <Enter> but only if you press <Tab>, I suggest: >
:set cinkeys=0{,0},:,0#,!<Tab>,!^F
You might also want to switch off 'autoindent' then.

Expand Down
4 changes: 2 additions & 2 deletions runtime/doc/intro.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*intro.txt* For Vim version 9.1. Last change: 2024 Apr 11
*intro.txt* For Vim version 9.1. Last change: 2024 Oct 05


VIM REFERENCE MANUAL by Bram Moolenaar
Expand Down Expand Up @@ -825,7 +825,7 @@ The current mode is "-- INSERT --" or "-- REPLACE --", see |'showmode'|. The
command characters are those that you typed but were not used yet.

If you have a slow terminal you can switch off the status messages to speed
up editing:
up editing: >
:set nosc noru nosm
If there is an error, an error message will be shown for at least one second
Expand Down
6 changes: 3 additions & 3 deletions runtime/doc/motion.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*motion.txt* For Vim version 9.1. Last change: 2024 Aug 28
*motion.txt* For Vim version 9.1. Last change: 2024 Oct 05


VIM REFERENCE MANUAL by Bram Moolenaar
Expand Down Expand Up @@ -169,9 +169,9 @@ h or *h*
CTRL-H or *CTRL-H* *<BS>*
<BS> [count] characters to the left. |exclusive| motion.
Note: If you prefer <BS> to delete a character, use
the mapping:
the mapping: >
:map CTRL-V<BS> X
(to enter "CTRL-V<BS>" type the CTRL-V key, followed
< (to enter "CTRL-V<BS>" type the CTRL-V key, followed
by the <BS> key)
See |:fixdel| if the <BS> key does not do what you
want.
Expand Down
8 changes: 4 additions & 4 deletions runtime/doc/pi_getscript.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*pi_getscript.txt* For Vim version 9.1. Last change: 2024 Sep 27
*pi_getscript.txt* For Vim version 9.1. Last change: 2024 Oct 05
>
GETSCRIPT REFERENCE MANUAL by Charles E. Campbell
<
Expand Down Expand Up @@ -281,14 +281,14 @@ With :AutoInstall: enabled, as it is by default, files which end with

---.tar.bz2 : decompressed & untarred in .vim/ directory
---.vba.bz2 : decompressed in .vim/ directory, then vimball handles it
---.vmb.bz2 : decompressed in .vim/ directory, then vimball handles it
---.vmb.bz2 : idem
---.vim.bz2 : decompressed & moved into .vim/plugin directory
---.tar.gz : decompressed & untarred in .vim/ directory
---.vba.gz : decompressed in .vim/ directory, then vimball handles it
---.vmb.gz : decompressed in .vim/ directory, then vimball handles it
---.vmb.gz : idem
---.vim.gz : decompressed & moved into .vim/plugin directory
---.vba : moved to .vim/ directory, then vimball handles it
---.vmb : moved to .vim/ directory, then vimball handles it
---.vmb : idem
---.vim : moved to .vim/plugin directory
---.zip : unzipped in .vim/ directory

Expand Down
28 changes: 27 additions & 1 deletion runtime/doc/quickfix.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*quickfix.txt* For Vim version 9.1. Last change: 2024 Sep 10
*quickfix.txt* For Vim version 9.1. Last change: 2024 Oct 05


VIM REFERENCE MANUAL by Bram Moolenaar
Expand Down Expand Up @@ -1278,6 +1278,32 @@ For writing a compiler plugin, see |write-compiler-plugin|.

Use the |compiler-make| plugin to undo the effect of a compiler plugin.

CPPCHECK *quickfix-cppcheck* *compiler-cppcheck*

Use g/b:`c_cppcheck_params` to set cppcheck parameters. The global
settings by default include

- `--verbose`: Enables verbose output.
- `--force`: Forces checking of all configurations.
- `--inline-suppr`: Allows inline suppressions.
- `--enable=...`: Enables specific checks like warnings, style, performance,
portability, information, and missing includes.
- `-j`: Utilizes multiple processors if available, determined by the
`getconf` command if available (requires omitting the unusedFunction check)

For C++ files (`filetype == 'cpp'`), the `--language=c++` option is added to
ensure Cppcheck treats the file as C++.

If compile_commands.json is present in the current directory, it is added as a
`--project` parameter to the command line. Otherwise, by default the
directories in &path are passed as include directories. These can be set by
g/b:`c_cppcheck_includes` as a list of `-I` flags. Tim Pope's vim-apathy
plug-in [0] can expand &path. To also append the folders in a git repo use >
let &l:path = join(systemlist('git ls-tree -d --name-only -r HEAD'), ',')
[0] https://github.com/tpope/vim-apathy

DOTNET *compiler-dotnet*

The .NET CLI compiler outputs both errors and warnings by default. The output
Expand Down
18 changes: 9 additions & 9 deletions runtime/doc/repeat.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*repeat.txt* For Vim version 9.1. Last change: 2024 Aug 12
*repeat.txt* For Vim version 9.1. Last change: 2024 Oct 05


VIM REFERENCE MANUAL by Bram Moolenaar
Expand Down Expand Up @@ -105,9 +105,9 @@ where the cursor was before the global command).

The global command sets both the last used search pattern and the last used
substitute pattern (this is vi compatible). This makes it easy to globally
replace a string:
replace a string: >
:g/pat/s//PAT/g
This replaces all occurrences of "pat" with "PAT". The same can be done with:
This replaces all occurrences of "pat" with "PAT". The same can be done with: >
:%s/pat/PAT/g
Which is two characters shorter!

Expand Down Expand Up @@ -526,7 +526,7 @@ Example: the lines >
\:%,
\n:>,
\fb:-
are interpreted as if they were given in one line:
are interpreted as if they were given in one line: >
:set comments=sr:/*,mb:*,el:*/,://,b:#,:%,n:>,fb:-
All leading whitespace characters in the line before a backslash are ignored.
Expand Down Expand Up @@ -611,7 +611,7 @@ advantages over normal plugins:
Using a package and loading automatically ~

Let's assume your Vim files are in the "~/.vim" directory and you want to add a
package from a zip archive "/tmp/foopack.zip":
package from a zip archive "/tmp/foopack.zip": >
% mkdir -p ~/.vim/pack/foo
% cd ~/.vim/pack/foo
% unzip /tmp/foopack.zip
Expand Down Expand Up @@ -661,7 +661,7 @@ If the package has an "after" directory, that directory is added to the end of
Using a single plugin and loading it automatically ~

If you don't have a package but a single plugin, you need to create the extra
directory level:
directory level: >
% mkdir -p ~/.vim/pack/foo/start/foobar
% cd ~/.vim/pack/foo/start/foobar
% unzip /tmp/someplugin.zip
Expand Down Expand Up @@ -978,13 +978,13 @@ will put the MO files in the "lang/" directory of the Vim editor.
Type the following commands:
>
cd /d f:\forkvim\src\po
(the following command must be entered in one line, here it is separated for example)
For Russian:
< (the following command must be entered in one line, here it is separated for example)
For Russian: >
nmake.exe -f Make_mvc.mak "PLUGPACKAGE=aap"
"PO_PLUGPACKAGE=e:\project\translate\plugins\ru.po"
"MO_PLUGPACKAGE_PATH=d:\Programs\vim\vim91\lang\ru\LC_MESSAGES"
aap.mo
For German:
< For German: >
nmake.exe -f Make_mvc.mak "PLUGPACKAGE=aap"
"PO_PLUGPACKAGE=e:\project\translate\plugins\de.po"
"MO_PLUGPACKAGE_PATH=d:\Programs\vim\vim91\lang\de\LC_MESSAGES"
Expand Down
4 changes: 2 additions & 2 deletions runtime/doc/spell.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*spell.txt* For Vim version 9.1. Last change: 2024 May 17
*spell.txt* For Vim version 9.1. Last change: 2024 Oct 05


VIM REFERENCE MANUAL by Bram Moolenaar
Expand Down Expand Up @@ -792,7 +792,7 @@ them before the Vim word list is made. The tools for this can be found in the
The format for the affix and word list files is based on what Myspell uses
(the spell checker of Mozilla and OpenOffice.org). A description can be found
here:
http://lingucomponent.openoffice.org/affix.readme ~
http://lingucomponent.openoffice.org/affix.readme
Note that affixes are case sensitive, this isn't obvious from the description.

Vim supports quite a few extras. They are described below |spell-affix-vim|.
Expand Down
11 changes: 6 additions & 5 deletions runtime/doc/starting.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*starting.txt* For Vim version 9.1. Last change: 2024 Sep 15
*starting.txt* For Vim version 9.1. Last change: 2024 Oct 05


VIM REFERENCE MANUAL by Bram Moolenaar
Expand Down Expand Up @@ -847,7 +847,8 @@ accordingly. Vim proceeds in this order:
'compatible' is only done later. Add a ":set nocp" command if you
like. For the Macintosh the $VIMRUNTIME/macmap.vim is read.

*VIMINIT* *.vimrc* *_vimrc* *EXINIT* *.exrc* *_exrc* *$MYVIMRC* *$MYVIMDIR*
*VIMINIT* *.vimrc* *_vimrc* *EXINIT* *.exrc* *_exrc*
*$MYVIMRC* *$MYVIMDIR*
c. Five places are searched for initializations. The first that exists
is used, the others are ignored. The $MYVIMRC environment variable is
set to the file that was first found, unless $MYVIMRC was already set
Expand Down Expand Up @@ -972,9 +973,9 @@ accordingly. Vim proceeds in this order:
The |v:vim_did_enter| variable is set to 1.
The |VimEnter| autocommands are executed.

The $MYVIMRC or $MYGVIMRC file will be set to the first found vimrc and/or
gvimrc file while $MYVIMDIR is set to the users personal runtime directory
'rtp' (typically the first entry in 'runtimepath').
The $MYVIMRC or $MYGVIMRC environment variable will be set to the first found
vimrc and/or gvimrc file while $MYVIMDIR is set to the users personal runtime
directory 'rtp' (typically the first entry in 'runtimepath').


Some hints on using initializations ~
Expand Down
4 changes: 2 additions & 2 deletions runtime/doc/syntax.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*syntax.txt* For Vim version 9.1. Last change: 2024 Sep 28
*syntax.txt* For Vim version 9.1. Last change: 2024 Oct 05


VIM REFERENCE MANUAL by Bram Moolenaar
Expand Down Expand Up @@ -2196,7 +2196,7 @@ optionality will be discontinued.


JSON *json.vim* *ft-json-syntax* *g:vim_json_conceal*
*g:vim_json_warnings*
*g:vim_json_warnings*

The json syntax file provides syntax highlighting with conceal support by
default. To disable concealment: >
Expand Down
2 changes: 2 additions & 0 deletions runtime/doc/tags
Original file line number Diff line number Diff line change
Expand Up @@ -6557,6 +6557,7 @@ compile-changes-8 version8.txt /*compile-changes-8*
compile-changes-9 version9.txt /*compile-changes-9*
compile-changes-9.2 version9.txt /*compile-changes-9.2*
compiler-compaqada ft_ada.txt /*compiler-compaqada*
compiler-cppcheck quickfix.txt /*compiler-cppcheck*
compiler-decada ft_ada.txt /*compiler-decada*
compiler-dotnet quickfix.txt /*compiler-dotnet*
compiler-gcc quickfix.txt /*compiler-gcc*
Expand Down Expand Up @@ -9659,6 +9660,7 @@ quickfix-ID quickfix.txt /*quickfix-ID*
quickfix-buffer quickfix.txt /*quickfix-buffer*
quickfix-changedtick quickfix.txt /*quickfix-changedtick*
quickfix-context quickfix.txt /*quickfix-context*
quickfix-cppcheck quickfix.txt /*quickfix-cppcheck*
quickfix-directory-stack quickfix.txt /*quickfix-directory-stack*
quickfix-error-lists quickfix.txt /*quickfix-error-lists*
quickfix-functions usr_41.txt /*quickfix-functions*
Expand Down
Loading

0 comments on commit 47b23cb

Please sign in to comment.