mirror of
https://github.com/neovim/neovim.git
synced 2024-12-23 20:55:18 -07:00
fix(genvimvim): add special abbreviations of :delete (#23172)
Also don't highlight :def as vimCommand.
This commit is contained in:
parent
84a4319545
commit
240c41e1af
@ -37,6 +37,9 @@ local function cmd_kw(prev_cmd, cmd)
|
||||
while cmd:sub(shift, shift) == prev_cmd:sub(shift, shift) do
|
||||
shift = shift + 1
|
||||
end
|
||||
if cmd:sub(1, shift) == 'def' then
|
||||
shift = shift + 1
|
||||
end
|
||||
if shift >= #cmd then
|
||||
return cmd
|
||||
else
|
||||
@ -67,6 +70,20 @@ for _, cmd_desc in ipairs(ex_cmds.cmds) do
|
||||
if cmd:match('%w') and cmd ~= 'z' and not is_special_cased_cmd(cmd) then
|
||||
w(' ' .. cmd_kw(prev_cmd, cmd))
|
||||
end
|
||||
if cmd == 'delete' then
|
||||
-- Add special abbreviations of :delete
|
||||
w(' ' .. cmd_kw('d', 'dl'))
|
||||
w(' ' .. cmd_kw('del', 'dell'))
|
||||
w(' ' .. cmd_kw('dele', 'delel'))
|
||||
w(' ' .. cmd_kw('delet', 'deletl'))
|
||||
w(' ' .. cmd_kw('delete', 'deletel'))
|
||||
w(' ' .. cmd_kw('d', 'dp'))
|
||||
w(' ' .. cmd_kw('de', 'dep'))
|
||||
w(' ' .. cmd_kw('del', 'delp'))
|
||||
w(' ' .. cmd_kw('dele', 'delep'))
|
||||
w(' ' .. cmd_kw('delet', 'deletp'))
|
||||
w(' ' .. cmd_kw('delete', 'deletep'))
|
||||
end
|
||||
prev_cmd = cmd
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user