I would like to rename all of the instances where
I use lazy lock. I just select lazy lock and
I would like to use absolute path. I just type
std sync lazy lock and it just works at the moment.
The docs are not available from the actual editor.
I will press semicolon. to collapse these selections
into just the cursors. And I can press R, which
is for replace. I replace the character at the
cursor with a comma. Yeah, so I just made this
website called Helix Golf. I just wanted to let
people know about the power of Helix, how you
can do different transformations to text. If
we go to the Wikipedia page, here we have this
tutorial. Everything that starts with tutorial
is I wrote it. Now I press capital I, which will
move me to insert mode at the beginning of every
single line. Now I can type whatever I want.
So I just... Have you heard about the joke, the
Helix joke? The Helix joke? I cannot say it.
But what else do you want to show? Why you can't
say it? If you're listening to this as a podcast,
Remember that it was originally recorded as a
video. If you're not following along, you can
go to my YouTube channel. My username is Linkarzo.
And if you want to support me to keep this podcast
going, you can donate in Ko -Fi. I'm going to
leave a link in the description. All right, so
let's get started with this chapter then. All
right, so I've been hearing about Helix for a
long time. I'm a big NeoVim user. I know nothing
about Helix. The only thing that I have done
with Helix is to install it. So today I have
Nick here, which is a Helix user. Hey Nick, how's
it going? Hey, great. I first heard about Helix
a couple of months ago because I wanted to get
into Rust language. I didn't know anything about
it and I was using Neovim as well. But I was
tired of constantly having to change my Neovim
configuration because every single week I would
find a new plugin. and i wanted to use it but
it just kept it kept going on forever so there
would be i would use my editor more to edit itself
rather than actually getting any work done yep
and i just wanted to something that works out
of the box okay makes complete sense i know nothing
about it so that's great you know that you come
from neovim so you can guide me through the process
and and explain why and all that stuff for how
long did you use new vim for half a year um it
was my first like terminal text editor so i started
off with visual studio code when i first learned
programming and then wanted something more um
extreme something that something interesting
okay yeah okay and Why did you want to go through
the pain of configuring your editor and the terminal
and playing with config files and all that stuff?
Why didn't you just keep VS Code? Because if
I just kept using VS Code, it would just constantly
be in my mind that I might be missing out on
something cool. I just have to give it a try
at least to know if I like it or not. And then
I can go back if I want to. And I'm not going
back. Okay, so no plans to go back to VSCO then?
No, it's a mouthless lifestyle. You can't go
back from it. It's just too comfortable. I like
it when I don't even need to touch mouse anymore.
Ever. Okay, okay, okay. The only thing that I
have done is to install it because I didn't know
how long it was going to take, right? This is
the only thing that I have done so far. You already
explained that you have used NeoVim. Are you
switching between both of them or just Helix
right now? So as soon as I heard about Helix,
I was doubtful for like a couple of days. But
then I just decided to go all in. I just deleted
my NeoVim configuration. Because that's the best
way for me to learn something, just to jump into
it. Instead of just casually, like, over a span
of a couple of weeks, use it a little bit. No,
I just went full on with Helix. For how long
have you been using Helix? For about a couple
of months now. I think I started in November,
which is also when I started using Rust. Okay.
Okay. Yeah. You seem pretty young. Would you
mind sharing how old you are with us? yeah i'm
18 years old i've been programming for about
a year now oh okay okay yeah so so you're doing
rust mainly at the moment yes um exactly i started
first i started with web development um using
the ocean projects if you've heard the bosses
it's like an a website where you can learn programming
by building projects such as them such as building
calculator, building like a painting app using
JavaScript. And that was my first experience
with programming. And then I sort of like, I
knew JavaScript and TypeScript, but I wanted
to learn about like systems programming, something
on the lower level. And Rust just seems like
the perfect language for me to learn because
it had everything I wanted. like a strong type
system a very good like package manager and uh
yeah so i just wanted to jump into it but i needed
something like a real project to work on um so
i can actually learn rust because i of course
i can just build like one of projects such as
the calculator or to -do list but it motivates
me to work on something that people actually
use. And when I work on these tasks, it motivates
me to work and keep it working, basically. Okay.
Do you mind showing us around in Helix? How do
you open it to start with? Is it... an application
in itself like is it a gui application like emacs
or is it something that you open in your terminal
yeah so helix is a command line so you have to
use a terminal for it but um like there were
plans to make it into a gui so maybe at some
point we will see something like neovite but
for helix but at the moment it's just in the
terminal okay okay so the only thing that i did
is install it how do i open it like after installing
it what do you do do you type helix in the terminal
yes so to open it you have to pick like any file
and just just open it using hx which is the command
hx and there you will see yeah okay okay do you
feel a difference comparing helix to any of them
do you feel that it's a little bit faster or
how do you feel yeah i feel like it's it's faster
but it sort of feels like placebo because it's
written in i know that it's written in rough
so it feels like it should be faster but at the
same time i can't really notice much of a difference
because both new them and helix are really fast
so as you can see i just opened i just opened
the file it's just instant there's no delay okay
okay Do you usually open a project and work in
that? Let's say you just type HX, open the project,
and then you have a file explorer in Helix, or
how do you usually navigate around in projects?
Yes, so usually I just use HX. It opens like
an empty buffer with nothing in it. And then
I do space F, and this opens a file. Explorer,
which is new from the latest version. So you
have to build from source at the moment. You
will get a file explorer, which is built into
Helix if you build from master. But you can also
use Yazi to integrate it with Helix. So you will
be able to navigate to different folders and
open them right with Helix with the Yazi integration.
And it even has image preview. so as you can
see i can view svgs right from helix interesting
yeah and to actually get this integration working
it's only like like 10 lines of of tumble basically
not much work yeah okay so you only need to have
yasi installed outside helix just install yasi
as usual And what do you need to do in Helix
to configure that? You mind showing us your Tamil
configuration file? Yeah, absolutely. So let
me go to... Let me open my config. Right. So
as you can see, this line means that in normal
mode, we are creating a key binding. So for the...
e key it will run this command which is i just
copy pasted it from the um github wiki but basically
what it does is it it creates like a temporary
file um which has the the current file your op
you have opened in yazi and then when you close
yazi and open it again it will remember which
file you have opened last time Okay. Yeah. Okay.
Wonderful. So by default, you don't get a file
explorer unless you build from sources at the
moment, right? Yes. Yeah. It's available on,
um, uh, master on the master branch. So there's
probably going to be a release in a couple of
months. That already comes with that file explorer
in case you don't want to use the IC. Okay. Yes.
What other file explorers or how do people navigate
around files then if they don't use Yasi and
if the file explorer is not present, do they
use something else? Yes. So to do that, you have,
first of all, you have a file taker. You press
space F and it opens all of the files in the
Helix's current working directory and it searches
them recursively. so let's say i want to open
a specific file like main .rs i can just type
it here and it's going to bring it up and i can
open it okay so that's the file picker yes you
can f yes space f okay space f okay okay wonderful
okay next you have um you can absolutely open
absolute files by using the open command. And
this brings up like a menu which has all of the
directories and all of the files right in front
of you. And you can just tab through them and
open whichever one you want. Okay. So you just
type colon and that brings up that menu. Just
like a new one. Colon open and it will bring
this up. Okay. And then if you press like enter
on the directory, it will actually show the files
inside of this directory. Okay. So if you press
enter, it's just going to show you the files
in that directory, right? Yes. Okay. And you
hit enter to open that file. Yeah. What else
can you show us around in Helix? What else did
you like about it compared to any of them? So
I like that, just the one I showed you. It shows
you the files which are available. I don't think
you get this in NeoVim. So it's more user -friendly
in this regard. Secondly, I have this disabled
in my config. But if I toggle auto info, now
when I press space, for example, it will show
me all of the available commands that you can
use. um in helix so it i know in new york there's
like a plugin called witch key it's basically
like that but it's built in okay it's built in
yeah can you say you wanted to global search
you just go space slash and then you can search
for any word and then you will have um you will
see entries which contain this Okay. So regarding
the configuration then, how do you manage it?
Is it a single file? Yeah, so there's two files.
The first file is called languages .toml, and
it has all of your language configurations. And
then another one is your actual configs. So I
will show you in my terminal. I will cd do .config
slash helix. And... There we go, config .tunnel.
But these files are generated by NixOS, since
I'm using Nix. But you can also edit them manually.
Okay. So you have those two files? Yes. This
is another one. As you can see, it's sim -linked
to this Nix store. Okay. Okay. Okay. Let's try
something. I'm going to switch to my screen here.
So you can just guide me through the process
a little bit. Okay. That's okay with you. Okay.
Yeah. So after installing it, I didn't do anything.
And I noticed that there's this directory here
already. Right. But it's empty. So or is it not?
Yeah, it's empty. Do you need to add the files
there? Yeah, so if you want to configure, you
have to make your new file called config .toml
in the directory. Okay. Do you have to start
with like a base config? Is there something that
I should copy from the documentation or something?
So, in all honesty, The only thing you should
really copy would be the language configurations.
It's not already built in because quite a lot
of language configurations, like for Rust, for
example, it's already built in. So you install
Helix, you open a Rust project, and you just
get Rust analyzer support for free. You don't
have to do anything about it. Okay. Yeah. Let's
try something then. I'm going to switch to my
.files directory here. Okay. And I'm going to
open Helix HX. Okay. So I get this. Yes. You
said that if I type, how do I get the picker?
Space F. Yes. Space F. You can open, write the
name of any file and you just jump to it instantly.
Okay. So this is my CSHRC file. I have the motions.
right yeah okay it's sort of like the motions
but it's a bit special because helix follows
a slightly different motions than them what are
the differences you would say so in neoven for
example if you want to delete word you you say
d i w so delete um inside word but in helix it's
reversed so first you would select the word with
um m i match in yeah m i m i w selects the word
okay and then d will delete it okay now is there
b for facial mode what's the difference if i
do v i w because you show me miw and that selects
it right but yes is there visual mode as well
can i do biw yeah it's called so this is select
mode and it so when you move your cursor in select
mode instead of creating a new selection it's
going to extend the current one so just try pressing
j in when you have pressed v okay b and then
i press j yeah okay yes so as you can see it
extend it extends the selection and um and the
benefit of this is that when you do something
like delete you instantly see what got changed
as opposed to vim where sometimes you have to
do a little bit of guessing as to what text will
actually change especially if you're changing
a lot of text i would like for you to show that
to make you some that getting it hold on how
do i do you know if i can to exit out of insert
mode into normal mode i usually use kj um is
that configurable uh yeah i'm pretty sure you
can do it uh but i haven't done this myself because
i have on my keyboard i have escape uh very close
to the home row so i can it's very easy for me
to Exit, but if you're on a regular keyboard,
I understand you would like to do that. So one
of the things here on caps lock, but I just got
used to to KJ already. I don't use the caps lock
here on my pinky, but I'm pretty sure it can
be done probably, right? Yeah, most likely. Yeah.
Okay. Do you mind just sharing about that visual
mode? I didn't get it. Visual. the difference
between the v and the m uh yes so let me go into
my project which i've been working on and let's
say um i just want to select this function it
selects it selects inside of the curly braces
how did you select it what did you type so i
type m let me let me bring up the auto info So
you can see which keys I'm pressing. So I type
M, match, match around, and I type which character
I want to match my selection around. So that
would be the curly braces. And now it selects
everything inside of the curly braces. I press
D, and it deletes the selection. I can just undo
it with U. Okay, so M is to match. Yeah. Okay.
And you have to be on the curly brace to run
MA curly brace, right? Yeah, and you will match
around the curly brace. But you don't have to
be inside of it. I mean, you don't have to be
on it. You can be inside of it as well. For example,
if I do this, it's going to do the same thing.
Basically selecting the closest one. Okay, makes
sense. Okay. And how is this different to V?
When would you use V then? Like, I'm used to
V in visual mode in any of it, right? So what's
the difference there? So here, if you want to
use V, you would usually use it when you already
have a selection. But as you can see, when I
press J, it just resets the selection. But if
I wanted to say... um i have i have this and
i wanted to extend to also include the more the
more word i just press v and now when i move
it doesn't reset my selection and i can just
move until i get the more word in my selection
and then i can act on it if you just hold down
x it will increase the selection like this and
then you press semicolon to reset it if you want
x what is x for um x is basically extends um
until the line bounds and then you press it again
and it goes to the next line and it repeats this
so that is x right yes so is it oh that is to
select the entire line it's similar to the capital
v in the oven yeah okay so it's with x okay and
um what if for example i wanted to select this
uh this and i wanted to select this could i do
it like this one and this one just those um yes
you could actually do that um it would be a little
bit more more like involved so what you would
do is you select the whole file with percent
okay i will show you on my online um terminal
so let's say i wanted to select these comments
i would first um i would make a selection which
includes all of all of the things i want to select
um and then i press s s brings up like a rejects
prompt which allows me to make more selections
based on the regex. So I just search for, in
regex you have starts with, which is the carrot,
and then starts with slash. And then this, this
would select the beginning, the comments, as
lines with comments begin with a slash. And then
I just press X again, and it will select both
of those lines. For me and I can just delete
them if I wanted to or do whatever I need to
Mmm, you press X to select the entire line. Yes
Okay, wonderful So as you can see they have multiple
cursors just built in and this is extremely useful
for example, let's say that I Would like to rename
all of the instances where I use lazy lock i
just select lazy lock and i would like to use
absolute path so i just i just type std sync
lazy lock and it just works it's it changed it
in one place and also on the one down but what
did you press to do that in right yeah so as
again i select and then i press f and i enter
select right search select yeah okay yeah and
then i type what i want to select which is a
lazy lock i press enter and now i i type i to
go into insert mode okay and it goes into insert
mode at both of those locations yeah and now
whatever i type it will be repeated for all of
the cursors and then i just press escape okay
you press escape and that's it yeah escape to
exit out of insert mode okay so this is multiple
cursors you mentioned that it's already built
in um into helix right yeah that's like the core
editing model um is part of it okay What else
do you use multiple cursors for? I usually use
it for making a lot of modifications to the file
and doing stuff like refactors. So actually,
I have made a small website for this. It's called
Helix Golf. Helix Golf. One second, let me find
it. So this is just a small website which has
some examples on how Helix can be used to do
refactoring. So let's just take this example
with JavaScript. So here you have an object,
and you would like to turn this object into basically
an array of tuples, where first you have the
key, and then you have the value, which is the
hex. And here we describe what we need to do.
So we have this command, but I would like to
show it live, how to do it live. So let me just
copy this. And I will make a new file. I will
paste using space B, which is a paste from my
system clipboard. So now I have this. Space B
for paste. Yeah. Yeah, so first, we can replace
the surrounding curly braces with square brackets.
And to do this, we use match. And here we have
match replace, which replaces, which waits for
a keyword for a character to replace. So we have,
so we enter curly braces here. Let me just make
it bigger. Enter curly braces. And now we can
press any character. And it's going to replace
those curly braces with this character. So I
can go something like exclamation mark. And it's
going to just replace them. I can do the same
thing as I did with the curly braces, but with
this exclamation mark. So I type again, M, match,
replace. And then instead of curly brace, I'm
going to type exclamation mark. And it selects
the exclamation mark. And I can replace it with
what I want. So I would like to replace with
a square. square brackets. Okay. Yeah. Now, to
proceed, we need to select inside of the array.
And to do this, we use match inside. And once
again, we select which character we want to make
the selection inside of. So for us, that would
be the square brackets. Now we use the S, which
I mentioned earlier. We can search inside of
this selection. And let's search for all of the
words. So in VEGIX, that would be you select
all the words and then plus. And then now we
have selected the words. I would like to remove
the selections from the strings. So the ones
who have double quotes. and to do this you can
uh so basically in helix you have the concept
of multiple cursors and they have um so you have
primary selection and you have secondary selection
at the moment my primary selection is at the
apricot as you can see them it's slightly lighter
the highlighting yeah so if i press a closing
parentheses it's going to switch my primary selection
to the next selection so now the second selection
is my primary and now i can press comma to remove
this from my selections okay and as you can see
it's made lightning my primary selection now
yep yeah i'm just going to repeat this go to
the next word with uh closing parentheses and
i'm going to remove this from selection again
And I'll do the same with this one. So now I
have three selections, which are the three keys
of the object that we had. And I want to surround
each selection with double quotes. And to do
this, you use M, which is match. Then you do
surround. So you add surrounding with MS. And
then you enter which character you would like
to surround each selection with. So for us, that
would be double quotes. So I'm going to press
double quotes here. And now we have quotes here
and also at them for the objects, for the keys
and the values. Yeah. So next, we're going to
replace these columns. We're going to replace
them with commas. How did you select the columns?
because you had something else selected before
what did you do there uh yeah so i had the these
words selected i just pressed l and it moves
my cursor to the left um but it cleared my selection
which i had so let's say i just wanted to keep
my selection i would press v and then i would
then i would press l again and as you can see
this time it didn't It didn't remove the selection
which I had, but rather it created a new one.
Okay. Yeah. So now I will press semicolon to
collapse these selections into just the cursors.
And I can press R, which is for replace. I replace
the character at the cursor with a comma. So
now we are almost there. Next, what else do we
have to do? As you can see here, we have square
brackets which surround each line except for
the final comma. So here what we'll do is move
all of our cursors to the end by using GL. So
press G. As you can see, there's lots of options
we could use. And it says... l which is go to
line end oh so we do that yeah and it moved us
to the end of the line and now i press h to go
backwards by one character i can do v to go into
select mode and then g s and this will move me
to the first non uh the first non -blank character
in the line G, S, S, S, and Sam. G, and then
S. Okay, I see it. Yeah. Now, I do the similar
thing to what I did before, surrounding our selection.
But this time, we're going to surround it with
the square brackets. So you do MS, square brackets,
and then surround each selection with the square
brackets. Got it. i have a question yeah how
did you set the multiple cursors then when you
started how was your cursor moving on each line
how did you do that like if you wanted to do
three cursors right now again there how do you
do it yes so uh what you can do is you press
capital c and it adds a cursor to the next line
okay and you can also do alt c and it will add
it will add the cursor to the Wait. Yeah, to
the line above. So you press Alt -C, it adds
to the line above. Alt -C, as in tomato? Alt
-C. C as in cat? Cat, yes, yes. Okay, okay. So
with Alt -C, you add more cursors. Well, one
cursor above. And how do you add a cursor below?
You press capital C, so Shift plus C. Hmm. That's
the way that you add. And can you add another
one below? If you type shift C, does it add one
more? Yes, shift C will add the third one. Okay.
I see. Okay. So now that you added the three
cursors, right? I know how to do that. How do
I select the words inside quotes and the key?
Side of things in Africa lightning and Delta.
How do you select those three? inside the quotes
All right. So when you do movements with the
cursors, they are mirrored for all of the cursors
So I just moved inside of the words With on every
single line and now I use match Match inside
and now I type which character I want to match
in and this can be any character so if we wanted
to we could even uh do something like uh square
brackets we could match inside the square brackets
but um we can also just match inside the quotes
which will select everything inside of those
quotes match around quotes we'll select including
the quotes as well okay okay now the recursors
are at different positions right now if you want
to move them to the beginning like all of them
to the opening square bracket how would you move
the three of them to each opening square bracket
yeah so you have a key binding g which is go
to and s so go to start and this will move the
cursor on every single line to the beginning
okay okay so would you say then that this multi
cursor functionality is a huge benefit of using
Helix? Yeah, absolutely. I think so because we
don't have this in NeoZen, to do these kind of
refactors, I just use ChatGPT for that. Just
ask it to do refactors, but it was unreliable
and sometimes it's just a waste of time because
the AI doesn't understand what I want from it.
But with Helix, I don't need AI for this. I can
do it myself. And it's much more reliable. There
is like a plugin in NeoVim. I don't know if you
heard about it. Vim Visual Multi. I watched the
video some time ago. I don't know if you ever
tried it or not. I don't even remember how to
use it. But I remember that I could have multiple.
I could do multiple selections, stuff like that.
But yeah, it's not built -in. You need to install
an additional plugin. And all of this that you're
mentioning right now is built into Helix already.
Yes, absolutely. And what's so great is that...
Yeah, because if you install something like a
plugin with multiple cursors, you're just going
to get extra functionality. But because Helix
was built... With these multiple cursors in mind,
the whole editor is integrated around these multiple
cursors. Everything was designed around these
cursors. So you get more of a complete experience
than if you use something like multi -cursor
plugin. What other things do you like about Helix
that you want to show? What else do you have
there on the website? Right, so I have more examples.
this this one we just convert so this is a comma
separated value and we wanted to convert this
into a sequel so you you just would like to in
for all of these you want to insert some values
into the specific specific table okay you want
to double that oh yeah sure let's do it so let
me just copy this so now i'm going to select
the whole file by using percent and if i yeah
and if i do space on capital arm it's going to
replace um the selection with what i have in
the system clipboard okay yeah so um so now i'm
going to try doing it before i forget this let
me ask you something Is there something like
this? Because I tend to forget what each key
does. And it's nice to have which key, right?
I can press space and I can get all the different
options that there are. But sometimes I don't
want to do this. Sometimes I want to open a menu,
which is a picker, Neobim. And I can search,
for example, for... What example can I give you?
Let's say that I don't remember how... I upload
an image from near them to imager, I don't remember
the key map. So I just search for imager. And
I see here, oh, so it's alt I, that's the key
map that I use. Or for example, if I don't remember
how I paste that GitHub link, right, it's alt
colon, so I can search for my key maps, I'm not
going to remember anything that we're discussing
right now, I'm not going to remember all of the
difference. key maps that i have to use is there
a way to search or how do you search just in
case you forget okay so it's space s or whatever
is there something to search or how do you refresh
your memory so there's the command palette um
if you want to see all of the commands you have
space and then question mark this will open the
picker which contains every single command what
the default key bindings are, and also the description
of this command. So basically what it's doing.
So here you have stuff like HL, you have JK,
but there's also a lot of commands which are
not bound to anything by default. So for example,
extend right. As you can see, it just moved my
cursor to the right, but also extended the selection.
And it didn't put me into select mode. So there's
lots of things like that. For example, let's
say I'm searching for a file. I would like to
search for main .rs. And then I go back to where
I was. I want to bring that picker up. And what
I could do is I could search for it again. But
alternatively, you could also press space and
then space single quote. this will open the previous
picker again so you don't have to type it again
it just opens for you and then you can just go
back to it so those are two files that you you
have open right now correct yes okay so is this
something similar to this in neovim I if I type,
well, me, I have this key map configure, right?
So capital H, I type capital H shows me the four
buffers that I have open, right? So I can just
switch between the buffers, but I have them open,
right? If I want to go to this one is open, this
one is open. If I want to close it, say that
I want to close this, just type D in my particular
case, right? I want to go to this one, I have
three of three buffers open that's why it's shown
here is that similar is that something similar
what you're just showing right now yes so um
in helix first of all you have the buffer line
and i have this disabled but you can enable it
uh pretty like this so you do just type colon
toggle buffer line and um wait hold on Oh, I
remember. You have to do set buffer line to enable.
Yeah, I don't remember how to do it. Let's see
the docs. The Helix editor. And can you see the
docs from the editor itself? Or you should go
to the website? Yeah, I just go to the website.
At the moment, the docs are not available from
the actual editor. But in the future, there are...
plans to have like a help command but in helix
oh wonderful yeah this is pretty useful you going
through all this in the video and not having
it enabled and then enable it that's going to
help users that don't know nothing about helix
because it helps us understand yeah how to find
help and all that stuff also like uh for example
right now i don't remember how to enable the
buffer line but i'm showing you how to look for
the docs and how to figure it out so maybe that
will also be helpful so let's search for buffer
line um yeah right so you have configuration
editor and here you have let me search for buffalo
with ctrl f right so okay so one of the options
are either always never or multiple oh i understand
so if you set buffer line to always it will always
show which available buffers you have you can
yeah you can move between them by pressing g
and then n and this will move you to the next
buffer and you can do the same but with back
so you go g b g p right previous go to previous
and we'll move it to the previous buffer okay
okay yeah i don't like keeping the buffer line
enabled too because it distracts me yeah okay
but you can get a picker where you see the two
buffers that you have open right how did you
bring that picker up so you press space and then
b and it shows you which buffers you have so
you don't need a buffer line yep i don't need
it i don't like it okay wonderful so why did
you have it disabled if i may ask like why why
do you keep it disabled um i don't because i
keep it disabled because i don't really need
it i use key bindings like if i need to see buffers
i just use space b if i need to open a file i
just type whatever i need into the file file
picker so i have most of the ui disabled just
so it's a minimal stuff okay wonderful okay now
where were we i got last there so you were gonna
demo something i remember oh yeah we wanted to
show how we um do this refactor let me stop you
a little bit there what's this website is this
something you created for the community what
is it yeah so i just made this uh website called
Helix Golf. It's just basic static website. It's
on my GitHub. We did have a couple of contributors.
I believe we have like five pull requests here.
And I just wanted to let people know about the
power of Helix, how you can do different transformations
to text. in Helix, because I don't see this talked
about as much as NewVim. So in NewVim, you have
NewVimGolf, and everyone knows about it. I didn't
know about that. Yeah. Yeah, go on. Sorry. Yeah,
so let's do it. So let's turn this comma -separated
values into SQL. Right, so first... You just
wanted to share a little bit of knowledge about
Helix with the community, right? So people can
come here and find examples on how to do basic
stuff, right? What would they expect? Just like
multiple cursor examples? Is that what you have
in the website or you have other stuff? Yeah,
so this is just one of the things which I made
for Helix. One more, which is on the Helix GitHub.
So if you go there. If we go to the Wikipedia
page, here we have this tutorial. So you have,
like, tutorial one, getting started, two. It
teaches you, like, how to use Helix from scratch,
basically. And this is what I wrote, all of these
pages, so that people have an easier time. You
wrote all of that? Yeah, yes. Okay, okay. why
did you start with that you know like we we needed
to know who you are what have you done in helix
so you wrote basically the entire wiki page or
most of it oh no just be adjusted to everything
that starts with tutorial is i wrote it oh okay
wonderful yeah okay what else have you done in
helix besides your other websites what other
things have you done in helix Yeah, so in Helix
specifically, I have a couple of pull requests
open if we search by my name. Yeah, so I have
about 24 open pull requests right now. So the
biggest one that I've been working on is git
blame. So git blame will allow you to show a
message at the end of the line. It will show
you like, the latest commit, which affected this
line. And it was like my biggest, biggest ever
pull request to any open source project I've
done ever. So as you can see, it's about 1400
lines. Yeah. So here you can see like the documentation,
which is going to happen when it gets merged.
And then I was actually amazed how many people
reacted positively to this. So, but great. Okay.
So you're waiting on approval then, right? Yeah.
There have already been like some reviewers,
like Byron, who is the creator of GitOxide. And
GitOxide, one second. Right, so Git Oxide is
basically a rough implementation of Git. It's
still a work in progress, but they have made
very, very impressive progress. And Git Oxide
Blame is what I'm using in my inline Git Blame
pull request to implement this feature. Okay.
Yeah, one pull request which actually got merged
lately. is color swatches. So in CSS, you have
things such as, you have colors, like you have
blue, green, and I added a small square, which
appears next to these colors. And this currently
got merged, it's on master, but I believe it's
going to be in the next release. Oh, okay. So
you can see the actual color. You can get an
idea on what the color is in the file that you're
editing. Yeah. And what I really like about this
implementation is that it doesn't hard -code
anything. So we don't have to make any sort of
parser for this RGB function. We don't have to
hard -code the light green color in the editor.
What actually happens is we just implement a
language server protocol method, LSP. On the
Helix's side, we have implemented it. And then
on the side of language servers, they have to
implement some function which returns the colors
for this file. And then these two will communicate
together. and produce these colors in the text
file so basically anyone can actually write their
own language server that provides these colors
which actually was done it was done by i believe
yeah some q60 they have made a custom language
server which shows colors but for hex code. And
it works in any file. So it can work in Nix files,
in Toml files, even has auto -completion. Okay,
wonderful. That's kind of the advantage. I see.
And you go to the NeoVim community and grab inspiration
and ideas. for stuff to implement in helix yeah
yes yep how does that yeah because that's the
main goal make the editor better for sure right
so yeah where do you grab inspiration from other
editors which ones so uh of course it's new them
and near them's plugins i'm Yeah, because there's
some plugins which can just make sense to implement
into Helix itself. They don't make sense as a
plugin to Helix. Because in the future, Helix
will have a plugin system which will allow you
to write any sort of arbitrary code and you can
interact with the Helix API. So you have emojis,
you have a list. a file with 10 ,000 emojis.
And you can open a picker where every single
line is one emoji. And this is the kind of functionality
that you will be able to get when the plugins
arrive. But at the moment, Helix doesn't have
plugins. So for me, I don't need plugins because
I can just edit source code and implement the
features which I need. and share it with others
okay so so far there's nothing you're missing
in helix right um is there something that you
miss that you say like oh man i had that in neobim
and i don't have it in helix something that you
can think of Right, so actually I would be surprised,
but no, there isn't much that I'm missing. So
when I was using NeoVim, I had about 60 plugins,
maybe two or three thousand lines of NeoVim configuration.
And when I switched to Helix, everything I really
wanted from all of those plugins was just built
into the editor itself. So I didn't need to worry
about... installing like a dozen plugins i didn't
have to worry about like breaking changes happening
every week and and me having to fix my config
things just work uh and this has been the case
for like uh the couple of months which i'm using
helix i haven't had any issues with it uh like
where it just stops working randomly that doesn't
happen which is one of the amazing okay wonderful
can you view images in helix So actually, as
I showed you with Yazy, you can use Yazy to view
them. Oh, but I mean in a Markdown file. Oh,
at the moment, there is no such capability. But
maybe in the future we can have something like
this. And I think it's possible to implement,
because we can use, I don't know, like 6L protocol,
which... is a protocol like for terminals where
they can display images like in yazi yazi probably
uses this protocol to display these svgs and
helix might be able to use something similar
okay okay because well sometimes i view images
any of them if you look at my screen right now
or my blog post especially right so i just need
to see what the image is, right. So if I jump
to my blog post here real quick, you're going
to notice, for example, this article, what is
this? Let's say that I opened this, this article,
right? I just quickly want to make sure that
the image that I have in the file is the correct
image. So for example, here, right? If I hover
over it, I can just quickly see Oh, so yeah,
I do have the right image. But that is Probably
coming in the future to Helix at some point,
right? There's actually an open issue about this.
Let me actually search it up. So Helix editor.
Let me know when you have it there and I'll switch
to your screen. Yeah. Let me find it. Image preview.
I remember seeing something like this. Right,
so I can't find it, but I do know that in the
future we will be able to implement this. If
not in the core, at least with plugins. Okay.
Yeah. Makes sense. Now, Tmux is a pretty important
part of my workflow. How does... tmux and um
helix play around do you use tmux by any chance
or no i used it for like a little bit but i don't
use it at the moment i used right so the terminal
editor which i use which is west term it provides
with me with all the features which i need and
just like paints um having different tabs yeah
okay yeah because If you guys decide to take
images into consideration, I'm in Tmux right
now, correct? And I can view images even when
inside Tmux. So even if you implement image support,
there's going to be a lot of customers, Helix
customers probably, that will use Tmux and will
tell you, hey, my images don't work in Tmux.
So I'm just bringing it up just in case. I mean,
we can't know what problems we'll have in the
future. Maybe we'll have this problem, maybe
we'll fix it. I will go there and create an issue
that I cannot see images within CMUX and Helix.
I'm just playing with you. Just playing with
you. All right. Let's demo the other thing that
you were going to show, the CSV demo. Yeah, sure,
sure. Yeah, so let me just make a new file with
this. Where are you from, by the way? Oh, yeah,
so I'm from London, from England. I've been here
since a very young age, but originally I was
born in Moldova. Oh, okay. Have you heard about
it? I have heard about it. I have no idea where
it is. I'm sorry. Yeah, yeah. I mean, that's
most people. Most people don't. It's a country
next to Ukraine. Oh, okay. It's like my country.
Nobody knows where my country is. It's Guatemala,
and people are like, what the hell is even that?
So I'm used to it. Yeah, me too, me too. Okay.
Okay. I live in London now. Okay, great. Yes.
So, right, so in Helix. You can see I don't have
syntax highlighting form comma separated values.
But I can go use column and then type lang. And
it will bring up a list of all the languages
which Helix has syntax highlighting for. And
then I can set it to whatever I want. So let's
set, right, so I set it to Rust. It's obviously
not, it's going to complain syntax error. This
is not valid Rust. let's set it to comma separates
values so as you can see now is this just syntax
highlighting or is it also lsp when you select
the language like do you get lsp yes you get
lsp you get syntax highlighting okay and you
don't need to do anything these come by default
in helix you don't need to configure lsbs enabled
by default And what if there's one that is not,
let's say that you're using a language that is
not part of Helix, what would you do in that
case? Yeah, so in this case, once again, you
go to the Helix wiki, which has Helix editor
GitHub. Right, so you go to the wiki. Here you
have all of the language server configurations.
These include... um hundreds of languages and
uh for example let's see let's say i wanted support
for mojo um right so here you have okay so for
mojo is a bad example because it doesn't have
but for matlab for example you have these uh
configs which you can just copy paste into your
languages .toml this might not be included by
default but you can easily add it Okay. So there's
a lot of examples in the documentation. Yes.
Wonderful. Okay. Thanks. Right. So let's do this.
So we want to convert this comma separated value
into SQL. And to do this, as you can see, they
all begin with the same thing. so they they begin
with insert into database dot table so first
let's select everything i press percent it selects
the whole file and then that's that's the command
that you have there at the bottom right so we're
going through that command uh yes oh yeah yeah
yeah that this one yes but yeah okay as you can
see it lists all of the explanations here uh
i will go through Wonderful. Yep. Yes. So I press
Alt S and it splits my selection into multiple
lines. So for every single line, I get a new
selection. Now I press capital I, which will
move me to insert mode at the beginning of every
single line. Yeah. And now I can type whatever
I want. So I just type what I see. on the after
so the table right and you can see it in real
time in the three lines not only in one right
yes so as you can see i type and it adds it to
every single line at once okay yes um so next
what do we have here we have uh the the id item
cost location and here it's actually repeated
so um now what we are going to do is we're going
to press t and then we're going to press enter
and this moves this select until the end of the
line t right yeah so it's not just special case
um basically team is a command which allows you
to move towards any character so let's say i
go to the um okay just like any of them t yeah
okay okay got it yeah like te would select to
them before the e etc you have 50 gray which
likes backwards okay yeah okay but answer is
till the end of the line uh yeah because um enter
is like the new line so you um yeah the lf character
at the end yes until the end yeah okay because
in helix and new lines are actual characters
so you can go you can an lf right the lf character
or yes yeah it depends it depends on which uh
text style you have because some of them have
different characters for end of line okay got
it yeah so you can press uh y which is going
to yank the character that we are on and you
press p and it just inserts a new line because
that's the character which i have copied okay
yeah so let's i press shift c to have multiple
cursors now let's copy all of this i select until
the end of the line with t enter and then i copy
it i i paste before the selection by using Shift
T. And this, hold on, let me just make this so
you can see it. So now we have two of these.
And as you can see in here, so the first pair
of these keys, they don't have any letters in
them, but the second one does. So what we're
going to do is let's just delete them, the numbers.
Once again, you do S, and it will search inside
of your selection. And in Regex, you have backslash
D, which is going to select the digits. And if
you do backslash D +, it will select one or more
digits. So here I have selected the digits, and
I'm just going to press D to delete them. like
this yeah um now right now what are we going
to do let's just add a closing parentheses at
the end of a location so okay i'm going to add
more cursors here and like this right how did
you add the closing after the multiple cursors
how did you add the closest closing parentheses
yeah so i just press i to go into insert mode
and then i press closing parentheses and it asks
them all of them at the end okay yeah so now
we have this uh let's let's write the rest so
we have values here and then So here we have
the word surrounded with parentheses. So we want
to do the same. So once again, we're going to
do T and then to the new line. So like this.
And now we do match. Let me turn on auto info.
So I do auto info so that you can see which commands
I'm typing. So I do match, surround add. which
is going to add surround and parentheses like
this. Okay. Yeah. Um, so what else? Oh yeah.
As you can see here, we actually have a semicolon
at the end. So let's not forget that. And, um,
they, they begin with capital letters. So right
now, right now you can see that it's location
but it's lowercase so to change the case uh we
can do we can do tilde so so enter this character
and one of your cursors how do you undo if you
mess something up you just type you to undo yes
yeah you just do you if you want to redo you
do shift you okay so it's not okay you yeah and
shift you okay yeah so i did um hold on one of
your cursors is moved to the to the right the
the bottom one how do you move that single cursor
can you um so i'm not sure if you can move single
one but what i usually do is just uh for example
here i would like to select just the l i i go
into select mode and i go back and now i have
all of the l's in my selection and now i do s
to select and i type l and it's going to place
a cursor at the l okay make sense okay yeah so
now let's just capitalize the l and let's do
the same with c and as you can see we have the
same problem here but we can circumvent it by
using the same method so you just select make
sure c is in your selection and then you select
the c by pressing s And then C, enter. Place
your cursor on the C. Now you use tilde to change
the case. Tilde. Tilde, yes. Okay. So let's see
what else. Oh, yeah. One more thing is all of
the words in the final parentheses. As you can
see, they have single quotes around them. Yep.
So I'm going to select inside of the parentheses.
Match inside. I type parentheses. And now I'm
going to do... Let's see, let's see. Is it Alt
-K? Yeah, so it's Alt -K. I press Alt -K and
it's different to F. So with F, you input like...
um some text which you want to select inside
of your selection but with k you input text which
you want to be removed from your selection so
exclude okay yeah so your selection is going
to be split into multiple smaller ones so you
can remove the commas from there yes so i type
comma and one second wait Oh, yeah. So I think
I remapped it. Yeah, there we go. So I remapped
it to a different key. Let's see in my config
what it is. So scnixos. Right. So let's see.
Shift S. I don't... I think... Yeah, I think
actually... Shift S will split your selection
to multiple ones. Yeah. So now that we have this,
I can do make so match surround add S. And I
input single quote. And it's going to surround
each of the selections with a single quote. Yeah,
I think. I think. Oh, yeah. And we do the same
with here. So here, I just collapsed my cursor
into a single one by using a comma. Okay. Yeah.
So let me make three cursors again. I will select
inside of the parentheses with mi opening parentheses.
And then here, as you can see, we have item,
which is capital. The first letter is capital.
Let's change it to lowercase. And tilde? You
just use tilde? Tilde, yes. And you go match
inside of the parentheses. Next, you select...
So you want to select the words. So you can do
this with Regex pretty easily. You just press
backslash W, which selects a character which
is a wordly character. and then plus means one
or more more of these so by doing this i have
selected each every single word okay yep yeah
so and now i just do the same thing i go match
surround add um and grave i press the grade and
it added um the back ticks So I think we're done
now. Yep. Oh, hold on. Yep. Yep. Okay. Wonderful.
Yeah, that explains really well how this multiple
cursor functionality works. I think that's going
to help a lot of people see the power of Helix.
Yes. Have you heard about the joke, the Helix
joke? By the primary joke, I cannot say it but
what else do you want to show? Why you can't
say Because it's a It's a bad joke. Okay. Okay.
Oh, yeah Yeah, sure. Um, so what would you like
to get to next? What else do you want to show?
What else do you think it would be useful for
new people to know about? Let's see. How long
have we been here? An hour and a half. If you
have time another day, we can do another session.
Right. Like so I'm going to post this video once
it's ready and I post it in the Helix community.
And let's see what people say there. Right. Like,
hey. I want to learn about this, this. So if
there's someone still watching the video, please
let me know in the video or in the Reddit post
if you would like to learn about something specific.
And if you're willing to meet again, Nick, and
explain that would be great. But it's up to you,
right? Yeah. If you want to do it, of course.
I mean, it sounds good. Sounds good. Okay, so
what else do you want to show before we wrap
it up? And in the next call, if we have another
one, we can get to know you a little bit better.
Sure. Would you like to show something else?
Yeah, I mean, let's look at the Helix documentation.
Maybe there's something which will inspire me
to show off some cool features. Okay. Right,
so let's go into configuration. editor and here
you can see all of them um config options oh
yeah one thing i want to note is that when you
as you've seen me do i use toggle and i use like
buffer line for example so whatever you like
about helix is that when you do toggle you can
see all of the config options on the screen and
you can just tap through all of them and it will
um show you like every single one in the future
we also might have something like help so you
you will be able to see which what each config
option does in like in in this concept yeah so
like above here you would be able to know what
it will do okay yeah and similar similarly you
can use that with themes so the theme command
it will show you all of the themes and now you
press tab and you can cycle through them so you
cycle through yeah i'm not gonna do it fast just
in case someone has like um someone's gonna react
negatively to it but you can you can go through
all of them um and it will show you each one
oh and okay yeah okay and what if i want to create
if you if you look at my screen i have a custom
color scheme right i don't create i didn't create
a color scheme for this right so it's just some
colors that i applied can i do the same in helix
if i want to apply my own custom color scheme
yes yeah you can absolutely do that so i even
made my own color scheme um and it's actually
pretty simple to do because it's just in a tumble
file let's see if i can find it While you're
looking for that, would you say that Helix is
a good project if you want to get started with
Rust? Oh, yeah, absolutely. So the Helix code
base is very clean, very easy to follow. And
from what I've seen, it achieves a surprisingly
large amount of features compared to its low
code size. So I think Helix has like... About
70 ,000 lines of code in Rust. And I looked at
how many lines of code NeoVim has, for example.
And that is like 200 ,000 or more. And most of
it is in C or Lua. And then you have Zed. Zed
also is written in Rust. But I think it has almost
a million lines of code. It's kind of impressive
how far Helix got. If you compare its code base
to the size of other editor code bases. Okay.
So if I'm like, okay, I want to learn about Rust.
If I get involved with Helix, would that help
me in my process of learning Rust? If I want
to contribute to Helix and all that stuff? So
I would recommend contributing to something that
you're personally interested in. And that is
a good way to keep yourself motivated to work
on projects. So for me, this was Helix. I basically
learned Rust by contributing to Helix. I think
from day two or three since I started with Rust,
I made my first full request to Helix, which
was small, but it was enough. to get me started.
But there's tons of cool open source projects
that you can contribute to, which you might also
find interesting, and they are written in Rust.
So that kind of seems like the language that
everyone uses for new projects on GitHub. So
would you say that Elix made your Rust learning
experience more... productive and better for
you personally yeah okay i learned so much just
by reading helix code trying to understand um
where different things go and it's it's it's
so awesome like when you use a text editor to
actually understand like what is going on under
the hood what is happening um so it just feels
good to use tools and knowing what happens underneath
them which is completely unlike um any sort of
like commercial software where you just get like
this binary you don't know what what it's made
of you just run it you don't really understand
what's going on okay okay good thanks for sharing
so you were gonna show oh the color the color
scheme yeah yeah so the color scheme which i
made which is like is the best color scheme in
the world yeah looks like the fries box from
mcconnell's right yes did you ever use it uh
maybe for like 10 seconds okay yeah but if you
want to make your own color scheme it's actually
not very difficult all you have to do is just
specify like which scopes represent which color
So here I have defined the palette and here I
can just use the palette. Yeah, and you can see
all of the scopes on the documentation side.
Okay, wonderful. So before we get into the color
scheme, we're going to show something else. I'm
sorry, but I keep interrupting you and pushing
you to different places. So you were gonna show
something else. I don't remember what. I don't
know. I think I was looking for the docs for
Helix. Seeing if I can get like inspired by any
of the config options. I noticed autosave there.
So is that an option? Autosave and autoformat?
Autosave. Oh, yes, yes. So as you can see. you
can say automatically save it when the focus
is lost and okay yeah but this is not something
i personally use because for me i just have um
save key bound to enter so i just press one key
and it will save my file okay yeah and yeah so
the issue with autosave is that um it sometimes
it can trigger and if you have automatic formatting
enabled Then it's going to format your file like
at random times whilst you're editing. And this
is not really a good experience. So what I prefer
is like editing. And then when I decide that
this is a state which I want to commit to, I
just press enter and save. Okay. Yep. Yes. I
got. I got used to auto save already any of them.
So I do auto save and auto save triggers auto
format. But I do understand what you're saying.
I have it configured to save after three seconds.
If I haven't made any changes, have a lot of
conditions, you know, in which ones not to save
and when to save. So if I'm in visual mode, don't
save, right? Even if the three seconds pass,
don't save. If I'm in insert mode, no. Only if
I'm in normal mode. It's good to hear that it's
an option. What else? What else? Oh, something
that I wanted to ask. Give me a second. Oh, do
you have your config in your .files? Do you have
your .files public? Yes, my .files are on GitHub.
So I think I have them. Let me see. Yeah, there
we go. Nix .files. So all of these files are
just publicly available. So this is my Helix
config. It looks like this. I have about 400
lines here, but most of this is for language
server setup. So stuff like Tailwind CSS, what
else? Nginx, this sort of stuff. And then also
my custom overrides. But in terms of my personal
config, I believe it's nothing special. The most
important feature is for me, Yazi integration,
which is this, which is already shown. And another
one, which is a lazy git. So you can also have
lazy git right inside of Helix. So yeah, I have
this. Do you know about lazy git? Yeah, I use
it all the time. That's my preferred method of
pushing stuff. So you can open it like this normally,
but you can also open it from Helix. So for me,
I have key binding for control G and it opens
it inside of the editor. Here I can make whatever
changes I need to make. As you can see the gutter
here, it says that this line was modified. it's
blue on the left so um one thing you can do is
just commit it so you just write some commit
message here and as you can see the blue lines
went away it means that this was committed yep
i also use basically um i have it mapped to alt
g and i get i get it from neovim right so notice
that i'm inside neovim here alt g brings it up
and i just can read my commits there so who is
stealing the ideas from who i guess helix is
stealing from any of him and you're the one doing
all that possibly okay um you're that fast okay
i noticed it's at that next file i know nothing
about next i'm just a regular person so someone
looking at your helix that next file can just
copy whatever is in there just put it in their
config that also yeah they should be able to
just uh copy but they will have to change the
syntax because the syntax is a little bit different
but in terms of a key value pairs it's the same
so okay yeah it basically just translates this
dot nix into dot tumble a one -to -one mapping
okay and that that that demo file is nowhere
in your in your dot files that's just local yeah
i guess right yeah um but i i can actually open
it it's in my helix folder it gets automatically
yeah here we go it's this it gets generated okay
got it makes sense all right so um i do really
appreciate your time nick it's been more than
an hour and a half thank you very much I'll share
this. Let's see what the folks say. And if you
want to share more with us again, I'll reach
out in Reddit. We can chat there. All right.
Sure. So, yeah. Have a good one. Yeah, you too.
Bye.