Skip to content

Instantly share code, notes, and snippets.

@t0mab
Last active August 29, 2015 14:20
Show Gist options
  • Save t0mab/085843d6cb851c43294a to your computer and use it in GitHub Desktop.
Save t0mab/085843d6cb851c43294a to your computer and use it in GitHub Desktop.
cvimrc dotfile
" Settings
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 = "top"
let locale = "fr" " Current choices are 'jp' and 'uk'. This allows cVim to use sites like google.co.uk
" or google.co.jp to search rather than google.com. Support is currently limited.
" Let me know if you need a different locale for one of the completion/search engines
let hintcharacters = "abc"
let completionengines = ["google", "amazon", "imdb", "duckduckgo"]
let searchalias d = "duckduckgo"
let searchalias g = "google"
let mapleader = ","
let qmark a = ["http://www.reddit.com", "http://www.google.com", "http://twitter.com"]
let qmark r = ["http://reddit.com/r/unixporn", "http://reddit.com/r/i3wm", "http://reddit.com/r/archlinux"]
let blacklists = ["https://mail.google.com/*","*://mail.google.com/*","@https://mail.google.com/mail/*"]
" Mappings
map <Leader>r reloadTabUncached
map <Leader>x :restore<Space>
map gb :buffer<Space>
" 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 :to @@reddit_prog/@@top_all<CR>
map TD :to @@reddit_prog/@@top_day<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)
"""
map <Leader>gh :open! https://github.com/t0mab<CR>
map <Leader>Gh :open https://github.com/t0mab<CR>
map <Leader>uds :open! https://github.com/unistra<CR>
map <Leader>Uds :open https://github.com/unistra<CR>
map <Leader>rt :open! https://rt.unistra.fr<CR>
map <Leader>Rt :open https://rt.unistra.fr<CR>
map <Leader>ch :open! https://chronos.u-strasbg.fr<CR>
map <Leader>ch :open https://chronos.u-strasbg.fr<CR>
map <Leader>i3 :open https://reddit.com/r/i3wm<CR>
map <Leader>I3 :open! https://reddit.com/r/i3wm<CR>
map <Leader>ux :open https://reddit.com/r/unixporn<CR>
map <Leader>Ux :open! https://reddit.com/r/unixporn<CR>
map <Leader>ar :open https://reddit.com/r/archlinux<CR>
map <Leader>ar :open! https://reddit.com/r/archlinux<CR>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment