summaryrefslogtreecommitdiffstatshomepage
path: root/src/nvim/ex_cmds.lua
AgeCommit message (Collapse)AuthorFiles
2026-04-23feat(excmd): add :uptime command #39331Olivia Kinnear1
Problem Nvim marks its v:starttime, but there is no user-friendly way to get Nvim's uptime. Solution Add :uptime (based loosely on uptime(1)).
2026-04-11feat(connect): filepath completion #38959Justin M. Keyes1
This is a stop-gap; the next step is for :connect to show a menu of known peers (and perhaps also any files in CWD that look like sockets).
2026-04-10feat(ex): add `:log` commandOlivia Kinnear1
2026-03-10vim-patch:9.2.0130: missing range flags for the :tab command (#38216)zeertzjq1
Problem: :tab accepts a tab address range but doesn't specify this in the command specification. Solution: Add EX_RANGE and EX_ZEROR to the command specification and use ADDR_TABS (Doug Kearns). As command modifers are handled separately before these flags are tested in the ex-command parser they have no effect. However, it's better to use an accurate description and the command specification table has uses in other areas like runtime file generation for the Vim filetype. closes: vim/vim#19100 https://github.com/vim/vim/commit/49b8d9903bc7a2620ce7cf46228e16f7cd308d2e Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2026-01-03vim-patch:9.1.2040: :tlunmenu incorrectly accepts a range (#37206)zeertzjq1
Problem: :tlnumenu incorrectly accepts a range. Solution: Remove EX_RANGE and EX_ZEROR from the command definition and use ADDR_NONE (Doug Kearns). closes: vim/vim#19055 https://github.com/vim/vim/commit/19442ad11830bc9fc1474dfae9e813c31bc858b8 Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2025-12-16fix(lsp): tests for :lsp, rename start/stopOlivia Kinnear1
- Rename :lsp start/stop to enable/disable - Move lua section of `:lsp` to `vim/_core` - Add tests
2025-12-16feat(lsp): builtin :lsp commandbrianhuster1
Problem: - Despite [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig) claims to be a "data-only" plugin, in fact it still provides some user-facing commands because they haven't been upstreamed to Nvim. Solution: - Upstream `:LspRestart`, `:LspStart` and `:LspStop` commands as `:lsp restart`, `:lsp start` and `:lsp stop` respectively. Co-authored-by: glepnir <glephunter@gmail.com>
2025-12-15vim-patch:9.1.1979: :helpclose allows range and counts (#36966)zeertzjq1
Problem: :helpclose incorrectly accepts a range and a count. Solution: Remove EX_COUNT and EX_RANGE from the command definition. (Doug Kearns) closes: vim/vim#18917 https://github.com/vim/vim/commit/4c141bae3bd7afd7eb63c72c835d356fbdff61e2 Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2025-11-15vim-patch:9.1.1915: :breaklist accepts unprocessed arguments. (#36561)zeertzjq1
Problem: :breaklist accepts unprocessed arguments. Solution: Remove EX_EXTRA flag from the Ex command definition. (Doug Kearns) The command should emit an "E488: Trailing characters" error rather than silently accept arguments. closes: vim/vim#18746 https://github.com/vim/vim/commit/de7049ede1a31c73bfac70b78a2613d690eb1594 Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2025-10-11feat: ":wall ++p" creates parent dirs for each buf #36121Rob Pilling1
`:wall ++p` will create parent directories if they do not exist, for each modified buffer
2025-08-18fix(excmd): correct :connect abbreviationzeertzjq1
2025-08-14feat(ui): :connect command #34586Siddhant Agarwal1
Add the `:connect <address>` command which connects the currently running TUI to the server at the given address.
2025-08-02feat: ":restart [cmd]" can run commands #35045Sathya Pramodh1
Problem: Not easy for a user to tell ":restart" to "run this command(s) after restarting". Solution: All ":restart" args following the optional +cmd arg are treated as a big cmdline that is passed as a "-c" CLI arg when restarting nvim.
2025-07-23feat: ":restart +cmd" #34788Sathya Pramodh1
Problem: ":restart" always executes ":qall" to exit the server. Solution: Support ":restart +cmd" so the user can control the command used to exit the server. Co-authored-by: Justin M. Keyes <justinkz@gmail.com> Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2025-07-05vim-patch:9.1.1477: no easy way to deduplicate textzeertzjq1
Problem: no easy way to deduplicate text Solution: add the :uniq ex command (Hirohito Higashi) closes: vim/vim#17538 https://github.com/vim/vim/commit/74f0a77bb9a170a25b03cacf640aa4e1b1d222b2 Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
2025-06-23fix(cmd): bar "|" not allowed after :fclose #34613glepnir1
Problem: `:fclose` command failed when used with trailing `|` bar. Solution: Add `TRLBAR` flag to fclose command to support trailing bar.
2025-06-22vim-patch:9.1.1473: inconsistent range arg for :diffget/diffput (#34588)zeertzjq1
Problem: inconsistent range arg for :diffget/diffput Solution: fix the range specification, place the cursor for :diffput and :diffget consistently on the last line (Yee Cheng Chin) Previously, `:<range>diffget` only allowed using 1 or above in the range value, making it impossible to use the command for a diff block at the beginning of the file. Fix the range specification so the user can now use 0 to specify the space before the first line. This allows `:0,$+1diffget` to work to retrieve all the changes from the other file instead of missing the first diff block. Also do this for `:diffput`. Also, make `:diffput` work more similar to `:diffget`. Make it so that if the cursor is on the last line and a new line is inserted in the other file, doing `:diffput` will select that diff block below the line, just like `:diffget` would. Also clean up the logic a little bit for edge cases and for handling line matched diff blocks better. closes: vim/vim#17579 https://github.com/vim/vim/commit/d75ab0cbf5cfaefab3edb0aa553954de70b236f8 Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
2025-06-07feat: make :restart work for remote UI (#34354)zeertzjq1
2025-06-03fix(excmd): don't allow range or args for :detach/:restart (#34280)zeertzjq1
Also remove the CMDWIN and LOCK_OK flags, so that there is no need to check for text_locked() and curbuf_locked().
2025-06-02feat(editor): ":restart" command #33953Sathya Pramodh1
Problem: Developing/troubleshooting plugins has friction because "restarting" Nvim requires quitting and manually starting again. #32484 Solution: - Implement a `:restart` command which emits `restart` UI event. - Handle the `restart` UI event in the builtin TUI client: stop the `nvim --embed` server, start a new one, and attach to it.
2025-03-27vim-patch:9.1.1224: cannot :put while keeping indent (#33076)zeertzjq1
Problem: cannot :put while keeping indent (Peter Aronoff) Solution: add the :iput ex command (64-bitman) fixes: vim/vim#16225 closes: vim/vim#16886 https://github.com/vim/vim/commit/e08f10a55c3f15b0b4af631908551d88ec4fe502 Cherry-pick test_put.vim changes from patch 8.2.1593. N/A patches: vim-patch:9.1.1213: cannot :put while keeping indent vim-patch:9.1.1215: Patch 9.1.1213 has some issues Co-authored-by: 64-bitman <60551350+64-bitman@users.noreply.github.com> Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
2025-02-28vim-patch:8.2.4594: need to write script to a file to be able to source themzeertzjq1
Problem: Need to write script to a file to be able to source them. Solution: Make ":source" use lines from the current buffer. (Yegappan Lakshmanan et al., closes vim/vim#9967) https://github.com/vim/vim/commit/36a5b6867bb6c0bd69c8da7d788000ab8a0b0ab0 Most code and test changes are reverted or modified again in patch 8.2.4603, so only port parts that are untouched in patch 8.2.4603. Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2025-02-10feat(ui): UI :detach commandJustin M. Keyes1
Problem: Cannot detach the current UI. Solution: - Introduce `:detach`. - Introduce `Channel.detach`. Co-authored-by: bfredl <bjorn.linse@gmail.com>
2024-12-17vim-patch:9.1.0934: hard to view an existing buffer in the preview window ↵zeertzjq1
(#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>
2024-04-30vim-patch:9.1.0381: cbuffer and similar commands don't accept a range (#28571)zeertzjq1
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>
2024-04-20refactor(lua): "module" => "M" #28426Justin M. Keyes1
Most of the codebase uses the `M` convention for Lua module. Update the last remaining cases.
2024-03-11vim-patch:9.1.0147: Cannot keep a buffer focused in a windowColin Kennedy1
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
2024-01-26feat(ex_cmds): ranged :lua #27167luukvbaal1
:{range}lua executes the specified lines in the current buffer as Lua code, regardless of its extension or 'filetype'. Close #27103
2023-12-04build: enable lintlua for src/ dir #26395Justin M. Keyes1
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
2023-10-11refactor(float): rename ex_floatclose to ex_fclose (#25596)Raphael1
2023-10-10feat(float): add fclose commandglepnir1
2023-06-01vim-patch:9.0.1596: :registers command does not work in sandbox (#23866)zeertzjq1
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>
2023-04-17fix(excmd): make :def unknown rather than unimplemented (#23150)zeertzjq1
2023-04-16vim-patch:9.0.0370: cleaning up afterwards can make a function messyzeertzjq1
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>
2023-04-14vim-patch:8.2.{0695,0725,0734,0753,0818,0819,0822} (#23075)zeertzjq1
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>
2023-04-13feat(ex_cmds)!: remove :behavebfredl1
just use the individual options instead. set selection=exclusive set selectmode=mouse,key set mousemodel=popup set keymodel=startsel,stopsel
2023-03-22feat(lua): allow `:=expr` as a shorter version of `:lua =expr`bfredl1
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.
2023-01-17vim-patch:8.2.4617: no completion for :scriptnameszeertzjq1
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>
2023-01-03feat!: remove hardcopyLewis Russell1
Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
2022-11-28feat(secure): add `:trust` command and vim.secure.trust() (#21107)Jlll11
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>
2022-10-13feat(cscope)!: removeLewis Russell1
2022-09-01vim-patch:9.0.0342: ":wincmd =" equalizes in two directionszeertzjq1
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
2022-08-17feat: allow :wincmd to accept a count (#19815)Famiu Haque1
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
2022-08-16vim-patch:8.2.3888: the argument list may contain duplicates (#19795)zeertzjq1
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.
2022-07-17vim-patch:8.2.1984: cannot use :vimgrep in omni completionzeertzjq1
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.
2022-07-17vim-patch:8.2.1294: Vim9: error when using vim9script in TextYankPostzeertzjq1
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
2022-07-16fix(ex_cmds): correct flags for :const (#19387)zeertzjq1
2022-07-16vim-patch:8.2.0593: finding a user command is not optimal (#19386)zeertzjq1
Problem: Finding a user command is not optimal. Solution: Start further down in the list of commands. https://github.com/vim/vim/commit/a494f56f885876c98a276f7acfa386bfbb344680
2022-07-01vim-patch:8.1.0487: no menus specifically for the terminal windowzeertzjq1
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.
2022-07-01vim-patch:8.0.1570: can't use :popup for a menu in the terminalzeertzjq1
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