forked from akahuku/wasavi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME.md.en
203 lines (132 loc) · 6.63 KB
/
README.md.en
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
wasavi (VI editor for any web page)
====================================
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 underdevelopment. Any bug report or feature request is welcomed.
A Quick Walkthrough
====================
* Here is a native TEXTAREA
![native textarea](http://appsweets.net/wasavi/wasavi_native_textarea.jpg)
* Focus the TEXTAREA, and press `Ctrl+Enter` to launch wasavi
![wasavi running](http://appsweets.net/wasavi/wasavi.jpg)
Salient Features
----------------
* wasavi supports some ex commands. This is the output of `:set all`
![set all](http://appsweets.net/wasavi/wasavi_set_all.jpg)
* Vim's incremental search
![incremental search](http://appsweets.net/wasavi/wasavi_incremental_search.jpg)
* [wasavi online app](http://wasavi.appsweets.net/). Open this link on a browser that has wasavi extension. wasavi will launch automatically. Then you can read and write files at your Dropbox account.
![stand alone](http://appsweets.net/wasavi/wasavi_stand_alone.png)
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.
* [Google Chrome extension](https://chrome.google.com/webstore/detail/dgogifpkoilgiofhhhodbodcfgomelhe)
* [Opera addon](https://addons.opera.com/en/extensions/details/wasavi/)
* [Firefox addon](https://addons.mozilla.org/en-US/firefox/addon/wasavi/)
Latest development releases can be downloaded from [this link](http://appsweets.net/wasavi/).
Source code is hosted at [Github](https://github.com/akahuku/wasavi).
### A note for Opera users
Opera does not support DOM3 Composition Event therefore input via IME is not available.
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.
## How to use wasavi with Vimperator on Firefox
Put [wasavi_mediator.js](https://raw.github.com/akahuku/wasavi/master/mediators/vimperator/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.
On [wasavi online app](http://wasavi.appsweets.net/), enter `:ignorekeys add ^http://wasavi\\.appsweets\\.net/` in Vimperator. Then Vimperator will always use pass-through mode for the online app. `ignorekeys` settings is stored automatically therefore you will not have to reenter it.
## How to use wasavi as an independent text editor
Install wasavi extension and open the link to [wasavi online app](http://wasavi.appsweets.net/). wasavi will start automatically. You can use ex commands `:read`, `:write`, `:edit` or `:file` to access your Dropbox files. You will have to authorize wasavi via OAuth to access Dropbox.
## I Have noticed a bug
Please create an issue on [wasavi issue tracker](http://github.com/akahuku/wasavi/issues)
Tips and Tricks
===============
* 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`
* to modify initial settings:
open preference wasavi extension (or enter `:options` on wasavi), and edit "exrc" textbox.
* 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.
* 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.
+ `: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.
* 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 '漢'.
Commands implemented
====================
* [count] operation [count] motion
* [count] operation [count] range-symbol
* [count] operation-alias
* [count] motion
* [count] scroll-command
* [count] edit-command
* : ex-command
Operations
----------
c y d > < gq
Operations Aliases
------------------
cc yy dd >> << C Y D gqq
Motion
------
- + ^ <home> $ <end> % | comma(,) ;
_ / ? ' ` ( ) { } [[ ]] <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$ gi G H M L f F t T n N
Vim text objects (range symbol)
* a" a' a` a[ a] a{ a} aB a< a> a( a) ab aw aW ap as
* i" i' i` i[ i] i{ i} iB i< i> i( i) ib iw iW ip is
Scroll commands
---------------
^U ^D ^Y ^E ^B ^F <pageup> <pagedown> z<enter> z. zz z-
Edit commands
-------------
x X <delete> p P J period( . ) u ^R ~ ^L ^G m @ q r R a A i I o O & s S ZZ
ex commands
-----------
abbreviate copy delete edit file global join k map mark marks move options print put quit read redo s & ~ set registers to unabbreviate undo unmap version v write wq xit yank > < @ *
ex commands to specify address are fully supported.
absolute line number, relative line number, regal expression.
wasavi also accepts offset.
Input mode commands
-------------------
^@ ^D ^H ^T ^U ^V ^W
^@ is actually `ctrl+space`.
^D accepts the last ^ and 0.
Line input mode commands
------------------------
* ^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
* ^U: delete whole line
* ^V: literal input
* ^W: delete a word
Vim features in wasavi
----------------------
* multiple level undo/redo
* incremental search
* range symbols (aka, Vim text objects)
* register `"`, `:`, `*`, `/` (`*` is used to access system clipboard)
* auto-reformat in input mode, and reformat operator (gq command) on the
state of textwidth > 0
* options: iskeyword, incsearch, smartcase, undolevels, quoteescape,
relativenumber, textwidth