aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ex_cmds.lua
Commit message (Collapse)AuthorAge
* vim-patch:9.1.0934: hard to view an existing buffer in the preview window ↵zeertzjq2024-12-17
| | | | | | | | | | | | | | | | | | | | | | (#31605) Problem: hard to view an existing buffer in the preview window Solution: add the :pbuffer command (Yinzuo Jiang) Similar as `:pedit` and `:buffer` command. `:pbuffer` edits buffer [N] from the buffer list in the preview window. `:pbuffer` can also open special buffer, for example terminal buffer. closes: vim/vim#16222 https://github.com/vim/vim/commit/a2a2fe841ed2efdbb1f8055f752a3a4d0988ae9d Cherry-pick Test_popup_and_previewwindow_dump() changes from patch 9.0.0625. Cherry-pick Run_noroom_for_newwindow_test() changes from patches 8.2.0432 and 9.0.0363. Co-authored-by: Yinzuo Jiang <jiangyinzuo@foxmail.com>
* vim-patch:9.1.0381: cbuffer and similar commands don't accept a range (#28571)zeertzjq2024-04-30
| | | | | | | | | | | | | Problem: cbuffer and similar quickfix and locationlist commands don't accept a range, even so it is documented they should (ilan-schemoul, after 8.1.1241) Solution: Define ex commands with ADDR_LINES instead of ADDR_OTHER fixes: vim/vim#14638 closes: vim/vim#14657 https://github.com/vim/vim/commit/652c821366691a8bd5474766581090df0c742fa1 Co-authored-by: Christian Brabandt <cb@256bit.org>
* refactor(lua): "module" => "M" #28426Justin M. Keyes2024-04-20
| | | | Most of the codebase uses the `M` convention for Lua module. Update the last remaining cases.
* vim-patch:9.1.0147: Cannot keep a buffer focused in a windowColin Kennedy2024-03-11
| | | | | | | | | | | | | | | Problem: Cannot keep a buffer focused in a window (Amit Levy) Solution: Add the 'winfixbuf' window-local option (Colin Kennedy) fixes: vim/vim#6445 closes: vim/vim#13903 https://github.com/vim/vim/commit/215703563757a4464907ead6fb9edaeb7f430bea N/A patch: vim-patch:58f1e5c0893a
* feat(ex_cmds): ranged :lua #27167luukvbaal2024-01-26
| | | | | | :{range}lua executes the specified lines in the current buffer as Lua code, regardless of its extension or 'filetype'. Close #27103
* build: enable lintlua for src/ dir #26395Justin M. Keyes2023-12-04
| | | | | | | | | | | Problem: Not all Lua code is checked by stylua. Automating code-style is an important mechanism for reducing time spent on accidental (non-essential) complexity. Solution: - Enable lintlua for `src/` directory. followup to 517f0cc634b985057da5b95cf4ad659ee456a77e
* refactor(float): rename ex_floatclose to ex_fclose (#25596)Raphael2023-10-11
|
* feat(float): add fclose commandglepnir2023-10-10
|
* vim-patch:9.0.1596: :registers command does not work in sandbox (#23866)zeertzjq2023-06-01
| | | | | | | | Problem: :registers command does not work in sandbox. Solution: Add flag to the command. (closes vim/vim#12473) https://github.com/vim/vim/commit/eb43b7f0531bd13d15580b5c262a25d6a52a0823 Co-authored-by: Julio B <julio.bacel@gmail.com>
* fix(excmd): make :def unknown rather than unimplemented (#23150)zeertzjq2023-04-17
|
* vim-patch:9.0.0370: cleaning up afterwards can make a function messyzeertzjq2023-04-16
| | | | | | | | | | | | Problem: Cleaning up afterwards can make a function messy. Solution: Add the :defer command. https://github.com/vim/vim/commit/1d84f7608f1e41dad03b8cc7925895437775f7c0 Omit EX_EXPR_ARG: Vim9 script only. Make :def throw E319 to avoid confusing behavior. Co-authored-by: Bram Moolenaar <Bram@vim.org>
* vim-patch:8.2.{0695,0725,0734,0753,0818,0819,0822} (#23075)zeertzjq2023-04-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | vim-patch:8.2.0695: Vim9: cannot define a function inside a function Problem: Vim9: cannot define a function inside a function. Solution: Initial support for :def inside :def. https://github.com/vim/vim/commit/04b12697838b232b8b17c553ccc74cf1f1bdb81c vim-patch:8.2.0725: Vim9: cannot call a function declared later in Vim9 script Problem: Vim9: cannot call a function declared later in Vim9 script. Solution: Make two passes through the script file. https://github.com/vim/vim/commit/09689a02840be40fa7bb10b1921fb5bc5b2908f1 vim-patch:8.2.0734: Vim9: leaking memory when using :finish Problem: Vim9: leaking memory when using :finish. Solution: Do not check for next line in third pass. https://github.com/vim/vim/commit/04816717dfea6e2469ff4c9d40f68b59aaf03724 vim-patch:8.2.0753: Vim9: expressions are evaluated in the discovery phase Problem: Vim9: expressions are evaluated in the discovery phase. Solution: Bail out if an expression is not a constant. Require a type for declared constants. https://github.com/vim/vim/commit/32e351179eacfc84f64cd5029e221582d400bb38 vim-patch:8.2.0818: Vim9: using a discovery phase doesn't work well Problem: Vim9: using a discovery phase doesn't work well. Solution: Remove the discovery phase, instead compile a function only when it is used. Add :defcompile to compile def functions earlier. https://github.com/vim/vim/commit/822ba24743af9ee1b5e7f656a7a61a38f3638bca vim-patch:8.2.0819: compiler warning for unused variable Problem: Compiler warning for unused variable. Solution: Remove the variable. https://github.com/vim/vim/commit/f40e51a880a95f94dbbbecc9476559506c2cc345 vim-patch:8.2.0822: Vim9: code left over from discovery phase Problem: Vim9: code left over from discovery phase. Solution: Remove the dead code. https://github.com/vim/vim/commit/2eec37926db6d31beb36f162ac00357a30c093c8 Co-authored-by: Bram Moolenaar <Bram@vim.org>
* feat(ex_cmds)!: remove :behavebfredl2023-04-13
| | | | | | | | | just use the individual options instead. set selection=exclusive set selectmode=mouse,key set mousemodel=popup set keymodel=startsel,stopsel
* feat(lua): allow `:=expr` as a shorter version of `:lua =expr`bfredl2023-03-22
| | | | | | | | | | | | | | | | existing behavior of := and :[range]= are unchanged. `|` is still allowed with this usage. However, :=p and similar are changed in a way which could be construed as a breaking change. Allowing |ex-flags| for := in the first place was a mistake as any form of := DOES NOT MOVE THE CURSOR. So it would print one line number and then print a completely different line contents after that.
* vim-patch:8.2.4617: no completion for :scriptnameszeertzjq2023-01-17
| | | | | | | | | | Problem: No completion for :scriptnames. Solution: Implement :scriptnames completion. (Yegappan Lakshmanan, closes vim/vim#10005) https://github.com/vim/vim/commit/454ce6737cadb82886f1fc0eb9e8666cc59ae42b Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
* feat!: remove hardcopyLewis Russell2023-01-03
| | | Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
* feat(secure): add `:trust` command and vim.secure.trust() (#21107)Jlll12022-11-28
| | | | | | | | | Introduce vim.secure.trust() to programmatically manage the trust database. Use this function in a new :trust ex command which can be used as a simple frontend. Resolves: https://github.com/neovim/neovim/issues/21092 Co-authored-by: Gregory Anders <greg@gpanders.com> Co-authored-by: ii14 <ii14@users.noreply.github.com>
* feat(cscope)!: removeLewis Russell2022-10-13
|
* vim-patch:9.0.0342: ":wincmd =" equalizes in two directionszeertzjq2022-09-01
| | | | | | | Problem: ":wincmd =" equalizes in two directions. Solution: Make ":vertical wincmd =" equalize vertically only and ":horizontal wincmd =" equalize horizontally only. https://github.com/vim/vim/commit/21c3a80a7fd6b7fc250ce5dc287963511f54b86f
* feat: allow :wincmd to accept a count (#19815)Famiu Haque2022-08-17
| | | | | | | | | | | | | | | Let :wincmd command accept a count like what its documentation suggests. Previously it could only accept a range, which led to some ambiguity on which attribute should be used when executing :wincmd using nvim_cmd. Closes #19662. Also fix a typo in a related Vim test: vim-patch:9.0.0223: typo in diffmode test Problem: Typo in diffmode test. Solution: Fix the typo. (closes vim/vim#10932) https://github.com/vim/vim/commit/5fd6ab820b4a0aaa5c6020852f39d118375fab49
* vim-patch:8.2.3888: the argument list may contain duplicates (#19795)zeertzjq2022-08-16
| | | | | | | Problem: The argument list may contain duplicates. Solution: Add the :argdedeupe command. (Nir Lichtman, closes vim/vim#6235) https://github.com/vim/vim/commit/73a024209cbfbd5b39a2e974084d807c6131e2ed Use latest index.txt :argdedupe doc from Vim.
* vim-patch:8.2.1984: cannot use :vimgrep in omni completionzeertzjq2022-07-17
| | | | | | | | | Problem: Cannot use :vimgrep in omni completion, causing C completion to fail. Solution: Add the EX_LOCK_OK flag to :vimgrep. (closes vim/vim#7292) https://github.com/vim/vim/commit/33aecb1f2c85711d53858b71f5f3c2cbe076435f Cherry-pick Test_resize_from_copen() indent change from patch 8.2.1432.
* vim-patch:8.2.1294: Vim9: error when using vim9script in TextYankPostzeertzjq2022-07-17
| | | | | | | Problem: Vim9: error when using vim9script in TextYankPost. Solution: Use EX_LOCKOK instead of the EX_CMDWIN flag for command that can be used when text is locked. (closes vim/vim#6529) https://github.com/vim/vim/commit/37394ff75270877a032422abcd079a6732a29730
* fix(ex_cmds): correct flags for :const (#19387)zeertzjq2022-07-16
|
* vim-patch:8.2.0593: finding a user command is not optimal (#19386)zeertzjq2022-07-16
| | | | | Problem: Finding a user command is not optimal. Solution: Start further down in the list of commands. https://github.com/vim/vim/commit/a494f56f885876c98a276f7acfa386bfbb344680
* vim-patch:8.1.0487: no menus specifically for the terminal windowzeertzjq2022-07-01
| | | | | | | | Problem: No menus specifically for the terminal window. Solution: Add :tlmenu. (Yee Cheng Chin, closes vim/vim#3439) Add a menu test. https://github.com/vim/vim/commit/4c5d815256099b50eca2ec5bf8f9aaa67a890211 ADDR_OHTER comes from patch 8.1.1241, which has already been ported.
* vim-patch:8.0.1570: can't use :popup for a menu in the terminalzeertzjq2022-07-01
| | | | | | | Problem: Can't use :popup for a menu in the terminal. (Wei Zhang) Solution: Make :popup work in the terminal. Also fix that entries were included that don't work in the current state. https://github.com/vim/vim/commit/29a2c08d792e4458a0af8371f5341394829fce29
* feat: add preview functionality to user commandsFamiu Haque2022-05-31
| | | | Adds a Lua-only `preview` flag to user commands which allows the command to be incrementally previewed like `:substitute` when 'inccommand' is set.
* feat: add `undo!`Famiu Haque2022-04-20
| | | | Allows using `undo!` to undo changes and remove them from the undo-tree. Can only be used for moving backwards in the same undo branch.
* feat(provider)!: remove support for python2 and python3.[3-5]Björn Linse2022-01-29
| | | | | | These versions of python has reached End-of-life. getting rid of python2 support removes a lot of logic to support two incompatible python versions in the same version.
* vim-patch:8.2.0128: cannot list options one per linezeertzjq2022-01-20
| | | | | | Problem: Cannot list options one per line. Solution: Use ":set!" to list one option per line. https://github.com/vim/vim/commit/6b915c0c0ee7ef82f8d3d310a4345e098cb929b0
* vim-patch:8.2.3400: ":z!" is not supportedSean Dewar2021-09-10
| | | | | | | Problem: ":z!" is not supported. Solution: Make ":z!" work and add tests. (Dominique Pellé, closes vim/vim#8836) Use display height instead of current window height. https://github.com/vim/vim/commit/7f2dd1e90c1d4a30c791fae20014594641769a1e
* vim-patch:8.1.1865: spellrare and spellrepall in the wrong orderJan Edmund Lazo2021-06-12
| | | | | | Problem: Spellrare and spellrepall in the wrong order. Solution: Put spellrare below spellrepall. (closes vim/vim#4820) https://github.com/vim/vim/commit/a3891681f72fd9efdea6444620d787358850d823
* vim-patch:8.1.1838: there is :spellwrong and :spellgood but not :spellrareJan Edmund Lazo2021-06-12
| | | | | | Problem: There is :spellwrong and :spellgood but not :spellrare. Solution: Add :spellrare. (Martin Tournoij, closes vim/vim#4291) https://github.com/vim/vim/commit/08cc374dabd2a02785129fa1c0100f7745c244ad
* ex_cmds: port :evalJan Edmund Lazo2021-04-15
| | | | | Cherry-picked from patch v8.1.1807. Required for patch v8.2.2761.
* [RFC] ":source" sources from current buffer if filename is omitted (#11444)Vikram Pal2021-02-18
| | | Fix https://github.com/neovim/neovim/issues/8722
* vim-patch:8.2.1967: the session file does not restore the alternate fileSean Dewar2021-02-11
| | | | | | | | | | | Problem: The session file does not restore the alternate file. Solution: Add ":balt". Works like ":badd" and also sets the buffer as the alternate file. Use it in the session file. (closes vim/vim#7269, closes vim/vim#6714) https://github.com/vim/vim/commit/59d8e56e048eb5d384649284fb35363931fc3697 Include minimal test_buffer.vim from patch 8.2.0243 for Test_balt(). Add entry for :balt to runtime/doc/index.txt from vim/vim#7819.
* vim-patch:8.2.2366: when using ":sleep" the cursor is always displayedJan Edmund Lazo2021-01-17
| | | | | | | | | | Problem: When using ":sleep" the cursor is always displayed. Solution: Do not display the cursor when using ":sleep!". (Jeremy Lerner, closes vim/vim#7688) https://github.com/vim/vim/commit/e2edc2ed4a9a229870b1e1811b0ecf045b84e429 Cursor showing/hiding is moved from core to TUI. ":sleep!" behaves the same as ":sleep".
* vim-patch:8.2.0407: no early check if :find and :sfind have an argumentJan Edmund Lazo2021-01-02
| | | | | | | | | | | Problem: No early check if :find and :sfind have an argument. Solution: Add EX_NEEDARG. https://github.com/vim/vim/commit/2d10cd478047df8ba144d4b0fcc46480993af57f Cherry-pick Test_find_cmd() from patch v8.2.0270. Use "exe 'cd ' . save_dir" pattern because patches v8.1.1291, v8.1.2278 are not ported yet. Cherry-pick modeline from patch v8.1.1432.
* vim-patch:8.1.1667: flags for Ex commands may clash with other symbolsJan Edmund Lazo2021-01-02
| | | | | | | | | | | | | | | | | Problem: Flags for Ex commands may clash with other symbols. Solution: Prepend with EX_. https://github.com/vim/vim/commit/8071cb2c646c9d38dcd4e3ccd377dce07705f031 N/A patches for version.c: vim-patch:8.1.1672: "make cmdidxs" doesn't work Problem: "make cmdidxs" doesn't work. Solution: Update macro names. (Naruhiko Nishino, closes vim/vim#4660) https://github.com/vim/vim/commit/d94ac0caca12c6ceb54b07fc932edba84a5f60f2 Error message for src/nvim/ex_cmds.lua which omits the "EX_" prefix for the flags.
* vim-patch:8.1.1281: cannot specify a count with :chistoryJan Edmund Lazo2021-01-01
| | | | | | | Problem: Cannot specify a count with :chistory. Solution: Add a count to :chistory and :lhistory. (Yegappan Lakshmanan, closes vim/vim#4344) https://github.com/vim/vim/commit/8ffc7c8b5f004971cb6f2bdcfbe4f7123cce717c
* vim-patch:8.1.1275: cannot navigate to errors before/after the cursorJan Edmund Lazo2021-01-01
| | | | | | | Problem: Cannot navigate to errors before/after the cursor. Solution: Add the :cbefore and :cafter commands. (Yegappan Lakshmanan, closes vim/vim#4340) https://github.com/vim/vim/commit/cf6a55c4b0cbf38b0c3fbed5ffd9a3fd0d2ede0e
* vim-patch:8.1.1261: no error for quickfix commands with negative rangeerw72021-01-01
| | | | | | | | | | | | | | | Problem: No error for quickfix commands with negative range. Solution: Add ADDR_UNSIGNED and use it for quickfix commands. Make assert_fails() show the command if the error doesn't match. https://github.com/vim/vim/commit/25190db225d63e185e77e043e694ef455b3cf304 N/A patches for version.c: vim-patch:8.2.0113: "make cmdidxs" fails Problem: "make cmdidxs" fails. Solution: Allow address for ":cquit". Add --not-a-term to avoid a delay. https://github.com/vim/vim/commit/9b24dfcb9f676e7f7a09a9062f0d05b2104a87eb
* vim-patch:8.1.1241: Ex command info contains confusing informationJan Edmund Lazo2021-01-01
| | | | | | | | | | | | | | | | | | | | | | Problem: Ex command info contains confusing information. Solution: When using the NOTADR flag use ADDR_OTHER for the address type. Cleanup code using NOTADR. Check for errors in create_cmdidxs.vim. Adjust Makefile to see the errors. https://github.com/vim/vim/commit/b731689e85b4153af7edc8f0a6b9f99d36d8b011 Use Lua's "assert()" to make an invalid command definition a compilation error. Misc changes: Remove 'RESTRICT' flag. Neovim does not support "restricted" mode since commit 7777532cebcfa9abc5ab2c7beae77f386feed3ca. TODO: Do not generate files before Lua assertions so that CMake always runs the generator script if the previous build has an invalid command definition.
* ex_cmds: port cmd_addr_T and ADDR_NONE (#13492)Jan Edmund Lazo2020-12-10
| | | | | | | Patch 8.1.1241 is too hard to port in 1 commit. https://github.com/neovim/neovim/pull/13079 is too hard to review and seems to be blocked. Use 'int' type for some addr variables to suppress 'switch/case' warnings.
* vim-patch:8.1.2401: :cexpr does not handle | in expressionJan Edmund Lazo2020-10-06
| | | | | | Problem: :cexpr does not handle | in expression. Solution: Remove EX_TRLBAR and set nextcmd pointer. https://github.com/vim/vim/commit/88a3e2b2ac33e3bb4b7cf9132eb75db051e8f4ed
* support for :perl, :perlfile, :perldo and perleval()Jacques Germishuys2020-08-30
|
* vim-patch:8.1.0883: missing some changes for Ex commandsJan Edmund Lazo2020-03-01
| | | | | | Problem: Missing some changes for Ex commands. Solution: Add mising changes in header file. https://github.com/vim/vim/commit/54d6fe5e60c0c488a424c078963ead40ae7dc397
* vim-patch:8.1.1256: cannot navigate through errors relative to the cursorShane Smith2019-10-27
| | | | | | | Problem: Cannot navigate through errors relative to the cursor. Solution: Add :cabove, :cbelow, :labove and :lbelow. (Yegappan Lakshmanan, closes vim/vim#4316) https://github.com/vim/vim/commit/3ff33114d70fc0f7e9c3187c5fec9028f6499cf3
* vim-patch:8.1.0586: :digraph output is not easy to readJan Edmund Lazo2019-10-06
| | | | | | | Problem: :digraph output is not easy to read. Solution: Add highlighting for :digraphs. (Marcin Szamotulski, closes vim/vim#3572) Also add section headers for :digraphs!. https://github.com/vim/vim/commit/eae8ae1b2b4e532b125077d9838b70d966891be3