3 ms·
> When you use Emacs or Vim and live on the command line every project has the same workflow. You don't need to install 10 different IDEs and learn 10 different
by npsimons 6y ago
> When you use Emacs or Vim and live on the command line every project has the same workflow. You don't need to install 10 different IDEs and learn 10 different workflows for 10 different projects.
When I was demonstrating emacs to some co-workers last week, I opened up code in three different languages and pointed out how the comments were all the exact same color. It's little things like that. And having things like hl-todo-next/previous and flycheck-next/previous-error bound to the same keys in multiple programming languages, or binding F4/F5 to compile/recompile, and that works for any command I want to run, then I can parse through error and warning messages with next/previous-error, or cruise through blocks of code with C-M-a/C-M-e. And all of this works in C/C++, Python, Lisp, Perl, etc.
- saurik 6y agoI have been using my same vim workflow now for twenty years, ever since I switched from Visual C++ 6... and, at the time, I configured some of the colors in vim to match parts of what I had been previously getting from Microsoft's editors. I thereby have had largely consistent colors for like, "a quarter of a century". Despite thinking a lot about syntax highlighting for various reasons, it honestly never once occurred to me--before reading your comment--that some (many?... _most_?!?) software developers don't have consistent syntax highlighting even across different languages much less through their career. OMG.
- remus 6y agoIt may well just be me, but what I find valuable about syntax highlighting isn't the colours per se, but the differentiation between different kinds of token in the language (comments, keywords, argsb etc.) Therefore I don't really notice the individual colours, I notice when the colour changes.
- npsimons 6y agoThis is what I'm talking about. It's that comments are one color, function/method/class/struct definitions are another, keywords are another. And it's the same, no matter what language I'm programming in. Heck, I can open up a language I haven't touched in years (or ever) and just start to get a feel for the structure based on the syntax highlighting alone.
- dleslie 6y agoI love blowing minds with using multiple major modes. IE, executable code snippets in Org, or Javascript inside HTML. There many Emacs packages that can do this, for example: https://polymode.github.io/screenshots/ https://polymode.github.io/screenshots/
- berkes 6y agoThis is really neat. And AFAIK not something that Vim does well. At least, in my vim setup, nested modes are clumsy. Code-inside-markdown means Markdown has to support the syntax (and snippets and shortcuts etc). Or requires a entire language (or dialect) like erb being both Ruby and HTML which cannot leverage the ruby and HTML at the same time, AFAIK. What is, or are the common vim solution for nested or mixed modes?
- dleslie 6y agoThis is a good read written by someone who uses multi mode editing for productive reasons: http://howardism.org/Technical/Emacs/literate-devops.html http://howardism.org/Technical/Emacs/literate-devops.html
- npsimons 6y agoOh yeah, I found his http://www.howardism.org/Technical/Emacs/spreadsheet.html http://www.howardism.org/Technical/Emacs/spreadsheet.html about org-mode and spreadsheets, yet another thing that I love about emacs and can't imagine a "modern" IDE doing as well.
- thiht 6y agoPeople often brag about "advanced" features of vim or emacs like you do, but everything you say is pretty standard these days. Vscode does the same. So does Intellij.
- berkes 6y agoIt seems you missed the point. It was not to "brag about advanced features". But to show that these features work exactly the same, wether you are in a Rails project, A Python script, a Rust crate or an Android App codebase.
- spdionis 6y agoJetBrains products work (mostly, I will concede) the same across all their products. Literally whether I open RubyMine, PyCharm or CLion I feel at home.
- polyterative 6y agoI have the same positive experience of efficient consistency with their products, also the reliability on keyboard shortcuts as well as the advanced navigation features make a big difference in my everyday work
- berkes 6y agoAFAIK this is the main selling point by and for JetBrains products. Still, there seems no JetBrains for Bash, ansible(yaml), HTML, Latex, Rust (though there is a plugin), or markdown. For me, at least, those are not my daily drivers, but I do spend substantial time hacking them. Same for "frameworks" RubyMine does Rails really well, but really gets in the way when hacking on some KibaETL or Chef scripts (also Ruby, deep down). I'm convinced this comes from the fact that IDEs have to be both highly opinionated and very flexible: supporting all of flask, django, pandas+Jupyter and ansible, properly, is tough: all are Python, all are really different. Either you turn Pycharm into something that does not work good for anyone (lowest common denominator) or you have to leave out communities. And also need to do everything on their own (or clumsily integrate) instead of leveraging community tools and standards like, say rustfmt, xmllint or jq through "unix".
- jnxx 6y agoI think it is the combination of consistency and adaptability. There are a huge number of interesting features and tweaks out there, and every once in a while one encounters a useful gem. For example, I have started to use Unicode more heavily in documentation, and I am also a latex user, so now there is a mode which lets one enter any kind of unicode symbol by typing the latex sybol name. Or another, I found that syntax highlighting is neat but what is really helpful instead is to give any identifiers in functions different colors, which makes the data flow in the function much more salient and quicker to understand - including spelling mistakes. And that works in many languages.
- npsimons 6y ago> Or another, I found that syntax highlighting is neat but what is really helpful instead is to give any identifiers in functions different colors, which makes the data flow in the function much more salient and quicker to understand - including spelling mistakes. And that works in many languages. Oh yeah, I just discovered rainbow-identifiers-mode. Pretty sweet!
- jnxx 6y agoIndeed. There is a similar mode to match parenthesis :-D
- jnxx 6y agoBased on Lisp, Emacs has also very good support for REPL, or read-eval-print-loop programming. My impression is this is becoming more important. Anyway this is an extremely valuable feature if one programs Common Lisp, Racket, Clojure, Forth, or Python (noting that Python has only partial support for that kind of programming, but it still helps a lot).
- npsimons 6y agoPython's getting there! I recently went on a tear of going through "elpa-*" packages in Debian and setting them up, and one was elpy, which now gets closer to SLIME's C-x C-e.
- slightwinder 6y ago> When I was demonstrating emacs to some co-workers last week, I opened up code in three different languages and pointed out how the comments were all the exact same color. I don't get this. That is normal in any modern editor. What is so special about this?
- npsimons 6y ago> I don't get this. That is normal in any modern editor. What is so special about this? So other editors have finally caught up with emacs? Nice to know. Last time I tried opening different languages in "advanced" IDEs, it was plain black lettering on white background.