atom-vim-mode-plus icon indicating copy to clipboard operation
atom-vim-mode-plus copied to clipboard

Support indent/outdent in insert mode (^T/^D)

Open liujisi opened this issue 7 years ago • 2 comments

debug info
{
  "atom": "1.27.1",
  "platform": "darwin",
  "release": "17.5.0",
  "vmpVersion": "1.32.0",
  "vmpConfig": {
    "blackholeRegisteredOperators": [],
    "startInInsertModeScopes": [],
    "charactersToAddSpaceOnSurround": [],
    "highlightSearchExcludeScopes": [],
    "flashOnOperateBlacklist": []
  }
}

Vim supports indent/outdent in insert mode via Ctrl-T/Ctrl-D: despite of cursor position, indent or outdent the current line.

VMP doesn't seem to register ^T/^D in insert mode. Key-Binding-Resolver suggested core:transpose and core:delete were triggered.

Real use case: I have ^T/^D built in to muscle memory. without these two, I have to think, stop and then undo which breaks the workflow.

liujisi avatar Jun 19 '18 06:06 liujisi

Looks like I can manually edit the keybindings. The following configure would work:

'atom-text-editor.vim-mode-plus.insert-mode':
  'ctrl-t': 'editor:indent-selected-rows'
  'ctrl-d': 'editor:outdent-selected-rows'

It would still be good to have those default on.

liujisi avatar Jun 19 '18 06:06 liujisi

What you did in above keymap setting is too my recommendation.

Although vmp is aiming to provide vim experience into Atom editor, I have been keeping away from touching insert-mode's keymap.

I want to keep Atom's default keymap intact.

t9md avatar Jul 01 '18 00:07 t9md