About

Helix Editor is a terinal-based text editor writen in Rust.

https://helix-editor.com/

The main article

https://docs.helix-editor.com/keymap.html

General notes

Commands need to be typed in Normal Mode. To enterthe Normal Mode, press ESC

Key bindings

Buffers

Buffers store contents of files. When you open a new file, the buffer with previous file goes to background. But you can open the previous buffer again.

Select buffer

  1. Press space
  2. Press b

Here you can pick a previously opened file.

Files

Open a file

  1. Press space
  2. Press f

This will open file picker where you can select a file to open

General

Go to next word startw
Go to next WORD startW
Go to previous word startb
Go to previous WORD startB
Go to next word ende
Go to next WORD endE
Go to the first linegg
Go to the last linege

Go to line with provided number

  1. Press g
  2. Type the line number
  3. Press g

Selection

Select current line: x

Select the whold document: %

Copy, paste

Copy (yank) to system clipboard

  1. Press v
  2. Select your text using arrows or mouse pointer (if supported)
  3. Press SPACE
  4. Press y
  5. Paste your text wherever your wish

Search and replace

Unlike in some other editors, the Search and Replace operation in Helix is a chain of commands:

  1. Press %s (do NOT add : before)
  2. Type your search term and press ENTER
  3. Press c
  4. Now you have multiselect active with original values deleted. You can type the value to replace your original values with whatever you will type
  5. Press ENTER
  6. Press , to exit from multiselect mode

Line operations

Delete a line

  1. Press x to select the current line
  2. Press d

Splits

You can split the editor window horizontally and vertically

Open a document in new split

Horizontal: %hsplit FILENAME. The editor will suggest you file names from current directory

Vertical: %vsplit FILENAME

Close a split

  1. Press <ctrl> + w
  2. Press q
  1. Press <ctrl> + w
  2. Press an arrow key you want to navigate to. Alternatively, you can use Vi key bindings (h - left, l- right, j - down, k - up)