Hnat Lesiv


Does vim customization take you any further?

18 Sep 2024

I don't know about you, but I spend way too much time configuring software. Sometimes it feels like an ultimate productive thing to do. You can think of it like a meta productivity. You are trying to make yourself more productive for the future self. What could be better? Right?

I can only speak for myself, since that is where obviously I have the most expertise. Also a bit of history will help to prove that I am an ultimate time waster in vimrc.

I started using vim right after getting my bachelor degree in 2018. It is probably a good thing that I did not waste my time on configs during studies. Also, if it wasn't for endless requests for payment from Sublime Text, there is a chance that I would never become vimrc_time_waster. It was love from first sight. After few days of vimtutor I finally felt like at home. That is when I decided that it's time to make my beloved editor even better with few configurations.

It was summer before my masters degree and I had an idea that it would be awesome to write notes during lectures in vim (including formulas). What could go wrong? Emmm, I would not spoil much if I say that it did not work out. I wasted a lot of my time configuring plugin manager and setting up all the "good stuff" I got used to like autocomplete, go do definition, proper syntax highlighting. Anyway, it wasn't working for, so I eventually I took notes with pen and paper and retrospectively I am super glad about that.

During most of masters I did not touch vim, until the time came to my dissertation. During one of the discussing with my professor i showed him what I programmed using Sublime Text. And he asked me why I don't use vim. Then it clicked in my head. I should it give it another try. It was marvelous, especially working on the university server through terminal. Everyone was sitting in university using school computers, while I sat at home with my beloved vim. The dissertation period was only 3 months, so I could not waste a lot of time on configurations. And I should have realized that it is the ultimate way of using vim.

I don't exactly remember how but I lost that vim configuration that I had during my masters. For quite some time I was trying to reproduce the same efficient vim workflow. I did not realize that actually productivity was coming not from vimrc but from doing the work and being in flow. When you are not distracting yourself with useless things, achieving the flow is much more realistic. However, I had some illusion that somehow modifying .vimrc could help.

But what do you think could be more useless than endlessly configuring your text editor. That is right, watching others do it. I saw @ThePrimeagen jumping much faster than I do in vim, flying like hell between documents. He seemed like someone I could trust when it comes to vimming. Obviously I then switched to neovim. I think the main motivation at the time was my illusion that copilot works only in neovim and not vim, but it was just the final push. I though I already know some vimscript, so why now learn lua and start my configuration journey from scratch (so smart).

Neovim really has some great features, I managed to set it up perfectly. At some point I was really happy with all the settings. I had perfect colors, lsp, even debugging. What else could you wish for. Except I always needed to change somethings in the settings. Make it slightly better. There was another problem. It is just slower, especially with my IDE-like settings.

Then I tried vanilla vim with no plugins. At some point I thought that these features don't help me too the extend I waste time setting them up (first good idea since opening vimtutor). So, just recently, after 6 years of "improving my productivity" I am telling you to stop configuring your vim.

Now my vimrc is just 24 lines of text, 9 of which are blank lines and comments:


" My colorscheme
syntax on
hi Comment ctermfg=grey
hi VertSplit ctermbg=NONE cterm=NONE
hi StatusLine ctermbg=NONE cterm=bold
hi StatusLineNC ctermbg=NONE cterm=NONE

" I like clean directory
set nobackup
set noswapfile

" I need to go back to files sometimes
set undodir=~/.vim/undo/
set undofile

" ^ is too far away, I like to see when I am searching
noremap 0 ^
set incsearch

" This settles the debate of tabs vs spaces
set expandtab
set tabstop=2
set shiftwidth=2
set softtabstop=2

Have a look at geohot's .vimrc:


syntax on
set tabstop=2
set shiftwidth=2
set expandtab
set ai
set number
set hlsearch
set ruler
highlight Comment ctermfg=green
It is a total of 9 lines. And he achieve more than majority of productive vimmers on the web. I know that he betrayed us with VS Code, but I am also not without sin. I use emacs sometimes, but we can talk about that later. I think it is fine to use domain-specif IDE sometimes if it helps. You don't have to be a cultist to use vim.

Even though Paul Graham is a lisp guru, he still uses vim. Actually he says that he uses vi, which is what every ultimate vimmer should do. But even if he uses vim, I bet his config file is smaller than yours.

I still enjoy watching @ThePrimeagen, but I try to separate my work and fun. I use vim for work and I should not spend countless hours configuring my settings so that it looks as cool as someone's else. You just don't need to modify your settings and that is why you don't need advice and help from people who can show what they achieved. Neovim is also great if it works for you, but when you work, just do your work. If you want to change something better think twice before doing that, or even 3 times. Better wait a month and if it still bothers you. Then, well, maybe do it. Or maybe wait another year. Because it is not productive at all. No matter what people tell you. But why should you listen to me anyway.

Also, you don't need tmux 99% of the time. But that is a story for another day.