Yeah... let me explain.
So I have this text that has hyphens on some words at the end of the line to join words, like this:
hello, my na- me is bruh...
This is a scanned book with OCR, and on every line there's a trailing space.
So, what I wanna do is make a shortcut, or map a list of commands (normal mode commands? idk how they're called) to:
- \n(hyphen space newline) and then
xxgJ(delete two characters [the selected by the search, and the trailing space] and join the line without adding a space).
map <C-`> /- \n<CR><bar>xxgJ
I'm aware I can also do
2x instead of
And, it didn't work.
dl, same thing according to
:help x, doesn't work when mapping it, like sort of how you have to use
\r when replacing instead of
\n (weird btw...).
But I don't know.
In normal mode they work as expected.
/- \n <hit enter> xxgJ
But when mapping them, the part that's supossed to delete the character under the cursor (
dl) doesn't work.
Please help. And sorry for the humongous post.