For really mind-blowing possibilities, try org-mode[1] under emacs, along with org-babel[2] and LaTeX export.
You can pretty much write and execute your technical paper and your source code simultaneously in arbitrary languages.
I recommend the spacemacs[3] distribution, as the vi interface gets it right.
[1] https://orgmode.org/manual/index.html#Top
[2] https://orgmode.org/manual/Working-with-Source-Code.html#Wor...