Skip to content

Instantly share code, notes, and snippets.

@petitviolet
Created May 21, 2019 05:51
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 petitviolet/f72d482d5e68e050442a05d9d46b0fa4 to your computer and use it in GitHub Desktop.
Save petitviolet/f72d482d5e68e050442a05d9d46b0fa4 to your computer and use it in GitHub Desktop.
" general
set autoupdategist " gistの設定を自動反映
let scrollstep = 150
let fullpagescrollpercent = 100
set smoothscroll
set noautofocus " サイトを開いた時に入力欄にフォーカスが奪われるのを抑止
let searchlimit = 20
let barposition = "bottom"
let locale = "jp"
let mapleader = ","
" navigation
" let hintcharacters = "asdfjkl"
" key mappings
map h previousTab
map l nextTab
map dd closeTab
map u lastClosedTab
iunmapAll " 入力欄内でのキーバインド無効化
let blacklists = ["http://localhost/*"]
" copy.js like command
" yank '%url%'
copyUrl() -> {{
RUNTIME('getRootUrl', function(url) {
let ret = url;
Clipboard.copy(ret);
Status.setMessage(ret, 2);
});
}}
map <Leader>u :call copyUrl<CR>
" yank '%title% - %url%'
copyTitleUrl() -> {{
RUNTIME('getRootUrl', function(url) {
let ret = document.title + " - " + url;
Clipboard.copy(ret);
Status.setMessage(ret, 2);
});
}}
map <Leader>c :call copyTitleUrl<CR>
" markdown style
copyTitleUrlM() -> {{
RUNTIME('getRootUrl', function(url) {
let ret = "[" + document.title + "](" + url + ")";
Clipboard.copy(ret);
Status.setMessage(ret, 2);
});
}}
map <Leader>m :call copyTitleUrlM<CR>
" chatwork style
copyTitleUrlC() -> {{
RUNTIME('getRootUrl', function(url) {
let ret = "[info][title]" + document.title + "[/title]" + url + "[/info]";
Clipboard.copy(ret);
Status.setMessage(ret, 2);
});
}}
map <Leader>C :call copyTitleUrlC<CR>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment