-
Notifications
You must be signed in to change notification settings - Fork 108
DeveloperTIPS
- open Atom in dev mode like
atom -d . - define operator/motion/text-object class. (e.g. eadd
NewOperatorclass inoperator.js) - execute
vim-mode-plus:reload-with-dependenciesthen executevim-mode-plus:write-command-table-and-file-table-to-disk - execute
vim-mode-plus:reload-with-dependencies - Check behavior via executing
vim-mode-plus:new-operatorfrom command-palette. - Define appropriate keymap if necessary.
Step 3 is necessary only when you define operator first time. So you can skip step 3 when modifying code without changing class name in following development.
So if you keymap f7 to vim-mode-plus:reload-with-dependencies command in your keymap.cson.
'atom-text-editor.vim-mode-plus.normal-mode:not(.narrow-editor)':
'f7': 'vim-mode-plus:reload-with-dependencies'You can reload code by just hitting f7 while interactive/incremental development.
To accelerate your dev of vmp-plugin, you can hot-reload vmp and vmp-plugin by vim-mode-plus:reload-with-dependencies.
First, open your config.cson and add your vmp-plugin pkg name in your devReloadPackages.
"vim-mode-plus":
devReloadPackages: [
"vim-mode-plus-move-selected-text"
"narrow"
"quick-highlight"
]Then start development with following workflow!
- open Atom in dev mode like
atom -d . - define operator/motion/text-object class. (e.g. eadd
NewOperatorclass inoperator.js) - execute
vim-mode-plus:reload-with-dependencies - Check behavior via executing
vim-mode-plus:new-operatorfrom command-palette. - Define appropriate keymap if necessary.
vmp-plugin use vmp's service which is provided by vmp. Reloading just vmp-plugin only is not necessary to refresh service-link between provider(vmp) and consumer(vmp-plugin).