Skip to content

Instantly share code, notes, and snippets.

@ShinichiU
Last active April 29, 2020 05:41
Show Gist options
  • Save ShinichiU/3a64d85ab540fa7e540f to your computer and use it in GitHub Desktop.
Save ShinichiU/3a64d85ab540fa7e540f to your computer and use it in GitHub Desktop.
cVimrc
"Settings
let scrolltep = 30
let fullpagescrollpercent = 100
"set nohud
set autohidecursor
"set noinsertmappings
set nosmoothscroll
let blacklists = ["https://mail.google.com/*"]
let mapleader = ","
"let locale = "jp"
let hintcharacters = "hjklasdfgyuiopqwertnmzxcvb"
let barposition = "bottom"
set autoupdategist
" qmarks
" google mail/task/calendar
let qmark m = ["https://mail.google.com"]
let qmark t = ["https://mail.google.com/tasks/canvas"]
let qmark c = ["https://www.google.com/calendar"]
" google translator en/ja/language tool
let qmark e = ["javascript:var%20t=((window.getSelection&&window.getSelection())%7C%7C(document.getSelection&&document.getSelection())%7C%7C(document.selection&&document.selection.createRange&&document.selection.createRange().text));var%20e=(document.charset%7C%7Cdocument.characterSet);if(t!='')%7Blocation.href='http://translate.google.com/translate_t?text='+t+'&hl=ja&langpair=auto%7Cen&tbb=1&ie='+e;%7Delse%7Blocation.href='http://translate.google.com/translate?u='+escape(location.href)+'&hl=ja&langpair=auto%7Cen&tbb=1&ie='+e;%7D;"]
let qmark j = ["javascript:var%20t=((window.getSelection&&window.getSelection())%7C%7C(document.getSelection&&document.getSelection())%7C%7C(document.selection&&document.selection.createRange&&document.selection.createRange().text));var%20e=(document.charset%7C%7Cdocument.characterSet);if(t!='')%7Blocation.href='http://translate.google.com/?text='+t+'&hl=ja&langpair=auto%7Cja&tbb=1&ie='+e;%7Delse%7Blocation.href='http://translate.google.com/translate?u='+encodeURIComponent(location.href)+'&hl=ja&langpair=auto%7Cja&tbb=1&ie='+e;%7D;"]
let qmark l = ["http://www.google.com/language_tools"]
" Feedly/Pocket/GitHub
let qmark f = ["http://cloud.feedly.com/#latest"]
let qmark p = ["http://getpocket.com/a/queue/"]
let qmark g = ["http://github.com/rcmdnk"]
" Move
map <C-h> scrollLeft
map <C-j> scrollDown
map <C-k> scrollUp
map <C-l> scrollRight
map <C-u> scrollPageUp
map <C-d> scrollPageDown
map <C-b> scrollFullPageUp
map <C-f> scrollFullPageDown
" Navigation
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
map <C-i> goForward
map <C-o> goBack
map :wo :new<Space>
map ;wo :new<Space>
" Want to make a key to yank current selected word and search it...
"map <C-g> :execute vlhyP<CR>
" Currently, ":" doesn't shows command line.
" Need at least one charactor (use <Space> here)
map ; :<Space>
" Text boxes
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment