技术小黑屋

Use Vim in StackEdit

StackEdit is really great online editor. It could connect with Google Drive. And what’s more, you can even use Vim in this editor.
Now add the following snippet into SettingsExtensionsUserCustom extension javascript area.

linenos:false
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
userCustom.onReady = function() {
        var ace = {}
        ace.require = require
        ace.define = define
    ace.require(["ace/lib/net"], function(acenet) {
        acenet.loadScript("https://rawgit.com/androidyue/resources/master/keybinding-vim.js", function() {
                        e = document.querySelector(".ace_editor").env.editor
            ace.require(["ace/keyboard/vim"], function(acevim) {
                                e.setKeyboardHandler(acevim.handler);

            });

        });

    });
        window.ace = ace;

};

Others





快来解锁最新版 Typora,新用户券后仅需 84 元!
如何便宜的购买 office 365 ?
新版赤友 NTFS 助手来袭,正版超低价