Last active
June 23, 2017 01:50
-
-
Save b0o/6bc476749dbf5a01794cc3abc1c96b17 to your computer and use it in GitHub Desktop.
Maddy's cVim Configuration
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
" cVim configuration | |
" See https://github.com/1995eaton/chromium-vim for more info | |
" Booleans Settings | |
set smoothscroll | |
set noautofocus | |
set autohidecursor | |
set autoupdategist | |
set scalehints | |
" General Settings | |
let vimcommand = "nvim" | |
let completionengines = ["google", "amazon"] | |
" Key Mappings | |
map <Leader>r reloadTabUncached | |
map <Leader>x :restore<Space> | |
map <Leader>ip :call getIP<CR> | |
map <Leader>fs :call fakeSpot<CR> | |
map <Leader>e :call createEditHint<CR> | |
" Search Engines | |
let searchalias g = "google" | |
command google tabnew google | |
command g google | |
map <Leader>sgo :google<Space> | |
let searchengine github = ["https://github.com", "https://github.com/search?q=%s"] | |
let searchalias gh = "github" | |
command github tabnew github | |
command gh github | |
map <Leader>sgh :github<Space> | |
let searchengine reddit = ["https://reddit.com", "https://reddit.com/search?q=%s"] | |
let searchalias re = "reddit" | |
command reddit tabnew reddit | |
command re reddit | |
map <Leader>sre :reddit<Space> | |
let searchengine subreddit = ["https://reddit.com", "https://reddit.com/r/%s"] | |
let searchalias sr = "subreddit" | |
command subreddit tabnew subreddit | |
command sr subreddit | |
map <Leader>ssr :subreddit<Space> | |
let searchengine stackoverflow = ["https://stackoverflow.com", "https://stackoverflow.com/search?q=%s"] | |
let searchalias so = "stackoverflow" | |
command stackoverflow tabnew stackoverflow | |
command so stackoverflow | |
map <Leader>sso :stackoverflow<Space> | |
let searchengine archwiki = ["https://wiki.archlinux.org", "https://wiki.archlinux.org/index.php?go=go&search=%s"] | |
let searchalias aw = "archwiki" | |
command archwiki tabnew archwiki | |
command aw archwiki | |
map <Leader>saw :archwiki<Space> | |
let searchengine aur = ["https://aur.archlinux.org/", "https://aur.archlinux.org/packages/?O=0&K=%s"] | |
command aur tabnew aur | |
map <Leader>saur :aur<Space> | |
let searchengine chromestore = ["https://chrome.google.com/webstore", "https://chrome.google.com/webstore/search/%s?_category=extensions"] | |
let searchalias cs = "chromestore" | |
command chromestore tabnew chromestore | |
command cs chromestore | |
map <Leader>scs :chromestore<Space> | |
let searchengine youtube = ["https://www.youtube.com/feed/subscriptions?flow=2", "https://www.youtube.com/results?search_query=%s"] | |
let searchalias yt = "youtube" | |
command youtube tabnew youtube | |
command yt tabnew youtube | |
map <Leader>syt :youtube<Space> | |
let searchengine yelp = ["https://yelp.com", "https://yelp.com/search?find_desc=%s"] | |
let searchalias yp = "yelp" | |
command yelp tabnew yelp | |
command yp tabnew yelp | |
map <Leader>syp :yelp<Space> | |
let searchengine wikipedia = ["https://en.wikipedia.org", "https://en.wikipedia.org/w/index.php?search=%s"] | |
let searchalias w = "wikipedia" | |
command wikipedia tabnew wikipedia | |
command w wikipedia | |
map <Leader>sw :wikipedia<Space> | |
let searchengine amazon = ["https://smile.amazon.com", "https://smile.amazon.com/s/?field-keywords=%s"] | |
let searchalias az = "amazon" | |
command amazon tabnew amazon | |
command az amazon | |
map <Leader>saz :amazon<Space> | |
" Functions | |
getIP() -> {{ | |
httpRequest({url: 'http://api.ipify.org/?format=json', json: true}, | |
function(res) { Status.setMessage('IP: ' + res.ip); }); | |
}} | |
fakeSpot() -> {{ | |
url = "http://fakespot.com/analyze?url=" + window.location.href | |
window.open(url, '_blank').focus(); | |
}} | |
" vim: set ft=vim: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment