In my current project I end up typing this line a lot
Then show me the page
How should I create a shortcut mapping so that if I am on a line and hit that shortcut then a new line just below the current line is created and the above mentioned line is added.
It would be nice if the newly added line has the same indentation as the above line.
I am using MacVim.
From normal mode, you can type, or add this line to your vimrc:
This just plays back the keystrokes to
open a new line below the current one (with correct indentation), type the characters, press enter for a linebreak, then exit insert mode.I chose the keystroke Q, but this overwrites something else. You might choose a different keystroke instead…