I've written a "script" to highlight all lines that begin with n (for a todo list):
syn region dash start=/^n/ end=/$/ oneline | highlight link dash String
And mapped it to ; in my init.vim:
map ; :syn region dash start=/^n/ end=/$/ oneline <bar> highlight link dash String
When I press ; the first command shows up in the bar at the bottom. They only run after I press enter. Why does Vim require me to hit enter, and how can I get rid of that step?
I'm very new to vim scripting, hopefully it's not something too obvious.
<CR>makes the issue go away. Is appending a good idea, or is there a better way to deal with this? – Aug 24 '20 at 22:09<silent>you will no longer see the prompt, since I think it's being caused by a long command-line being printed by Vim before execution. (But I might be wrong about that part.) – filbranden Aug 24 '20 at 22:16:help@CtrlAltF2 There's also:help help-summary– Martin Tournoij Aug 25 '20 at 01:49