Skip to content

Instantly share code, notes, and snippets.

@hadashiA
Last active October 9, 2018 06:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hadashiA/0629dc6409fb7096ec726602d2031e27 to your computer and use it in GitHub Desktop.
Save hadashiA/0629dc6409fb7096ec726602d2031e27 to your computer and use it in GitHub Desktop.
" Settings
set updowncompletion
let hintcharacters = "qwerasdfzxcv"
" Sites
let searchalias a = "amazon"
let searchalias t = "twitter"
let searchalias ja = "googletranslate_ja"
let searchalias en = "googletranslate_en"
let searchengine amazon = "https://www.amazon.co.jp/s/ref=nb_sb_noss_2?__mk_ja_JP=%s&url=search-alias%3Daps&field-keywords=%s"
let searchengine twitter = "https://twitter.com/search?q=%s"
let searchengine googletranslate_ja = "https://translate.google.com/?hl=ja&tab=TT#ja/en/%s"
let searchengine googletranslate_en = "https://translate.google.com/?hl=ja&tab=TT#en/ja/%s"
let searchengine alc = "https://eow.alc.co.jp/search?q=%s"
let searchengine pr = "https://github.com/aiming/sergeant/pulls?q=is:pr+is:open+%s"
let searchengine prc = "https://github.com/aiming/sergeant/pulls?q=is:pr+is:open+%s"
let searchengine pra = "https://github.com/aiming/sergeant/pulls?q=is:pr+is:open+author:hadashiA+%s"
" Mappings
map H previousTab
map L nextTab
map d closeTab
map h goBack
map q goBack
map l goForward
map w goForward
map y yankDocumentUrl
map <C-u> scrollPageUp
map <C-d> scrollPageDown
map b :buffer<Space>
map ? :settings<CR>
" Text boxes
iunmapAll
copyAsLink -> {{
const url = document.URL;
const title = document.title;
const text = `[${title}](${url})`
Status.setMessage(text, 3);
Clipboard.copy(text);
}}
copyTitle -> {{
const text = document.title;
Status.setMessage(text, 3);
Clipboard.copy(text);
}}
map ly :call copyAsLink<CR>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment