❌

Normal view

There are new articles available, click to refresh the page.
Before yesterdayMain stream

NeoVim Too Complex? Try Helix as Your First Modal Editor

By: Sreenath
10 November 2026 at 13:33
Helix

Helix is a modal text editor that operates much like Vim or Neovim. While switching from a GUI like VSCode takes some practice, mastering a terminal editor truly boosts your daily productivity.

Starting with Helix is a smooth experience if you have never used modal editors before. The default settings are intuitive, provided you are familiar with your keyboard layout.

You can avoid the hassle of learning a specific programming language just to configure your workspace. Helix delivers a complete and powerful experience right after you install it.

In my opinion, I suggest Helix if you want the Neovim vibe without the massive time investment. It includes modern tools like language server protocols and tree sitter support by default.

🚧
Helix does not have a plugin system at the moment.

Let's look at how you can get started with Helix as your very first modal text editor.

Installing Helix

Helix is available in the official repositories for several Linux distributions, like Arch Linux, Fedora, and Ubuntu. To install it on Arch Linux, use the command:

sudo pacman -S helix

If you are a Fedora user, install the editor with:

sudo dnf install helix

Ubuntu 26.04 LTS and above also includes Helix in its official repositories. You can install it using:

sudo apt install hx
πŸ“‹
In Ubuntu, the command name is hx and not helix.

For all other users, pre-built binaries are available in the official Helix GitHub repository. You can follow the official documentation to complete the installation of these binaries.

Modes in Helix

Helix is a modal editor. It means Helix has different modes with dedicated purposes.

Without having an understanding of the modes, it is hard to grasp how the editor works. So, let's see them one by one.

πŸ’‘
Unlike Vim, Helix follows a select β†’ action model. You always highlight text first, then perform an operation on it. If something feels backwards coming from Vim, this is likely why.

The Normal Mode

Normal mode is the default state in most modal text editors, where you perform all text manipulations.

Whenever you are elsewhere in the editor, simply press the ESC key to return to this home base. Unlike a traditional editor where you are always in a typing state, modal editors use this mode as a starting point.

For example, you can scroll down a couple of lines by pressing j while in normal mode. You can also remove a character under the cursor by pressing d.

You cannot type any text while you are in this Normal mode. To start typing, you must enter insert mode by pressing i while the editor is in its normal state.

The Insert Mode

Insert mode is the state where you actually type your text. Most traditional GUI editors, like VSCode, have this mode only where all text actions are carried out with the help of keyboard and mouse.

While in insert mode, you generally focus on entering text rather than deleting or copying it. You can still use the arrow keys to move the cursor around in both normal and insert modes.

Whenever you finish typing, simply press ESC to return to normal mode.

πŸ’‘
Some other text actions are supported in Insert mode, which takes help of the CTRL and ALT key. Take a look at the documentation for these commands in insert mode.

Select Mode

Select mode is the equivalent of Visual mode in Vim and is used specifically for highlighting text. You enter this mode by pressing v while in the Normal mode.

The character under your cursor is automatically selected as soon as you enter this mode. You then use navigation keys to extend that selection across your text.

For example, pressing l will extend the selection to the next character, and pressing it again adds the third. You cannot type any new text while you are in this state.

In my experience, combining this with movement shortcuts is incredibly powerful. For instance, I can press v followed by ge to instantly select everything from my cursor to the last line.

You can even press the END key to include the entire last line in your selection. This allows you to highlight massive blocks of text with just a few keystrokes.

Once your selection is finished, use the Normal mode keys to perform an action.

🚧
In Select mode, you can directly apply operators like d, y, c on your selection. No need to press Escape first. The operator acts on the selection and drops you back into Normal mode.

Pressing d will delete the entire highlighted block, while y will copy it for later use.

Other modes of purpose

The above three are the main modes in Helix. But there are some more modes that you may come across.

Command Mode

When you press : in normal mode, you enter the command mode. Here, you can enter supported commands.

Some important operations, like saving a file, quitting the editor, etc., are performed in the command mode.

To save the current file, and quit the editor:

:wq

Helix offers a lot of commands that you can use. Its official documentation on commands has listed it more efficiently.

Picker Mode

Picker mode is triggered by pressing the Space key in normal mode. It is a fuzzy finder interface, where you can invoke a file picker, buffer picker, etc.

If you know Neovim, this picker mode can be a minimal close equivalent of the Telescope plugin.

For example, we can use Space + f to open a file picker.

Also, if I select a block of text and press Space + Shift + c, then you can block comment that section, and so on.

0:00
/0:21

Comment code in Helix

Helix shows the actions

For supplementary modes like picker mode, Helix shows what to press next in a neat pop up.

When you press space, you can see that a pop-up comes up that says all keys and their uses, so that you can read and follow.

Another one I suggest you try is press the g key and read all the subkeys and their functions.

Press the g key to get some interesting actions in Helix
Pressing the g key

Access the tutor

Helix has an interactive tutorial available to get you started, like the Vim tutor.

Open a terminal and run the command:

helix --tutor

This will take you to a text, which you will read and perform actions as described.

A beginner should complete this tutorial since it gives you a lot of day-to-day shortcut practice inside a sample text.

Essential Keybindings

Helix works flawlessly right out of the box. You do not need any configuration files to make any part of the editor work in the beginning.

But, since it depends on keybindings, before going to other areas, let's see some essential shortcuts to get you started.

Shortcuts to move around the text in Normal mode.

Description Shortcuts
Move one character left/bottom/top/right h/j/k/l
Move to the start of the next word w
Move to the start of the next word (punctuations included) W
Move back to the start of the word b
Move back to the start of the word (punctuation included) B
Move to the end of the next word e
Move to the end of the next word (punctuations included) E
Move to the last line of the text ge
Move to the first line of the text gg
Move to the nth line <n>G
Move to the start of the line HOME
Move to the end of the line END
Move page up PgUp
Move page down PgDn

Shortcuts to change the text in Normal Mode

Description Shortcut
Insert before cursor (Enter insert mode) i
Insert after cursor a
Insert at the beginning of the line I
Insert at the end of a line (append) A
Open a new line below cursor and enter insert mode o
Open a new line above cursor and enter insert mode O
Replace character under cursor r<character>
Delete/cut character under cursor (or selection) d
Yank (copy) selection y
Paste selection p
Paste before cursor P
Yank (copy) to a named register a "<a>y
Paste from a named register a "<a>p
Undo a change u
Redo a change U
πŸ’‘
Always use registers to yank texts. This way, it is easy to confirm where a copied text is and easier to paste later.
🚧
The deletion shortcut d actually cuts the selected word and stored. So, if you have some texts yanked, and then deleted some other text, the deleted text will be the one pasted when you press p. So, use registers for copying important text.

Other routine shortcuts

Description Shortcut Mode
Search for a pattern in the text /<search term> Normal
Select next search match n Selection
Select previous search match Shift + n Selection
Run the command in a shell :!<command> Normal
Run the command and add its output to a line :r !<command> Normal

You can refer to the official keymap documentation for a lot more keyboard shortcuts across modes for specific use cases.

Create a config file

Helix doesn't need a user-written config file to work since it comes with many usable defaults. Still, changing away from defaults needs a config file.

Helix uses the TOML configuration file, located at ~/.config/helix/config.toml.

First, create the directory if it does not exist.

mkdir -p ~/.config/helix/

Now, create a file inside this directory like:

touch ~/.config/helix/config.toml

A different theme

Helix comes with a lot of themes preinstalled, and you don't want to create a long config for it.

Open Helix in a terminal:

helix

Inside Helix, in Normal mode, enter :theme, press a space, and press the TAB key.

You can see that themes begin to show preview. Press TAB to scroll through the live preview of themes. When you spot a theme of your choice, note the name of the theme and press Enter.

πŸ“‹
If you have downloaded the Helix binary, then set of themes are in the runtime folder. Make sure you placed it properly as the documentation say.

Upon pressing the enter key, the theme will be applied to the current session.

To make it permanent, you need to add one line to the Helix config file.

Edit the config file with your favorite text editor.

helix ~/.config/helix/config.toml

And add the line

theme = "theme-name"

For example,

theme = "tokyonight"

Language support

Helix comes with Language Server Protocol Support preset, so there is no need to worry about configuring the LSP.

Still, you need to setup the language server though.

I am using Arch Linux in this example, and in Arch Linux, most of the language server you need are available in the official repository.

To set up CSS support, install the vscode-css-language-server

sudo pacman -S vscode-css-languageserver

Helix will spot this , and you can start working on CSS files from your next start.

0:00
/0:52

CSS Language Completion in Helix

To set up Rust support, install the rust-analyzer package:

sudo pacman -S rust-analyzer

Refer to the Language support page in the official documentation to know what package needs to be setup to get the language support working.

Multiple Cursors

Helix supports multiple cursors out of the box. You can duplicate your cursor downward by pressing Shift + c in Normal mode.

0:00
/0:22

Multiple Cursors in Helix

This lets you edit several lines at once. If you end up with multiple cursors by accident, press , to collapse back to a single cursor.

Wrapping Up

Helix is a decent modal editor, that offers most of the modern features you would expect in the convenience of an easier learning curve.

I won't suggest replacing Neovim or Vim with Helix if you have mastered those editors. But, if you are into modal editing, or terminal-based text editing in general, Helix is the best place to start.

Will you use Helix for all your coding purposes? Or you have another editor that meets all your needs? Do mention in the comments.

This Overlooked Linux mv Option Replaces Three Commands With One

By: Community
5 November 2026 at 10:40
mv exchange

Every Linux user has done the three-step dance at least once. You want to swap two files, so you move the first one to a temporary name, move the second one into its place, and then move the temporary file back.

Ever felt that this is a bit... clumsy? And for a moment, one of your files simply doesn't exist. That doesn't feel right!

Since version 9.5, GNU coreutils has a better way: mv --exchange.

In this article, I'll show you what it does, how to check if your system has it, where it actually helps, and the mistake I made the first time I used it on directories.

The old way: three moves and a temporary name

Let's say you have two configuration files, nginx.conf and nginx.conf.new, and you want the new one to take the place of the old one while keeping the old one around.

The classic approach looks like this with the mv command:

mv nginx.conf nginx.conf.tmp
mv nginx.conf.new nginx.conf
mv nginx.conf.tmp nginx.conf.new

There are two problems here:

  • There is a gap. Between the first and second command, nginx.conf doesn't exist. If a service reads it at that exact moment, it finds nothing (and trust me, one day that will happen).
  • It can fail halfway. If the second command fails, you are left with a temporary file and a half-finished swap to clean up by hand.

The exchange option does this in a single command:

mv --exchange nginx.conf nginx.conf.new

Swap files with mv --exchange

The --exchange option tells mv to swap the two paths in a single operation. On Linux, it uses the kernel's renameat2() system call with the RENAME_EXCHANGE flag, so the swap is atomic: at any moment, both names exist and point to a file.

Check if your mv supports it

First, check your coreutils version:

mv --version

On my machine, running NixOS, I get:

mv (GNU coreutils) 9.11

You need version 9.5 or newer. Careful here: version numbers are not decimals. They are compared part by part, so 9.11 (nine point eleven) is newer than 9.5. You can also check whether the option is listed in the help:

mv --help | grep exchange

If this prints nothing, your mv doesn't have the option yet. I'll talk about which distributions ship it later in this article.

Swap two files

Let's create two small files to test:

echo "config A" > a.conf
echo "config B" > b.conf

Now swap them:

mv --exchange a.conf b.conf

Check the result:

cat a.conf b.conf
config B
config A

That's it. The contents traded places in one command, and no temporary file was involved.

Swapping two files with mv --exchange in the terminal

Swap two directories (and the mistake I made)

It works for directories too, which is where it really shines. But the first time I tried it, it failed:

mkdir release-old release-new
touch release-old/v1 release-new/v2
mv --exchange release-old release-new
mv: cannot exchange 'release-old' and 'release-new/release-old': Unknown error -1

Look at the second path in the error: release-new/release-old. When the last argument is an existing directory, mv assumes you want to move things into it, just like a regular mv. So it tried to swap release-old with a path inside release-new that doesn't exist.

The fix is the -T (--no-target-directory) option, which tells mv to treat the last argument as a plain name instead of a destination folder:

mv -T --exchange release-old release-new
ls release-old release-new
release-new:
v1

release-old:
v2

Now the whole directory trees were swapped, no matter how many files they contain, because only the names changed.

Where it actually helps

Here are a few situations where I find mv --exchange useful:

  • Rolling out a new configuration. Swap the new config into place and keep the old one under the other name, ready for a quick rollback with the same command.
  • Switching release directories. If you deploy a new version of a site into a separate folder, you can swap it with the live folder in one step (remember the -T).
  • Undoing a swap. Running the same command again swaps the files back.

Limitations you should know

mv --exchange is not magic, and a few things can trip you up.

Both paths must be on the same filesystem

The swap only works when both files live on the same filesystem. If you try to exchange a file on one filesystem with a file in a tmpfs mount like /dev/shm, the kernel refuses the operation:

mv --exchange b.conf /dev/shm/x.conf
mv: cannot exchange 'b.conf' and '/dev/shm/x.conf': Unknown error -1

The message is not very helpful (it is the same "Unknown error -1" we saw in the directory mistake above), so it's worth knowing the real reason: the kernel can't swap names across two different filesystems.

Regular mv gets around this by copying the file and deleting the original, but that can't be done atomically, so --exchange doesn't even try.

mv --exchange failing when the files are on different filesystems

The filesystem must support it

The underlying system call needs filesystem support. Common Linux filesystems such as ext4, Btrfs, XFS and tmpfs support it.

Conclusion

mv --exchange is one of those small additions that removes a whole category of fiddly, error-prone shell work. If you are on a recent distribution like NixOS, Fedora or Debian 13, it is already on your system.

Next time you reach for a temporary file name to swap two things, try mv --exchange instead. Just remember to add -T when you swap directories.

✍️
Igor Giamoniano is a developer and teacher from SΓ£o Paulo, Brazil. He contributes to the Brazilian Portuguese translation of the Linux kernel documentation and runs Coisa de Dev, where he teaches Linux and programming to a Brazilian audience. You can find his open source work on GitHub.

Getting Started with Basic Terminal Commands on macOS and Linux

MacOS and Linux share something in common that many new users overlook: the Terminal. The Terminal is the command-line interface (CLI) that allows you to communicate directly with your operating system. For many newcomers, it can look intimidating a black screen filled with text, seemingly expecting you to know secret codes. But once you start using it, you’ll quickly see that it’s one of the most powerful tools in your toolkit.

I’ve said it countless times, and I’ll say it again: learning to navigate and function in the Terminal is an essential skill for anyone using macOS or Linux. Even a little familiarity can save you hours of frustration when troubleshooting or performing tasks that would otherwise require several clicks in the GUI.

Before we dive into the commands, here’s a cardinal rule of Terminal usage: *

Never copy and paste commands from the internet without understanding them.*

While there are many tutorials online offering magical one-liners, blindly running commands can break your system or expose you to security risks. Instead, take the time to type out commands manually, paying attention to spaces, dashes, and syntax. This is how you learn. Trust me, those tiny details matter more than you think.

With that said, let’s explore some basic and safe Terminal commands that every MacOS or Linux user should know.

1. pwd Print Working Directory

The pwd command stands for Print Working Directory. This command shows you your current location within the filesystem.

Example:

pwd

Output might look like:

/Users/Craig/Desktop

This tells you that you are currently in the Desktop folder. Knowing where you are is crucial before performing any other operationsβ€”especially when moving or deleting files.

2. cd Change Directory

The cd command allows you to navigate between directories (folders) in the filesystem.

Examples:

cd /Desktop

This moves you into the Desktop directory.

cd ..

This moves you up one level in the directory hierarchy.

cd ~

This brings you back to your home directory.

A quick tip: pressing Tab while typing a folder name will autocomplete it if the folder exists. This is a real time-saver.

3. ls List Directory Contents

ls stands for list, and it displays the contents of your current directory.

Example:

ls

Output might look like:

Documents Downloads Music Pictures

You can also add options for more detail:

ls -l

Shows files with permissions, ownership, size, and date modified.

ls -a

Shows hidden files (files beginning with a .), which are usually configuration files in Unix-based systems.

4. mkdir Make Directory

mkdir creates a new folder.

Example:

mkdir MyNewFolder

Now you have a folder called MyNewFolder in your current directory. Combine it with cd to immediately enter the new folder:

cd MyNewFolder

5. touch Create Empty Files

The touch command creates a new empty file.

Example:

touch notes.txt

This will create a blank file called notes.txt in your current directory. It’s a handy way to quickly create test files or placeholders.

6. cp Copy Files and Directories

cp is used to copy files or directories.

Example:

cp notes.txt backup_notes.txt

This copies notes.txt into a new file called backup_notes.txt.

For directories, use the -r flag to copy recursively:

cp -r MyNewFolder MyNewFolderCopy

7. mv Move or Rename Files

mv can move a file to another directory or rename it.

Examples:

mv notes.txt Documents/

Moves notes.txt into the Documents folder.

mv notes.txt todo.txt

Renames notes.txt to todo.txt.

8. rm Remove Files and Directories (With Caution!)

rm deletes files or directories. Be carefulβ€”deleted files don’t go to the Trash.

Example:

rm todo.txt

Deletes the todo.txt file.

For directories:

rm -r MyNewFolder

This recursively deletes the folder and all its contents. Triple check before running this command.

9. man Manual Pages

man shows the manual page for any command. Think of it as the built-in help system.

Example:

man ls

This opens the manual for the ls command, showing all options and usage examples.

10. echo Display Text

echo prints text to the Terminal. It’s simple, but very useful.

Example:

echo "Hello, world!"

Output:

Hello, world!

It can also be used to append text to a file:

echo "My first line" >> notes.txt

This adds a line to notes.txt.

11. cat Display File Contents

cat reads a file and prints its contents to the Terminal.

Example:

cat notes.txt

It’s perfect for quick checks without opening a text editor.

12. clear Clear the Terminal

clear wipes the Terminal screen, giving you a clean workspace.

Example:

clear

13. Combining Commands with Pipes and Redirects

Once you’re comfortable with basic commands, you can combine them for more powerful operations:

  • Pipe |: Sends output from one command as input to another.
ls -l | grep "Documents"

Finds the word β€œDocuments” in your directory listing.

  • Redirect >: Saves output to a file.
echo "Hello" > hello.txt

Creates a file called hello.txt with the text β€œHello”.

Final Tips for Terminal Newbies

  1. Practice typing commands instead of copy-pasting. It’s how you truly learn.
  2. Start small don’t try to master everything at once.
  3. Use man often it’s your best friend.
  4. Be careful with sudo it gives commands administrative powers, which can break your system if misused.
  5. Experiment in a safe environment create test folders and files to play around.

Learning the Terminal may feel old-school, but it’s an invaluable skill for anyone serious about macOS or Linux. It gives you control, speed, and a deeper understanding of your computer. Even if you only use a handful of commands, you’ll be far better prepared for troubleshooting, automation, and advanced computing tasks.

❌
❌