Live data from Hacker News

Why don’t we have good code editors?

kristofer.reykjal.in

61–70 of 74 posts

Re: Why don’t we have good code editors?

#62
post #39

Earlier quoted context omitted.

OK... what is the difference, as you see it?

The real difference is that in Normal mode, you have a very complete set of commands bound to each key that either move the cursor from an absolute perspective, relative to current position, or relative to syntax structure. There are also commands that create a selection to transition you into Visual mode (which is cursor selection) with a given syntax block already selected. Finally, all of these commands can be mul…

> Other editors and IDEs have macro functionality, but without the composable structural editing commands in vim (these are also in emacs) you don't quite have the same kind of power.

That's the other way around. Modern IDEs don't work on text like vim does, they understand the language. Using e.g. JetBrains IDEs you can do refactoring across an entire code base in a few clicks. Something you can't possibly do because vim (unless you use plugins) doesn't understand the semantics or even the syntax of the language, it's just text.

Re: Why don’t we have good code editors?

#63

I 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.

> 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.

Re: Why don’t we have good code editors?

#64

Earlier quoted context omitted.

Usually? File handling. It's convenient on large projects to have a list of files in view next to the code.

Nerdtree for vim? Emacs out of the box ... Wtf. This stuff is decades old

They’re awesome because they’re decades old. That’s a lot of time to get things just the way developers like them.

Re: Why don’t we have good code editors?

#65

Earlier quoted context omitted.

I never said memorized. I do believe if you truly understand your code however (and ours spans 500k+) then you don't need a file browser to know that components live in the "components" folder. I agree with taking advantage of a modern UI, all programs could benefit from advancements. I find the article was written with little research or thought put into what is available on the terminal.

You do have to memorize a ton of arcane key strokes just to get around in your editor though. I bet that time invested is a big reason why some coders hang onto terminal editors. IMO you shouldn't have to do "research" to setup your editor or even simply to use it effectively. With VS Code everything that you need is already integrated and clearly stated - Ctrl+Shift+P to find any command Ctrl+P to open any file in y…

When I use emacs, I hardly have any shortcuts memorized. I just use smex, which has fuzzy matching for commands. When I wanted to open a file, I wasn't sure what command would do that, so I pressed M-x and typed "file." One of the suggestions was, "find-file," so I chose that one, and it gave me a prompt for which file to open, I entered the path in an interface that also had similar fuzzy matching, and I was ready to go. Afterwards, a brief hint told me the key command if I don't want to bother typing, "finf," but I don't really use it.

The command pallette in VSCode is pretty nice too, but I don't recall having quite as nice an experience using it. I still do my professional work in VSCode, though. Emacs is for fun.

Re: Why don’t we have good code editors?

#66
post #63

I 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.

> 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.

I 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.

Re: Why don’t we have good code editors?

#67
post #63

Earlier quoted context omitted.

> 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.

I 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 u…

Sorry 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.

Re: Why don’t we have good code editors?

#69
post #67

Earlier quoted context omitted.

I 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 u…

Sorry 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.

Well now I'm sorry that you're sorry! Wasn't my intent, if it works for you and are happy with it, of course you should recommend it. Maybe some people don't even care about actual compatibility, and just want a modal editor. That's fine. I only meant to add my own experience, not discount yours.

Re: Why don’t we have good code editors?

#70
post #28

> 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…

The mouse is not a "clumsy" input and there are plenty of situations in which the mouse allows more efficient usage than the keyboard like when navigating through 2D space. For example it is clearly more efficient to place your cursor at a certain arbitrary point in the document using the mouse than to navigate there using keyboard commands. I'm also not really convinced about the "hands on the keyboard" argument...…

There have been numerous studies on this, and the results are basically always: people don’t think that it’s faster to stick with the keyboard, but it is. Yes, even for people who are very familiar with the task, the keyboards, and the mice.

There are some interactions where switching to the mouse and back is faster; things like drawing and navigation through irregular shapes (I.e. “not grids or lists”).

Whether that difference is important to you or not is far more about your specific circumstances than anything else. Comfort is important also.

Post reply on HN