Firefox 浏览器附加组件
  • 扩展
  • 主题
    • 适用于 Firefox
    • 字典和语言包
    • 其他浏览器网站
    • 适用于 Android 的附加组件
登录
Vi Editing Mode 预览

Vi Editing Mode 作者: Mechiel Lukkien

Automatically and non-intrusively add a vi editing mode to all textareas/inputs. Behaviour remains unchanged (like insert mode), hitting Escape enables command mode.

5 (2 reviews)5 (2 reviews)
24 个用户24 个用户
您需要 Firefox 来使用此扩展
下载 Firefox 并安装扩展
下载文件

扩展元数据

关于此扩展
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 files: 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.

See https://github.com/mjl-/vijs for details and development of this addon.
评分 5(1 位用户)
登录以评价此扩展
目前尚无评分

已保存星级评分

5
2
4
0
3
0
2
0
1
0
阅读全部 2 条评价
权限与数据详细了解

必要权限:

  • 访问您在所有网站的数据

可选权限:

  • 获取剪贴板数据
  • 输入数据到剪贴板
更多信息
附加组件链接
  • 主页
  • 用户支持网站
版本
0.0.11
大小
37.1 KB
上次更新
9 个月前 (2024年11月21日)
相关分类
  • 其他
许可证
MIT 许可证
版本历史
  • 查看所有版本
添加到收藏集
举报此附加组件
0.0.11 的发布说明
v0.0.11

- Add an "id" to the manifest.json for Firefox.

v0.0.10

- Switch to manifest v3, this add-on/extension works with Chromium too.
- Use internal fake clipboard buffer if it isn't available, to make 'y' and 'p'
(yank/paste) somewhat work in insecure contexts.
Mechiel Lukkien 制作的更多扩展
  • 目前尚无评分

  • 目前尚无评分

  • 目前尚无评分

  • 目前尚无评分

  • 目前尚无评分

  • 目前尚无评分

转至 Mozilla 主页

附加组件

  • 关于
  • Firefox 附加组件博客
  • 扩展工坊
  • 开发者中心
  • 开发者政策
  • 社区博客
  • 论坛
  • 报告缺陷
  • 评价指南

浏览器

  • Desktop
  • Mobile
  • Enterprise

产品

  • Browsers
  • VPN
  • Relay
  • Monitor
  • Pocket
  • Bluesky (@firefox.com)
  • Instagram (Firefox)
  • YouTube (firefoxchannel)
  • 隐私
  • Cookie
  • 法律

除非另有注明,否则本网站上的内容可按知识共享 署名-相同方式共享 3.0 或更新版本使用。