Skip to content

Instantly share code, notes, and snippets.

@attomos
Created September 28, 2013 05:46
Show Gist options
  • Select an option

  • Save attomos/6738847 to your computer and use it in GitHub Desktop.

Select an option

Save attomos/6738847 to your computer and use it in GitHub Desktop.
" vim: set ft=vim:
"set runtimepath+=~/git_repos/vimperator-plugins
let mapleader = ","
" Fast tabs {
map <S-H> gT
map <S-L> gt
" }
" Now, I can close my find bar on Vimperator
" http://superuser.com/questions/557246/firefox-with-vimperator-how-to-toggle-find-bar
" Adapt a little bit
inoremap <S-Esc> <S-Esc><Esc><S-Esc>
" http://stackoverflow.com/questions/3788266/firefox-open-a-new-tab-instead-of-a-pop-window
" http://code.google.com/p/vimperator-labs/issues/detail?id=379
"set popups=inherit
" https://code.google.com/p/vimperator-labs/issues/detail?id=656
" type :set popups=window
set! popups=window
"set! browser.link.open_newwindow=1
set editor='bash -lc "mvim -f \$*" mvim '
" XXX
" From https://github.com/cfree3/config/
" ~/.vimperatorrc | vi: set ft=vimperator: | Curtis Free (http://curtisfree.com)
" These settings prevent Vimperator from overwriting my preferred Firefox settings.
"set! browser.startup.page=1
" Miscellaneous
"set history=50
"" vertical bar CANNOT be used here
"set urlseparator=;
" Awesome Bar
"" See http://developernotes.com/archive/2008/09/22/vimperator-tip-awesome-bar.aspx.
"" Additional 's' option gives initial suggestion of search engine but (mistakenly?)
"" enables suggestions (which should only occur given 'S'). Useful, but I'll favor
"" privacy/security and just use 'l' here.
set complete=l
" Scrolling
"" Vimperator does not give the user direct control over scroll distance. Vimium (for
"" Chromium/Google Chrome) uses a nice 60px by default; 2<dir> is much smaller, but it
"" feels better in Vimperator.
nnoremap j 2j
nnoremap k 2k
nnoremap h 2h
nnoremap l 2l
"" show numbers on each tab
"set tabnumbers
"" see http://code.google.com/p/vimperator-labs/issues/detail?id=311
"set popups=tab,resized
" Find
"" perform incremental searching
set incsearch
"" highlight search results
set hlsearch
"" typically (see below) ignore case
set ignorecase
"" only consider case if an upper case char is used
set smartcase
""" Site Opening
map <C-l> o
imap <C-l> <Esc>o
map <C-S-l> t
imap <C-S-l> <Esc>t
""" Searching (Google)
map <C-k> ogoogle<Space>
imap <C-k> <Esc>ogoogle<Space>
map <C-S-k> tgoogle<Space>
imap <C-S-k> <Esc>tgoogle<Space>
""" Manage Search engines first
" yt for YouTube
" tw for Twitter
map <C-y> oyt<Space>
imap <C-y> <Esc>oyt<Space>
map <leader>tw otw<Space>
" Duckduckgo
map <leader>mm oddg<Space>
map <leader>mt tddg<Space>
" Override speeddial
"map t tabopen chrome://speeddial/content/speeddial.xul<cr>
" Quickly firebug
map <leader>eq :firebug off<cr>
map <leader>ew :firebug toggle<cr>
" Open Jekyll WEBrick
command! jekyll open http://0.0.0.0:4000
" Open dev environment for for http web server port 3000
command! dev open http://localhost:3000
" App Tabs
command! app set apptab!
" https://vimeo.com/67215271
" now <C-c> won't break the autoclose parentheses
" Also works in Vimperator, cool!
inoremap <C-c> <Esc>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment