Open calebmeyer opened 6 years ago
I think you can get count of current operation stack like this.
const vimState = service.getEditorState(editor)
const countOfCurrentOperationStack = vimState.operationStack.getCount()
For how to access service of vmp from your pkg, see vim-mode-plus-ex-mode as example and also read Atom's official documentation describing how service works.
[NOTE]
vimState
is core role of vmp.operationStack
instance.globalState
instance.
debug info
```json { "atom": "1.27.0", "platform": "win32", "release": "10.0.16299", "vmpVersion": "1.32.0", "vmpConfig": { "automaticallyEscapeInsertModeOnActivePaneItemChange": true, "keymapBackslashToInnerCommentOrParagraphWhenToggleLineCommentsIsPending": true, "keymapCCToChangeInnerSmartWord": true, "keymapPToPutWithAutoIndent": true, "keymapUnderscoreToReplaceWithRegister": true, "keymapYToYankToLastCharacterOfLine": true, "showHoverSearchCounter": true, "statusBarModeStringStyle": "long", "useSmartcaseForSearch": true, "useSmartcaseForSearchCurrentWord": true, "wrapLeftRightMotion": true, "blackholeRegisteredOperators": [], "startInInsertModeScopes": [], "charactersToAddSpaceOnSurround": [], "highlightSearchExcludeScopes": [], "flashOnOperateBlacklist": [] } } ```Read and check all "Check list" bellow.
Check list
You have to check all before open issue.
Vim Mode Plus: Clip Debug Info
command.atom --version
), vim-mode-plus version, and OS version(e.g. macOS Sierra 10.12.3).What
I'd like for vim mode plus to provide a service that custom commands can hook into. Specifically, I'd like to be able to find out the current count from the OperationStack.
Why
I maintain the VMP macros package, and I have a request: https://github.com/calebmeyer/vim-mode-plus-macros/issues/5 to use VMPs count to replay macros more than once.
This would also allow for other packages to implement VMP commands and have them feel more native.