Onivim 2 User Manual

Onivim 2 User Manual

  • Early Access
  • About
  • Timeline
  • Docs

›Basic Usage

Getting Started

  • Why Onivim?
  • Installation
  • Vim Differences
  • Tips for Vim Users
  • Tips for VSCode Users
  • Modal Editing 101

Basic Usage

  • Moving Around
  • Editing and Deleting Text
  • Visual Mode (Selection)
  • Working with Files
  • Formatting
  • Language Features
  • Command Line
  • Integrated Terminal
  • Emmet
  • Snippets

Configuration

  • Settings
  • Key Bindings
  • Extensions

Languages

  • Reason & OCaml
  • ReScript
  • Python
  • Go
  • Java
  • C / C++
  • C#
  • Rust

For Developers

  • Architecture
  • Building from Source
  • How to Contribute
  • Style Guide
  • License Key Bounty

Other

  • FAQ
  • Appendix A: v2 Design Doc
  • Appendix B: More Resources
Edit

Editing and Deleting Text

Insert Mode

Insert mode is the mode you usually think about in a text editor - when you press a key, the corresponding character is inserted.

To enter insert mode from normal mode:

  • i - enter insert mode before the cursor position, on the same line.
  • I - enter insert mode at the beginning of the current line.
  • a - enter insert mode after the cursor position, on the same line.
  • A - enter insert mode at the end of the current line.
  • o - create a line after the current line, and enter insert mode.
  • O - create a line before the current line, and enter insert mode.

To leave insert mode, and go back to normal mode, you can use the following keys:

  • Escape
  • Control+c
  • Control+[

Operators

Besides insert mode, there are other ways to manipulate text in normal mode - that's where operators come in. Vim and the 'vi' family of editors, like Onivim, provide a sort of text-editing-language, and operators are an important piece of this language.

Basic Operators

  • dmotion - delete the text described by motion.
  • cmotion - change the text described by motion.

A motion is a cursor movement, as described in Moving Around.

Examples:

  • c$ - change the text from the cursor position to the end-of-theline.
  • dd - delete the current line.
  • d10j - delete the 10 lines below the cursor.
  • dG - delete to the end of the file.

Other operators

  • ymotion - yank text to a specified register.
  • gumotion - convert text described by motion to lowercase.
  • gUmotion - convert text described by motion to uppercase.
  • >>motion - shift lines described by motion to the right.
  • <<motion - shift lines described by motion to the left.

Repeat

The . "dot operator" is a very useful command - it repeats the last command.

For example, if dd was used to delete a line, pressing the . key would repeat the command, and delete another line.

Undo / Redo

It can be scary to experiment with the operators and motions, for fear of losing your work!

However, you can always undo your change:

  • In insert mode, you can use Command+z (Control+z on other platforms)
  • In normal mode, u will undo the last change, while Control+r will redo it.

Further Reading

We've only scratched the surface of motions and operators available here - checkout the Vim documentation on motions and operators for more.

← Moving AroundVisual Mode (Selection) →
  • Insert Mode
  • Operators
    • Basic Operators
    • Other operators
  • Repeat
  • Undo / Redo
  • Further Reading
Onivim 2 User Manual
Docs
Getting StartedBasic UsageFor DevelopersFAQ
Community
RedditDiscordTwitter
More
GitHubStar
Copyright © 2022 Outrun Labs, LLC