emacs emulating vi open line below


Quoted from Stackoverflow - Original Link Below ( love this post, these three are my biggest emacs annoyences)
Hi there,
I am currently playing around with emacs and happy with most of the concepts. But I really adored the convenience of the three vim commands: dd,o,O Hopefully you can tell me how to mirror them in emacs :)
dd - deletes whole line, including newline, no matter where the cursor is.
I found something similar to do the trick:
C-a C-k C-k
While C-a moves the cursor to the beginning of the line, the first C-k kills the text, the second one kills the newline. The only problem is that this is not working on empty lines where I only need to typeC-k which is quite inconvenient as I have to use different commands for the same task: killing a line.
o / O - creates a new empty line below / above cursor and moves cursor to the new line, indented correctly
Well, C-a C-o is nearly like O, just the idention is missing. C-e C-o creates an empty line below the current but does not move the cursor.
Are there any better solutions to my problems or do I have to learn Lisp and define new commands to fulfill my needs?



These original posts are great
stackoverflow
tuxicity

Comments

Popular posts from this blog

Vim vi how to reload a file your editing