Skip to content

Instantly share code, notes, and snippets.

@b0o
Last active June 23, 2017 01:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save b0o/6bc476749dbf5a01794cc3abc1c96b17 to your computer and use it in GitHub Desktop.
Save b0o/6bc476749dbf5a01794cc3abc1c96b17 to your computer and use it in GitHub Desktop.
Maddy's cVim Configuration
" 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