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
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.