-
Notifications
You must be signed in to change notification settings - Fork 1
Home
We are going to see a demo of how code-editor improve your productivity.
Click here to see the preview of code-editor.
What have we done?
- We just opened the
index.html
file usingvi index.html
command. - Enters in
insert
mode pressing thei
key. - Edited the html file and saved it using
ctrl + s
.
In this documentation we'll learn how to use code-editor (neovim) in brief.
code-editor (neovim) works a bit differently from most code editors. Instead of just typing directly into the code, you switch between different modes. Think of modes as different gears that change what your keyboard does. This might seem strange at first, but it's what makes code-editor incredibly efficient once you get the hang of it.
There are mainly five modes in code-editor (neovim) that we are going to see.
Click here to see the preview of each.
Mode | Preview |
---|---|
Normal | ![]() |
Insert | ![]() |
Visual | ![]() |
Visual Block | ![]() |
Terminal | ![]() |
When you open code-editor (neovim) using the vi
command it's the default
opened mode.
-
How to Enter: If you're ever unsure what mode you're in, just press the
esc
key a couple of times, this way you go back to this mode. - What it Does: This mode is for commands (not for the terminal but for code-editor).
-
Command: You need to mandatorily use a colon
:
before every command you execute. For example you can try a basic command to execute:echo "hello"
.
Where you focus most of your time and efforts.
-
How to Enter: Press
i
(for "insert") while in normal mode. There are other ways to enter insert mode (likea
to append after the cursor,o
to open a new line below the current one), but i is the most common. - What it Does: This is the mode where you actually type text into your code, just like in vscode.
-
How to Exit: Press the
esc
key to return to normal mode.
-
How to Enter: Press
v
(for "visual") while in normal mode oralt + v
in insert mode. - What it Does: Visual mode lets you select text. You can use arrow keys to highlight the text you want to select and format them.
-
How to Exit: Press the
esc
key to return to normal mode.
Where you interact with multiline editing.
-
How to Enter: Press
ctrl+v
while in normal mode. - What it Does: Visual Block mode is like visual mode, but it allows you to select text in a rectangular block. This is incredibly useful for editing columns of text, like in tables or code with consistent indentation.
- How it Works: Once in visual block mode, use the arrow keys to define the rectangular block you want to select. The cursor's starting position will be one corner of the rectangle.
-
How to Exit: Press the
esc
key to return to normal mode.
Where you interact with your linux shell.
-
How to Enter: Press
ctrl+t
while in normal mode. This opens a terminal window just like other code editors. - What it Does: Terminal mode gives you a fully functional command-line terminal directly within code-editor (neovim). You can run shell commands, execute programs, and do anything you would normally do in a terminal.
-
How to Exit: Press the
esc
key to return to normal mode andctrl+d
to close the window.
© 2025 code-editor documentation. Built with ❤ with cli.