Surfingkeys icon indicating copy to clipboard operation
Surfingkeys copied to clipboard

The aceVimMap mapping setting have no effect, can you help me?

Open yuanliangxie opened this issue 2 years ago • 2 comments

Error details

SurfingKeys: <1.0.3>

Browser: <chorme 74.0.3729.169><win 10>

Context

Here is my setting, the jj map is working, but the le and la map has no effect. This makes me very suspicious.

// an example to create a new mapping `ctrl-y`
const {
    aceVimMap,
    mapkey,
    imap,
    iunmap,
    imapkey,
    getClickableElements,
    vmapkey,
    map,
    unmap,
    cmap,
    addSearchAlias,
    removeSearchAlias,
    tabOpenLink,
    readText,
    Clipboard,
    Front,
    Hints,
    Visual,
    RUNTIME,
} = api;

mapkey('<ctrl-y>', 'Show me the money', function() {
    Front.showPopup('a well-known phrase uttered by characters in the 1996 film Jerry Maguire (Escape to close).');
});

// an example to replace `T` with `gt`, click `Default mappings` to see how `T` works.
map('gt', 'T');

// an example to remove mapkey `Ctrl-i`
unmap('<ctrl-i>');
aceVimMap('le', '$', 'normal');
aceVimMap('la', '^', 'normal');
aceVimMap('jj', '<Esc>', 'insert');

// set theme
settings.theme = `
.sk_theme {
    font-family: Input Sans Condensed, Charcoal, sans-serif;
    font-size: 10pt;
    background: #24272e;
    color: #abb2bf;
}
.sk_theme tbody {
    color: #fff;
}
.sk_theme input {
    color: #d0d0d0;
}
.sk_theme .url {
    color: #61afef;
}
.sk_theme .annotation {
    color: #56b6c2;
}
.sk_theme .omnibar_highlight {
    color: #528bff;
}
.sk_theme .omnibar_timestamp {
    color: #e5c07b;
}
.sk_theme .omnibar_visitcount {
    color: #98c379;
}
.sk_theme #sk_omnibarSearchResult ul li:nth-child(odd) {
    background: #303030;
}
.sk_theme #sk_omnibarSearchResult ul li.focused {
    background: #3e4452;
}
#sk_status, #sk_find {
    font-size: 20pt;
}`;
// click `Save` button to make above settings to take effect.</ctrl-i></ctrl-y>

yuanliangxie avatar Jan 19 '22 02:01 yuanliangxie

I just found it does work, but le will move to the character to the left first, then to the end of current line. It seems that ACE will handle l first, then handle le.

brookhong avatar Feb 05 '22 02:02 brookhong

Thanks for your answer, But my setting is still not working for me。

yuanliangxie avatar Feb 24 '22 09:02 yuanliangxie