-
-
Notifications
You must be signed in to change notification settings - Fork 531
Migrate your settings from 0.9.74 to 1.0
Due to code changes to improve maintainability, it is necessary to update your settings.
APIs such as map / mapkey, have been put under a global object api such as api.map / api.mapkey. For example, to use mapkey, we now need to code as below,
api.mapkey('<Ctrl-y>', 'Show me the money', function() {
api.Front.showPopup('a well-known phrase uttered by characters in the 1996 film Jerry Maguire (Escape to close).');
});previously the code does not need the api keyword,
mapkey('<Ctrl-y>', 'Show me the money', function() {
api.Front.showPopup('a well-known phrase uttered by characters in the 1996 film Jerry Maguire (Escape to close).');
});You could also add below code at the very beginning of your snippets, which will free you from changing your original snippets.
const {
aceVimMap,
mapkey,
imap,
imapkey,
getClickableElements,
vmapkey,
map,
unmap,
unmapAllExcept,
vunmap,
cmap,
addSearchAlias,
removeSearchAlias,
tabOpenLink,
readText,
Clipboard,
Front,
Hints,
Visual,
RUNTIME
} = api;Please refer to the full list of API functions. Any function that you are using has to be included in the code above. Else, you will have to call it via api.<function_name>(), instead of just <function_name>().
eg. If you forgot to include unmapAllExcept, and call it without the api keyword prefix, you will face this error,
[SurfingKeys] Error found in settings: ReferenceError: unmapAllExcept is not defined
Some other breaking changes:
-
addSearchAliasXwas replaced withaddSearchAlias. -
Hints.numericHints = true;was replaced withHints.setNumeric(). -
Hints.characters = "abcd";was replaced withHints.setCharacters("abcd"). -
settings.blacklistPatternwas replaced withsettings.blocklistPattern.