Before switching to CLion eventually, I've used my well curated VIM config[1] together with YouCompleteMe and several clang-based tools such as clang-format, clang-rename etc. for several years, working on smaller and large C/C++ codebases with reasonable success.
At some point in time I switched to a full-fledged IDE (CLion) because there are certain refactoring tasks which are probably still possible using this setup but I found them to be mentally too complex to deal with, especially when I am focusing on the task at hand at the same time.
+1 to CLion. Vim is great for what it is-- if I need to make a small edit or even work on C code it does the job well and is very fast and efficient. But at the end of the day it's not a full blown IDE and as such is missing a graphical debugger and profiler, good configuration for interactively running unit tests, and complex refactoring tools.
CLion is pretty much the best C++ IDE I've found by a mile. Eclipse is so slow and terrible I won't even consider it. Visual Studio is amazing but Windows only and really heavyweight. VSCode, Atom, etc. aren't really "proper" IDEs. Then there's open source contenders like Jucipp which while very fast do lack a lot of the niceties of their paid competitors.
My only gripe with CLion is that it's CMake only. This limits its usefulness for Bazel or Autotools projects.
VSCode gets the look right. Indeed, its look is fantastic. But it doesn't get the feel of vim right at all. My fingers speak vim and they know whether they're talking to vim or something hinky. So after a few days with VSC, I go back. Usually it has to do with ex mode which I power edit in a lot. But I do look at VSC every year or so and it gets better.
The lack of a built-in profiler was a big one for me (though this may have improved recently). I do like using external tools like Intel VTune or Morgan Stanley's XPedite but they're not great for the "quick profiling" you might do to test out various implementations of a function or component.
Maybe that's been added since I used it 1.5 years or so ago though.
That would be my advice, if you are comfortable with vim it will be a great tool for small to mid projects. Maybe even larger ones that are clearly modularized and kept lean.
But you cannot escape the reality, refactoring kinda needs a good IDE to get it done quickly.
An IDE or the equivalent of an IDE implemented as a language server.
Using language servers make me wonder why it took so long to figure this out. Pretty much all IDEs are awful for text editing if you're a Vimmer but superior for the refactorings you're going to need. Programs like Vim are excellent text editors but JetBrains is never going to invest in VimScript.
I am occasionally frustrated that sometimes I am still forced to choose between one or the other because a lot of the servers are still in their infancy. Still waiting for the equivalent of Visual Studio 2019 as a language server that actually works with the projects I have to develop.
Language servers + vim are sometimes not as performant (or efficient) as an IDE.
Once, I tried replacing IntelliJ with vim + deoplete + a linter plugin (whose name I forgot), because Intellij ate my laptop battery too quickly, and because I like editing text in vim more than IntelliJ.
Well, the vim setup ate through it twice as fast, and was slightly less responsive.
In IntelliJ, it is possible to open the current buffer/editor in emacs using emacsclient. You can configure Tools > External Tools in the preferences. With this, you can have the same line number centered in emacs.
There could be something similar for vi too, though I have not explored this route.
There are still a lot of little differences which were
fundamentally the reason I even switched to Vim in the first
place. The tab switching and window splitting alone is something
that drives me mad every time I have to use a Jetbrains IDE. Not
to mention IDEs always insist on auto-formatting code while I'm
typing it, which feels like using a site where the content jumps
around because the ads are still loading.
Unless they fixed it in the last year or two, the interactions between JetBrains selection (necessary for a lot of the IDE magic) and Vim visual mode (what you'd actually use in the IdeaVim bindings) weren't always very predictable. That prevented the easymotion clone from working quite like the plugin, other things along those lines.
I found it to be a very good emulation of vanilla Vim, but also found when I was using Vim mode I hardly used any of the IDE features aside from passive JSDoc/outline/etc displays. That lack of integration between the two halves killed it for me, not to mention it'd been a long while since vanilla Vim was what I was really using.
I love the Language Server concept and hope that just becomes the thing going forward. There was never any reason specific language knowledge should be part of the editor, other than we didn't have a vertical enough ecosystem yet to coordinate a different way. Whatever else I can say about Microsoft, they accomplished that vertical pretty skillfully with VSC and TypeScript, and have been running with it like mad. I'm glad some of that has been to our general benefit.
You don't have to pick one. I write my projects in vim and keep the IDE open for when I want to refactor/debug. I'm not against using the IDE mind you, I sometimes refactor then keep on typing in the IDE. But I find myself naturally drifting back to vim when I'm just writing code.
(I'm also a firm believer in getting familiar with the default keybindings for any program, so I don't use any vim emulation in an IDE. There's value in learning a set of shortcuts that are usable everywhere)
CLion (and other IDEs) have pretty good vim plugins: IdeaVim, VsVim , Vrapper.
They're not perfect, but I also made the switch from vim to CLion and never looked back. With a half-decent plugin for editing text, there's not much value in using a more minimalist vim setup IMHO.
Having used vim for several years, switching to VS Code greatly improved my productivity. Having an in-app file tree, and being able to quickly peek at definitions or all references of a variable are convenient features to have, and IMO not matched by any similar vim plugin. I feel the greatest advantages of Vim are its small memory footprint and keybindings, but it is possible to use plugins in VSCode for the latter and the former is something that has not affected me too greatly.
It's decent, though the debugger isn't quite as pleasant to use and it lacked a profiler last time I checked. But the actual editing experience is excellent and it uses libclang for a backend so you get up to date features for the latest C++ incarnations.
At some point in time I switched to a full-fledged IDE (CLion) because there are certain refactoring tasks which are probably still possible using this setup but I found them to be mentally too complex to deal with, especially when I am focusing on the task at hand at the same time.
[1] https://github.com/NewProggie/Dev-Utils/blob/master/dotfiles...