Skip to content

Instantly share code, notes, and snippets.

@lingkz
lingkz / 0_reuse_code.js
Created June 22, 2017 06:24
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@lingkz
lingkz / surfingkeys
Last active June 20, 2018 02:10
surfingkeys
// an example to create a new mapping `ctrl-y`
mapkey('<Ctrl-y>', 'Show me the money', function() {
Normal.showPopup('a well-known phrase uttered by characters in the 1996 film Jerry Maguire (Escape to close).');
});
// an example to replace `u` with `?`, click `Default mappings` to see how `u` works.
map('?', 'u');
// an example to remove mapkey `Ctrl-i`
unmap('<Ctrl-i>');
@lingkz
lingkz / cVimrc
Last active June 14, 2017 15:11
cVimrc
map . nextMatchPattern
map , previousMatchPattern
map zx closeTabLeft
map cx closeTabRight
map gj firstTab
map gk lastTab
let qmark a = ["https://www.baidu.com"]
let searchengine dogpile = "http://www.dogpile.com/search/web?q=%s"
let searchengine baidu = "https://www.baidu.com/s?ie=utf-8&f=8&rsv_bp=1&ch=&tn=baiduerr&bar=&wd=%s"
"let searchengine baidu = "https://www.baidu.com/baidu?word=encodeURIComponent%s&ie=utf-8"