Last active
December 18, 2017 01:45
-
-
Save j138/6de69b0672fedd2d9a7c0a2cb176c52f to your computer and use it in GitHub Desktop.
vimperatorの代替としてcVim入れてみた ref: https://qiita.com/Jey/items/2bee3597bfc24fc8a1f8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Settings | |
" set noautofocus | |
set typelinkhints | |
let searchlimit = 30 | |
let scrollstep = 70 | |
let fullpagescrollpercent = 100 | |
let barposition = "bottom" | |
let locale = "jp" | |
let mapleader = "," | |
let hintcharacters = "qwertyuiasdfghjklzxcvbnm" | |
" Search | |
command g tabnew google | |
let completionengines = ["google", "amazon"] | |
let searchalias g = "google" | |
let qmark t = ["http://twitter.com"] | |
let qmark m = ["https://inbox.google.com/u/0/?cid=imp"] | |
let qmark c = ["https://www.google.com/calendar"] | |
let qmark i = ["http://www.inoreader.com/folder/Must%20Read"] | |
" Ignore Site | |
let blacklists = ["https://inbox.google.com/*"] | |
" Mapping | |
map h previousTab | |
map l nextTab | |
map b :buffer<Space> | |
map B :bookmarks<Space> | |
map d closeTab | |
map u lastClosedTab | |
map <M-i> goToInput | |
map @ pinTab | |
map <C-h> moveTabLeft | |
map <C-l> moveTabRight | |
map <M-r> reloadTabUncached | |
iunmapAll | |
" yank '%title% - %url%' | |
copyTitleUrl() -> {{ | |
RUNTIME('getRootUrl', function(url) { | |
let ret = document.title + " - " + url; | |
Clipboard.copy(ret); | |
Status.setMessage(ret, 2); | |
}); | |
}} | |
map yt :call copyTitleUrl<CR> | |
" accessTokenは自分で発行して入れてね | |
" yank '%title% - %bitly%' | |
copyTitleBitly() -> {{ | |
RUNTIME('getRootUrl', function(url) { | |
const bitlyToken = 'pleaseSetAccessToken!!!!!111'; | |
httpRequest( | |
{url: `https://api-ssl.bitly.com/v3/shorten?access_token=${bitlyToken}&format=json&longUrl=${url}`, json: true}, | |
function(res) { | |
let ret = document.title + " - " + res.data.url; | |
Clipboard.copy(ret); | |
Status.setMessage(ret, 2); | |
}); | |
}); | |
}} | |
map yb :call copyTitleBitly<CR> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment