Repository navigation
Releases
v0.4.2
VimText 0.4.2: the command line and the Cursor on contenteditable editors
VimText gives Vim's modal editing to the text fields of ordinary web pages
(textarea, single-line text inputs and contenteditable editors), editing
the page's own field in place: no native host, no replacement editor.
Chrome only.
Install: https://chromewebstore.google.com/detail/vimtext/egfolppakllammjdjnpbajpioigchbkp
Source, issues, design and the accepted limitations: https://github.com/Kyu-seok/VimText
What is new since 0.4.1:
The Cursor on contenteditable editors
- VimText now draws the Normal-mode Cursor itself: the character under it
shows inverted, and the page's own selection stays a caret. A site's
selection toolbar no longer opens over every Normal move, and Notion no
longer shows an opaque box over the character. - Esc with the caret at a line's end puts the Cursor on the last character,
not one past it. This holds on textarea and input too.
The command line (: / ?)
- Esc in the command line closes it.
- Closing it on a contenteditable editor leaves the Cursor where it was.
- A command whose Enter ends in a message (a search that finds nothing, an
unknown command, :w) gives the field focus back, so the next key is
Vim's. - A click elsewhere while the command line is open stands: the field does
not take focus back, and the Status Line hides. - Notion: after the command line closes, keys act on the block again; they
were typed into the page. - Notion: : typed right after a cursor move keeps the command line open.
Elsewhere
- The Status Line shows over a modal dialog or popover its field sits in.
- Esc pressed before VimText's settings have loaded Activates the field
even on a page that blurs the field on Esc (Lexical).
Known limits added
- Esc in a : command line opened from Visual closes it and leaves the
field in Visual, where Vim returns to Normal. Press Esc once more.
The full list is under "Accepted limitations" in DESIGN.md.
v0.4.1
VimText 0.4.1: fixes for contenteditable editors
VimText gives Vim's modal editing to the text fields of ordinary web pages
(textarea, single-line text inputs and contenteditable editors), editing
the page's own field in place: no native host, no replacement editor.
Chrome only.
Install: https://chromewebstore.google.com/detail/vimtext/egfolppakllammjdjnpbajpioigchbkp
Source, issues, design and the accepted limitations: https://github.com/Kyu-seok/VimText
What is new since 0.4.0:
Fixes
- Notion: o, O, a linewise p and u of J now work inside a block. 0.4.0
listed them as refused; when a page refuses a line break, VimText now
offers it once more the way Shift+Enter would. - After cw, s or another change on a bold or italic word, the text you
type keeps the formatting of the text it replaced; a after a bold word
types bold, i before one types plain, as typing there would. - :q, :wq and :x on a contenteditable editor leave nothing highlighted,
and clicking back in resumes Normal on the same character. - Enter in Normal on a single-line editor (aria-multiline="false") whose
page does not handle Enter no longer inserts a line break over the
cursor's character. The page's own Enter handling still runs.
Look
- The toolbar and chrome://extensions icons match the store icon.
Known limits added
- On Quill and Gmail, cw on the first word of a bold run types plain:
Chrome types there in the style before the run. - A formatting shortcut such as Cmd+B pressed while an edit is still
landing (typed within about 60 ms of o or A) can apply to nothing, or to
the wrong text. The text itself is always kept.
The full list is under "Accepted limitations" in DESIGN.md.
v0.4.0
VimText 0.4.0: contenteditable editors
VimText gives Vim's modal editing to the text fields of ordinary web pages
(textarea, single-line text inputs and now contenteditable editors),
editing the page's own field in place: no native host, no replacement
editor. Chrome only.
Install: https://chromewebstore.google.com/detail/vimtext/egfolppakllammjdjnpbajpioigchbkp
Source, issues, design and the accepted limitations: https://github.com/Kyu-seok/VimText
0.4.0 closes M4. What is new since 0.3.0:
contenteditable editors
- The rich-text boxes of sites such as Gmail, Slack and Notion are fields.
Press Esc in one and it is under Vim, as a textarea is. Each editor is one
field; its text is the editor's text without the formatting. - VimText's edits go through the editor: each one is offered to the editor
first, as the editor's own typing would be, so the editor's model takes
it. ProseMirror, Lexical, Slate and Quill are covered by tests against
pinned builds of each, which check the editor's model, not only the page. - A mention chip, an inline image or another non-editable island counts as
one character: motions step over it, x and dw delete it whole, and a yank
stores its visible text (@alice, an image's alt text). - In a multi-line editor Enter in Normal is Vim's motion, so a chat box
sends with Enter in Insert or Cmd/Ctrl+Enter. An editor that declares
itself single-line (aria-multiline="false") follows the single-line
input rules. - On a field taller than the window the Status Line stays in view.
- Keys typed while an edit is still landing (the text after o or cw) are
kept and land with it.
Every field
- When a page refuses an edit (puts its text back), the page's text stays,
VimText follows it, and the Status Line says the page refused the edit.
This holds on textarea and input too.
Known limits on contenteditable editors
- VimText edits the text and leaves the formatting to the editor. Yank and
put carry plain text, never formatting; Cmd+V keeps the editor's own rich
paste. Text written at the end of a formatted run takes that formatting,
as typing there would. - u restores the text, not always its formatting: a character put back at
the start of a bold run comes back plain, and an undone line join can
leave a line in another kind of block. - A mention chip or inline image comes back from u only while VimText
still holds it (the last 200 removed in that field). On Lexical, u after
deleting one restores the text around it, without the chip or image. - VimText's edits are in the editor's own undo history too, so Cmd+Z in
Insert can undo them; VimText catches up on the next key. - Notion makes each block its own editor, so each block is a field and j
and k stop at its edge. - On Notion, o, O, a linewise p and u of J inside a block are refused:
Notion takes no line break VimText writes. The Status Line says so;
Enter in Insert makes a new block as usual. - Display-line motions and scrolls approximate on mixed fonts and sizes.
- On an editor without a pinned test, VimText sees only the page's text,
so an edit the editor's model did not take can go unnoticed. - An editor inside a closed shadow root is out of reach.
The full list is under "Accepted limitations" in DESIGN.md.
Still true in 0.4.0
- Chrome only. Firefox is untested and not submitted.
- Canvas editors such as Google Docs are out of scope; password fields
never. - A field starts in Insert mode and is the page's own until you press Esc
or Ctrl+[ on it. In Insert mode IME, autocomplete and the site's own
handlers work as before; only Esc, Ctrl+[, Ctrl-o, Ctrl-r, Ctrl-u and
Ctrl-w are Vim's there. - No hlsearch highlighting (n and N work). Scroll commands (Ctrl-d/u/f/b,
zz zt zb) approximate. Display-line motions approximate on unusual fonts.
Visual block highlights only the primary range. - A mapping whose prefix is itself a bound key (nnoremap x dd while
is l) never fires: the engine takes the full match at once rather
than waiting like Vim's timeoutlen. Map from an unbound prefix such as . - The privacy policy is unchanged.
Bugs and questions: https://github.com/Kyu-seok/VimText/issues
v0.3.0
VimText 0.3.0: on the Chrome Web Store, with clipboard registers, Session State across tabs, and the surround and targets Plugins
VimText gives Vim's modal editing to the text fields of ordinary web pages
(textarea and single-line text inputs), editing the page's own field in
place: no native host, no replacement editor. Chrome only.
Install: from the Chrome Web Store once its review passes; the README links the store page.
Source, issues, design and the accepted limitations: https://github.com/Kyu-seok/VimText
0.3.0 is the first version on the Chrome Web Store. It closes M3. What is
new since 0.2.0:
Clipboard registers
- "+ is the system clipboard: "+p reads it; "+y, "+d and "+c write it. "*
is an alias of "+. The unnamed register never touches the clipboard. - The clipboard is read only for a "+ or "* paste and written only when a
yank, delete or change stores text into "+ or ". A denied read shows a
message on the Status Line and leaves the text alone. A plain http://
page has no clipboard API, so every "+ and " command beeps there, with
a message.
Session State across tabs
- Registers (the macros they hold included), search and command history
and the last f/t search are shared by every field in every tab for as
long as the browser runs. They live in Chrome's session storage and are
gone when the browser closes. - Two tabs changing a register at the same moment: the last write wins;
nothing is merged. - Marks, undo history and the jump list stay with the field they belong to.
vimrc
- The options page lists each failing line of a saved vimrc, with the
engine's message, under the text box. A clean vimrc lists nothing. - The saved vimrc is the whole truth about your mappings. Every Activation
clears the user mappings and runs it again, so a mapping you delete is
gone at the next Activation in every tab instead of lingering until a
restart.
Plugins (off by default; switched on in the options page, effective at the
next Activation in every tab)
- surround (modelled on vim-surround): ys{motion}{char}, yss{char},
cs{old}{new}, ds{old} and Visual S{char}; the four bracket pairs with
the aliases b r B a (the opening character adds inner spaces, the closing
one does not) and the three quotes; any other character wraps literally.
. repeats ys, cs and ds with the same characters. Macros record and
replay them. - targets (modelled on targets.vim): i( a( i" a" and friends Seek the next
pair or quote when the cursor is not inside one; the n and l prefixes
(cin(, dil", vin(); the argument objects ia and aa. - A vimrc mapping on a key a Plugin also binds wins, as your vimrc beats a
plugin's default maps in Vim. - Not in this version: surround's tag and function targets (ysiw,
cst, dst), yS ySS cS gS and Insert-mode Ctrl-s; targets' separator
objects, I/A, any-block ib and any-quote iq. Known differences from the
upstream plugins: a key VimText is holding while it waits for the rest of
a Plugin sequence (the d of ds) does not show on the Status Line until
the sequence resolves; Visual S is not .-repeatable; targets ranks its
Seek candidates as if every line were on screen, so a next object below
always beats a last object above; a pair whose brackets end and start
lines of their own is charwise (ci{ leaves {}). The full list is under
"Accepted limitations" in DESIGN.md.
Release
- The zip attached to this Release is what the store received, built from
this tagged commit by the release workflow. - The privacy policy ships with this version: PRIVACY.md in the repository,
linked from the store page. In short: no analytics, no network requests,
no remote code. Settings (Site Policies, the vimrc, the Plugin toggles)
are carried by Chrome Sync when you have it on and otherwise stay on
this device. The clipboard is touched only by "+ and "* commands.
Registers and history are Session State in session storage, gone when
the browser closes. The content script runs on every http and https page
and frame, because nothing else could hear the Esc that Activates a
field, but it reads only the field you Activated. A change to the policy
ships with a new version and is noted in that version's release notes. - The README describes a public install: Install leads with the store
link, load-unpacked lives under Develop.
Still true in 0.3.0
- Chrome only. Firefox is untested and not submitted.
- textarea and the text, search, url, email and tel inputs, in the top
page and in embedded frames, on plain pages and on pages whose framework
rewrites the value (React controlled inputs, masks). contenteditable
editors (Gmail, Slack, Notion, Reddit's rich-text composer) are the next
milestone; canvas editors such as Google Docs are out of scope; password
fields never. - A field starts in Insert mode and is the page's own until you press Esc
or Ctrl+[ on it. In Insert mode IME, autocomplete and the site's own
handlers work as before; only Esc, Ctrl+[, Ctrl-o, Ctrl-r, Ctrl-u and
Ctrl-w are Vim's there. - No hlsearch highlighting (n and N work). Scroll commands (Ctrl-d/u/f/b,
zz zt zb) approximate. Display-line motions approximate on unusual fonts.
Visual block highlights only the primary range. - A mapping whose prefix is itself a bound key (nnoremap x dd while
is l) never fires: the engine takes the full match at once rather
than waiting like Vim's timeoutlen. Map from an unbound prefix such as .
Bugs and questions: https://github.com/Kyu-seok/VimText/issues