Onivim 2 User Manual

Onivim 2 User Manual

  • Early Access
  • About
  • Timeline
  • Docs

›Getting Started

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

Modal Editing 101

Modal Editing

Onivim, like Vi and Vim, is a modal editor - meaning it operates in different modes.

The default mode for Onivim, like Vi and Vim, is normal mode. Normal mode is a command mode; characters you type execute commands (like moving the cursor, deleting text, etc). This is much different from modeless editors; where typing always inserts text! The advantage of having modes is that you can navigate through code, manipulate text swiftly, and even manage selections without your hands leaving the keyboard.

Normal Mode

'Normal' mode seems counter-intuitive - coming from other modeless editors, the 'normal' mode seems like it should be inserting characters! However, when working with text, the majority of our time is spent navigating, manipulating, and editing - rather than inserting. For this reason, the 'normal' mode is the default mode.

In normal mode, you can move the cursor around:

  • h - move the cursor left
  • j - move the cursor down
  • l - move the cursor right
  • k - move the cursor up

NOTE: You can use the arrow keys, too, but we recommend h, j, k, and l, because it keeps your hands on the home row!

You can also prefix these characters with a number, for example:

  • 5j moves the cursor 5 lines down
  • 10l moves the cursor 10 characters to the right

This tends to be faster than repeatedly pressing or holding a key.

Insert Mode

Even though we spend a lot time in normal mode, we need to be able to type and insert text, too. To enter insert mode, you can press i from normal mode.

The cursor will switch to a caret, and you'll see an indication in the status bar that we are now in insert mode.

Once you have finished typing, you can press Escape, Control+c, or Control+[ to return to normal mode - pick whichever one is most comfortable for you.

Ex Commands

Onivim also exposes a vast number of vim's ex commands, which are key sequences starting with :. Some useful ones to get started with are:

  • :cd <directory> to change the working directory
  • :e <filename> to open a file for editing, or create a new file if it doesn't exist
  • :w to save the current file
  • :w <filename> to save the current file with a new name
  • :q to close the current file, and the editor if it the last open file
  • :wq as a shorthand to save and close

Next Steps

Play around with switching between insert mode and normal mode, and when you're ready, let's dive-in to some more advanced editing:

  • Moving in Onivim
  • Editing & Deleting Text
  • Visual Mode (Selection)
  • Working with Files
  • Settings
  • Key Bindings
  • Extensions
← Tips for VSCode UsersMoving Around →
  • Modal Editing
    • Normal Mode
    • Insert Mode
    • Ex Commands
    • Next Steps
Onivim 2 User Manual
Docs
Getting StartedBasic UsageFor DevelopersFAQ
Community
RedditDiscordTwitter
More
GitHubStar
Copyright © 2022 Outrun Labs, LLC