-
Notifications
You must be signed in to change notification settings - Fork 112
DeveloperTIPS
- Open Atom in dev mode like
atom -d .
- Define operator/motion/text-object class. (e.g. eadd
NewOperator
class inoperator.js
) - Execute
vim-mode-plus:reload-with-dependencies
then 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-operator
from 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
to check behavior whenever you saved modified code 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
.
These listed plugin packages are reloaded after vmp reload was finished.
"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 .
- Edit your vmp-plugin codes.
- Execute
vim-mode-plus:reload-with-dependencies
- Check behavior via executing
vim-mode-plus:new-operator
from 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).