0

I use auto-indent that always begins a new line on the level of indent the last line has been.

Now how do I specify this behavior in my vimrc:

Shift + Enter enters new line (just like just enter would) but also activates the backspace key 4 times (I use spaces instead of tabs (Python)) or, to make this useful for other users too: Just one backspace (to delete the tab).

Who can set me up?

Alon
  • 434
  • 4
  • 19

1 Answers1

0

It is not possible to remap shift + enter on the terminal version of vim.

If you're using the windows version or gvim:

imap <S-CR> <CR><c-d>

Note that you must have both shiftwidth and tabstop set to 4:

set tabstop=4 shiftwidth=4

You can also simply type enter, then ctl-d.

Community
  • 1
  • 1
Xavier Nicollet
  • 353
  • 6
  • 12