Last active
June 19, 2017 23:31
-
-
Save canalguada/5d7b6073ac8b22e7f4a00992debd76ff to your computer and use it in GitHub Desktop.
cvimrc - Chromium Vim config
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
" 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 defaultnewtabpage | |
"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'. | |
" This will do the same thing as above, except typing ':tabnew withbase' into to command bar | |
" without any search parameters will open 'http://www.dogpile.com' | |
"let searchengine withbase = ["http://www.dogpile.com", "http://www.dogpile.com/search/web?q=%s"] | |
let searchengine github = ["https://github.com", "https://github.com/search?q=%s"] | |
let searchengine pydoc = ["file:///usr/share/doc/python/html/index.html" , "file:///usr/share/doc/python/html/search.html?q=%s&check_keywords=yes&area=default"] | |
let searchengine archbbs = ["https://bbs.archlinux.org", "https://bbs.archlinux.org/search.php?action=search&keywords=%s&author=&search_in=0&sort_by=0&sort_dir=DESC&show_as=topics"] | |
let searchengine archpkg = ["https://www.archlinux.org/packages/", "https://www.archlinux.org/packages/?sort=&q=%s&maintainer=&flagged="] | |
let searchengine archaur = ["https://aur.archlinux.org", "https://aur.archlinux.org/packages/?O=0&K=%s"] | |
let searchengine archwiki = ["https://wiki.archlinux.org", "https://wiki.archlinux.org/index.php?title=Special%3ASearch&profile=default&search=%s&fulltext=Search"] | |
let searchengine conjugaison = ["http://conjugueur.reverso.net" ,"http://conjugueur.reverso.net/conjugaison-francais-verbe-%s.html"] | |
let searchengine stack = ["https://stackoverflow.com" ,"https://stackoverflow.com/search?q=%s"] | |
let searchengine dico = ["http://dictionnaire.reverso.net/francais-definition/", "http://dictionnaire.reverso.net/francais-definition/%s"] | |
let searchengine reverso = ["http://dictionnaire.reverso.net/francais-anglais/", "http://dictionnaire.reverso.net/francais-anglais/%s"] | |
let searchengine citations = ["http://www.dicocitations.com/google.php", "http://www.dicocitations.com/google.php?q=%s"] | |
"let searchengine ddg = ["https://duckduckgo.com", "https://duckduckgo.com/?q=%s&atb=v69-5__"] | |
let searchengine startpage = ["https://www.startpage.com", "https://www.startpage.com/do/dsearch?query=%s&cat=web&pl=opensearch&language=francais"] | |
let searchengine twitter = ["https://twitter.com", "https://twitter.com/search?q=%s"] | |
"let completionengines = ["google", "amazon", "imdb", "dogpile"] | |
let completionengines = ["google", "duckduckgo", "wikipedia", "youtube", "google-image", "wolframalpha"] | |
" alias ':g' to ':tabnew google' | |
command g tabnew google | |
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' | |
command st tabnew startpage | |
let searchalias st = "startpage" | |
command ddg tabnew duckduckgo | |
let searchalias ddg = "duckduckgo" | |
let mapleader = ',' | |
" Mappings | |
map <Leader>r reloadTabUncached | |
map <Leader><CR> :nohlsearch<CR> | |
unmap a | |
map a :tabnew startpage | |
map <M-p> previousTab | |
" You can use <Space>, which is interpreted as a | |
" literal " " character, to enter buffer completion mode | |
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> | |
" Commands | |
let vimcommand = 'gvim-edit' | |
" 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> | |
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment