Closed zhaocai closed 8 years ago
Basically you can not use key which is not directly mapped to some command(like space
in insert-mode
which directly insert text).
I don't know it's technically fixable or not.
Thanks for the info.
How to reset/remove the hovering pending count with a function or command?
Insert activeVimState.getCount()
whitespaces without leaving normal mode.
### init.coffee
# same code from your dotfiles
getActiveVimState = ->
getEditorState(getEditor())
###
insertWhitespace = ->
return unless editor = atom.workspace.getActiveTextEditor()
v = getActiveVimState()
space = ' '
if v.hasCount()
space = Array(v.getCount() + 1).join space
atom.commands.dispatch('atom-text-editor.vim-mode-plus', 'vim-mode-plus:reset-normal-mode')
editor.insertText(space)
Can not find a way to reset/remove the hovering pending count.
'vim-mode-plus:reset-normal-mode'
command Havent't investigated yet, from what you want to do. Itms straight forward to create operator to insert space which take number of spaces from count you specify. Vmp's wiki section have instruction for vmp plugin.
Thank you 😀 That is extremely helpful.
The following keystroke intends to insert white-space without leaving normal-mode. But it is not working. I guess it is related to
i
to enter insert mode.