Skip to content

ardagnir/pterosaur

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pterosaur

Pterosaur is a Pentadactyl/Vim extension that gives you the full power of Vim in each Firefox text field.

Demo

Pterosaur is at more of an alpha/proof-of-concept stage right now, but it's already somewhat useful.

##Requirements

  • Pterosaur requires Pentadactyl and Vim(compiled with +clientserver).
  • Pterosaur assumes you are using Linux. It might work on OS X.

##Setup Step 1: Install pterosaur using your Vim plugin-manager. For pathogen-compatible managers:

cd ~/.vim/bundle
git clone http://github.com/ardagnir/pterosaur

Step 2: Add pterosaur.js to ~/.pentadactyl/plugins/

mkdir ~/.pentadactyl/plugins
cd ~/.pentadactyl/plugins
ln -s ~/.vim/bundle/pterosaur.js pterosaur.js

Step 3: Pterosaur's full-vim editing is disabled by default. Type :set fullvim in firefox to enable it.

Step 4: Your default vim setup will need a mapping to get out of vim's insert mode, since <ESC> is handled by pentadactyl (and currently broken). If you haven't set up something like inoremap kj <ESC>, you might want to consider it. This mappping alone will change your life.

##How it works Pterosaur runs an actual vim instance in the background and routes keystrokes through vim.

##Bugs

  • Escape leaves textboxes while in insert mode, but does nothing in normal mode.
  • Some editors (like github outside of zen-mode) do weird things with text that make text manipulation difficult. Usually, pterosaur will fail into normal(vimless) text entry, but for some types of weirdness it will completly refuse to enter text at all.
  • If you map another key to /, :, or ? in vim's normal mode, pterosaur won't show you the ex command you are typing until you hit enter.
  • The code to handle multiple windows is hacky. If you create multiple windows at the same time, pterosaur might break and lose some of your keys.
  • Mouse support is limited. Currently, you can click anywhere in a textbox to move the cursor there in insert mode. Eventually, mouse selection will be supported as well.

##Troubleshooting

  • If you can't enter text in fullvim mode, make sure the vim server is running. Type vim --serverlist at the commandline. You should see a PTEROSAUR server.
  • If :set usevim doesn't even work in pentadactyl, there's a problem on the pentadactyl side. Type :messages in pentadactyl and it should tell you the error.

##License AGPL v3

About

All firefox text fields are vim.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published