DEV Community

Cover image for Vim for People Who Use Visual Studio Code (Full Article)

Vim for People Who Use Visual Studio Code (Full Article)

Jared on September 24, 2019

Hot tips to bring the awesomeness of Visual Studio Code to Vim. Front-Matter I want to start by saying, this is not an editor-shame art...
Collapse
 
sesamestrong profile image
Sesamestrong • Edited

Love the article! I recommend TabNine for Vim; it has the best autocompletion that I've ever seen. It uses GPT-2, OpenAI's text prediction model, and I often find it correctly autocompleting entire lines with it.
thepracticaldev.s3.amazonaws.com/i...

Collapse
 
dattran1999 profile image
dattran1999

Hey, I am trying to use tabnine in vim. I also love to use youcompleteme but idk how to make the 2 work together (like in vscode, tabnine will work alongside with intellisense). Do you have any suggestion?

Collapse
 
bharat profile image
Bharat

Tabnine is awesome. I have been using it with emacs for some time now. I am using the professional version which is currently free and in beta.

Collapse
 
sesamestrong profile image
Sesamestrong

I also use the Professional version; Deep TabNine is incredible and I can't wait until support is added for things like Salesforce's CTRL or other powerful text prediction models based on GPT-2.

Collapse
 
codenutt profile image
Jared

I just read an article about TabNine! I'll definitely check it out. Thanks!

Collapse
 
luisdavim profile image
Luis Davim

You should look into github.com/liuchengxu/vim-clap for a ⌘P like palette.
Also if you're using coc.nvim you probably don't need extra plugins for auto-pairs and formatting on save, you just need to set it up on coc.

Collapse
 
codenutt profile image
Jared

Good point, thanks!

Collapse
 
gui42 profile image
Guilherme Marthe

Is the Kyle Mathews demo you watched available anywhere online? Now I'm curious to check it out :D

This is a great article! Ill just share some talks that really got me into the vim mindset:

There were a few places that helped and are helping me.

  • Luke Smith's channel has helped me a lot with customizing my setup together with mapping shortcuts and guide navigation within vim. I've adapted his ideas into my language snippets, but I've tweaked a few things for my personal preferences.
  • For vim plugins and usage of more advanced features (ctags for example) this presentation has helped me a lot, even though I still think my setup kinda bloated.
  • After going to twitter and having a conversation with the amazing Julia Evans, one of her followers recommend me this talk. It was eye opener and is what started it all.
Collapse
 
codenutt profile image
Jared

I don't remember exactly which one it was, but here is the link to their webinars:
gatsbyjs.com/resources/webinars/

Thanks for the resources! Watching people use Vim is incredibly eye opening lol

Collapse
 
marschal profile image
marschal

Great article! But, did you missed pointing out to the Powerline extension or did I missed it? One of the greatest thing for vim imho.
I somehow stopped using vim for coding mostly because of the lack of a good intellisence plugins in the past. Will give it a try with your proposed plugins :)

Collapse
 
codenutt profile image
Jared

Thanks! I actually think I left powerline out because it's not something that you get from native VSCode, but it is an awesome plugin!

I would argue that because of the intellisense from CoC (or from what im hearing about TabNine) now is a perfect time to jump back in!

Collapse
 
captainawesomedi profile image
Di Wu

same here! I switch to vim with tmux 3 month ago. I used thoughtbot upcase video to learn from. Honestly, so far its been great. I can the biggest plus is I can navigate with in a file with so much precision.

Collapse
 
codenutt profile image
Jared

Agreed! Thoughtbot is great 👍🏻

Collapse
 
drsensor profile image
૮༼⚆︿⚆༽つ • Edited

Thanks for writing this post. I'm currently in the process of migrating from VSCode to Vim to preserve more RAM and teach myself about langserver-protocol.

I use LangaugeClient-neovim + completor.vim as my daily driver. Avoiding coc.nvim because it depend on nodejs.

I'm still searching on something similar to "autocomplete as you type" but don't depend on any interpreter/runtime (pure binary executable).

Collapse
 
codenutt profile image
Jared

Interesting! Any reason why you are avoiding nodejs? I think most autocomplete plugins are going to require some type of runtime, but I could be wrong.

Collapse
 
drsensor profile image
૮༼⚆︿⚆༽つ

For simple application, nodejs has a bigger memory footprint than python or lua. Also, by default, nodejs is not pre-installed in most of Linux distribution. But that's not the main case.

  1. If I use typescript langserver, then there will be 2 nodejs running at the same time. One for coc and the other is for tsserver. And if I use webpack hot-reload for developing an app, then there will be 3 nodejs running at the same time.

  2. Vim 8 and Neovim has their own asynchronous job control. So why not leverage those. This means that the lsp-client will share the same runtime as vim, no duplicate runtime.

Recently I found this article that explain about vim-LSC. The project is quite new and I'm not testing it yet, but it's interesting that there is an lsp-client written in pure vimscript.

Thread Thread
 
codenutt profile image
Jared

Interesting. Thanks for the info! I would prefer not to run 6 node servers either lol I haven't had any issues with Coc, but I definitely see your point.

Collapse
 
xsrvmy profile image
Rui Ming (Max) Xiong

Whta's your opinion on using the vscode vim plugin? I personally use that a lot but I find the issue with how undo works messy sometimes.

Collapse
 
codenutt profile image
Jared

Its okay. My issue with it isn't so much about the plugin but about myself. I used the plugin for about 6 months but my learning about vim quickly plateaued because i was still sticking to VS Code shortcuts. Its my personal opinion that in order to really get a benefit from Vim, its gotta be in Vim.

Collapse
 
pavanmehta profile image
Pavan Maheshwari

Do you have dotfiles to install everything? Or they can only br installed manually?

Collapse
 
codenutt profile image
Jared

Yeah, I have dotfiles: github.com/DarthOstrich/dotfiles

Collapse
 
jessekphillips profile image
Jesse Phillips

You might want to support onivim.io/

New vim UI to natively support VS Code extensions and powered by a native vim backed (my understanding was supported by neovim development).

Collapse
 
codenutt profile image
Jared

Really interesting project. Will definitely start following it.

Collapse
 
eclecticcoding profile image
Chuck

Okay, time to spend more time with VIM than just README's.

So, what are your thoughts about VIM VS. NVIM?

Collapse
 
codenutt profile image
Jared

Ive only used Vim. Another guy i used to work with used nvim and he liked it. I don't think it really matters

Collapse
 
simme profile image
Simme

Just FYI, Vundle is not deprecated. The Bundle commands in Vundle are however.

Collapse
 
codenutt profile image
Jared

Correct. Bad choice of words. I meant it hasn't been updated in a long time.

Collapse
 
wileymab profile image
Matt Wiley

Bravo

Great article! I use Vim regularly... but poorly. This has inspired me to supercharge my use. Thanks!

Collapse
 
codenutt profile image
Jared

Haha thanks! That gif is the greatest compliment anyone has given me