DEV Community

Cover image for On Learning Vim

On Learning Vim

Sindbad on October 26, 2024

A year ago (I still do), I would get so amazed and overwhelmed watching ThePrimeagen navigate the Vim editor. I wanted to do it as well. But I was ...
Collapse
 
acudworth3 profile image
acudworth3

Don't be afraid to use a distribution like Astro, lazy or Chad neovim. It's a bit of a short cut but will keep you using neovim quicker. After a while you'll want to do the configs yourself to get it just right (in my experience).

Configuring for front end won't be much trouble if you go that route .

Collapse
 
sindbad_x profile image
Sindbad

@acuwebservices so i did started with nvchad, but i felt too much of the overkill and i didn't understand lot of underneath thing. currently, i'm using kickstart.nvim, which uses lazy.

Collapse
 
tsolan profile image
Eugene

Once upon a time, I’ve decided to learn vim, mostly because of generic key binds which I wanted to apply to vscode via vim plugin (years of using vscode with my own custom ones left me unhappy each time I encountered different environments) and, additionally, some utilities also uses vi by default. I started with vim plugin in vscode, but quickly found myself confused due to muscle memory associated with vscode. Thought to switch to nvim for the time of learning. Having installed nvim, I picked up some tutorials on youtube that carried me through basic setup and explained basics of lua and nvim apis, so I was able to begin practicing. Days were passing by, more and more I was getting used to it as well as bringing more modifications to the interface to fit my needs. Finally, it ended up with almost perfect setup, a great command over the functionality, and a strong desire never ever again to return to vscode at all.

Collapse
 
sindbad_x profile image
Sindbad

@tsolan yeah, i couldn't and still find it hard to switch to nvim because the environment is so different out of sudden. I put the one dark theme, and now i feel a little bit less foreign in this new environment. i haven't made the switch entirely to nvim but i can see myself, as you have to reach a perfect setup where i may not want to leave to vs code at all.

Collapse
 
tsolan profile image
Eugene

By now, I have been using nvim for more than a year and since then never launched vscode…

Thread Thread
 
sindbad_x profile image
Sindbad

@tsolan go daawg!!!

Collapse
 
diso profile image
Wayne Rockett

💡Is the reason people in Vim Club always talk about Vim, because they don't know how to quit Vim Club?
Image description

Collapse
 
sindbad_x profile image
Sindbad

@diso are you also part of the vim club?

Collapse
 
tigga73 profile image
tigga73

Read the book practical vim: edit text at the speed of thought, 20 minutes every day during 1 month mades me more faster than the last 9 months using exclusively Neovim

Collapse
 
sindbad_x profile image
Sindbad

@sirbabyface thanks, found a pdf version on github. hope i get time to read it.

Collapse
 
joeschr profile image
JoeSchr

Configuring frontend is no Biggie. I use it every day, with the help of lazy and mason.

Also check out oil.nvim as netrw replacement.

Yazi for Filemanager with vim keys

Collapse
 
sindbad_x profile image
Sindbad

@joeschr i'll definitely check that out. I did came across oil.nvim, but again, as I said earlier, I'm trying to stick to default for now. so, for another day for sure.

Collapse
 
martinbaun profile image
Martin Baun

Once you get the binds to your memory, you won’t be able to use anything else :P

Collapse
 
sindbad_x profile image
Sindbad

@martinbaun yes 100%. i'm already using vim keybindings outside vim: obsidian.

Collapse
 
mannuelf profile image
Mannuel

Nice, congrats on two accounts switching to Linux and using VIM. I keep this cheatsheet nearby vim.rtorr.com/

Collapse
 
sindbad_x profile image
Sindbad

@mannuelf thanks man. although i haven't mentioned this cheat-sheet here, this is my default reference. i didn't list it because it will probably overwhelm newbies. but once you are past the newbie phase, this cheat-sheet is very very handy.

Collapse
 
kurealnum profile image
Oscar

Well written! I always enjoy seeing people join the vim cult fanclub.

Collapse
 
sindbad_x profile image
Sindbad

@kurealnum i haven't sold my soul to the cult yet

Collapse
 
moopet profile image
Ben Sinclair

Oh you have, you just don't know it yet.

Thread Thread
 
sindbad_x profile image
Sindbad

👀👀👀👀👀

Collapse
 
navneet_verma profile image
Navneet Verma

Nice article, your experience motivated me to learn vim myself! But is Vim for everyone, What do you think ?

Collapse
 
pengeszikra profile image
Peter Vivo

My opinion is vim is great for every one, because more or less on certain point we are facing a terminal -> shell, during our works. If we are forcing to use windows as developer environment, then I suggest to select gitBash as termina, that is give a near same experience as linux or MacOs shell does.
VIM are installed!
But at the old days I am don't spend time to understund this great editor. Which are seems wierd at first moment compared to nano. But if we spen a bit time to understand the basic movement, than that is good starting point at least to use as side editor, when we don't want to leave a shell.

best movement:

o -> turn to insert mode and we get a new line under current one to write
: -> back to normal mode
:q! -> back to normal mode and close without save
:wq -> back to normal mode save our modification and quit
:e start-typing-filename -> back to normal mode and open any file to read or edit, you get all helps as OS give. Mainly tab help is good at this point.

So I recommended to learn vim to every one.

Collapse
 
sindbad_x profile image
Sindbad • Edited

@pengeszikra agree! at some point, you will be greeted with vi in shell and i remember first time, wondering if this program is broken or what. nothing happened on pressing any keystroke, so i killed the terminal and going to bed in confusion. I wish i had took some time to understand what it was, because now i feel i missed an amazing tool that i would like to carry with myself throughout this programming journey. And you know what, it's not even that hard. Just takes a little time to get used to this mode of thinking and navigating the cursor and editing text.

Collapse
 
sindbad_x profile image
Sindbad

@navneet_verma i don't know if vim is for everyone but if you have some time, you can try it out and find it yourself.

Collapse
 
ezpieco profile image
Ezpie

I have one small tip. Configure vim by yourself, take help from youtube videos or documentation if needed, I know it can be a bit overwhelming but mind my words, you will realize just how crazy it can get, because you made it you know it, as simple as that, at first you might get problems while configuring, but once it's all done using the editor will be a blaze.

Collapse
 
sindbad_x profile image
Sindbad

@ezpieco yes that's the right way. i'm actually planning to do that. but before that, i'll need to look at some lua.

Collapse
 
dhan profile image
Dhanush K • Edited

Opening vim
In cmd type nvim to open vim

Closing vim
press :q to exit vim

Thank me later🙂

Collapse
 
shakilnwz profile image
Shakil Nawaz

Long press the power button.