Hacker News new | ask | show | jobs
Vim or Emacs for C++ Coding?
5 points by HusrevCelenk 1180 days ago
8 comments

If you are using Windows, and you don't know either editor, I would go with Vim because it's easier to learn and it works better in Windows. But if you want to get up to speed quickly, I would go with VS Code. Both Vim and Emacs take a while to learn enough to make it worth using. VS Code doesn't take as long to get to that point.
Old school C/C++ dev is done with ctags, grep, and compiler output. Emacs and Vim both integrate with this stuff just fine. They are a tie here. Maybe a slight edge to Emacs with citre-mode; a really fancy ctags integration that brings the bling.

Emacs can integrate with GDB for debugging. I'm not familiar with how vim integrates with debuggers so can't compare.

New school is to use lsp servers. Again both Emacs and Vim integrate. I've had 0 performance issues Emacs/eglot but I heard some people say Vim/NeoVim has better lsp performance. So maybe a slight edge to Vim there.

Personally I prefer Emacs due to how it treats the tab key as "go-to-indentation" instead of a literal tab/spaces. YYMV.

I use vim for C++ coding, however it is a bit difficult to set up to make it productive. I use YouCompleteMe [0] for autocompletion, Vimspector [1] with the C++ plugin for debugging, ALE [2] for linting, along with a few other general plugins (such as NerdTREE for file view).

[0] https://github.com/ycm-core/YouCompleteMe

[1] https://github.com/puremourning/vimspector

[2] https://github.com/dense-analysis/ale

Why not use Neovim + LSP?
Just haven't tested it out yet, but am interested in testing out some different plugins and combinations in the future. Also neovim wasn't available in one of the platforms I use, so have been sticking with vim.
Thanks for ınformatıons
What type of coding? What OS? If on Windows definitely I'll recommend VS, much easier and very good debugger.
In wındows but because of economıcs problem ın my country Vs ıs not effectıve
I don't know but maybe VSCode is another option, although I find its intellisense and debugging facilities not satisfying comparing to VS.
VS Community Edition is free
I used to use vim but I find actual IDEs to be much better suited for development now
Use an IDE. Visual Studio if Windows, XCode if Mac, CLion otherwise.
Ultimate++ :)