0

While in visual mode with if you highlight some text and press backspace the cursor will continue to move back and continue to highlight more of your code; however, if you hit the d key, the highlighted text will be deleted and sublime will move back into command mode.

I'd like my backspace key to be mapped to my d key but only when I'm in visual mode. But I think that it's more like I'd like to map my backspace key to the same command as my d key when I'm in visual mode (because I think that's how sublime goes about emulating vim anyways, but not completely sure) How would I go about doing this? Thanks for your help :)

sudo bangbang
  • 27,127
  • 11
  • 75
  • 77
mbigras
  • 7,664
  • 11
  • 50
  • 111

2 Answers2

1

Try this one

{ "keys": ["backspace"], "command": "set_action", "args": {
    "action": "vi_delete",
    "description": "Delete"},
    "context": [{"key": "setting.command_mode"}]
},

This is where I got the relevant information to work on. Default sublime keymap in vintage mode

sudo bangbang
  • 27,127
  • 11
  • 75
  • 77
  • @mbigras: I just learned that it is not a good idea to put thank you comments. I've added a link to my answer. It might help in adding more mappings – sudo bangbang Apr 27 '16 at 18:10
0

Not sure about sublime configuration, but from vim's point of view you can do this:

vnoremap <bs> d
ronakg
  • 4,038
  • 21
  • 46