I need to remap C-x in Vim to behave like in some Windows editors:
- In visual mode it should cut selected text.
- In normal mode it should cut the current line, only if it’s not blank.
- A blank line should be deleted and put in the black hole registry.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Updated version below. Had to google “black hole register”, which I didn’t know about. (Thanks!) I also put a different empty line matcher in. Pick the version that suits you best.