Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I'm writing less C++ than I used to recently, but here's the basic setup I use:

1) Emacs prelude w/ helm enabled everywhere -https://github.com/bbatsov/prelude

2) Irony-mode for auto completion. Since you're using Cmake, you can just add CMAKE_EXPORT_COMPILE_COMMANDS to your invocation to output the needed metadata for completion to work. - https://github.com/Sarcasm/irony-mode

3) helm-flycheck for syntax checking https://github.com/yasuyk/helm-flycheck

4) For jump to definition I generally just use helm-ag (grep) , I never actually got this working to my satisfaction despite trying a few things like rtags (slow, unstable) and clang-ctags (promising but annoying to set up at the time).

5) For formatting I usually just enable clang-format on save w/ something like this (requires clang-format mode installed):

  (add-hook 'c++-mode-hook
    (lambda () (add-hook 'before-save-hook #'clang-format-buffer nil t)))


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: