wasavi is an extension for Chrome, Opera and Firefox. wasavi transforms TEXTAREA element of any page into a VI editor, so you can edit the text in VI. wasavi supports almost all VI commands and some ex commands.
wasavi is under development. Any bug report or feature request is welcome.
And we also welcome a donation to continue development:
Here is a native TEXTAREA. Focus the TEXTAREA, and press Ctrl+Enter to launch wasavi
Salient Features
wasavi supports some ex commands. This is the output of :set all
Vim's incremental search
wasavi online app. Open this link on a browser that has wasavi extension. wasavi will launch automatically. Then you can read and write files at your Dropbox/Google Drive/OneDrive account or local files.
How to install
Currently, wasavi is available for following browsers only. Select your browser and click the link. Standard extension installation procedure of your browser will follow. These extensions are hosted at the addons store of their respective browser.
Chrome has reserved some fundamental shortcuts, such as Ctrl+T, Ctrl+W and Ctrl+N. Although these keys cannot be used in wasavi, you can use Alt+T, Alt+W and Alt+N.
Frequently Asked Questions
How to launch wasavi
Focus TEXTAREA and press Ctrl+Enter.
How to quit wasavi
To quit wasavi press ZZ or :q or :wq or any other VI quit command.
This plugin will control suspend mode of Keysnail according to the state of wasavi.
VimFx
Latest VimFx recognizes wasavi as editable element. While wasavi is running, VimFx suspends temporarily.
To use VimFx's key binding while wasavi is running, click outside area of wasavi or enter :set esctoblur and press <esc> in normal mode. Then keyboard focus would be removed from wasavi, and you can use VimFx's key binding.
How to use wasavi as an independent text editor
Install the wasavi extension and open the link to wasavi online app. wasavi will start automatically. You can use ex commands :read, :write, :edit or :file to access your Dropbox/Google Drive/OneDrive files or local files. You will have to authorize wasavi via OAuth to access these storages.
About automatic setting override
The :set commands which you input while wasavi is running are stored to extension's persistent storage, and those are regenerated when you launch wasavi next time.
This setting override mechanism works each independent URLs (max 30). If you think this is unnecessary, put :set nooverride in your exrc. Then overriding will be skipped.
How to cooperate with Migemo
wasavi for Chrome can Migemo search. Install Migemo Server, then input a special meta character \M in search query of / or ? command. If \M included in search query, these search commands are executed via migemo.
to maximize the wasavi: :set fullscreen or :set fs
to restore the wasavi: :set nofullscreen or :set nofs
to change a color theme: :set theme=blight or :set theme=charcoal or :set theme=matrix or :set theme=solarized or :set theme=solarized_dark
abbreviate syntax is
:abbreviate displays all the abbreviations currently registered.
:abbreviate [clear] clears all the abbreviations.
:abbreviate lhs displays the abbreviation corresponding to lhs.
:abbreviate lhs rhs registers a abbreviation which expands lhs to rhs.
:abbreviate [noremap] lhs rhs also registers, but it is not effected remap mechanism.
map syntax is
:map displays all the mappings currently registered.
:map [clear] clears all the mappings.
:map lhs rhs registers a rule which translates lhs to rhs. Its translation is recursive. About syntax of key stroke descriptor like <esc> in the lhs and rhs, see this page.
:map [noremap] lhs rhs also registers, but it is non-recursive.
:map targets the normal mode mappings. On the other hand,
:map! targets the insert mode. This is equivalent to vim's :imap.
jk^$ moves cursor by physical row, on the other hand,
gjgkg^g$ moves by wrapped row. To swap the behavior: :set jkdenotative
fFtT extension for Japanese: these commands recognizes reading (ro-ma ji
expression) of hiragana, katakana, and kanji. For example, fk will place
a cursor on 'か', 'カ', '漢' and so on.
fFtT extension for Latin script: these commands recognizes the base alphabet
of diacritical marked letter. For example, fa will place a cursor on
'å', 'ä', 'à', 'â', 'ā' and so on. Also see mapping table.
use a online storage as file system:
:filesystem status shows all file systems currently available.
:filesystem default shows default file system. You can set default file system
via :filesystem default dropbox or :filesystem default gdrive or :filesystem default onedrive.
:filesystem reset discards the access token for online storage.
You can place the file system name at the head of a file name explicitly:
for instance, :read dropbox:/hello.txt.
When you read from the register of A to Z, some registers returns special content:
B register: user agent string
D register: current date time string (formatted by using datetime option as template of strftime(3))
T register: title string
U register: URL string
W register: version string of wasavi
To return a setting to default state:
:set <option-name>& or :set <option-name>&default
To return all settings to default state:
:set all& or :set all&default
To return a setting to the state just after evaluation of exrc:
:set <option-name>&exrc
To return all settings to the state just after evaluation of exrc:
:set all&exrc
To submit a form automatically after writing text and closing wasavi:
请发表评论