MacVim Visual Selection Delete moves back 3 extra chars

469 views Asked by At

Using MacVim with https://github.com/carlhuda/janus installed, when I select a visual or insert block and hit backspace, the cursor jumps back an extra 3 spaces. Anyone else see this? Makes it real annoying to do my favorite shift-cmd-up to select and delete empty lines.

set backspace=indent,eol,start

is the only reference to backspace I see in vimrc and gvimrc.

Selection made:

Made selection with mouse or shift-arrow

After hitting backspace:

Where the cursor ends up after backspace key

Anyone know of a quick way to fix this? I'm working through http://vim.wikia.com/wiki/Backspace_and_delete_problems to see if any of the remedies there can help but I don't see anything at first glance.

3

There are 3 answers

1
Raimondi On

If you're lucky and it's a mapping, :verbose vmap <BS> would tell you where it's being set. Otherwise, you'll have to see if the problem is your vimrc or a plugin, run MacVim from the terminal with mvim -N -u NORC -U NORC to rule your vimrc and gvimrc out, then mvim --noplugin to rule plugins out.

0
markquezada On

I know this question is a little old, but the two previous answers led me in the right direction. Looks like snipMate was the culprit.

Edit this file:

 ~/.vim/after/plugin/snipMate.vim 

And comment out this line:

snor <bs> b<bs>

This solved the issue for me.

0
Paul Baumgart On

Removing snipMate seemed to do the trick for me.