So maybe one of the things that I want to do
is I want to print out the value of this variable
foo after it's been multiplied by two. I'll do
G question mark V. And what will happen is debug
print will insert a print line. I'm going to
run the script again in my terminal. You'll see
that it now prints out debug print. And here
it's printing out at the end the value foo equals
246. If I want to repeat it down here, debug
print supports dot repeat, the fin dot repeat
function. So I can just press dot. And now I
get that same print out here. Debug print is
able to remove those statements anyway, because
it provides the command called delete debug prints.
So I can just type delete debug prints and they're
all gone. 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 Linkarzu.
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. Hey,
Andrew, how's it going? It's going good. It's
going good. Chris, how's it going with you? It's
going good as well. What time is it where you're
at? It's just gone 20 past six in the evening.
So, yeah, kind of like beginning to wrap up for
the day here. So great time to great time to
connect and chat. Oh, yeah. It's 1121 a .m. here.
So, yeah, thanks for joining. Thanks for. No
problem. your time today, you're going to share
with us about your NeoBIM plugin. Is that correct?
Yeah, that's right. Yeah, I thought I'd talk
to you a little bit about a NeoBIM plugin I've
built called DebugPrint or DebugPrint. and maybe
kind of give you a little bit of a demo and a
flavor, or we can talk a little bit about, you
know, what kind of led me to create it in the
first place. And, you know, some of my experience
is creating NeoVim plugins or specifically this
NeoVim plugin. Okay. Is this your first plugin
or you have more? So I actually have another
plugin that I maintain as well called wrapping
.envim. I think debug print is kind of more interesting.
It's certainly more full feature than it's kind
of where most of my attention goes these days.
So that's why I thought we'd talk about that
today. But yeah, I have another plugin called
wrapping .envim, which is all to do with kind
of switching between soft and hard wrapping automatically.
It needs a little bit of love and attention though.
So that's one of the reasons why I thought maybe
we'd talk about debug print instead today. Okay,
wonderful. Do you mind showing us your repo?
just to get an idea of what the plugin is about?
Yeah, sure. So this is the repo you can see here
on the screen. You can find it here at andrewferrier
.debugprint .envim. So essentially, if we kind
of just sort of scroll down and take a look at
the readme. So basically, this is just kind of
talking about what DebugPrint does in the general
sense. So really, this plugin was kind of born
out of some pain that I had in debugging. um
kind of shell scripts and python scripts and
other things i don't do a lot of kind of like
hardcore programming programming myself anymore
it's not something that i do as part of my day
job but i still do it as kind of a hobbyist from
time to time and so my attitude towards debugging
tends to be quite lo -fi and low -tech right
i don't really use kind of full blown debuggers.
Instead, I like to, you know, use the kind of
old school method of sticking in lots of kind
of print statements. But that can be a bit tedious,
and you know, ends up a bit of a mess. And so
the idea of debug print was kind of borne out
some pain there where, you know, I wanted to
work with several different file types and I
wanted an easy way to insert kind of debug statements
into different kind of types of programming language
or script such that it would kind of show you
where you were. And it kind of sort of started
fairly small. You know, I supported only a few
languages. It's grown a bit, right? So it now
supports kind of up to 40 file types or programming
languages and various different variants, including
almost all of the standard ones that, you know,
folks in the NeoVim community tend to use. In
my experience, you know, most modern languages,
Python, JavaScript, Java, C, Lua, and loads and
loads of others. um actually if you're interested
in in this plugin you want to see if it supports
the language that you're working with if you
click on this more link it will take you down
the bottom of the readme to this feature comparison
table so this feature comparison table actually
shows how debug print compares to some bits let's
call them competitor plugins or similar plugins
and if you take a look down there you can actually
see down the bottom i've got a list of all of
the different file types that are supported.
And of course, I'm showing that debug print tends
to support kind of almost all of the common ones.
But yeah, so that's the basic idea is it's there
to kind of insert kind of debug print lines.
If you still don't know what that means, it's
probably going to be easier to show by way of
a demo, which I guess we'll kind of get to in
a second. and over time it's grown a whole bunch
of sort of sophisticated features around highlighting
lines outputting variables it provides neovim
key mappings for all of the different sort of
standard neovim modes and a whole bunch of kind
of ancillary features as well oh wonderful do
you want to quickly give us a demo well not quickly
because that's the that's really interesting
part of the call you know can you just show us
around and give us a better idea Sure I can.
So let me open up a terminal window and I'll
just start up NeoVim. I tend to use the nightly
distribution of NeoVim because I'm developing
a plugin. And so, you know, I tend to like to
make sure I've got all the very latest stuff
to, you know, make sure the plugin is able to
stay on the bleeding edge as well. Although at
least for debug print, I try to do a reasonable
job of making sure it's compatible with a few
versions back. So I think at the moment, you
know, it's still compatible with NeoVim version
0 .10, for example. But anyway, let me open up
just kind of a sort of a sample file, right?
So what I'm going to do is I'm just going to
go actually into the debug print repo, the debug
print repo itself. And I've actually got, let
me just sort of scroll around. I've actually
got a sample Python script here, for example.
So you can see this Python script, incredibly
rudimentary, even if the folks watching this
video don't. you know, don't write Python, I'm
sure they'll understand what this does. You know,
if you have any kind of programming experience
at all, right, so obviously, we're just assigning
the value 123 to the variable foo, and then we're
multiplying the variable foo by two, bar is being
assigned 456. And then we're just summing those
two values together. And we're printing out that
sum, obviously, a very simple script, right,
but just for kind of demonstration purposes.
So, you know, let me open up another terminal
window and I will go into my DevoPrint. repository
and I will find that sample script here it is
let me run that sample script and here you go
here's the value here's the answer 702 but let's
say that I'm a little bit confused about why
it got to the value 702 that wasn't quite what
I was expecting so I want to insert some kind
of debug print statements into my code to understand
what's going on So maybe one of the things that
I want to do is I want to print out the value
of this variable foo after it's been multiplied
by two, but before we add it to bar, right? Just
so I can see what the result of multiplying one,
two, three by two is, right? Again, this is obviously
a bit of a contrived example because clearly
we can figure that out relatively easily in our
heads. But let's say I want to print foo. So
what I'll do is I'll do G question mark V. Excuse
me. I'll do G question mark V. And what will
happen is debug print will insert a print line.
You can see that it's basically formatted in
a sort of standard Pythonic way in this particular
case. So it's got this string debug print in
here. And then you can see towards the end it's
printing out the value of V. Now, for those of
you who are watching the video who maybe haven't
written Python before, essentially this is a
Python's way of inlining variables into a string
using this kind of syntax here where it has these
curly braces. So if I go and run the script again
in my terminal. Sorry, I need to save the script
first. That would help. I go and run the script
again in my terminal. You'll see that it now
prints out debug print. And here it's printing
out at the end the value foo equals 246. So,
you know, not particularly complicated, but the
really powerful thing is we can then go and repeat
that, right? So if I want to print out the value
of foo here just after I've assigned 1, 2, 3
to it, I can do G question mark V. If I want
to repeat it down here, debug print supports
dot repeat, the bin dot repeat function, so I
can just press dot. And now I get that same printout
here. Or if I want to print out bar, I can do
G quote mark V down here, and I'll print out
the value of bar. If I want to print out some,
I can do the same thing down here. So you can
see I can very rapidly debug print statements
all the way throughout my code. Sometimes I might
also want to print something more generic just
to understand where I've got to. This code doesn't
really have any ifs or loops or kind of conditional
logic in it at all. But sometimes you might have
some if statements. So let's say, for example...
right let's change this can you undo and add
those debug statements if you just undo yeah
i can i can and actually i was going a bit too
quick there wasn't i right because what i've
actually just done is hit the vim undo key it
supports vim undo right so i can just hit you
to remove the statement that i just added in
the same ways you can undo a lot of stuff in
vim but there are also other ways of doing it
so if for example i add a few back in again Right.
Maybe I save my file. Maybe I even quit Vim and
I come back and I open that file up again. Right.
Maybe I've lost my undo history at this point,
depending on how I've set up NeoVim. But debug
print is able to remove those statements anyway,
because it provides the command called delete
debug prints. So I can just type delete debug
prints and they're all gone. oh and basically
all it's doing is just doing a simple match on
this string debug print here in in capitals and
it just literally deletes them from the file
right so that's that's kind of all that's going
on there um i can actually do some other stuff
so for example if i type uh toggle uh excuse
me if i type debug print toggle comments debug
prints. I don't know why I couldn't find that
there for a second, but if I type toggle comment
debug prints, one of the things it will do is
it will then go through the file and it will
actually comment them all, right? So in this
particular case, it's using Python comment syntax,
which is to put a hash mark in front of each
line, but it will do that in a way that makes
sense for the language that you're working with,
of course, right? So if I now go back to my script
and I run it again, I'm not printing anything
out. If I go back to my script and I run toggle
comment debug prints, it will uncomment them
again. So if I save that and now I run my script,
now I've got my debug prints back again. Okay.
And in script brackets, you see the line number.
Oh, no, it's not the line number. What is that?
It's not the line number. No. So the way this
works by default. is that here it's showing test
p y is the name of the file and then three is
the line number it's the line number when the
line was inserted so debug print isn't smart
enough to update these statements as you edit
the file right so if you add lots of lines The
debug print statement won't change. That's maybe
a little shortcoming, if we're being honest.
But that's the line statement when it was inserted.
So, for example, if I go up here and I insert
one just after line one, you'll see that it's
got the line number one as part of that debug
print statement. The number in the square brackets
after debug print is how many debug print statements
I've inserted ever since I've started using debug
print, right? So I actually, obviously I've done
more than 22 in my career, right? Because I developed
debug print itself, but I actually reset that
counter earlier before we started, you know,
recording this conversation. But if I quit NeoVim
and I reopen it again, and I go back to my Python
script and I insert some more debug print lines,
you should see it carries on from the same number.
There you go. 23 if i insert another one 24 if
i insert another one 25 and this is quite powerful
because this means if i've got multiple files
that i'm inserting my debug print lines into
you know i kind of got this just monotonically
increasing counter so it makes it easy to tell
them apart when i'm running my script right so
you know if my script consists of multiple classes
or files or modules you know whatever programming
language i'm using i can easily tell where they
came from right so this debug print 20 If I'm
looking at that and that's really interesting,
but I need to go and correlate it back to my
source code, all I really need to do is search
for the number 25 and then I found it. That's
kind of the idea. So it actually inserts a line
and it inserts the print statement, basically,
right? That's correct. That's correct. And it
does this in Python because it knows that we're
working with Python. If I were to work with a
different programming language, so let's say
I go and edit some Lua code instead, right? I
write quite a lot of Lua because, of course,
NeoVim plugins are written in Lua and DeepiPrint
is written in Lua, right? So if I'm working with
Lua instead, I can use exactly the same key bindings.
So I can do G question mark V. Oh, I didn't type
that fast enough. I do G question mark V, and
now it inserts the lower equivalent, right? So
rather than Python code, which of course wouldn't
make sense in this context, instead it's using
print, and then it's using this vim .inspected
tax here to inspect the value of fit. So it's
basically the lower equivalent of what the Python
statement would be. And as I say, it works across
40 -odd different programming languages, right?
So we have templates that make sense. hopefully,
at least, for each of those different programming
languages. And you can actually add your own
and customize the templates as well if you want
to kind of get fancy in advance. But out of the
box, this is kind of how it works. Okay. And
you specify that highlight group. That's why
it looks red, the background, right? Yes. So
the way that it works is out of the box, debug
print is configured. If you're using mini .envim,
I'm sure many of your... And many of the people
watching this video will have come across Mini.
It's, you know, one of the most popular, in fact,
if not the most popular kind of like meta plugin
in the NeoVim ecosystem. So it has a submodule
called, I think it's Mini Highlight or something
similar. I forget the exact name off the top
of my head. But debug print works with that.
So if you've got mini installed, it will use
that highlighting module to basically highlight
any line that contains this exact string debug
printing in. in capital letters, right? So anywhere
that you insert it, it will automatically highlight
that. But it's actually mini -envim that's doing
that, and then debug -print kind of configures
it to do that out of the box. If you don't use
mini and you're not interested and you've never
installed it and you're not interested in installing
it, you won't see that red highlight. It will
just appear like any other code. So that's just
a convenience feature, and you can turn it off
in the debug -print options as well if you don't
like it. Okay, but it does not install. that
mini plugin as a dependency you have to add it
manually right if you want the highlight That's
right. Well, the way that this works, if you
have a look in the readme for debug print, just
going back to the Git repo, the way that this
works, if we go down here, you'll see that the
example that I give for installing debug print,
which is for that lazy Envim plugin manager,
by the way, which I think is probably the most
commonly used one. Here I'm listing mini Envim
as a dependency, and it says needed for line
highlighting. But as it says there, it's optional,
right? So if you don't include this dependency,
That's fine. You just won't get that line highlighting,
basically. So it's kind of your choice. And the
reason I implemented it that way is because implementing
that line highlighting is actually not straightforward.
I kind of looked at doing it myself as part of
debug print, but doing it in a way that's reliable
and accurate across all of the different file
types is quite tricky. So I decided to outsource
that job, basically, to mini -end them. As an
aside, I mean, if there are other line highlighters,
highlighting plugins that folks watching this
video are using and they're interested in getting
debug print to work with that i'd certainly be
interested in hearing from people so feel free
to open up an issue on debug print if you you
know if you wanted to work with other similar
plugins but i used i started with mini nbin just
because it's probably the most popular one at
least the most popular one i'm aware of okay
wonderful so it's installation it's just this
just basically specify the plugin repo plugin
name dependencies version in case they want to
stick to a specific version otherwise you're
using latest i guess right yeah so this is all
you need by default if you want to use all the
default values or the default options for debug
print This is kind of all you need. You can put
in some custom options in here. I'll show that
in a second. They're kind of sort of listed further
down. And then these are actually just sort of
standard features of the lazy plugin manager.
So this is just basically this lazy equals false
is required to make that line highlighting that
we were just talking about work. If you don't
have that set up, it won't work until you do
the first debug print command for reasons that
are a bit fiddly and too complicated to explain
here. But that's why. have lazy equals false
in there. And then yes, this basically makes
it use the stable version. So the way that I've
been developing this plugin, at least, which
seems to be following the sort of standard conventions
in the NeoVim kind of plugin ecosystem is I give
my plugins tags or version numbers in GitHub,
right? So, you know, using the way that lazy
works, basically, it will install the latest
tag. And then from time to time, I will create
a new version. based upon all the new features
and fixes and stuff on the head of my main branch,
and then that becomes the new version. But basically,
if you're not that interested in the plug -in
development aspect and you just want to use this,
then version equals star is almost certainly
what you want because it just gives you the latest
stable version of debug print, basically. Okay.
I have a question. What if there's someone that
encounters... programming language that is not
supported. Can they submit PRs? Do you accept
PRs? Absolutely. Absolutely. I'd be very keen
to accept PRs, although you can also just configure
it for yourself locally. That works too. So if
you go down in the repo, there's a whole bunch
of sections here, by the way, that talk about
all of the standard key mappings and kind of
how they work. I've sort of shown the one for
variable in particular, but there's also just
plain debugging and then there's surrounds and
other things that I haven't sort of shown yet.
But anyway, that's all listed in there. And then
there's a whole section that talks about all
of the different customizations and options that
you can do. But if you scroll down a little bit
further, all the way, where is this listed? All
the way down the bottom, you'll see that there's
an ability to add custom file types. So if you
click on that, That takes you to what I call
the showcase. So this configuration showcase
file, this is basically like an addition to the
readme. And what I'm trying to do in here is
capture some kind of sort of more advanced tips
and tricks for debug print or kind of more unusual
customizations for folks who want to use stuff,
you know, that's kind of a little bit just beyond
that. kind of outbox functionality. And one of
the things in there, as you can see, is kind
of modifying or adding your own file types, right.
So basically, the way that you do this is you
kind of sort of set up this simple little structure
in lower locally in your NeoVim configuration.
Basically, there's a mechanism where you specify
you know, both the sort of left -hand side of
the print statement before the auto -generated
NeoVim bit, and then the right -hand side bit
of that print statement. And you express that
in whatever makes sense for the programming language
you're working with. And then you kind of pass
that into the setup mechanism, the setup function
that you're setting up debug print with. in lazy
or whatever programming language you want to
use. So you can just do that locally in your
own NeoVim configuration if you want to. But
if you figure one out for a programming language
that you think other people would want to use,
I'm absolutely very keen and happy for people
to open, I say issue here, but I'm also obviously
pull request is fine too, right? You know, we'd
be very keen and happy to hear from anybody who's
using. Maybe a language that's a little bit unusual
that, you know, isn't part of the sort of standard
40 that are kind of sort of currently supported
by debug print. More than happy to kind of sort
of add those in and maintain those. You know,
the configuration of each programming language
is not particularly tricky to do. As long as
you know how to program in that language and
you know how to print out a string, you can pretty
much figure this out, right? So, yeah. happy
to and if anyone's kind of struggling with this
process because you know it can be a little bit
fiddly especially if you've never written any
lure before again happy to help you figure it
out if you want to open up an issue on that on
the repo i can i can talk to people about that
so that makes it very flexible then you don't
have to wait on the pr to be accepted and all
that so you can just add it yourself locally
and you're good to go That's right. That's right.
And part of the reason I did this was also because
I thought that there may be circumstances where
certain people want local customizations that
we don't typically have as part of the sort of
standard debug print. I'll give you a good example.
One of the things that has come up a lot, especially
for folks who write JavaScript or TypeScript,
which is obviously a pretty common language these
days. is that some people want to use console
.info rather than console .warn, which is what...
debug print uses by default. You know, there's
a good reason why debug print uses console .warn.
You know, I've been through a conversation, like
if you're really interested in all the gory details
and you're into your TypeScript, you can go and
read this issue here where we sort of debated
it back and forth. But if you still don't like,
you know, the answer that I gave, you know, you
don't like the fact that it uses console .warn
rather than console .info, you can just change
that. And I've got an example snippet of how
to do that. of how to do that here right so both
folks can have their own local customizations
for for debug print that are more than just um
you know more than just what kind of comes out
of the box if they if they want to do okay so
you specify it for different file types for four
different file types the same print statement
right that's right that's right so that's what
i'm doing here because the way that JavaScript
and TypeScript work in NeoVim. There are four
different NeoVim file types, right? JavaScript,
TypeScript, JavaScript React, and TypeScript
React for folks writing React .js. In fact, there
may even be more variations than that. But off
the top of my head, those are the ones I'm aware
of. So that's kind of how I've expressed it there.
So the way these file types work is these are
NeoVim file types. So depending on how familiar
you are, you are with NeoVim. If you take a look
at your NeoVim window, I've got a custom status
line. So this may look a little bit different
from how other folks have got their NeoVim set
up. But, you know, every NeoVim file has a file
type. Lua is obviously Lua, right? Python is
obviously Python. But, you know, some of them
are a little bit less obvious. I guess JavaScript
React is one of those. But yeah, these are NeoVim
file types, basically. Okay, wonderful. You want
to show us other stuff that you use the plugin
for? Sure. So there's a few kind of like slightly
more unusual features. Let me see what we can
find. So let me just go back to my script .lua.
So one of the things I added relatively recently
at someone's request is what I call the surround
feature. So if I do G question mark S. p it will
actually insert two debug print lines one above
and one below that's actually it sounds a little
bit weird but it's the kind of thing if you do
this if you use this kind of do this type of
debugging a lot because you're a bit lazy like
me and you like to do it this way rather than
using a proper debugger that can actually be
quite useful right because maybe bar equals two
takes 10 seconds to run I mean obviously it doesn't
in this case right but you know maybe it's a
long running operation or you're kind of surrounding
a function invocation or something like that
and you want a print statement directly before
it runs and then a print statement directly after
it runs so you can do that and then that's a
kind of an atomic thing so if I undo that they
both disappear at the same time you know I can
also do the same thing with the variable variation
so I'm not sure how well I explained this earlier
but Debug print basically has kind of two standard
keystrokes. One is G question mark P. That just
inserts a sort of standard print line with no
variable content in it. So all this is doing
is basically just saying after the line where
you set bar equals two, that's where I've got
to. If I actually wanted to print the value of
bar, I do G question mark V. Oh, I didn't do
that fast enough. G question mark V. And now
I actually get the printout, the current value
of bar, right, which in lower is bar equals.
And then we've got this Vim inspect bar. And
then there's the surround variations on both
of those. So if I do G question mark SP, then,
you know, I get the print plane version. And
if I do the V, then I get the V version. So that's
kind of one of the. One of the sort of slightly
more unusual features, I'm actually just going
to go back to the readme here to prompt myself
to see what else there is. So one of the things
to be aware of is that there are key bindings
for many different modes. So everything I've
been showing you so far I've been doing in normal
mode, but you can also work, for example, in
visual mode. So let's say I, for example, visually
select foo here, right? So I've selected that
variable. If I now do G question mark V, it will
print out the value of foo below. If I undo that,
if I instead visually select bar and do G question
mark V, it will print out the value of bar instead.
And for some languages, I can even do expressions.
So let's say I'm interested in the value of foo
plus bar. I can select that whole thing, and
then I can do G question mark V, and now I get
foo plus bar equals vim inspect foo plus bar,
right? Obviously, in this case, I know we've
just assigned it to banana, right? So that's
a bit of a fake example, but you get the idea,
right? You can also do what are called operator
pending expressions. So this is quite, let's
call it this way. It's quite an old school Vim
thing, right? Like not everyone who uses NeoVim
necessarily does this, but it's a very powerful
feature to know in general, not just for debug
print, but debug print supports it too. So if
I do G question mark O, I have to do this quite
quickly because of the way I've set up my, time
out in my neo vim configuration but if i do d
question mark o inside word it will now produce
um it will now do um the value of right if i
hover over bar and i do g question mark inside
words oops excuse me i didn't do it fast enough
g question mark o inside words it will do the
same thing for bar so you don't have to select
the word in visual mode before right correct
correct in fact in fact if if the folks watching
this haven't come across operator pending mode
before i can show you a simpler example that
doesn't even use debug print if i'm sitting on
the word foo and i do D -I -W, delete inside
word, is basically going to delete the word foo
from my NeoVim buffer. So that's got nothing
to do with debug print. That's just standard
Vim, NeoVim behavior, right? It's basically using
text objects. So inside word, I -W, means inside
the word I'm currently on. So if I go D -I -W,
it deletes it. If I do C -I -W, it switches into
insert mode and allows me to replace it. So that's
standard kind of Vim behavior. But DeboPrint
extends on this by having G question mark O inside
Word and allows me to kind of print it out like
that. So if you're the kind of person who likes
to use that kind of Vim interaction, you can
do it that way. if you don't like that you can
do it with visual mode instead i think these
days my experience is that folks in the neo vim
community are more especially folks who maybe
have come from another editor like vs code or
whatever they're more familiar and more comfortable
with using visual mode that's fine you can do
that too that works So, you know, whatever you
prefer, basically. But debug print supports all
of these. Okay. What happens if I have three
variables declared, like foobar and banana? And
I select all of them in visual mode, and then
I bring debug print, like the three. of a more
selective you may you may you may or may not
depending upon the language you're using get
something invalid right so it debo print is not
that smart about understanding what you've actually
selected right it just treats it in a relatively
naive way so for example if i select this whole
line banana equals food plus bar and i do g question
mark v i'll get a line that looks like this banana
equals food plus bar equals well that's just
a string so that will be fine because it's just
printing out a string. And then it'll do vim
.inspect banana equals food plus bar. This is
a syntax error in Lua because you can't have
an equal sign in the middle of an expression
like this. So that won't work, right? But DeboPrint
doesn't understand that those variables. It's
not that smart. It's just looking at this as
text, basically. So it does rely on you having
a little bit of understanding of the programming
language you're working in and what you're doing.
But in general, to be honest, I don't tend to
use it for anything that sophisticated anyway.
I'm just generally doing this. Yes, you want
something quick, right? Exactly, exactly. That's
kind of the idea, right? So I'm not trying to
be too smart about this. In some languages, but
not all of the ones that it supports, so LoRa
as an example, NeoVim is a little bit smarter,
and it tries to use TreeSitter, which is, again,
for anyone who's watching the video who's not
familiar, TreeSitter is one of the more modern
NeoVim features that allows NeoVim to kind of
like build up an internal tree of a language
and kind of understand it. its different features.
So for some languages, I think maybe three or
four, DevoPrint actually uses TreeSetter to try
and slightly more smartly understand what the
variable is. But for some other languages, it
does not. It really depends on what you're working
with. Okay, wonderful. So I guess that covers
the demo. Do you want to show something else
before we get to know you a little bit more?
I don't think so. Oh, there is one other feature
that may be interesting. I'm actually cheating
through my own readme to remind myself of all
the different features. So there is one other
potentially interesting feature. Again, it's
maybe sort of a slightly more advanced, you know,
traditional NeoVim -y thing. But one of the things
you can do is you can put the contents of your
debug print expressions into registers. So I'll
give you an example. If I'm sitting on foo here,
for example, I can do quote a g question mark
v. Nothing appears to have happened apart from
the fact you can see down the bottom it says
written variable debug line for foo to register
a. And then I can do the same thing for B, except
this time I'm going to do capital A register,
which means it's going to append to the register.
So I'm going to do quote capital A G question
mark V, and it's appended bar to register A.
So at this point, all NeoVim is doing is writing
stuff into standard, excuse me, all debug print
is doing is writing stuff into standard NeoVim
registers. But the reason why I've done all that
is because maybe I actually want to insert those
debug lines all the way down here. So what I
can now do is quote a P and now bingo. And now
I've got my two registers further down in my
two debug print lines further down in my script.
So I'm printing out foo and I'm printing out
bar all the way down here. This is quite useful
if maybe I've got a whole bunch of variables
here and I want to print out all of them. but
I want to do it kind of sort of further down
in the script or something like that. occasionally
useful but again it's a slightly more kind of
advanced thing you know folks watching this video
if you're kind of deeply into your vim or your
neo vim you know you might have come across you
know different names registers and be using them
like this many folks just use a simple kind of
you know clipboard that right so it really depends
on you know how you tend to use your near them
if you don't want to use that feature don't use
it but it's there okay okay and Since they're
just print statements, you can move them from,
you could move all of them from where they put
it to the bottom of the file. Absolutely. Once
the print statements are inserted, there's nothing
special about them. They're just text in your
script, same as anything else. They're being
highlighted in red because they happen to have
this phrase debug printed in them. Although you'll
notice if I delete, for example, this T, immediately
the red highlight. disappears right so they're
just they're just text in your script right i
can delete this line i can move it up here i
can modify it right you know i can put whatever
rubbish i want in there like you know it's just
it's just part of your script at this point okay
wonderful okay and moving on to other type of
questions when did you start with um with neovim
to get you know to get to know a little bit better
Sure. Well, I was actually taking a look at my
.files, my config, kind of the other day, you
know, just niching around, taking a look, you
know, in preparation for our discussion. So I
think I actually started with Vim, not NeoVim,
right? So I've been using Vim for quite some
time, I think since 2010, if I'm not mistaken.
So I guess I've been using Vim and NeoVim for...
getting on for 15 years now. I don't remember
when I exactly made the transition from Vim to
NeoVim. I think it must have been around about
NeoVim version 0 .3, 0 .4, something like that.
I was kind of sort of watching the project from
afar. And initially, I guess I didn't quite understand
what the guys were trying to do with NeoVim.
But, you know, then it became a little bit. It
became a little bit more obvious. And it sounded
really interesting. So I kind of sort of took
the plunge and I converted. I had a VimRC file,
which is like the Vim equivalent of your NeoVim
configuration, which was quite long. And it was
written in VimScript. And for the folks on the
call who maybe have only ever used NeoVim, you
know, VimScript is an interesting language, right?
But it's a little bit painful to work with compared
to Lua. So in one sense, I really liked the fact
that they made the transition to Lua. But yeah,
I took the plunge and I basically converted that
BMRC into Lua and I kind of not really looked
back. I mean, I tried to maintain a dual config
for a while, but that was even more painful.
And I just kind of gave up on that in the end
and kind of went the whole hog into the NeoVim
ecosystem. And I just really like it. But yeah,
so I guess if you count Vim as well, about 15
years, but you know. Maybe seven or eight years
in the event, something like that. I don't know
the exact time. Oh, so that's your main text
editor. What about other editors? What are your
thoughts on Emacs, for example, or other ones?
So Emacs, I kind of dabbled with Emacs a while
ago. Somewhere I still have an Emacs configuration,
but it's probably getting on for like 20 years
old at this point. I mean, I never used it. Like,
it's probably in my .files somewhere or something.
But, yeah, I've never used that. And I remember
Emacs being quite painful. I could never really
kind of get to grips with all the list -based
configuration. And the slightly more serious
answer, I mean, these days, yes, I use NeoVim
for... almost everything. Occasionally, I've
dabbled with using things like VS Code. Oh, I
tried out Cursor the other day, which is, you
know, one of the more AI -enabled, you know,
sort of VS Code forks, I guess. And yeah, I quite
like using that kind of thing for its more kind
of like visual view, right? So, you know, if
someone's given me a repository of some code
or something, and I want to kind of read it and
get to grips with it, sometimes using VS Code
can be can be handy. Um, just cause I don't know,
it's the graphical nature of it somehow makes
it a little bit easier to kind of navigate around.
Um, but you know, for my own little pet projects
and my own dabbling around and so on, it's, it's,
it's almost exclusively, uh, almost exclusively
near them. Oh, okay. Okay. And what are your
thoughts on distribution? I guess you have your
own configuration, right? Yeah. I mean, I think,
I kind of go back and forth on that, right? Like
I think distributions, like I think LazyVim is
pretty popular these days as an example. I mean,
I wouldn't claim to know all the distributions
very well, but I know LazyVim well enough because
I've kind of sort of seen it referred to on,
you know, Reddit and stuff like that. It's not
for me personally, because part of the fun for
me is kind of like dabbling in the details. And
I guess distributions kind of abstract some of
that away from you. But for a lot of people,
particularly people who, you know, just need
to use, you know, NeoVim to get their work done,
like, I can completely understand why, you know,
they want a distribution. And I think it is a
good way of getting people who are new into the
NeoVim ecosystem into that kind of thing. So,
you know, it's easy to be snobby about these
things, but I don't think, you know, I don't
think there's anything wrong with distributions
if that's what works for people, then use it,
right? Yeah. OK, OK, wonderful. You want to share
a little bit about you and where can people find
you? Yeah, sure. So I've been working in the
technology industry now for about like 20 years
or so. I kind of sort of started out as a as
a coder, as a developer. I've kind of like sort
of, you know, moved roles a few times. I no longer
code on a daily basis. I now kind of like. work
as a consultant in a political organization right
you know still focused on technology but i don't
you know i don't code on a daily basis it's more
about you know kind of um advice and and kind
of sort of facilitation and things like that
but i've always been of the opinion that like
you know if you're going to be in technology
you should still you know fundamentally, you
should still know how to code on some level or
at least know enough to be dangerous, right?
Like when other people are talking about technology,
you know the general things they're referring
to. And I find that just kind of keeping my hand
in and that stuff in my spare time is one of
the ways of doing that. And so that's one of
the reasons why I maintain things like debug
print in my spare time, just because I find it
fun and I find it a way to dabble in programming
and at least make sure that I still know. approximately
what I'm talking about. You know, I can do things
like, like I use test -driven development, for
example, for debug print, right? So, you know,
it's just a way of like teaching myself. Again,
I'm not going to claim I'm a guru in that stuff.
Maybe it's not, they're not the very best tests,
but they're good enough. And, you know, it teaches
me a little bit about some of the principles
so that when other people are talking about it,
I know enough, at least that's what I like to
think. Okay, wonderful. You too know, right?
You don't have a YouTube channel or anything
like that? I don't have my own YouTube channel
yet. I've considered it. You know, this is probably
one of my first, like, you know, proper being
on YouTube experiences, which is one of the reasons
I was keen and excited to talk to you today.
So, no, I don't have a YouTube channel of my
own, but, you know, I follow... at least some
of the kind of NeoVim core folks like TJ DeVries,
for example, and stuff like that on YouTube.
And I've definitely thought about doing that.
Whether I would do it in a, you know, development
-focused way or about something like NeoVim,
I don't know yet. But yeah, not yet. Okay, wonderful.
How has the experience been with the plugin?
How has the open source? Pretty good. Pretty
good. I mean, like, you know, the reason I started
doing it was I thought, like, you know, it's
like many of these things. It's like scratching
your own itch, right? Like, I found myself wanting
to put these debug statements in stuff I was
doing. And so I was like, well, let me create
a little script. And so I created a little script.
And then I thought, oh, well, actually, maybe
if I just put a little bit of effort into generalizing
that, I could, you know, release it on GitHub.
And so I did. But then, of course, you know,
people start saying, well, you know, wouldn't
it be great if it could do this? Wouldn't it
be great if it could do that? And so, like, you
know, it kind of sort of spirals over time. But
it is rewarding. It's nice. Like, I literally,
I love it when people open up issues and pull
requests because it actually kind of sort of
shows that people are kind of interested and
engaged with it. That kind of motivates me. So
to anyone watching this, by the way, if you're
interested and you want me to keep maintaining
debug print, you know, I'm not there for the
money or sponsorship or anything like that. You
know, I just kind of want to do it for the fun
of it. So, you know, if you want me to keep doing
that, then by all means, please, please engage,
you know, sort of send me issues or pull requests
or things like that. You know, I'm always more
than happy to have those conversations with people.
So in general, I found it like really positive.
I wouldn't say I've had any. major problems right
occasionally you have probably the trickiest
thing I've had so far and DevoPrint isn't a very
high profile plugin so I guess you know I probably
don't get that many issues and so on you know
there's been one or two where I've had issues
where people are asking for something do you
think well that's quite a good idea but I need
to think about how we generalize that to make
sure that it's useful to a lot of people, right?
Rather than necessarily, you know, I'll give
you an example. I think someone opened an issue.
I forget the specifics, but someone opened an
issue saying something like, you know, wouldn't
it be great if I could have an emoji in my debug
print statement, right? So I can see them clearly.
And I'm like, yeah, that is great. But what actually
I should really do is generalize it so that you
can change the tag to anything you like. So actually,
by the way, way it doesn't have to be debug print
you can configure that you can set it to a different
string if you want uh in the configuration options
so just little things like that where it's like
you know someone makes a request but i want to
implement it in a way that's generally useful
to everybody not you know kind of super specific
so basically kind of like trying to make the
right architectural choices i know architecture
is probably a very fancy word to use about something
so simple as a plugin like this but um But, yeah,
I would say in general it's been very positive
and, like, you know, most people seem to engage
in good faith. Like I mentioned earlier, there's
one or two other plugins that, quote, compete
with debug print, you know, but, you know, I've
been in touch with the maintainers of both of
those and, you know, we have some healthy competition,
let's put it that way, I guess, right? You know,
like neither of them seem to – I think one of
them was aware of debug print and the other one
wasn't, but, you know, no one – We see that as
like, I'll implement something and maybe they
go and implement something similar or I decide
that that feature isn't right for debug print
or whatever, right? But, you know, it's just
a way of everybody, you know, learning from each
other, basically. That's the way I see it. Okay,
wonderful. What file explorer do you use on Uvim?
I don't know if you count it as a file explorer.
I just use oil. So I don't know how familiar
you are with that. But for folks who haven't
used it, yeah, so this is oil. It's not a tree
style kind of file explorer like NerdTree or
whatever. It's basically an extension of if you've
ever used the inbuilt net RW or if you've used
vinegar, which was kind of the previous incarnation
of this concept before oil came along. basically
just excuse me just basically a way of making
your your file uh directories editable right
so you know i can navigate here here is my debug
print repository you know if i go up to the doc
directory and press enter then it changes into
the doc directory i'm just pressing the minus
key to go up in the file tree But it's quite
powerful because you can use it in a NeoVim -like
way, right? So let's say I want to rename my
readme file from readme to readme -andrew. I
can literally just edit this, and then when I
save this file buffer, bingo, the file is renamed,
right? So for me, this meshes quite well with
the NeoVim way of using things, and I'm quite
happy with it. It's relatively simple, but it
does what I need it to. Okay. Since you like
that type of file, manipulation have you heard
about this many that files i have i tried to
use it briefly i didn't put very much time into
it if i'm honest um but i'm not that familiar
with it i don't know i like thinking of it like
a mixture between oil and uh neotree because
you kind of get like a tree right you can get
all of your emotions right i can yank this paste
it somewhere else i can delete it using vim navigation
basically but i get a preview i have the preview
on the right i have like these sort of little
windows right yeah navigating my directory i
don't know okay yeah so i when i'm doing i am
quite a terminal kind of geek like I tend to
do a lot of stuff in the terminal and I do tend
to use the lf file manager quite a lot which
is kind of similar um similar I guess to ranger
if people have ever used that or there's one
or two other similar ones I forget the name of
all of them but yeah so I use lf quite a lot
right which is kind of similar you know it enables
me to kind of navigate up and down through file
trees for whatever reason I use that independently
of NeoVim. I don't quite know why. I've actually
set up a NeoVim key binding that allows me to
open that in a separate window. But yeah, that's
what I tend to use. But I will probably give
minifiles a go at some point. I use many of the
other mini sub -plugins, I guess I should call
them. I don't know what the official name for
them is. But I use some of the other ones, but
I've never really tried minifile. Okay, okay.
now move it on to something else well let's just
discuss neovim right now and uh then we can touch
on the other subjects so the color scheme that
you're using you're uh like i think i just used
christmas box if i remember i think i just used
grab box to remember riley yeah just gruff box
i'm not i'm not majorly into like changing my
colors i'm not there's a whole community if i'm
making their their their uh linux distribution
look look super fancy and i'm yeah that's not
that's not for me it's all right spend my time
doing so i just use grab box which i think is
you know pretty old color theme at this point
but you know it works for me okay you prefer
a die a light i don't know i actually i actually
have it set up to switch so it switches in the
evening to dark and then it switches back again
in the morning to light Oh, okay. Yeah. I spent
probably more time than I should do on getting
that working in my terminal and in NeoVim and
so on. Like you can see, I've actually got this
like state file where it sort of maintains whether
it's light or dark and it kind of automatically
switches within NeoVim. If we stay on this phone
call long enough, you may even see it happen
automatically because it's getting on for 10
past seven in the evening here. So it'll probably
go dark in about, I don't know, an hour's time,
something like that. But yeah. So like I said,
I probably spent more time than I really should
do on kind of getting that working. But it was
a bit of fun. OK. And do you use any tool to
take notes, like Obsidian or something? At work,
I use a Mac. You can see I'm using Linux here.
But, yeah, at work, I use a Mac. And so most
of my note -taking is in that context. So I just
use iCloud Notes, which I know is not particularly
kind of hackery. But, you know, it works fine
for me because I have an iPhone and a MacBook.
So that's what I tend to use. Yeah. I guess for
personal stuff, maybe occasionally I'll just
write stuff into a Markdown document. But, I
mean, that's about as sophisticated as it gets.
I think fancy. Okay. No, I think I don't see.
What tool do you use to push to versioning control?
So most of my version control, again, because
I'm a bit of an old school guy, I either tend
to work with Git commands directly from the command
line, or sometimes I will work with TIG. So for
folks who haven't come across TIG before, so
this is my .files repo, for example, which is
public, by the way, so if anyone's interested
in looking at my .files, it's part of my GitHub
account. But yeah, so I tend to use TIG, which
is just like command line 2E, basically. So,
you know, you can just go along and see all of
the different changes. You know, I can see what's
staged. I can stage stuff. I can unstage stuff.
I can commit, you know, things of that nature,
right? So that's basically what I use probably
like 95 % of the time. TIG, okay. I hadn't heard
about that. So it's like a terminal tool. CLI
tool. Yeah, it's a terminal tool. It's very,
very... Very common. You'll find it in all the
standard Linux distributions and stuff like that
as a package. But yeah, TIG, basically. I mean,
I have a few very minor customizations, but mostly
I just use it kind of as it is out of the box.
Okay, wonderful. What are your thoughts on Tmux?
Do you use it? I sometimes use it, to be honest,
mostly just as like... i don't really tend to
i don't really tend to use it like for kind of
splitting up windows because i use the i3 window
manager which is what you'll see on my screen
right here which kind of does a lot of similar
stuff right so for example i can kind of split
my windows up like that and i can create stuff
and i can kind of drag it around with my mouse
and rearrange it like that so that's how i tend
to use that the only time i ever really use tmux
is i've got a few like one or two kind of little
home mini servers. So if I want to run something
on one of those, I'll log into it, create a TMUX
session so that I can start something long running,
like a backup or whatever, disconnect from it,
and then come back the next day and kind of reconnect
it, which obviously you can't really do with
your window manager. So that's the main thing
I tend to use TMUX for. But, you know, when I'm
just mucking around on my laptop like this, I'll
just split windows using i3. Maybe it's just
me, but I always found all the TMUX keys bindings
a bit kind of confusing i could never really
i can never really remember which control b prefix
thing does what so i just i use it in a really
basic way where i just attach and detach from
sessions most of the time okay okay wonderful
so you mentioned that you use linux right in
your personal uh computer linux at work you use
mac so yeah why do you choose linux have you
used that all the time Yeah, so let's see. Well,
like in my professional life, I mean, you know,
15 years ago, I used to use Windows. And then
at some point, I had the opportunity to switch
to Mac. And I never looked back because for me,
like Mac, the Mac. The Mac at work makes sense
because it's like that nice mix between, you
know, it's a bit hackery and customizable and
I can still get terminals and stuff, but it just
basically works out of the box, right? Which
is why I need it at work because I need to get
my work done. But at home, I tend to use Linux
because obviously it's a bit more customizable.
Well, it's a lot more customizable, you know,
and I can fiddle with it and I can play with
it. But obviously that also comes with the risk
of... you know, breaking stuff too, right? So
like, yeah, in my personal life, I use Linux.
And I mean, I've used Linux again, like certainly
probably for about 20 years at this point, off
and on in various different ways, like initially
just through servers. So, you know, I've kind
of had the home server for quite some time in
various different forms, like headless servers,
basically, just to kind of, you know, run backup
jobs and file shares and other stuff at home.
But, yeah, more recently, the last 10 years or
so, I've started using it on my personal desktop,
my personal laptop as well. And, yeah, I'm using
Arch Linux here at the moment as a desktop, again,
just because it sort of strikes that nice combination
between being reasonably easy to use but also
quite customizable, I guess. And then I use Debian
on mine. servers just because it's nice and stable.
Yeah, just because it's nice and stable and reliable
and, you know, it doesn't break very easily,
basically. That's the one that I use as well.
First person that tells me Debian on servers
and that's the one that I love. Like, why Ubuntu,
right? If I could just go to the grandfather
of that. I went through a phase of using Ubuntu
on my servers and I kind of regretted it because
I realized at some point I don't know about Ubuntu
on the desktop. I think Ubuntu did a lot of good
things for the desktop. Not some bad things,
too, but a lot of good things. But on servers,
I realized that Ubuntu server is basically more
or less just rebranded Debian, but with some
things that are kind of broken and annoying.
And so after a while, I realized there really
wasn't any point in using it, especially for
a home user like me. I'm not interested in like...
you know, formal support contracts and all that
kind of stuff. I just want to, you know, just
want to use it as a hobbyist, right? So, you
know, Debian is just plain and simple and it
works and it's stable and it generally doesn't
break, right? So, yeah. Yeah, I just use Debian.
And I've been using Debian since version 2, I
think. Like, you know, maybe version 3 on a server.
Like, I still remember at university, what, 20
years or so ago, having a sort of... a server
in my dorm room, you know, with Debian installed,
Debian 2 or Debian 3, I think, installed on it.
And, you know, it's stable then and it's still
stable now. So, yeah, I really like it. I think
it's a great project. Yeah, I love Debian too.
The only thing is that there's more documentation
for Ubuntu, but you can find your way around
in Debian as well, right? Yeah, and a lot of
the stuff is very similar, right? Because Ubuntu
is based on Debian, so a lot of the time you
can kind of copy commands or adapt them or whatever.
Yeah. Okay. What are your thoughts on Windows?
i mean these days for me personally it's mostly
irrelevant right like i mean you know i think
um like i i went through a phase like when i
was a kid you know i had quite a lot of like
windows you know machines and so on and so i
went through a phase like customizing them a
lot and fiddling with them a lot you know that
was back in like windows 95 days and things like
that but i mean these days Whenever I've used
Windows recently, which is not very often at
all, it tends to be when I'm helping someone
else out who's got Windows on their laptop. I'm
sure all us techie people have the same thing,
right? Someone comes along and is like, can you
help me fix my laptop? And so I'll try, and often
I can fix the problem, but my experience is it
just seems to be overcomplicated for simple things.
And I just don't really see that it has any notable
advantages at this point beyond, you know, using
a Mac or, you know, maybe even using Linux Mint,
for example. I have one or two family members
who are not very technical and I tend to install
Linux Mint on their laptops because it's just
nice and straightforward and easy to use kind
of out of the box, you know, without really needing
to be techie or kind of understand what a terminal
is or any of that kind of nonsense, right? So,
you know, if I have a family member who's like,
can you sort out my laptop for me? 90 % of the
time, that's get rid of Windows, install Linux
Mint. And they can't really tell the difference
because it's kind of pretty similar, right? Like,
you know, to all the things that it matters for
them, at least, like, it's pretty similar. Which
is browser, basically. Which is a browser and
maybe an email client. Yeah, things like that,
right? Okay, okay. Window Manager, you mentioned
that you use i3, right? Is that what you started
with? No, I think I went through a phase of transitioning
across to using i3 about three or four years
ago, something like that. I mean, I've used loads
of Window Managers over the years. I can't even
remember what I was using before that. Probably
some GNOME thing, I think. I just quite like
the idea of using the keyboard a lot. Like, you
know, I sort of went through a phase of trying
to learn keyboard shortcuts for loads of stuff
just because it makes you so much more efficient.
And the nice thing about using Live 3 is, like,
I'm sitting here and I'm barely touching my mouse
a lot of the time, right? I mean, I use my mouse
in my browser, I suppose. That's probably the
one place where I use it quite a lot. But, you
know, if I'm doing stuff on terminals, I can
just open my terminal. I can open another terminal.
I can change the splits around. I can do all
kinds of stuff. Like I'm just touching my keyboard.
I'm not even, you know, touching the mouse at
this point. So that's one of the things I like
about i3. And I know there's similar window managers
to i3. I'm actually blanking on the names right
now, right? You know, there are other kind of
sort of, sort of BSP -type window managers like
that. But I don't know. For some reason, when
I was looking, I kind of settled on i3, and it
does everything I need it to. So that's kind
of what I stick with. Okay, wonderful. Are you
a single monitor person or multiple monitors?
Well, multiple monitor today, just because it's
easier for us to do our recording like this.
But no, generally, I'm a single monitor guy,
right? Yeah, I mean, I'm lucky enough to have
a nice big monitor on my desk at home, but I
also have a relatively small desk, so it's just
the one monitor. And yeah, generally that works
for me. I've kind of dabbled in the past, in
years past, with kind of having multiple monitors.
But for me, at least, I find it kind of annoying,
like stretching my neck and stuff. So, you know,
I just tend to stick with one. One big one is
kind of my approach. Okay, wonderful. Yeah, me
too. Single monitor. I used a big TV in the past,
but... No, it's not efficient. I prefer to have
one. Yep. What terminal emulator do you use?
At the moment I use Kitty. You know, there are
lots of similar terminal emulators out there.
I know that. I'm not like super wedded to Kitty,
but I've spent a little bit of time kind of customizing
it for my needs. You know, we've kind of sort
of, and I just like the way that Kitty does kind
of quite a lot of. nice stuff out of the box.
Like it's quite standards compliant these days.
So it does all the kind of slightly more advanced
stuff. Um, but you know, it also supports a whole
bunch of like rich features. So yeah, I just
tend to use Kitty. Okay. Wonderful. Do you use
a special keyboard? Uh, no, not particularly.
No, I just got a standard standard UK keyboard,
which is, which is where I am. And that's, that's
what I use. Okay. Use which layout? QWERTY or
something different? Oh, yeah, yeah, QWERTY.
Yeah, yeah, yeah. Yeah, no, no, I sort of vaguely
dabbled with the idea of trying Dvorak or one
of these alternative layouts. But the problem
I find is you can never interact in the real
world by doing that because you do it on your
laptop, but then as soon as you go to someone
else's laptop, someone else is like, oh, can
you help me fix a problem on my laptop? And you
try and type something in, and it's like, that's
just going to die. My brain is not big enough
to cope with both of those things simultaneously.
So, yeah, no, I just stick with standard QWERTY.
I know it's supposed to be more efficient keyboard.
layouts but i just haven't got the patience to
deal with learning one of them okay do you use
ai what are your thoughts on it yeah so i use
interesting so yeah i use ai a bit in my job
right because i'm kind of a consultant sort of
technology consultant in my in my job so sometimes
I'll use it to like research issues or you know
things like that but it's like probably more
more relevant and interesting to this video and
the folks watching it you know how do I use it
in kind of like more sort of programming kind
of or you know kind of like development type
context it's interesting so I Haven't integrated
it with NeoVim. I tried one or two NeoVim AI
plugins to interact with things like GPT and
stuff like that. It's probably just me being
impatient and not spending enough time on it,
but I haven't yet found any that I like. I'm
quite unusual, I think, in the NeoVim community
in that I really hate autocomplete. I keep trying
it, but I just can't get with it. So I kind of
turn it off. And, you know, I think a lot of
that AI stuff works quite well in an autocomplete
context. What I will do, though, sometimes is
I'll go to chat GPT, for example, and I'll just
be like, can you write me a snippet of code to
do X, Y, Z? And then I'll like copy and paste
it in and adapt it. Or, for example, the other
day I was playing around with a Python script
and I was like, I don't know how to read in this
JSON file whilst doing, you know, whilst doing
some like. type assertions and stuff like that,
so I would get it to explain it to me. So it's
more like a little bit kind of a coding assistant.
To be honest, if I was doing, like, coding professionally,
I would probably spend more time on getting that
set up properly so that it integrated with NeoVim
or, you know, VS Code or whatever editor I was
using, but I don't do it enough professionally
to, like, justify spending the time on, like,
getting it all perfectly. Okay. I lasted for
a second, but you're here again. Can you hear
me? Yeah. Yeah, I can hear you. Can you hear
me clearly? Yep, I can. Okay. Okay. And are you
working on any other projects that you want to
share with someone watching? Not any kind of
like, not too many kind of sort of personal projects
at this stage. I mean, like I said earlier, I
am kind of sort of... dabbling with the idea
of doing a YouTube channel, but I'm still trying
to figure out what ideas and stuff I want to
do there. So nothing kind of to publicly announce.
I did mention earlier, I have kind of one other
NeoVim plugin, right? So if you kind of go up
into my... into my uh github username so you'll
see i've got another plugin here called wrapping
.nvm it does need a bit of attention i will warn
you so you know if anyone's feeling on like trying
this out you're more than welcome but it hasn't
had any uh maintenance in a little while so you
know it might be a little bit more rough around
the edges than uh debug print essentially what
this was supposed to do was this was supposed
to deal with This is supposed to deal with the
fact that things like markdown files, for example,
sometimes have soft or hard kind of wrapping
modes, like soft or hard wrapping endings. And
wrapping .envim is designed to automatically
detect that and then change the relevant NeoVim
settings to kind of handle that automatically,
which is something, surprisingly, that NeoVim
doesn't do out of the box. But like I say, it
probably needs a little bit of kind of sort of
love and care and updating. You know, there's
a few issues that need attention there and so
on. It should still work. So if folks are interested
in trying it, by all means, please go and try
it. And if you're interested in using it or it's
not working for you, again, please open an issue.
You know, maybe that will motivate me to give
it a bit more attention. But that's one thing.
It's not really a project, but if folks are interested
in seeing my NeoVim .files, you can take a look.
If you go into my... .files repo. This is actually
my .files for all kinds of stuff, not just NeoVim.
So if you go into this directory here, stow,
and then you go down to where are we, if command,
it's a little bit kind of hidden. And then down
here to nvim, that's where all my NeoVim kind
of .files are. So, you know, if you're interested
in seeing what I'm doing there, then you can
have a look in that if that's interesting. So
that's kind of the main stuff that I have going
on. Okay. Wonderful. You mind sharing three of
your favorite terminal tools or TUIs or CLI tools,
whatever? Yes, I do. So I already mentioned kind
of one of them, which is LF, right? I'm opening
up on the wrong screen there, so you won't be
able to see that. Let me just try and do that
on the right screen. There we go. So hopefully
you can see that in the window. So, yeah, so
I already mentioned one of them, LX. So, like
I said, this is just a kind of a file manager.
I've spent a little bit of time kind of customizing
that for my needs. If you're interested, the
.file for that is in my .files repo as well.
Another one that I use sometimes that's maybe
a little bit less well -known is a thing called
Entra, E -E -E -N -T -R. So if you go, I'll show
you by example. So if you go into, here's, for
example, the debug print. repository in my home
directory, you know, where lazy checks it out.
So one of the things I mentioned earlier is the
debug print has some unit tests. So if I just
run make, it will run the unit tests for debug
print. And hopefully they're all passed. Yep,
they did all pass. That's great. So, you know,
debug print's working. But when I'm developing
on debug print, one of the things I sometimes
want to do is repeatedly run those unit tests,
right? Because that's kind of the whole point
of having automated testing. So one of the things
I'll do is I'll use entra to set that up. So
what you can do is you can basically say find
dot, right? So probably as many people will know,
if I just run find dot, that will list all of
the files under the debug print repo. So I can
do find dot, and then I can pipe that into entra.
And I can type make. And what that will basically
do is it will watch all of those files, right?
Every single one of them. And if any one of them
changes, it will rerun the make command, which
in this particular case is like synced up to
basically run the unit test, right? So if I just
run that, the first time it will run make. If
I then open up another terminal window, and maybe
let's put them side by side so that you can see
what's going on a little bit more clearly. If
I go back into the debug print repository, oh,
that's the wrong place. If I go back into the
debug print repository, let's say, for example,
I just, I don't know, let's modify the readme,
right, because obviously that's not going to
actually change anything in the code, but, you
know, it's still changing some contents of the
repo. So let's say I change the readme and press
write quit. You'll see it. reruns the tests over
here right so basically this is like a really
easy way of like i'm changing some code or maybe
i'm changing one of the tests every time i change
something and i write and quit it reruns the
whole test suite over there on the left But you
can generalize this concept, right? So it's not
just for running tests. That's just how I happen
to be using it here. Basically, any command that
you have that will create a list of files on
your file system, Entra will then find it's quite
a convenient way of doing that. But there's obviously
many other ways. Entra will then watch that entire
list. And any time any of those files changes,
it reruns the command that comes after Entra,
which in this case is make, which reruns the
test. So it's quite a useful general command
for watching stuff. and doing stuff oh that is
a pretty interesting tip thank you for that okay
any other one uh immediately comes to mind no
no okay that's fine that's fine do you have three
favorite neobim plugins Three favorite NeoVim
plugins. So I didn't have a list prepared, but
let's take a look in my top files and see what
I can suggest for you. Let me just clear up my
screen a little bit. Let's go and take a look
at my NeoVim configuration. So the way my NeoVim
configuration is structured, and again, by the
way, this is all public, so if anyone's interested
in looking at any of this stuff, you can just
go to my GitHub repo for my .files. So you can
see I actually use quite a lot of NeoVim plugins.
I always used to like to say that I was quite
a Vim minimalist, but it turns out I'm actually
not. I've got quite a few. So let's see, what
have I got in here? So one of the interesting
ones is, I'm trying to see if there's anything
particularly unusual in here. folks watching
this may not have come across before um one of
the ones i quite like is capture it's really
simple right but basically if i'm in near them
if i do something like um i don't know for example
hi uh let's think of a good example if i type
highlight here as a command it will print out
um all of these different highlight groups and
it does it in a way where it's kind of a really
annoying pager where you can only go down it's
quite old school In fact, there is a NeoVim issue,
I think, to fix that. But one of the things you
can do is you can type Capture Highlight with
this plugin installed, and it will then capture
all that, and it will put it in a buffer. Now,
actually, in this case, that was quite a bad
example because the whole point of the highlight
thing is to have them all printed out with different
colors, and of course it hasn't actually honored
that. So that's maybe not the best example I
could have used, but still, Capture is kind of
pretty helpful sometimes. Let's see what else
is kind of sort of particularly interesting.
Oh, so one of the other interesting ones, I actually
only started using this recently, is this thing
called Quicker, which is quite interesting. So
what it enables you to do is you can do things
like, let's say I'm in my .files directory, for
example. So let's change the current directory
as my .files. And then let's grep for, I don't
know, the word plugin. I'm sure that's in there
plenty of times. It is. So now that I've grep
for the word plugin, It's found all of those
and it's put them into a quick fix window. Probably
many of the people watching this video will be
familiar with the quick fix window, but just
in case you're not, this is kind of like a sort
of standard old school Vim thing, right? That
basically kind of, you know, allows you to capture.
basically kind of files and lines and so in this
particular case it's taken the output of grep
and it's put that into this quick fix window
right so i can navigate up and down between those
different uh all the different places that it's
found the word plug in across the whole of my
dot files repo so that's great right so i'm just
pressing you know uh next bracket q to just kind
of navigate up and down through my quickspace
window so that's fine but then what this quicker
plugin also allows me to do is to basically manipulate
the quick fix window So let's say, for example,
now having done that search on the word plugin,
what I want to do is I actually want to replace
everywhere in this file where it says the word
plug with the word banana. Right. So I'm just
using sort of a standard Vim search and replace
within the quick fix list buffer. So I'm replacing
the word plug with the word banana. And I'm going
to put the C option on here as well, which allows
me to confirm it. Oh, that didn't work. Okay,
that's a bit of a shame. That should have worked,
I think. I wonder if the plugin's not working.
Oh, there we go. There we go. I sort of cheated
by changing it, but it may be that there's a
bug with the plugin. It's not my plugin, so I'm
going to disclaim responsibility there. But the
idea is supposed to be that I can basically now
manipulate this buffer. And once I save those
changes, it's a little bit like oil. Once I save
those changes, they will actually be reflected
in the original files, right? So if I go through
and I replace it with banana, here, here, not
here, here, not here, I can basically use any
Vim command I want, you know, edit this buffer
in any way I like. And then when I press right,
it should reflect those in the original file.
But obviously this plugin isn't quite working
right for some reason. I'm sure it's a good plugin.
Maybe I just haven't got it set up right or something.
Maybe you need to do some debugging offline.
But that's kind of the idea is that it enables
you to actually edit quick fix buffers and then
make changes to them. But clearly it's not working
right for some reason. Oh, and then like this
one is completely frivolous and a little bit
silly. but I quite like it, and it's called Tiny
Glimmer. So basically what it does is it kind
of, like, animates your yanks and puts and so
on and so forth. So if I, like, yank, yank that
line, I don't know how well this is coming out
over YouTube and over the recording because it's
quite a smooth animation, but hopefully you'll
at least get the idea. If I, like, yank, yank
that line, it kind of highlights and flickers
it. And then if I paste it down here, you can
see it, like, sort of zooms in. Probably on the
recording it may look... a little bit more janky
than it would in real life, but you kind of get
the idea. So yeah, there you go. There's three
off the top of my head. I mean, if you're interested
in seeing what other plugins I'm using, then
by all means look in my .files, but that's kind
of the idea. Okay, okay, wonderful. And what
are your thoughts on homelabs? What are my thoughts
on homelabs? I wouldn't go so far as to say I
have a homelab. But I have a home to servers.
So, like, I do do quite a lot of sort of self
-hosting of stuff. So, like, for example, I kind
of sort of self -host my own iCal server for
my calendar, like, that I use with my, you know,
iPhone and stuff like that. What else do I self
-host? uh i self -host an ad blocker and stuff
like that so i mean yeah i i have felt like my
whole network i mean So, yeah, I have, like,
one or two servers that I kind of have running
at home. But I wouldn't say I'm, like, majorly
into that. Just enough, basically, for kind of
what I need. I'm more of a software guy than
a hardware guy. Let's put it that way, right?
So, you know, they're nothing fancy. They're
just those little mini ITX, are they called,
I think? Like the little Intel NUCs. I don't
even know. how you pronounce it but yeah just
just those kind of little boxes they're not they're
nothing particularly powerful oh you run a hypervisor
on them or just straight linux no i just run
debian on them directly i mean these days people
seem to be getting more and more into running
things like proxmox and stuff like that on them
and i've certainly heard about that but but so
far it's not something i've been particularly
interested in doing so yeah i just run debian
on them directly on bare metal okay okay wonderful
you want to share to end the call two of your
favorite music bands yeah so music i have a diverse
and eclectic kind of musical interest i guess
i would say but you know as of recent years i'm
quite into my metal so things like nine inch
nails metallica things of things of that nature
like fast stuff that kind of sort of helps me
like stay in the zone and focus when i'm working
basically so things like that but i'm not i'm
no like musical expert guru i just kind of like
what i like basically okay okay wonderful and
what about movies cheesy 80s Hollywood action
stuff. So like, you know, Die Hard, Beverly Hills
Cop, that kind of stuff. That's the kind of thing
I like, you know. Did you ever watch... Just
pre -CGI. Pre -CGI, basically, is kind of like
my genre. Sorry, did I ever watch... Yeah, did
you ever watch White Man Can't Jump? I have not
seen it. Is it good? Hold on, let me see. I like
the movie. My wife hates it. This one. Hold on.
Where's my... Where's my screen? There we go.
This one. Yeah, Woody Harrelson and... Wesley
Snipes. Wesley Snipes, yeah. Yeah. I don't know.
It's an old movie, you know? Yeah. I don't know.
I just like it. Okay. Yeah. I'll stick it on
the list. Yep. And video games? Are you into
video games? I'm not a huge video gamer. I guess
I'm probably what some people might kind of derogatorily
call quite a casual gamer. You know, I'll play
my... you know tower defense games on my ipad
and stuff like that i'm not like a big big gamer
in the way that some guys some some people are
um i've sometimes you know kind of got into things
like doom and stuff like that for a while but
yeah again it's all like fairly old school stuff
i'm not i'm not one of these people who buys
like some huge fancy rig with the very latest
gpu to download so i like that's that's not me
okay wonderful so um any final words before we
Wrap it up, Andrew? No, not really. Just to say,
firstly, thank you for inviting me and for talking
to me about this. And for anyone watching this,
I hope you found this kind of useful and interesting.
You know, I'm always happy to chat to anyone
about... um near them you know you probably the
best way to reach me certainly through debug
print context is kind of through issues or pull
requests on on on the repo right so you know
if you want to provide any feedback you know
features bugs that kind of type of thing by all
means go that way uh you can also find me on
reddit i think my reddit username is andrew fz
if i'm not mistaken um so you can reach me there
as well if you kind of want to talk to me in
a in another context But, yeah, so thank you
very much. I really appreciate the time chatting
to you today and talking through debug print
and some other things. I hope folks found it
useful and interesting. Oh, yeah. Thanks to you
for your time and for reaching out. Yeah, and
thanks for setting up the call, Chris, and thanks
for sorting this all out. Okay, wonderful. Nice
to meet you. I'll talk to you later. Nice to
meet you, too. Cheers. Thanks very much. Bye.
Take care. Bye -bye.