Last active
April 2, 2019 06:10
-
-
Save nopcall/1b6e845566581172f27d to your computer and use it in GitHub Desktop.
Google Chrome cvim setting
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
" {{{ Convenience | |
set hud | |
set smoothscroll | |
set noautofocus | |
set typelinkhints | |
"set showtabindices | |
set autohidecursor | |
" use <C-n> and <C-p> to cycle through completion results (requires you to set) | |
" the nextCompletionResult keybinding in the chrome://extensions page (bottom right) | |
set cncpcompletion | |
let searchlimit = 30 | |
let scrollstep = 70 | |
let barposition = "top" | |
let locale = "jp" | |
let hintcharacters = "qwertasdfzxcvb" | |
" ^\s*[上前][一]?[页张个篇章节步封]\s*$,^\s*(较新的文章)\s*$,^<<<$,^([nN]ewer|[pP]rev|[pP]revious)$,^<$,^(<<|«|‹‹)$,^(<|«),(<|«)$ | |
let previousmatchpattern = '((?!last)([pP]rev(ious)?|[nN]ewer|back|«|less|<|‹|[上前][一]?[页张个篇章节步封]| )+)' | |
" ^\s*[下后][一]?[页张个篇章节步封]\s*$,^\s*(较旧的文章)\s*$,^>>>$,^([oO]lder|[nN]ext)$,^>$,^(>>|››|»)$,^(>|»),(>|»)$,\bmore\b | |
let nextmatchpattern = '((?!first)([nN]ext|[oO]lder|more|>|›|»|forward|[下后][一]?[页张个篇章节步封]| )+)' | |
" }}} | |
" {{{ Search Engines | |
let searchengine taobao = "http://s.taobao.com/search?q=%s" | |
let searchengine yd = "http://dict.youdao.com/search?q=%s" | |
let searchengine baidu = "https://www.baidu.com/s?ie=utf-8&f=8&rsv_bp=0&rsv_idx=1&tn=baidu&wd=%s&rqlang=cn&rsv_enter=1&rsv_sug3=4" | |
let searchengine gentoo = "http://gpo.zugaina.org/Search?search=%s" | |
let searchengine mobilism = "http://forum.mobilism.org/search.php?keywords=%s&terms=all&author=&sc=1&sf=titleonly&sr=topics&sk=t&sd=d&st=0&ch=300&t=0&submit=Search" | |
let completionengines = ["google", "baidu", "taobao", "gentoo", "mobilism", "yd"] | |
let searchalias g = "google" | |
let searchalias b = "baidu" | |
let searchalias gt = "gentoo" | |
let searchalias tb = "taobao" | |
let searchalias mb = "mobilism" | |
" }}} | |
" {{{ quick mark 'gn<*>' or 'go<*>' | |
let qmark a = ["http://www.acfun.tv"] | |
let qmark i = ["http://www.inoreader.com"] | |
let qmark g = ["http://www.github.com"] | |
let qmark c = ["http://www.cplusplus.com/reference/"] | |
let qmark p = ["https://getpocket.com/a/queue/"] | |
" }}} | |
" {{{ disable cvim on specific site | |
" let blacklists = ["@chrome-extension://*","@chrome://*","https://mail.google.com/*","*://mail.google.com/*","@https://mail.google.com/mail/*"] | |
" blacklists prefixed by '@' act as a whitelist | |
" }}} | |
" {{{ KeyBindings | |
let mapleader = "," | |
map q previousTab | |
map w nextTab | |
map D lastUsedTab | |
map Q createHoverHint | |
map R reloadTabUncached | |
map b :buffer<Space> | |
map B :bookmarks<Space> | |
map <C-u> rootFrame | |
map <C-d> scrollPageDown | |
map <C-b> scrollPageUp | |
" Text Boxes | |
imap <C-a> beginningOfLine | |
iunmap <C-k> | |
imap <C-k> deleteToEnd | |
imap <C-d> deleteForwardChar | |
imap <M-d> deleteForwardWord | |
imap <C-h> deleteChar | |
imap <M-h> deleteWord | |
imap <M-f> forwardWord | |
imap <M-b> backwardWord | |
imap <C-S-a> selectAll | |
" }}} | |
" {{{ Code blocks (see below for more info) | |
getIP() -> {{ | |
httpRequest({url: 'http://api.ipify.org/?format=json', json: true}, | |
function(res) { Status.setMessage('IP: ' + res.ip); }); | |
}} | |
" Displays your public IP address in the status bar | |
map ci :call getIP<CR> | |
" settings from there | |
" In this case, when pages with a file ending in ".js" are loaded, | |
" cVim will pin the tab and then scroll down | |
" site '*://*/*.js' { | |
" call :pintab | |
" call scrollDown | |
" } | |
" }}} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment