Item logo image for Vi Editing Mode

Vi Editing Mode

Item media 1 screenshot

Overview

Automatically and non-intrusively add a vi editing mode to all textareas/inputs. Behaviour is unchanged until you hit Escape.

Automatically and non-intrusively add a vi editing mode to all textarea/input elements on pages, so you can use vim keys/shortcuts to edit and navigate text. Inputs/textareas keep working as they normally do (like insert mode, handled by the browser), hitting "escape" enables command mode on the focused element, indicated with a box-shadow. Features: - Simple, automatic, non-intrusive vi editing. - Command, visual and visual-line modes. - Plenty of commands/keys (but please contribute more!) - Multi-level undo and redo. - Repeat. - The tab key inserts literal tabs after having been in command mode, until the element loses focus. - Only basic addon permissions needed. (clipboard read/write permission requested on first use). Non-goals: - vi-like keys for other browser behaviour, like navigating on a page or the internet. - Full-blown vi/vim editor (not all commands are needed, it doesn't have to look like a standalone vi/vim, it would be too much for an input element). - Marks, tags, macros, registers, custom key mappings and other advanced features. # Limitations Since vi.js uses basic textarea/input elements, it inherits some limitations/behaviour: Textareas don't expose whether text (e.g. the selection) is visible in the viewport. This limits how vi.js can implement some commands/motions. Insert mode is handled by the browser (with the exeception of Tab, which can insert a literal tab), including undo/redo while typing. JS doesn't have access to textarea undo/redo history. vi.js tracks history for changes it makes (based on commands), and tracks changes during insert by comparing contents between going into insert mode. The edits a user makes in insert mode are turned into a single history change to undo/redo. In vi/vim, the cursor is typically "on" a character. With a textarea, it is shown between characters. The position at the end of the line, after the last character, before the newline, is not normally a separate position in vi. vi.js lets you navigate to these positions, which changes how some motion keys work. Access to the clipboard is only explicitly with the "y" and "p" keys. Commands that remove/replace text don't change the clipboard. Not all input types are supported, browsers only allow editing selections on some types: text, search, url, tel, password. Others don't work: email, time, etc. Popular messaging web applications have custom UI elements for sending messages, for their rich text. They often don't use standard textarea/input elements, so this plugin won't help with those apps. Some applications use "Escape" as a shortcut to cancel. Use "ctrl-{" as alternative. Unfortunately, the obvious alternative "ctrl-[" is interpreted by firefox as "back" and can't be intercepted. Plenty of vi/vim keys haven't been implemented yet. People typically use a subset of all the many vi/vim key bindings. Please submit a PR for commands you're missing and want. Keep the code maintainable. The source code is Open Source, MIT-licensed, see https://github.com/mjl-/vijs.

0 out of 5No ratings

Google doesn't verify reviews. Learn more about results and reviews.

Details

  • Version
    0.0.10
  • Updated
    November 24, 2024
  • Offered by
    Mechiel Lukkien
  • Size
    32.85KiB
  • Languages
    English
  • Developer
    Email
    mechiel.vi@ueber.net
  • Non-trader
    This developer has not identified itself as a trader. For consumers in the European Union, please note that consumer rights do not apply to contracts between you and this developer.

Privacy

The developer has disclosed that it will not collect or use your data.

This developer declares that your data is

  • Not being sold to third parties, outside of the approved use cases
  • Not being used or transferred for purposes that are unrelated to the item's core functionality
  • Not being used or transferred to determine creditworthiness or for lending purposes

Support

For help with questions, suggestions, or problems, visit the developer's support site

Related

Drag & Input(旧Checkbox Checker)

5.0(1)

Shift(Windows)またはCommand(Mac)を押しながらドラッグで選択範囲内の入力を一括操作。AIを活用して選択範囲内の入力要素の自動的に回答候補を生成も。

tabVertikal - vertical tabs

4.3(24)

Manage tabs & tabGroups vertically in side panel. Advanced auto tab grouping. Switch workspaces. Auto suspend tab

Surfingkeys

4.6(280)

Rich shortcuts to click links/switch tabs/scroll, capture pages, use your browser like vim for productivity.

ProKeys

4.4(218)

Save time and effort in emails, etc. with ProKeys! Define snippets, do math in browser, auto complete braces, and much more.

Print Edit WE

4.4(320)

Edit web pages prior to printing. Delete, hide and format elements. Edit text. Remove adverts and sidebars.

Page Manipulator

3.8(35)

Inject HTML, CSS or JavaScript into any web-page. The changes you make are applied every time you visit the specified website(s).

Live editor for CSS, Less & Sass - Magic CSS

4.6(269)

Live preview of CSS/Less/Sass code changes. Auto-save file, autocomplete, Less/Sass to CSS, beautify, CSS reloader, lint, ...

Vimium

4.8(4.5K)

The Hacker's Browser. Vimium provides keyboard shortcuts for navigation and control in the spirit of Vim.

Copy Text Easily

4.3(58)

A simple and hassle free way to copy text, paragraphs, sentences and custom selections in browser.

Shortkeys (Custom Keyboard Shortcuts)

3.4(754)

Custom keyboard shortcuts for your browser

Text Expander

4.7(34)

Use Text Expander to increase productivity. Save time with textexpander shortcuts and power text automation for all your tasks.

Vimium C - All by Keyboard

4.9(187)

A keyboard shortcut tool for keyboard-based page navigation and browser tab operations with an advanced omnibar and global shortcuts

Drag & Input(旧Checkbox Checker)

5.0(1)

Shift(Windows)またはCommand(Mac)を押しながらドラッグで選択範囲内の入力を一括操作。AIを活用して選択範囲内の入力要素の自動的に回答候補を生成も。

tabVertikal - vertical tabs

4.3(24)

Manage tabs & tabGroups vertically in side panel. Advanced auto tab grouping. Switch workspaces. Auto suspend tab

Surfingkeys

4.6(280)

Rich shortcuts to click links/switch tabs/scroll, capture pages, use your browser like vim for productivity.

ProKeys

4.4(218)

Save time and effort in emails, etc. with ProKeys! Define snippets, do math in browser, auto complete braces, and much more.

Print Edit WE

4.4(320)

Edit web pages prior to printing. Delete, hide and format elements. Edit text. Remove adverts and sidebars.

Page Manipulator

3.8(35)

Inject HTML, CSS or JavaScript into any web-page. The changes you make are applied every time you visit the specified website(s).

Live editor for CSS, Less & Sass - Magic CSS

4.6(269)

Live preview of CSS/Less/Sass code changes. Auto-save file, autocomplete, Less/Sass to CSS, beautify, CSS reloader, lint, ...

Vimium

4.8(4.5K)

The Hacker's Browser. Vimium provides keyboard shortcuts for navigation and control in the spirit of Vim.

Google apps