Step 3 of 5

Session settings

Session settings

Helix’s settings live under [editor] in its config file, and you can change any of them for the current session straight from the command line:

  • :set cursorline true gives one option a value
  • :toggle cursorline flips a true/false option
  • :toggle line-number absolute relative cycles an option through the values you list

The option names are the same ones the config file uses, so anything you learn here carries over. Tab completes them too.

Changes made this way last until the editor closes — here, until you leave the page. That makes :set and :toggle good for trying a setting out before you commit to it. The next step shows how to make one stick.

Work through the checklist below.

  1. Highlight the cursor line with :set cursorline true Type :set cursorline true and hit Enter — the line under your cursor gets a background.
  2. Switch to relative line numbers with :toggle Type :toggle line-number absolute relative and hit Enter — the gutter now counts away from the cursor.
Highlight the cursor line with :set cursorline true Type :set cursorline true and hit Enter — the line under your cursor gets a background.

Next: Switch to relative line numbers with :toggle

Loading editor…