Logo

dev-resources.site

for different kinds of informations.

Helix and Zellij

Published at
10/8/2023
Categories
editor
linux
Author
pietrangelo
Categories
2 categories in total
editor
open
linux
open
Author
11 person written this
pietrangelo
open
Helix and Zellij

I really like the Helix text editor among all the common ones, for its simplicity and its support out of the box for every language I use.

The only thing I'm missing is a valid way to call the terminal from it, and make the terminal open in the same path I'm working on.

To accomplish this I'm using Zellij which is a terminal multiplexer with batteries included, indeed it is presented as a terminal workspace.

Zellij Configuration

Zellij allows you to create some custom layouts, that can be invoked at startup, to better adapt it to the work you are going to do.

The following is mine configuration to work with the Helix text editor. I have saved this configuration under this path ~/.config/zellij/layouts/helix.kdl:

layout {
    pane size=1 borderless=true {
        plugin location="zellij:tab-bar"
    }
    pane {
        command "hx"
        args "."
    }
    pane split_direction="vertical" size="20%" {

    } 
    pane size=2 borderless=true {
        plugin location="zellij:status-bar"
    }
}
Enter fullscreen mode Exit fullscreen mode

Which results in the following layout:

Zellij with Helix editor

Helix running in the top pane with a terminal console in another pane at the bottom, in the same path of the project I'm working with!! and this is exactly the goal I wanted to achieve.

System Configuration

Now to launch zellij with the custom layout and an instance of Helix I need to run:

zellij --layout ~/.config/zellij/layouts/helix.kdl
Enter fullscreen mode Exit fullscreen mode

From the path I want to run Helix from.

Now to simplify that command i created an alias zhx and saved it inside my ~/.bashrc file.

alias zhx='zellij --layout $HOME/.config/zellij/layouts/helix.kdl'
Enter fullscreen mode Exit fullscreen mode

With this configuration, every time I need to spawn a new instance of Helix, I just need to type zhx inside the directory I want to work with and Zellij will call Helix for me and make it open the project automatically.

editor Article's
30 articles in total
Favicon
Implementing Image Upload in React Quill
Favicon
Lazyvim version 14.x in WSL
Favicon
Adding and Customizing Tables in React Quill
Favicon
C Development with GNU Emacs
Favicon
Building a Real-Time Collaborative Text Editor with Slate.js
Favicon
SLATE Code editor with highlight
Favicon
Emacs, a simple tour
Favicon
AI Video Editor: Revolutionizing Video Editing
Favicon
Choosing the editor for the next decade
Favicon
Effortless Formatting for OpenTofu Files with LazyVim
Favicon
Store and Run your Javascript Online - tryjs.online
Favicon
Chosing the right code editor: A quick guide
Favicon
Magic Spell - An AI-powered text editor built with Next.js and the Vercel AI SDK
Favicon
Easy Access to Terminal Commands in Neovim using FTerm
Favicon
Encrypted Note Editor App In React Native
Favicon
Fully featured, modern and extensible editor
Favicon
Set Up Neovim with kickstart.nvim on Mac as a Vimginner
Favicon
Working with Zed for a week
Favicon
Guide to using ‘ed’ editor in Linux
Favicon
Elevating Your Video Editing Experience
Favicon
How do you use your VSCode profile?
Favicon
Live Editor with React, Quill, and Socket.IO
Favicon
The Spectacular Transformation: VFX’s Role in Redefining Cinema
Favicon
The Evolution of Emacs: A Journey Through Time
Favicon
React Markdown Editor with real-time preview
Favicon
Online Code Editors
Favicon
A light weight code editor that helps as to code efficiently & swiftly in a 360 world
Favicon
I created overbyte - An Online code editor
Favicon
Build a Neovim plugin in Lua 🌙
Favicon
Helix and Zellij

Featured ones: