DEV Community

Discussion on: Finally switching to vim

Collapse
 
dubyabrian profile image
W. Brian Gourlie

There are two ways to think of VIM: As a text editor, and as a set of common modes and keybindings.

Switching to VIM doesn't need to be about making the switch from a fully-featured IDE to a text editor—IDEs have a lot of great functionality that text editors don't, so you're really giving up a lot for the sake of using VIM for everything.

The alternative to using VIM (the text editor) for everything, is to leverage VIM plugins for whatever tool is best fit for the job. You mention you use RubyMine; JetBrains vends an excellent VIM plugin for all their IDEs. There are excellent VIM plugins for Visual Studio, Sublime, Atom, VSCode, etc.

While VIM (the text editor) is great in its own right, and there are a lot of really great plugins, VIM is really about being able to navigate and edit text efficiently. You don't need to give up your existing tools to leverage VIM's efficiency!

Collapse
 
ddiukariev profile image
Dmitry Diukariev

I confirm that VIM plugin is a good way to go if you want the best of both worlds power of VIM and IDEs. Doing this for over a year with Visual Studio and VsVim and it works great for me (I have tried switching fully to VIM but lack of IDE features made me consider mix of IDE and VIM).
Also it is true that sometimes those plugins miss things that VIM has. But I just made a command to open current file for editing in VIM with hitting single key. So whenever I need smth. complex that plugin still doesn't have I just switch to VIM edit and return back.
Also eventually I found out that I want VIM editing everywhere :). So I made an AutoHotKey script that allows me to edit text from any input in vim (I just hit shortcut selected text loads in vim I edit it hit shortcut again and new text replaces previously selected) find this to be very handy.

Collapse
 
ismatim profile image
Ismatim

Do you have a special list of plugins for working with Visual Studio ?

Thread Thread
 
ddiukariev profile image
Dmitry Diukariev

I use VsVim for Visual Studio. No other plugins.

Thread Thread
 
ismatim profile image
Ismatim • Edited

How does your crafted .vimrc work within Visual Studio ? Did you need to make any curious adjustment ?

Thread Thread
 
ddiukariev profile image
Dmitry Diukariev

I have separate configs for vim (_vimrc) and VsVIM (.vimrc) because VsVIM does not support all of the vim features. Both files are placed in default vim installation directory at C:\Program Files (x86)\Vim. VSVim picks it up automatically when you load visual studio. There is also a manual way to load it just type :s {path to your .vimrc}

Collapse
 
peterfication profile image
Peter Gundel

And what I also like about vim is that you are encouraged to adjust it to your needs. That's a really strange thing because you can do the same in the JetBrains IDEs but I never really did it. Maybe because it's already that good out of the box.

Collapse
 
robertmjohnson profile image
Robert Johnson

Agreed, I recommend this approach - I got started though using plugins too. Another area where plugins shine is being able to easily toggle them on and off with a button or keyboard shortcut. This really helped me when I had got confident enough to start using Vim editing at work, but sometimes wanted an escape hatch to get back to "normal" editing for more complex things that I hadn't learnt the Vim way for yet.

Plugins are also useful for if you work on Windows. There are things like gVim or installing Vim on a Cygwin terminal, but to me they always feel a bit unnatural somehow compared to the experience on a *nix box, and so plugins avoid this issue.

Collapse
 
peterfication profile image
Peter Gundel

Oh that's really cool! I should definitely check this out!

Another problem with RubyMine though is that it is so slow. So I thought it is better to have a really fast text editor instead of all the IDE features from which I only use some.

Collapse
 
dubyabrian profile image
W. Brian Gourlie

Ah, yeah. I've never had performance issues with JetBrains IDEs, but I've also never used RubyMine specifically.

Collapse
 
alexeyzimarev profile image
Alexey Zimarev

I agree. Using vim keystrokes saves lots of time when one uses emulator across multiple IDEs and editors. I use VS 15/17, several Jetbrains products, Sublime, VS Code, and everywhere I use vim emulators, keeping me comfortable across all these.