AusecIT
1/6/2018 - 10:28 PM

cvimrc

cvimrc

"
"
" Settings
set nohud
set nosmoothscroll
set noautofocus " The opposite of autofocus; this setting stops
                " sites from focusing on an input box when they load
set typelinkhints
let searchlimit = 30
let scrollstep = 70
let barposition = "bottom"

let hintcharacters = "abc123"

let searchengine github = "https://github.com/search?o=desc&q=%s&s=updated&type=Repositories"

" alias ':g' to ':tabnew google'
command git tabnew github

let completionengines = ["google", "github"]

let searchalias g = "google" " Create a shortcut for search engines.
                             " For example, typing ':tabnew g example'
                             " would act the same way as ':tabnew google example'

let blacklists = ["https://mail.google.com/*", "*://mail.google.com/*", "@https://mail.google.com/mail/*"]

let mapleader = ","

" Mappings

map <Leader>r reloadTabUncached
map <Leader>x :restore<Space>

" This remaps the default 'j' mapping
map j scrollUp

" You can use <Space>, which is interpreted as a
" literal " " character, to enter buffer completion mode
map gb :buffer<Space>

" This unmaps the default 'k' mapping
unmap k

" This unmaps the default 'h', 'j', 'k', and 'l' mappings
unmap h j k l

" This remaps the default 'f' mapping to the current 'F' mapping
map f F

" Toggle the current HUD display value
map <C-h> :set hud!<CR>

" Switch between alphabetical hint characters and numeric hints
map <C-i> :set numerichints!<CR>

map <C-u> rootFrame
map <M-h> previousTab
map <C-d> scrollPageDown
map <C-e> scrollPageUp
iunmap <C-y>
imap <C-m> deleteWord

" Create a variable that can be used/referenced in the command bar
let @@reddit_prog = 'http://www.reddit.com/r/programming'
let @@top_all = 'top?sort=top&t=all'
let @@top_day = 'top?sort=top&t=day'

" TA binding opens 'http://www.reddit.com/r/programming/top?sort=top&t=all' in a new tab
map TA :tabnew @@reddit_prog/@@top_all<CR>
map TD :tabnew @@reddit_prog/@@top_day<CR>

" Use paste buffer in mappings
map T :tabnew wikipedia @"<CR>

" 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>

" Script hints
echo(link) -> {{
  alert(link.href);
}}
map <C-f> createScriptHint(echo)

" let configpath = '/path/to/your/.cvimrc'
" set localconfig