changeset 334:8e28cc541519

Add Vimperator configuration.
author Ludovic Chabant <ludovic@chabant.com>
date Tue, 22 Dec 2015 19:04:28 -0800
parents e0f8641ed31e
children 4888e2f3bc1d
files install.cmd install.sh vimperator/vimperatorrc
diffstat 3 files changed, 66 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/install.cmd	Tue Dec 22 19:02:30 2015 -0800
+++ b/install.cmd	Tue Dec 22 19:04:28 2015 -0800
@@ -51,6 +51,13 @@
 echo set runtimepath=~/.pentadactyl,%CWD:\=/%pentadactyl > "%userprofile%\_pentadactylrc"
 echo source %CWD:\=/%pentadactyl/pentadactylrc >> "%userprofile%\_pentadactylrc"
 
+if exist "%userprofile%\_vimperatorrc" (
+    set /P confirm=Will delete existing "%userprofile%\_vimperatorrc". OK with that? Press CTRL-C to abort.
+    del /Q "%userprofile%\_vimperatorrc"
+)
+echo set runtimepath=~/.vimperator,%CWD:\=/%vimperator > "%userprofile%\_vimperatorrc"
+echo source %CWD:\=/%vimperator/vimperatorrc >> "%userprofile%\_vimperatorrc"
+
 :: Console 2
 if exist "%appdata%\Console\console.xml" (
 	set /P confirm=Will delete existing Console2 settings. OK with that? Press CTRL-C to abort.
--- a/install.sh	Tue Dec 22 19:02:30 2015 -0800
+++ b/install.sh	Tue Dec 22 19:04:28 2015 -0800
@@ -42,6 +42,9 @@
 echo set runtimepath=~/.pentadactyl,$CWD/pentadactyl > "$HOME/.pentadactylrc"
 echo source "$CWD/pentadactyl/pentadactylrc" >> "$HOME/.pentadactylrc"
 
+echo set runtimepath=~/.vimperator,$CWD/vimperator > "$HOME/.vimperatorrc"
+echo source "$CWD/vimperator/vimperatorrc" >> "$HOME/.vimperatorrc"
+
 # TMUX
 # ----
 ln -s "$CWD/tmux/tmux.conf" "$HOME/.tmux.conf"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/vimperator/vimperatorrc	Tue Dec 22 19:04:28 2015 -0800
@@ -0,0 +1,56 @@
+" Config for Vimperator
+
+" Options
+"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
+
+" No GUI
+set gui=none
+
+" Highlighting
+set hlsearch
+
+" DDG FTW
+set defsearch=duckduckgo
+
+" Website that have good keyboard shortcuts
+ignorekeys add -except=<>JK fastmail.com
+ignorekeys add -except=<>JK feedbin.com
+
+" Don't close the window with the last tab.
+set! browser.tabs.closeWindowWithLastTab=false
+
+
+" Mappings
+"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
+" Scroll faster
+nnoremap j <C-d>
+nnoremap k <C-u>
+
+" Change tabs without awkward `CTRL` combinations
+nnoremap J :tabprevious<cr>
+nnoremap K :tabnext<cr>
+
+" Reorder tabs
+nnoremap > :tabmove! +1<cr>
+nnoremap < :tabmove! -1<cr>
+
+" Use and quickly hide search highlighting
+nnoremap ,<Space> :nohlsearch<cr>
+
+" Aw come on, copy/pasting is ridiculous by default.
+nnoremap <C-c> i<C-c>
+nnoremap <C-x> i<C-x>
+nnoremap <C-v> i<C-v>
+
+vnoremap <C-c> i<C-c>
+vnoremap <C-x> i<C-x>
+vnoremap <C-v> i<C-v>
+
+" On keyboards like the Leopold FC660C, for some obscure reason, the
+" <Insert> key sends the <Help> ID. WTF.
+nnoremap <Help> <Insert>
+
+" Toggle tabs.
+nnoremap <F3> :set gui=invtabs<cr>
+
+" vim: ft=vim