Xudong Yang

Hi, welcome to my blog! 👋 I love thinking, digging in and figuring out things!

My latest writing is below. Feel free to read and explore!

Neovim experience

I have been using JetBrains IDE for quite some time. I have always enjoyed its rich features, such as refactor and convenient shortcuts. Due to this appreciation, I have tried a few different JetBrains IDE, including its lite editor JetBrains Fleet (kind of a VS Code follower). Even though some of them are not so good, most of them are still very impressive. I still heavily use JetBrains IDE at work, but recently I started to re-evaluate if I should start looking for lighter alternatives.

The trigger was quite simple. I found my MacBook Air sometimes cannot hold JetBrains IntelliJ and WebStorm. It can get noticeably slow. While it’s still tolerable, but that made me wonder if I really need it for everything. Especially for my blog writing.

That leads me to the world of Vim once again. I used to look into this landscape, but the steep learning curve pushed me out of the door. After some considerations, I decided to give it another shot, and this time, I started getting into it, and I decided to spend more time to get used to it.

To give you an impression of my setup now, this is how my terminal look like as I am writing this post.

Writing this post using Neovim
Writing this post using Neovim

Pretty cool? Isn’t it? Actually I did nothing. All I did is just to install neovim and lazyvim. It comes with all of those IDE alike window and cool features such as spell check. I am still actively learning this, and hopefully I will get to somewhere I can confidently share more tips.

Reasons I decide to invest time in this steep learning curve:

Did I consider emacs? No, and pretty unfairly no reason. I just didn’t look at both thoroughly and made a thoughtful decision. I have seen one emacs user in my real life, and I am not sure if he would be disappointed that I come to the side of vim. This choice of vim is pretty random, and perhaps one day if I become a CLI coding expert, I would try both and compare them.

As I write this blog, I really start to understand how keyboard workflow is more effective. I used to struggle with moving my cursor in vim because I really don’t remember all of those shortcuts other than hjkl (and I didn’t even use them; I used arrow keys instead), irR and wq!. After spending some time practicing those keys, now I am able to quickly move my cursor, edit multiple lines, and make quick edits, completely without touching my trackpad. This is awesome!

Another noticeable little nice thing. I found out this setup automatically adds the empty line at the end of each file for me. I guess this is a plugin or something in neovim or lazyvim, which is called something best practice. This code styling point is that small little thing which bugs me a lot when I used JetBrains IDE for my blog, especially when I used it to maintain my own theme. JetBrains IDE completely ruins those go template html files (indentation, syntax highlighting, linting etc.). I am so bored to fix those numerous errors, and most surprisingly, there is not a good way in JetBrains IDE to customise or disable some of those annoying rules. Hopefully this more customisable vim solution brings me to a better future.

Recent posts