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
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.
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.
Firefox addon
Source code and latest development releases are hosted at Github:
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.
Focus TEXTAREA and press Ctrl+Enter
.
To quit wasavi press ZZ
or :q
or :wq
or any other VI quit command.
:set
command?See this table.
Note: there are also options which are accepted but don't have any effect yet.
Open preference wasavi extension (or enter :options
on wasavi),
and edit "exrc" textbox.
Add set noerrorbells
to your exrc to disable beep sound. If you prefer a visual bell, add set visualbell
instead.
Also, a chime at wasavi startup can be disabled with set nolaunchbell
.
The volume of any beeps can be controlled with set bellvolume=N
. Range of value N is 1 to 100.
See document.
Put wasavi_mediator.js in your Vimperator plugin directory, for example, ~/.vimperator/plugin
or %HOME%\vimperator\plugin
.
This plugin will control the pass-through mode of Vimperator according to the state of wasavi.
Put wasavi_mediator.ks.js in your Keysnail plugin directory.
This plugin will control suspend mode of Keysnail according to the state of wasavi.
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.
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.
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.
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.
Please create an issue on wasavi issue tracker
:set fullscreen
or :set fs
:set nofullscreen
or :set nofs
:set theme=blight
or :set theme=charcoal
or :set theme=matrix
or :set theme=solarized
or :set theme=solarized_dark
: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
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
.j
k
^
$
moves cursor by physical row, on the other hand,
gj
gk
g^
g$
moves by wrapped row. To swap the behavior: :set jkdenotative
f
F
t
T
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.f
F
t
T
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.: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.:read dropbox:/hello.txt
.B
register: user agent stringD
register: current date time string (formatted by using datetime
option as template of strftime(3))T
register: title stringU
register: URL stringW
register: version string of wasavi:set <option-name>&
or :set <option-name>&default
:set all&
or :set all&default
:set <option-name>&exrc
:set all&exrc
:wqs
:submit
(this can be shortened to :sub
):
ex-commandc
y
d
>
<
gq
gu
gU
cc
yy
dd
>>
<<
C
Y
D
gqq
guu
gUU
yss
ySS
A counter can be inserted in front of the last 1 character.
ys
yS
ds
cs
-
+
^
<home>
$
<end>
%
|
,
;
_
/
?
'
`
(
)
{
}
[[
]]
<enter>
0
j
k
h
l
^N
^P
^H
<down>
<up>
<left>
<right>
<space>
w
W
b
B
e
E
gg
gj
gk
g^
g$
G
H
M
L
f
F
t
T
n
N
a"
a'
a`
a[
a]
a{
a}
aB
a<
a>
a(
a)
ab
aw
aW
ap
as
at
i"
i'
i`
i[
i]
i{
i}
iB
i<
i>
i(
i)
ib
iw
iW
ip
is
it
^U
^D
^Y
^E
^B
^F
<pageup>
<pagedown>
z<enter>
z.
zz
z-
x
X
<delete>
p
P
J
.
u
^R
~
^L
^G
ga
gv
m
@
q
r
R
a
A
i
I
o
O
&
s
S
v
V
ZZ
gi
^A
^X
abbreviate
cd
chdir
copy
delete
edit
file
filesystem
global
join
k
map
mark
marks
move
options
print
put
pwd
quit
read
redo
s
&
~
set
sort
submit
registers
to
unabbreviate
undo
unmap
version
v
write
wq
wqs
xit
yank
>
<
@
*
The addressing in ex command is fully supported:
%s/re/rep/
.p
$p
1,2p
+1,+2p
/re/p
?re?p
'a,'bp
In addition to this wasavi also accepts offset, for example: /re/+1p
.
Two addresses are usually connected by a ,
, wasavi also supports ;
.
^@
input the most recently input text, and exit input mode. this key stroke is actually Ctrl+Space
.^D
unshift. but if the last input character is 0
or ^
, delete all indentation^H
delete a character^R
paste register's content^T
shift^U
delete all the characters entered in the current input session^V
literal input^W
delete a word^A
move cursor to top of line^B
back^E
move cursor to end of line^F
forward^H
delete a character^N
next history^P
previous history^R
paste register's content^U
delete whole line^V
literal input^W
delete a wordtab
complete ex command name, set option name, file name argument of read/edit/write/fileBound mode is similar to vim's visual mode.
c
delete the bound, and switch to insert moded
delete the boundy
yank the bound<
unshift the bound>
shift the boundC
delete the line-wise bound, and switch to insert modeS
surround the boundR
same as C
D
delete the line-wise boundX
same as D
Y
yank the line-wise boundg
prefix commandsa
, i
prefix range symbols~
swap lower case and upper case in the bound:
switch to line input modeJ
join the boundp
delete the bound, and paste a register's contentP
same as p
r
fill the bound up with inputted letters
same as c
u
lower-ize the boundU
upper-ize the boundv
character wise bound modeV
line wise bound modex
same as d
^A
add the counter to all numeric strings within the bound^X
subtract the counter to all numeric strings within the bound!#$%&*+,\-.:;=?@^_|~"'`
abBrt[]{}()
!#$%&*+,\-.:;=?@^_|~"'`
abBr[]{}()
^T
,<Tt
"
unnamed register:
last executed ex command*
reading from and writing to the system clipboard/
last searched string=
evaluate math expression. supported operators are: +
-
*
/
%
. supported numeric expressions are: integer, float (including exponential form), binary (with leading 0b
), octal (with leading 0), hex (with leading 0x
)iskeyword
, incsearch
, smartcase
, undolevels
, quoteescape
, relativenumber
, textwidth
, expandtab
, cursorline
, cursorcolumn
, nrformats
gu
/ gU
+ motion: lowerize or upperize a region:sort
(regex pattern, r
and i
options)^A
to increase a numeric string. ^X
to decrease a numeric string.