aboutsummaryrefslogtreecommitdiffstats
path: root/surfingkeys/surfingkeys.js
blob: 6c8aa2fee4cbd9b8f965ec32a2a6efe1dd87c62d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
function orgCapture() {
    location.href = 'org-protocol://capture?'
        + new URLSearchParams({
            template: 'U',
            url: window.location.href,
            title: document.title,
            body: window.getSelection()});
}

api.unmap(':');

api.mapkey('<Alt-x>', '#7Open commands', function() {
    api.Front.openOmnibar({type: "Commands"});
});

api.mapkey('cc', '#13Capture current page', orgCapture);

api.map('<Ctrl-b>', 'h');
api.map('<Ctrl-n>', 'j');
api.map('<Ctrl-p>', 'k');
api.map('<Ctrl-f>', 'l');
api.map('<Ctrl-x>xg', 'r');
api.map('l', 'S');
api.map('r', 'D');
api.map('c0', 'yy');
api.map('<Alt-p>', 'E');
api.map('<Alt-n>', 'R');
api.map('<Ctrl-u>f', 'af');

api.unmap('h');
api.unmap('j');
api.unmap('k');
api.unmap('S');
api.unmap('D');
api.unmap('yy');
api.unmap('E');
api.unmap('R');
api.unmap('af');

api.map('<Ctrl-v>', 'P');
api.map('<Alt-v>', 'U');
api.map('<Alt->>', 'G');
api.map('<Alt-<>', 'gg');

api.unmap('P');
api.unmap('U');
api.unmap('G');
api.unmap('gg');

api.cmap('<Ctrl-g>', '<Esc>');
api.imap('<Ctrl-g>', '<Esc>');

api.Hints.setCharacters('arstdhneio');
api.hintAlign = "left";

settings.aceKeybindings = 'emacs';
settings.defaultSearchEngine = 'd';
settings.omnibarPosition = "bottom";

// Local Variables:
// js2-additional-externs: ("api" "settings")
// End: