8 ms·
Why don’t we have good code editors?
- WilliamEdward 7y agoHis first topic / sub-heading answers the question for itself: people are too fussy about editors. Everyone has different tastes when it comes to editors, some want syntax highlighting, some like integrated command line, some just want plaintext. There are no two people with the exact same preference in editors, and that's why there are too many editors and yet still a perceived lack of quality overall. It's also why most people end up customising the ever loving shit out of their own editors anyway.
- bauerd 7y ago>a terminal does not a pleasant user experience make Author doesn't establish this, just takes it as a given. I wonder what features terminal emulators/editor programs would lack that are afforded by GUIs? I consider the terminal text editing experience far more efficient
- WilliamEdward 7y agoUsually? File handling. It's convenient on large projects to have a list of files in view next to the code.
- mpfundstein 7y agoNerdtree for vim? Emacs out of the box ... Wtf. This stuff is decades old
- taylodl 7y agoThey’re awesome because they’re decades old. That’s a lot of time to get things just the way developers like them.
- bipinu 7y agoEfficient is not necessarily a pleasant user experience though, is it? I am not downplaying anyone's preference of one over the other. However, a better UX would mean that the initial learning curve to start with something should be low, which isn't usually with terminals.
- carlmr 7y ago>However, a better UX would mean that the initial learning curve to start with something should be low, which isn't usually with terminals. Depends how you define better. If you do something very often a steep learning curve with long term payoff can be the better UX seen as a whole. I use almost only VSCode mind you, but I can see the argument here. I know a bit of vim and it is practical when configuring servers via PUTTY. For bigger projects I find it very lacking.
- jimmyvalmer 7y agoSummary: I would like a vscode that better integrates modal editing. Verbosity is an existential threat.
- frou_dh 7y agoInane article title required for clickbait?
- tlackemann 7y ago> In all seriousness though, a terminal does not a pleasant user experience make. Yes, yes it does. At my fingertips I have access to every single tool and program without needing to clumsily navigate through folders or Finder, whatever it is. Moving my hand away from my keyboard to my mouse to check TS typings is biggest waste of time when I know how to get to any line in any file with less than 3 keystrokes. > The way these editors achieve this is through graphical representation of the project hierarchy – the file sidebar I work on a site which is part game engine, part marketplace, and part React application. I have never once used a file tree because I don't need it to understand the code. This isn't a flaw of terminal editors, it's classic PEBKAC. Terminal editors don't suck. They require learning and discipline, something that some might argue is becoming a lost art in this field. In the days of "gluing modules together", maybe vim isn't for you, but it's for me and this piece contributed nothing.
- johannes1234321 7y agoI love using the terminal. And I mostly use vim and for raw editing hardly anything can beat it. But there are things which a terminal can't to. The article mentionedd the ability of IntelliJ (and derived IDEs) to show the code of functions in a mouse over tooltip. A proper tree to show hierarchy of code. The ability to click and browse and so on. They are really useful things when exploring a code base.
- tlackemann 7y agoNERDTree will give you file hierarchy, CoC will give you insane-levels of autocomplete that rival or beat intellisense and you can use keybindings to navigate directly to method definitions, typings, anything. Claiming the terminal doesn't do these things demonstrates the lack of time invested time to learn or discover what's available. Again to each their own, but it seems to be the author claims there are no good editors when they simply are just too eager to "open up vscode".
- johannes1234321 7y agoOh, I have vim with tons of plugins and use gvim for simpler discovery of some features I les softne use, thus know that vim isn't strictly bound to the terminal. But there is a massive difference while browsing code between the IntelliJ style editor and all the vim plugins in the world.
- fennecfoxen 7y ago> Terminal editors are out of date. By this I don’t mean that they’re obsolete; I mean their user experience is lagging far behind modern standards. Using editors like Vim and Emacs is not a good experience for the user. You... you are aware that you can run emacs not in a terminal, right? Use the mouse and resize split buffers and everything? It's okay if you still don't think it's good enough, just... don't pigeonhole it quite like that.
- c256 7y agoModern GUI emacs has basically all of the features that the OP’s rant mentions (You can even run WebKit inside of emacs, if you want), but they have to be configured. It seems likely that they haven’t tried emacs in a while, because the rant demands things about packages that already exist. If this were a serious request for help rather than a rant, “Use Spacemacs or Doom-emacs” would be a fine response. That said, there’s nothing wrong with a little rant now and then. There’s a pretty pervasive feeling among programmers that our tools for interacting with code certainly could be better, and probably should be. I assume the OP is hitting one of those moments right now. More seriously, though, I believe that there is an answer to the headline question: we don’t have better code editors because the people with the combination of skill, desire, and opportunity almost always fall into one of the two traps: 1.) If they want to make a better general editor for experienced, skilled programmers, then they get sucked into learning an existing editor (usually emacs or vi, sometimes both) on the way, and they find that once you are proficient, those are really quite powerful coding environments. 2.) If you want to make a better general editor for people learning to code, then they tend to create something that is limited (simplified, streamlined, etc). Along the way, they either stop at a version that’s good enough (there are lots of these around), but definitely missing things that are important to (a smaller group of) skilled, experienced programmers – at which point, see #1. The strongest candidates survive, and some of them go quite far (Linus Torvalds uses a fork of micro-emacs, there are people at Google who use nano, etc.) In the end, the “editor wars” between emacs and vi came down (IMNSHO) to a question between “fast and lean” vs. “expandable”. In the end, both became ”expandable enough”, and software growth (bloat) grew so extensive that both became “fast and lean enough”.
- giancarlostoro 7y agoI am kind of excited for Emacs in Rust. I would love something Emacs like that looks modern and easier to manage like VS' ability to easily drag and drop components wherever you need them, and is very fast to boot, think of ST3, CudaText, and co. Then all the bloatware is optional plugins. I would say VS Code is a good goal, it has everything you need to have an IDE, and yet you don't feel forced to use it.
- nika1975 7y agoThe main reason for Emacs existence is the ability to customize it as you want. That's made possible by Lisp. It is on a whole different level than a VSCode plugin. How does Rust enhance this experience? I do not get the requirement to be "very fast to boot". My Emacs instance is always running and I use emacsclient as an entrance point for external tools. This is the typical workflow for Emacs users.
- giancarlostoro 7y agoI don't want to even think about those things. I don't have to with Visual Studio or VS Code.
- iikoolpp 7y ago> The most limiting factor for my choice of code editors is that I need modal editing. After learning how to use Emacs, and then Vim, I can not imagine going back to the typical non-modal text editing. These editors make it much more comfortable to edit text (and code), and ruined every other way of editing for me. Truly, v*m rots the brain.
- kace91 7y agoI think there could be a huge market for a ux effort that brings the somewhat forgotten goodies of old modal editors into the modern world, combining them with new advances like fuzzy searching. I love vim, but it's appalling that we have so many historical baggage creating a gap for the users... It's so obvious how vim's ergonomics are made for the [adm 3a keyboard](https://catonmat.net/images/why-vim-uses-hjkl/lsi-adm3a-full-keyboard.jpg https://catonmat.net/images/why-vim-uses-hjkl/lsi-adm3a-full...) (location of esc, control, arrow keys, etc) and yet we keep making layers of customization or force ourselves to the standard instead of doing the very needed reboot.
- coldcode 7y agoBecause no one can agree on what is "good". It's entirely subjective to each person. One loves vim, one loves Notepad, one loves VSCode, one loves Intellij, maybe someone loves hammer and chisel on stones. Like virtually everything in the programming world, it's all about what gives you the ability to do what you need to do with the least extra effort. Like any tool you need what you need, not what someone else says you need. Arguing about what is better is pointless but common.
- sword_smith 7y agoI like that the author has high standards for an editor. He should have. In my opinion VSCode and VS live up to his requirements about out of the box intellisense, inline definition peeking, and extensions that are easy to install (VS Code being better than VS in this regard). They probably don't live up to his model requirement, though, but I think the author could have done a better job of explaining exactly what he wants from this editing mode.
- iKnowWhyIamHere 7y agoI think I can relate to his feelings. I want vim with default Intellisense of VS Code. I know about coc-nvim, but I still couldn't get it to work for C++ on Ubuntu 19.04, will try again soon.
- pnako 7y ago> I want vim with default Intellisense of VS Code. Your best bet is probably CLion (it's proprietary) with IdeaVim plugin. It's not perfect but it's probably easier to implement vim-mode into any IDE than turn vim into an IDE.
- boring_twenties 7y agoI used to use IdeaVim with IntelliJ, it was utterly awful. All of the basic commands were wildly incompatible with vi and vim. Example: u (undo). Not only would it add cursor movements to the undo stack, it would also put multiple actions onto the stack as one, so you could only undo them all at once or not at all. That's the one I remember most -- it's been over 5 years -- but not a single day went by without some utterly flabbergasting surprise when expecting it to, you know, emulate vi/vim. Somewhat ironically, about 5 years before that, I used some similar plugin for Visual Studio and that one was infinitely better. It cost $99, but my employer paid for it, and it actually performed as advertised. Even that didn't implement "advanced" vim commands that I like a lot -- like :perldo -- but at least it didn't fail to get even the basics right. In the end I don't think any IDE vim-mode can be good enough. What I think would be best is if the IDE somehow embedded the actual vim editor.
- pnako 7y agoSorry for recommending this. I have a lot of experience with Jetbrains IDE, but not with the plugin itself. I use vim in vim mode occasionally :) I think the Neovim project has a goal to eventually make the editor easy to integrate in larger applications, as a plugin, which makes a ton of sense.
- 7y ago
- roryrjb 7y agoI disagree. Terminal is modern it's just different to GUIs, of course they were a precursor but I don't think anyone can say that GUIs are supposed to be a replacement, as in, I don't think they can say this in retrospect. It's just a different interface, which to me is much more convenient and intuitive. I can pick up a command line application that I have never used before and get up to speed very quickly. Obviously this does depend on the usage of conventions, such as environment variables, arguments, man pages and so on but because of its perceived "limitation" it probably means that applications in this domain are more alike to each other at least in terms of their interfaces. I am biased of course, I live inside tmux and vim and I would happily just use the framebuffer (and use cmus, newsboat, irssi, mplayer, et al) but I have to use a browser for work so yeah. Vim is a very good user experience, you either have to learn it a lot to be productive, or use a few plugins that gloss over this somewhat, but I don't think it has such a massive learning curve considering its vibrant ecosystem. Emacs on the other hand, and I really like the keybindings (using a subset in the shell) just makes my head hurt.
- GordonS 7y agoErm, we do have good editors? VSCode, Visual Studio, Rider, to name but a few. I'm not really sure what the OP's beef is here. They begin by bemoaning anything that isn't vim, then move on to say they want a graphical UI, support for plugins, and a bunch of other things that pretty much any IDE has these days. I think what they really want is a vim extension for VSCode, customised just for them?
- Ballas 7y ago>I think what they really want is a vim extension for VSCode, customised just for them? Exactly. But they don't want to write it themselves.
- GordonS 7y agoDoes anyone know what "modal editing" is? I've read the article, and it's mentioned several times, but I've no idea what it actually means.
- dhagz 7y agoBasically, having two ways of interacting with the file: one mode lets you execute commands to edit the file, the other mode lets you type like in a typical GUI editor.
- GordonS 7y agoWhile editing a file in VSCode, I can press CTRL+P, which opens a small command box in which I can type to find a command with autocomplete - like a souped-up version of vim's "colon prompt" (not sure what it's called!) - does that count?
- mpfundstein 7y agoNo
- GordonS 7y agoOK... what is the difference, as you see it?
- gtf21 7y agovim (I can only really speak for vim here) has several modes for editing. The main ones are: normal, insert, visual. Most people I know (incl. myself) spend most of their time in normal mode, which allows you to manipulate text objects using movements. In insert mode, your key strokes are converted to characters which are inserted into the file buffer. Switching to normal mode isn't really the same as summoning a command prompt into which you enter commands, it's a bit more fundamental than that.
- notmainacct 7y ago
- dhagz 7y agoVim has mouse support. You just need to turn it on in your .vimrc/init.vim with `set mouse=nv` (that specifically enables the mouse in normal and visual modes).
- mpfundstein 7y agoDoes that work in terminal? Afaik I had the only working in gvim.
- gtf21 7y agoWorks for me (iTerm2 + tmux + vim/neovim).
- payne92 7y agoTL DR; The author wants a modal editor (like vim) that's also "modern"/graphical. My view: this is largely a religious issue. Editor design is like QWERTY keyboards (or beer): preferences are more dominated by your muscle memory and what you're used to, than any objective notion of "good" or "best".
- sundayedition 7y agoVim has plugins that seem to address most of what you note. Nerdtree gives you see semblance of a graphical UI. I rarely use it since installing fzf and getting better at using buffers. It's much, much easier to press a shortcut and type a partial name. I use Nerdtree when I need to browse the hierarchy. I also previously had ranger integrated into vim which is really nice Vim has tons of user extensions. Yeah, the package managers aren't great UI but I use vim awesome website to browse and a plug-in install is a simple copy paste of 1 line. Using tabnine with vim has been really great for autocomplete. It's probably not as good as vs code but it's good enough for me. Peek at implementation is available via ctags. Configuration can admittedly be a bear but I have a shortcut to jump to the method definition under the cursor that works pretty well. I'm using neovim which is usually fast and responsive. Some things like folding and syntax highlighting aren't great in certain conditions but you can write scripts to disable those things in those conditions (file name, and probably size even) I've tried to switch away from vim but the extensibility is better than any other editor I've looked at. Neovim + tmux makes me feel pretty productive
- drcongo 7y agoTabNine is amazing. I use it with SublimeText and it constantly surprises me by guessing correctly what I was about to type, sometimes even when what I'm about to type doesn't exist in any of my codebases.
- ScottFree 7y agoThis rant reminds me of Gary Bernhardt's talk from Strange Loop 2012[0]. In that talk, Gary shows a true modal editor that has more than just "edit" and "write" modes. His talk focused mostly on visual layers that could be laid overtop of the code, but it made me think adding "debugging" and "git" modes would be nice. I certainly wish git had a dedicated mode every time I use fugitive[1]. [0]: https://www.destroyallsoftware.com/talks/a-whole-new-world https://www.destroyallsoftware.com/talks/a-whole-new-world [1]: https://github.com/tpope/vim-fugitive https://github.com/tpope/vim-fugitive
- vinceguidry 7y agoUse Spacemacs. Take everything that's great about Vim, and Emacs, make the configuration sane, and the features super-discoverable. You'll never look back.
- jbergens 7y agoI think Emacs and Vim missed how popular js got. That is a reason why Atom and VSCode has tons of plugins for everything including some Intellisense-like completion.