Skip to content

Instantly share code, notes, and snippets.

@achilleas-k
Last active October 10, 2019 16:05
Show Gist options
  • Save achilleas-k/fb70110d0739e38f939b to your computer and use it in GitHub Desktop.
Save achilleas-k/fb70110d0739e38f939b to your computer and use it in GitHub Desktop.
cVimrc
let barposition = "top"
let mapleader = " "
set noautofocus
set numerichints
set typelinkhints
set scalehints
set nocompleteonopen
set smoothscroll
let blacklists = ["https://playbeta.pocketcasts.com/*", "https://*netflix.com/*", "https://*mitarbeiterportal.bayern.de/*", "https://mail.google.com/*", "https://keep.google.com/*", "https://*.todoist.com/app*", "https://calendar.google.com/*", "https://youtube.com/*", "https://play.pocketcasts.com/*"]
" search options
let searchengine aw = "https://wiki.archlinux.org/index.php?search=%s"
let searchengine python = "https://docs.python.org/3/search.html?q=%s"
let searchengine godoc = "https://golang.org/search?q=%s"
let searchengine amazon = "https://smile.amazon.de/s/?field-keywords=%s"
let searchalias gg = "google"
let searchalias ddg = "duckduckgo"
let searchalias gi = "google-image"
let searchalias yt = "youtube"
let searchalias wp = "wikipedia"
let searchalias maps = "google-maps"
let completionengines = ["google", "google-image", "youtube", "wikipedia", "archwiki", "imdb", "google-maps", "python", "duckduckgo", "godoc"]
let defaultengine = "google"
" mappings (attempting to match pentadactyl)
map u :undo<cr>
map w :new<space>
map s :open gg<space>
map S :tabnew gg<space>
map D :quit<cr>
map <C-u> scrollPageUp
map <C-d> scrollPageDown
map <C-c> cancelWebRequest
map R reloadTabUncached
map gf :viewsource<cr>
map gF :viewsource!<cr>
map b :buffer<space>
map B :bookmarks!<space>
map <C-a> incrementURLPath
map <C-x> decrementURLPath
" a to search annoys me
unmap a
" clear text search
map <leader>/ :nohlsearch<cr>
" tab switching
map <A-.> nextTab
map <A-,> previousTab
map <A--> lastUsedTab
map <A-`> lastUsedTab
" reverse J and K for tab switching
map J nextTab
map K previousTab
" tab management
map <leader>d :tabdetach<cr>
map <leader>D :duplicate<cr>
map <leader>a :tabattach<space>
map <leader>c :tabnew https://achinet.com/newtab<cr>
" tab history
map <leader>h :tabhistory<space>
" passthrough prefix
map ` passKeys
" disable x to close key
unmap x
" text editing -- defaults duplicated for completeness
iunmap <C-m>
iunmap <C-a>
iunmap <C-e>
iunmap <C-u>
iunmap <C-k>
iunmap <C-w>
iunmap <M-d>
iunmap <M-b>
iunmap <M-f>
iunmap <C-f>
iunmap <C-b>
imap <C-a> beginningOfLine
imap <C-e> endOfLine
imap <C-u> deleteToBeginning
imap <C-k> deleteToEnd
imap <C-w> deleteWord
imap <M-d> deleteForwardWord
imap <M-b> backWord
imap <M-f> forwardWord
imap <C-f> forwardChar
imap <C-b> backwardChar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment