changeset 220:1ba0daaa8e4e

Start using Pentadactyl instead of Vimperator.
author Ludovic Chabant <ludovic@chabant.com>
date Tue, 16 Sep 2014 17:01:06 -0700
parents 738c1a3ad786
children 1055e086abe7
files install.cmd install.sh pentadactylrc uninstall.cmd uninstall.sh vimperatorrc
diffstat 6 files changed, 66 insertions(+), 75 deletions(-) [+]
line wrap: on
line diff
--- a/install.cmd	Thu Sep 11 23:14:59 2014 -0700
+++ b/install.cmd	Tue Sep 16 17:01:06 2014 -0700
@@ -36,11 +36,11 @@
 copy "%CWD%git\gitconfig" "%userprofile%\.gitconfig"
 
 :: Web Browser
-if exist "%userprofile%\_vimperatorrc" (
-    set /P confirm=Will delete existing "%userprofile%\_vimperatorrc". OK with that? Press CTRL-C to abort.
-    del /Q "%userprofile%\_vimperatorrc"
+if exist "%userprofile%\_pentadactylrc" (
+    set /P confirm=Will delete existing "%userprofile%\_pentadactylrc". OK with that? Press CTRL-C to abort.
+    del /Q "%userprofile%\_pentadactylrc"
 )
-echo source %CWD:\=/%vimperatorrc > "%userprofile%\_vimperatorrc"
+echo source %CWD:\=/%pentadactylrc > "%userprofile%\_pentadactylrc"
 
 :: Console 2
 if exist "%appdata%\Console\console.xml" (
--- a/install.sh	Thu Sep 11 23:14:59 2014 -0700
+++ b/install.sh	Tue Sep 16 17:01:06 2014 -0700
@@ -27,5 +27,5 @@
 
 # WEB BROWSER
 # -----------
-ln -s "$CWD/vimperatorrc" "$HOME/.vimperatorrc"
+ln -s "$CWD/pentadactylrc" "$HOME/.pentadactylrc"
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pentadactylrc	Tue Sep 16 17:01:06 2014 -0700
@@ -0,0 +1,58 @@
+" Config for Pentadactyl
+
+" Scroll faster
+nmap -builtin h 3h
+nmap -builtin j 3j
+nmap -builtin k 3k
+nmap -builtin l 3l
+
+" Scroll easier
+nmap -builtin d <C-d>
+nmap -builtin e <C-u>
+
+" Close tab with `x` since `d` is for scrolling down now
+nmap -builtin x :bd<cr>
+
+" Don't close the window with the last tab.
+set! browser.tabs.closeWindowWithLastTab=false
+
+" Change tabs without awkward `CTRL` combinations
+nmap -builtin J :tabprevious<cr>
+nmap -builtin K :tabnext<cr>
+
+" Reorder tabs
+nmap -builtin > :tabmove! +1<cr>
+nmap -builtin < :tabmove! -1<cr>
+
+"New tab using the old classic way
+nmap -builtin <C-t> :tabnew<cr>
+
+" Use `i` to get into pass-through mode,
+" `I` for temporary pass-through mode,
+" and `c` for the 'caret' mode.
+nmap -builtin i <C-z>
+nmap -builtin I <C-v>
+nmap -builtin c i
+
+" Shortcuts for common extensions
+nmap -builtin ,f i<D-\>
+nmap -builtin ,p <S-Esc><A-D-\>
+nmap -builtin ,b I<A-b>
+
+" Use and quickly hide search highlighting
+set hlfind
+nmap -builtin ,<Space> :noh<cr>
+
+" Quickly open some dialogs
+nmap -builtin ,b :downloads<cr>
+
+set defsearch=duckduckgo
+
+" Super minimal UI
+"set toolbars=noaddons,nobookmarks,nomenu,nonavigation,notabs
+
+" Websites with useful keyboard shortcuts already
+set passkeys+=fastmail.fm:jkx.rupn
+set passkeys+=feedly.com:jkgv
+
+" vim: ft=vim
--- a/uninstall.cmd	Thu Sep 11 23:14:59 2014 -0700
+++ b/uninstall.cmd	Tue Sep 16 17:01:06 2014 -0700
@@ -7,3 +7,5 @@
 del          "%userprofile%\_vimrc"
 del          "%userprofile%\mercurial.ini"
 del          "%userprofile%\.gitconfig"
+del          "%userprofile%\_pentadactylrc"
+
--- a/uninstall.sh	Thu Sep 11 23:14:59 2014 -0700
+++ b/uninstall.sh	Tue Sep 16 17:01:06 2014 -0700
@@ -6,4 +6,5 @@
 rm $HOME/.vimrc
 rm $HOME/.hgrc
 rm $HOME/.gitconfig
+rm $HOME/.pentadactylrc
 
--- a/vimperatorrc	Thu Sep 11 23:14:59 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,70 +0,0 @@
-" Config for Vimperator
-
-let mapleader=","
-
-" Scroll faster
-nnoremap h 3h
-nnoremap j 3j
-nnoremap k 3k
-nnoremap l 3l
-
-" Scroll easier
-nnoremap d <C-d>
-nnoremap e <C-u>
-
-" Close tab with `x` since `d` is for scrolling down now
-nnoremap x :bd<cr>
-
-" Change tabs without awkward `CTRL` combinations
-nnoremap J :tabprevious<cr>
-nnoremap K :tabnext<cr>
-
-" Reorder tabs
-nnoremap > :tabmove +1<cr>
-nnoremap < :tabmove -1<cr>
-
-"New tab using the old classic way
-nnoremap <C-t> :tabnew<cr>
-
-" Use `i` to get into a persistent insert mode,
-" and `I` for the quick one.
-nnoremap i <S-Esc>
-nnoremap I i
-
-" Shortcuts for common extensions
-nnoremap <leader>f i<D-\>
-nnoremap <leader>p <S-Esc><A-D-\>
-nnoremap <leader>b I<A-b>
-
-" Quickly hide search highlighting
-nnoremap <leader><Space> :noh<cr>
-
-" Quickly open some dialogs
-nnoremap <leader>b :downloads<cr>
-
-" Super minimal UI
-"set toolbars=noaddons,nobookmarks,nomenu,nonavigation,notabs
-
-" Websites with useful keyboard shortcuts already
-ignorekeys add -except=:,J,K,b fastmail.fm
-ignorekeys add -except=:,J,K,b feedly.com
-ignorekeys add -except=:,J,K,b mnmlrdr.com
-ignorekeys add -except=:,J,K,b newsblur.com
-
-" The new Firefox fucked up vimperator's ability to hide
-" things. Let's do it ourselves for now.
-map <silent> <F2> :js toggle_ui()<CR>
-
-:js << EOF
-function toggle_ui() {
-    var nb = document.getElementById('nav-bar');
-    nb.style.visibility = (nb.style.visibility == '') ? 'collapse' : '';
-    nb.style.overflow = (nb.style.height == '') ? '' : 'hidden';
-
-    var tb = document.getElementById('TabsToolbar');
-    tb.style.visibility = (tb.style.visibility == '') ? 'hidden' : '';
-    }
-toggle_ui();
-EOF
-
-" vim: ft=vim