Wasavi is some sort of vim implementation for browser text fields.
- Chrome extension: https://chrome.google.com/webstore/detail/wasavi/dgogifpkoilgiofhhhodbodcfgomelhe
- home page: http://appsweets.net/wasavi/
Once installed go to https://play.golang.org, you can use INSERT or CTRL+ENTER to enter the vim mode. To quit use the usual vim commands.
Tips:
- The default keybinding to enter vim mode, CTRL+ENTER, conflicts with the standard playground shortcuts (CTRL+ENTER to format, SHIFT+ENTER to run). I recommend configuring wasavi to not enter vim mode on CTRL+ENTER (just use INSERT or configure something else)
- Once you remapped CTRL+ENTER, you can have the following workflow:
- Enter vim mode (INSERT)
- Make changes, :wq
- Run or auto-format using the playground's default SHIFT+ENTER or CTRL+ENTER shortcuts
- Re-enter vim mode (INSERT)
Recording macros even seems to work. The most annoying thing so far has been that dots are seen as part of words and I'm not used to that, if anyone finds a way to fix that let me know.
Obviously wasavi works on other web pages as well.
For more Go banter see my blog https://garbagecollected.org/ or follow me on Twitter.