# emacs-like key bindings for pentadactyl



## jrm@ (Nov 25, 2011)

I've tried some of the lighter browsers like www/surf, www/xxxterm, www/midori and www/conkeror and also www/chromium and www/opera, but for a variety of reasons have returned to using www/firefox.  Two addons that I find useful are adblock and pentadactyl.  Pentadactyl borrows from projects like vi(m) and conkeror to make (near)-mouse-free web browsing doable.  It also has a flash blocking feature like the flashblock addon. If you prefer emacs-like keybindings, I've included what I've come up with so far.  Maybe it's useful for someone.  Suggestions are welcome.

EDIT: See attachement below for the key bindings.


----------



## jrm@ (Nov 25, 2011)

I've just learned that *noremap is being deprecated, so here is an update.  You can just pop the attached file in ~/.pentadactyl/plugins/.  I added the .txt extension because the forum software wouldn't let me upload with the original name.


----------



## Zauron (Dec 9, 2011)

That's my setup also, chromium is blazing fast and user friendly but adblock do not match firefox one and no vi plugin as advanced as pentadactyl.

I just use one more firefox plugin https everywhere.

Thanks for emacs key bindings.


----------



## purgatori (Dec 28, 2011)

Thanks for sharing this with us, but attempting to use it results in a syntax error: 'missing ; before statement.'

I oscillate between using Opera and Conkeror at the moment. I've setup Opera so that it uses Emacs-like bindings, but the limitations of the interface make it impossible to reproduce Emacs' flexibility. Conkeror, on the other hand, has no such limitations, but the version of Xulrunner that it is built against on FreeBSD is ancient, creaking, and sloooow 

It would be nice if there were an adequate solution on Firefox proper, but Firemacs and Keysnail are hopeless, and I find Pentadactyl very difficult to customize -- which is why I haven't come up with my own set of Emacs bindings for it. Being Vimmers, they probably don't _want_ you to Emacsify their addon


----------



## jrm@ (Dec 29, 2011)

purgatori said:
			
		

> Thanks for sharing this with us, but attempting to use it results in a syntax error: 'missing ; before statement.'



Hmm... Are you using a recent version of pentadactyl?  Try installing hg6703.  I make changes from time to time, so you can grab the latest emacs.penta here: http://gly.ath.cx/misc/emacs.penta.



			
				purgatori said:
			
		

> Being Vimmers, they probably don't _want_ you to Emacsify their addon



On the contrary.  I spent hours chatting with the developers on irc and they were extremely helpful.  In fact, they were the ones who suggested I make the plugin.  They call them plugins - you put them in ~/.pentadactylrc/plugins/ - but it's really just a config file.


----------



## purgatori (Dec 30, 2011)

jrm said:
			
		

> Hmm... Are you using a recent version of pentadactyl?  Try installing hg6703.  I make changes from time to time, so you can grab the latest emacs.penta here: http://gly.ath.cx/misc/emacs.penta.
> 
> 
> 
> On the contrary.  I spent hours chatting with the developers on irc and they were extremely helpful.  In fact, they were the ones who suggested I make the plugin.  They call them plugins - you put them in ~/.pentadactylrc/plugins/ - but it's really just a config file.



I was running RC1 (the latest 'stable' version), but I switched to hg6703, and now it seems to work fine... except all the tabs disappear  Is this the intended behavior? If so, what option do I need to edit in order to turn tabs back on?


----------



## jrm@ (Dec 30, 2011)

Yeah, that's intended to save precious screen real estate.  You can do what you do in emacs to show/switch buffers (tabs): 
	
	



```
C-xC-b.
```
  If you want the firefox tabs back you can edit the line with 
	
	



```
go=bCs.
```
 The go stands for Gui Options. For details do 
	
	



```
C-xC-h
```
 and click the options link.


----------



## Zauron (Dec 31, 2011)

The only thing missing would be a C-r C-s when searching for an url. but I doubt it's feasible (but that would be awesome)


----------



## jrm@ (Dec 31, 2011)

Zauron said:
			
		

> That's my setup also, chromium is blazing fast and user friendly but adblock do not match firefox one and no vi plugin as advanced as pentadactyl.
> 
> I just use one more firefox plugin https everywhere.
> 
> Thanks for emacs key bindings.



The https plugin sounds interesting in certain scenarios.  Aside from pentadactyl, one reason I prefer firefox to chromium is the privacy features.  For example, with data syncing, firefox encrypts everything before sending it to their servers, whereas chromium does not.


----------



## purgatori (Jan 18, 2012)

jrm said:
			
		

> Yeah, that's intended to save precious screen real estate.  You can do what you do in emacs to show/switch buffers (tabs):
> 
> 
> 
> ...



Thanks for that. In the end, though, I went back to Conkeror. Despite running on top of an old version of Xul, Conkeror was still faster on my cruddy old system than Firefox 8. I'm also more familiar and comfortable with the Conkeror/emacs-w3m interpretation of Emacs bindings for web-browsing.


----------



## jrm@ (Jan 18, 2012)

purgatori said:
			
		

> Thanks for that. In the end, though, I went back to Conkeror. Despite running on top of an old version of Xul, Conkeror was still faster on my cruddy old system than Firefox 8. I'm also more familiar and comfortable with the Conkeror/emacs-w3m interpretation of Emacs bindings for web-browsing.



Whatever works best for you.  You can quite easily modify these keybindings to whatever you like, but I won't argue with firefox bloat.


----------



## segfault (Jan 18, 2012)

Currently forcing myself to learn emacs just after switching to the Awesome WM and have been dreaming of going completely mouse-less on my laptop. The only thing I currently use the mouse for is browsing. But with this I can finally turn old mickey loose and free up a hand for some full on keyboard-input-only efficiency.
Thank you for this.


----------



## jrm@ (Jan 25, 2012)

Zauron said:
			
		

> The only thing missing would be a C-r C-s when searching for an url. but I doubt it's feasible (but that would be awesome)



@Zauron, if I understand you correctly, you want to restrict your text search to URLs.  You can do this with (emacs keybindings) 
	
	



```
C-s blah\l.
```

If you have pentadactyl installed see here: dactyl://help/pattern.


----------

