DEV Community

Cover image for Why I switched to Vim from Visual Studio Code

Why I switched to Vim from Visual Studio Code

Ayooluwa Isaiah on April 02, 2018

I started using Vim as my main editor around six months ago and I can say it has been a worthwhile experience because it has pushed me to think in ...
Collapse
 
verzola profile image
Gustavo Verzola • Edited

Hey! Nice post! I also forced myself to use Vim full time some years ago and I do not regret. It made me a lot more productive. I recommend this book that helped me understand a lot of Vim:
learnvimscriptthehardway.stevelosh...

Have you ever tried Vim 8 or NVIM? It allows you to get the same colors from GVIM.

My .vimrc: github.com/verzola/.vimrc

Collapse
 
ayoisaiah profile image
Ayooluwa Isaiah

Thanks for sharing your vimrc! Just took a quick look and I can already see some things that I will find useful :)

I've been on Vim 8 since day one so I don't think that's the problem. It appears you need true color support in the terminal as well. I'm not sure what Linux terminal emulators have true color support and I haven't been bothered to look it up. Gvim will do for now.

Collapse
 
verzola profile image
Gustavo Verzola

You are welcome! Most of the things in my vimrc was stolen from other people vimrc or from this book, hehe! I started using these ready vimrc distributions like spf13-vim but my vim took too long to startup... Also there was a lot of plugins and settings that I didn't know how to use or didn't needed, so I created mine with just the things I really need and now it is super fast, like it should be!

About the terminal, if you use Linux, there is a big chance that the default terminal emulator has true color support, but you have to activate in vim with setguicolors. It is useful mostly when you are connected to a server via ssh or use the terminal a lot.

Collapse
 
moopet profile image
Ben Sinclair • Edited

I like this post, but I want to throw in with a bit of a pet peeve:

the free version is unrestricted in its feature set, but you just have to deal with that popup and it can be annoying sometimes

From the horse's mouth:

license must be purchased for continued use.

Sublime text is not free, as in either speech or beer, and it never has been. Abusing the trial by using it as if it was free is commonplace, but it's still abuse of the license.

EDIT: I used PHPStorm briefly with its vim emulation and found that to be the best out of all the editors I'd dallied with.

Collapse
 
ayoisaiah profile image
Ayooluwa Isaiah

Ah yes! Wrong choice of words there. I should have said "the unlicensed version". Thanks for pointing it out 👍

In any case, it's hard to justify Sublime's hefty price tag given the depth of features that competitors, such as VS Code, have got nowadays.

Collapse
 
jorinvo profile image
jorin

Hi Ayo! Nice to see others enjoying to learn vim! Even after three years, I still learn something new almost daily!
Just recently I took time to make more use of macros. This article was really helpful: hillelwayne.com/post/vim-macro-tri...
Also, there is a great Twitter account to follow for learning neat vim tricks: twitter.com/vimgifs

Collapse
 
maxdevjs profile image
maxdevjs

Good article about macros, thank you :)

Collapse
 
oivoodoo profile image
Alexandr K

You don't need to switch to the new editor at all. It's better to have the alternatives daily. in one day it will become boring to use the same editor daily and visual code, spacemacs, vim and other options will come to your life :)

using vim the last ~10-11 years and using visual code with key bindings sometimes as well for js, python,go because of awesome autocomplete there. but vim is still one of the best option to feel like a hacker by developing in terminal or sshing to the server and edit there in place.

Collapse
 
myterminal profile image
Mohammed Ismail Ansari

I have been wanting to learn Vim myself since a while. However, my infatuation with Emacs does not let me try another text-editor at all. I can totally relate what it must have been for you to entirely switch to an editor like Vim where you can 'magically' perform tasks with a few key-strokes here and there, tasks that would otherwise be cumbersome in regular/modern text-editors. I also have huge respect for your efforts on learning Vim, coming from a fairly easy-to-use software like Sublime Text.

Not that I want to disrupt your happy experience with Vim, I'd just like to mention that Emacs can provide a similar experience where after starting to understanding it, in some time (depending upon how quickly you get accustomed to the awkward key-bindings) you would find yourself so excited about a text-editing tool that you cannot stop talking to people about it, as I have been since about five years now :)

It turns out that a text-editor can actually change you as a programmer by providing you with unique tools and methods to perform the same task in a more systematic and efficient way.

Happy text-editing to you!

Collapse
 
ayoisaiah profile image
Ayooluwa Isaiah

Cheers man! Thanks for the comment

Collapse
 
rossijonas profile image
Jonas B. R.

I've been thru almost the same path as you, I've used Sublime Text/Atom for a while, and tried VSCode.

They all seemed pretty much the same.. boring.. and very slow when dealing with large codebases, or with multiple files, or with linters and stuff turned on!

After switching to Vim I realized how it's awesome, the learning proccess is what makes me more excited to use it and I never get bored of it. There's always new tricks, you can program scripts to better your workflow... It's more than my text editor of choice, it's my videogame 😂.

After using Vim for a while, I decided to write quick tips and tutorials for Vim beginners, to help them deal with specific configs and get excited with tricks you can use.

You can check it on medium.com/vim-drops !

Cheers!✌️👨‍💻⌨️👩‍💻✌️

Collapse
 
maximfilimonov profile image
tpaktop

I do use vim as editor of choice for quickly editing a file, though the static analysis and refactoring support is way too much work for me to configure in Vim.
My latest setup based on nvim as it offers many sane defaults and better support for modern plugins.
There is also a fun way to learn vim - Vim Adventures

I do find myself sticking to VSCode more and more these days especially with recently added LiveShare support. With Vim plugin installed I'm feeling right at home and don't really miss much any of vim features.

Collapse
 
maxdevjs profile image
maxdevjs

"instead, learn the features it has that makes it so unique and special": is up to us to choose, red or blue pill...

Harder part has been to "accept" to think in Vim mode, but when it clicked, reality changed :)

Collapse
 
tahini profile image
Tahini

Great post.

Honestly, Vim blows everything else away. It takes time to learn and setup, but once you get proficient, switching to anything else is hard. I have tried multiple times to switch to code, but I can't make it stick. It's not so much the key-bindings (which can be emulated fine on Code - and even better on Atom); it's more the low-level, unix-y nature of it.

I love vim.

Here's my setup, if anyone is interested:
github.com/hew/hotfiles/tree/maste...

Collapse
 
leob profile image
leob • Edited

Interesting ...

I'm using 3 different IDEs (Eclipse for Java, Netbeans for PHP, and Webstorm for Javascript), and I use VIM quite often for simple editing tasks (but not as an IDE ... I like VIM a lot, but an IDE it isn't).

Recently I've tried Atom and VSCode with the aim to replace Netbeans and Webstorm (to reduce the number of IDEs from 3 to 2).

Conclusion: I like VSCode a LOT more than Atom ... VSCode looks a lot better, works better, is faster (Atom feels more sluggish). Atom also requires you to install and configure a mountain of plugins for even the simplest things, VSCode is more or less complete 'out of the box'. I think Atom really lost this war.

Funny thing is, for now I'm still hanging on to Netbeans and Webstorm ... old habits are hard to change, and each has little things that I like just a tad better than the equivalent VSCode feature.

I could however see myself switching to VSCode at some point!

Collapse
 
fengshangwuqi profile image
枫上雾棋

[shake hands], I used vim for few mouths, and I deeply falling in love with it, this is my vim config, as well as tmux and zsh, welcome to reference and exchange.
to-vim-tmux-zsh

Collapse
 
ayoisaiah profile image
Ayooluwa Isaiah

Awesome, thanks for sharing. I'll be sure to take a look :)

Collapse
 
metronom72 profile image
Mihail

Bonjour.

I think you may be interested to use, or simple overview SpaceVIM (github.com/SpaceVim/SpaceVim) bunch of addons to vim

Collapse
 
gottz profile image
Jan-Stefan Janetzky

just to get the best of both worlds maybe try the neovim plugin for vscode

Collapse
 
dj_yanic profile image
YaNic • Edited

Just tried today VS Code with Vim keymapping and it’s dope!

Collapse
 
ronalterde profile image
Steffen Ronalter

Great article. I like the idea of adopting the Vim way (without many plugins).

Do you use any plugins for things like fuzzy finding and completion?

Collapse
 
jwmevans_77 profile image
James Evans

Have you tried playing with the fonts & colour schemes in Terminator itself?