summaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2026-04-20 22:15:01 +0200
committerJustin M. Keyes <justinkz@gmail.com>2026-04-21 15:54:08 +0200
commita1c8b816720e815253e2d91d7e2b234fec2bcafe (patch)
tree0d85bf521f3cd35ca11e11eddbe9697e153bffbb /src
parent2551c7a8b1a5f1448f5057e845d15ca7d65b4523 (diff)
feat(normal): normal-mode ZR does :restart
Make it a normal-mode command instead of a default mapping.
Diffstat (limited to 'src')
-rw-r--r--src/nvim/normal.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/nvim/normal.c b/src/nvim/normal.c
index 9860937612..7a5a238df2 100644
--- a/src/nvim/normal.c
+++ b/src/nvim/normal.c
@@ -3299,6 +3299,15 @@ static void nv_Zet(cmdarg_T *cap)
do_cmdline_cmd("q!");
break;
+ // "ZR": restart. With count, restart without checking for changes.
+ case 'R':
+ if (cap->count0 >= 1) {
+ do_cmdline_cmd("restart +qall!");
+ } else {
+ do_cmdline_cmd("restart");
+ }
+ break;
+
default:
clearopbeep(cap->oap);
}