Last active
December 23, 2016 22:35
-
-
Save rubenvereecken/9d2ced09a8fa740459b1 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 " | |
"""""""""""" | |
" C-n won't work on Linux, use Tab to cycle suggestions | |
set nocncpcompletion | |
" It's really annoying when websites get autofocus, messes up the flow | |
set noautofocus | |
" Had this on for a while but it gets annoying | |
set noshowtabindices | |
" Shorter links are closer to top left | |
set sortlinkhints | |
" Good for me newbie, shows available commands | |
set completeonopen | |
let defaultengine="duckduckgo" | |
let searchalias g = "google" | |
let searchalias d = "duckduckgo" | |
let blacklists = ['*://*/*.ipynb*'] | |
"""""""""""" | |
" MAPPINGS " | |
"""""""""""" | |
let mapleader = "," | |
" From my normal vim workflow | |
map <Leader>h previousTab | |
map <Leader>l nextTab | |
" Toggle last used tab | |
unmap <C-6> | |
map <Leader>t lastUsedTab | |
" Custom commands | |
command g tabnew google | |
command d tabnew duckduckgo | |
command s tabnew http://play.spotify.com | |
unmap a | |
map w :tabnew! google<Space> | |
map a :tabnew!<Space> | |
map h :history!<Space> | |
saveLink(link) -> {{ | |
if (link.href) { | |
var newLink = document.createElement('a'); | |
newLink.href = link.href; | |
newLink.download = link.href.replace(/.*\//, ''); | |
document.body.appendChild(newLink); | |
newLink.click(); | |
document.body.removeChild(newLink); | |
} else { | |
console.log(link); | |
var someKindOfText = link.innerText || link.value; | |
Status.setMessage("Nothing to save" + (someKindOfText ? " for '" + someKindOfText + "'." : "."), 5); | |
} | |
}} | |
unmap s | |
map s createScriptHint(saveLink) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment