Skip to content

Instantly share code, notes, and snippets.

@bergercookie
Created December 2, 2015 21:05
Show Gist options
  • Save bergercookie/eb523ebb3c88076005f9 to your computer and use it in GitHub Desktop.
Save bergercookie/eb523ebb3c88076005f9 to your computer and use it in GitHub Desktop.
" 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 locale = "uk" " 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 = "abc123"
let hintcharacters = "1234567890"
let searchengine dogpile = "http://www.dogpile.com/search/web?q=%s" " If you leave out the '%s' at the end of the URL,
"" your query will be appended to the link.
"" Otherwise, your query will replace the '%s'.
let searchengnine wikipedia = "https://en.wikipedia.org/w/index.php?search=%s&title=Special%3ASearch&go=Go"
" alias ':g' to ':tabnew google'
command g tabnew google
let completionengines = ["google", "youtube", "amazon", "imdb", "wikipedia", "dogpile"]
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'
" Open all of these in a tab with `gnb` or open one of these with <N>goa where <N>
let qmark a = ["http://www.reddit.com", "http://www.google.com", "http://twitter.com"]
" blacklists prefixed by '@' act as a whitelist
let mapleader = ","
" Mappings
map <Leader>r reloadTabUncached
map <Leader>d :restore<Space>
"" This remaps the default 'j' mapping
" You can use <Space>, which is interpreted as a
" literal " " character, to enter buffer completion mode
map gb :bookmarks<Space>
map b :buffer<Space>
"" The unmaps the default 'k' mapping
"unmap k
"" 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>
"set numerichints<CR>
" unmaps - using pentadactyl standards
unmap x
unmap gxt
unmap gxT
unmap gx0
unmap gx$
unmap H
unmap S
unmap L
unmap D
unmap >
unmap <
" Greek support
map α a
map κ k
map ξ j
map η h
map λ l
map δ d
map ο o
map τ t
map ς w
map π p
map ι i
map θ u
map υ y
map φ f
map ψ c
map γ g
map ρ r
map γ g
map ν n
map Π P
map τ t
map Η H
map Ο O
map Λ L
map Δ D
map Υ Y
map Γ G
map Σ S
map Τ T
map Φ F
map σ s
map Σ S
map υυ yy
map γγ gg
map ψογ cog
map ψοΓ coG
map ζζ zz
map ζι zi
map ζο zo
"map <C-u> rootFrame
map <C-o> goBack
map <C-i> goForward
map H moveTabLeft
map L moveTabRight
map d closeTab
map gdt closeTabRigth
map gdT closeTabLeft
map gd0 closeTabToLeft
map gd$ closeTabToRight
map u :undo<CR>
map <C-n> nextTab
map <C-p> previousTab
map <C-d> scrollPageDown
map <C-u> 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)
let configpath = '/Users/nick/dotfiles/.cvimrc'
"set localconfig " Update settings via a local file (and the `:source` command) rather
" than the default options page in chrome
" As long as localconfig is set in the .cvimrc file. cVim will continue to read
" settings from there
l
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment