tags:

views:

206

answers:

1

TextMate has a feature where pressing Command-Return at any point inserts a new line below the current line placing your cursor at the beginning of the new line. This works much (exactly?) like pressing 'o' while in command mode in Vim.

Is there a way to emulate this TextMate feature while in insert mode in Vim? The same question phrased differently: Can I make Cmd-Return in insert mode do what 'o' does in command mode?

+5  A: 

Untested, since I don't use a Mac, tried with Ctrl-Return (<C-CR>). Ctrl-O executes a single command in normal mode.

:inoremap <D-CR> <C-O>o
Jörn Horstmann
Awesome. That works!
dstrelau