DEV Community

Cover image for Learning Vim in Quarantine - Part 1

Learning Vim in Quarantine - Part 1

Anand Amrit Raj on May 16, 2020

Wow, it has been a long time since I wrote anything on this blog. To be honest the last year was a bit too much. And surprisingly this year is no b...
Collapse
 
aminnairi profile image
Amin

Hi there, always great to see people moving to vim and reporting some great benefits such as faster editing.

I believe you made a mistake when you said that the d command deletes the character you're at. I think this is the x command since the d command waits for a motion before deleting something.

Anyway thanks for sharing your journey with us.

Collapse
 
anamritraj profile image
Anand Amrit Raj

Yes! Thanks for pointing it out!! I guess I need to take vimtutor one more time.😁

Cheers!!

Collapse
 
aminnairi profile image
Amin

No need haha! I too make silly mistakes, I'm glad you didn't take it personally. Great article again.

Thread Thread
 
anamritraj profile image
Anand Amrit Raj • Edited

Actually it's great that you pointed it out. Otherwise, after reading this, someone (maybe my future-self) might have tried to delete a character, pressing d multiple times and ended up deleting their whole code. 😂

I can totally imagine that guy being me.

Collapse
 
muhimen123 profile image
Muhimen

I just use airline and auto-complete braces in my init.vimrc(I use neovim) and I am happy with it.

Collapse
 
aminnairi profile image
Amin • Edited

I have added NerdTree which adds a folder view to the left of Vim just like an IDE. It makes creating, updating names and deleting files really fast and easy.

I also added Ctrlp since I am often editing huge projects at work and home to ease the search of files. It is a fuzzy file finder just like in VSCode.

I also have Devicons which adds little icons of folders and files in NerdTree. It is really not necessary if you are saving resources but it adds a more IDE-like experience. I hope you'll find these useful for your workflow.

Collapse
 
muhimen123 profile image
Muhimen

NerdTree is definitely the best available option so far. But I think I am okay without this because I don't need to work with multiple files that much. I use vim when I am doing competitive programming. Other than that, I use vscode.

Thread Thread
 
aminnairi profile image
Amin

I see, you definitely are right. Vim has a command called :Explore which acts as a little graphic file manager. You can also use :Sexplore for a vertical split. This can be a pretty good replacement for NerdTree if you do competitive programming.

Collapse
 
anamritraj profile image
Anand Amrit Raj

And here I am in comments, taking notes!

Collapse
 
dvg3012 profile image
dvg3012 • Edited

Hey, great you discovered vim.
For the start, would advise you to not rely to much on plugins but try to stick to vanilla vim.
Trying to use too much plugins was a big mistake I made at the beginning.

Nevertheless, if you want to add plugins I can only recomend you the ones from github.com/tpope/ and github.com/junegunn. They're gold!
I am in the process of re-configuring my vim(nvim) setup, but if it helps take a look at my dotfiles:
github.com/daniel-vera-g/dotfiles (The main vim work is being done in the branches).

Collapse
 
anamritraj profile image
Anand Amrit Raj

Thank you! I agree with you. Adding plugins blindly will only make me confused. This is the kind of thing that happened to me when I directly jumped to Angular without properly learning basics of Javascript. Not going to make that mistake again!

Cheers!

Collapse
 
jamesingold profile image
James Ingold

When I was first learning vim, I made it habit to try to go through vim-tutor once a day. It's a big commitment but definitely adds to the muscle memory.
Also recommend Drew Neil's Practical Vim book - Edit Text at the Speed of Thought

Collapse
 
anamritraj profile image
Anand Amrit Raj

Thanks! Will take a look at it!

Collapse
 
waylonwalker profile image
Waylon Walker

I love vim... Trying to use a terminal app from windows is such a pain though. Ironically enough the best terminal experience on windows is the vscode embedded terminal.

Collapse
 
anamritraj profile image
Anand Amrit Raj

Haha! I completely agree. I have been guilty of using a VSCode instance with just a bunch of open Terminal panes without any files open.

Collapse
 
waylonwalker profile image
Waylon Walker

Many times I have vim open inside vscode.

Collapse
 
aortizoj15 profile image
Alexis Ortiz Ojeda

Started using vim this year and I love it! I feel so much faster with all the key bindings available, thanks for the article Anand!

Collapse
 
anamritraj profile image
Anand Amrit Raj

I can't wait to get to a position you are in and feel the speed ⚡️

Collapse
 
emtes profile image
Enmanuel de la Nuez

Excited to jump on this with you! Can't wait for part 2!

Collapse
 
anamritraj profile image
Anand Amrit Raj

Thank you!