News for hackers. Stuff that matters.
Re:GNU nano is my editor of choice (2021) by elsjaako on Wednesday December 28, 2022 @07:24AM (#34160309)
I'm an enthousiastic vim user. I think everyone who spends a lot if time editing text and who doesn't use vim (or similar) is probably missing out (including the author of this article). I think vim is really good.

But I 100% agree that vim is a stupid default. In almost every context it's going to confuse more people than it makes happy.

Re:GNU nano is my editor of choice (2021) by pjmlp on Wednesday December 28, 2022 @07:29AM (#34160349)
I have used VI in and out since introduced to it on Xenix in 1993.

Definitely not missing out.

Re:GNU nano is my editor of choice (2021) by giancarlostoro on Wednesday December 28, 2022 @08:34AM (#34160782)
Neovim is a different beast than vi or vim, definitely suggest looking into it. It's insanely capable, and if major IDE's invested time into supporting it, you wouldn't need to ever choose between Neovim or an IDE, you could just use both together. I think currently VS Code is the only editor that supports Neovim properly, there might be others though.

The neat benefit is you get all the editors own plugins + all of Neovims plugins.

Re:GNU nano is my editor of choice (2021) by v3ss0n on Wednesday December 28, 2022 @08:53AM (#34160934)
Neovide is much better editor that natively supports neovim than vscode. All vim plugins in vscode have conflicts with other extension rendering them useless
Re:GNU nano is my editor of choice (2021) by pjmlp on Wednesday December 28, 2022 @11:11AM (#34162402)
If stuck with classical UNIX editors, I rather spend my time on Emacs.

I know VI well enough to save me when nothing else is available, specially helpful when dealing with servers without root account access, and noexec $HOME, and that is good enough for me.

Re:GNU nano is my editor of choice (2021) by giancarlostoro on Sunday January 01, 2023 @02:18PM (#34209710)
If Emacs ever does the headless UI thing I will crawl back to it, in all honesty. I like the idea of consistent editor key bindings across editors and consistently being able to reuse a powerful editor with any IDE.
Re:GNU nano is my editor of choice (2021) by Narishma on Wednesday December 28, 2022 @12:41PM (#34163528)
What does it mean for an IDE to support neovim?
Re:GNU nano is my editor of choice (2021) by Zvez on Wednesday December 28, 2022 @02:15PM (#34164643)
it probably means to run actual instance of neovim and use it as a backend for current editor's content.
Re:GNU nano is my editor of choice (2021) by giancarlostoro on Wednesday December 28, 2022 @04:12PM (#34166021)
Except you get features of both editors, so IntelliJ would still have their auto complete intellisense features, and Neovim key bindings would still work, and Neovim plugins as well.
Re:GNU nano is my editor of choice (2021) by elsjaako on Wednesday December 28, 2022 @09:10AM (#34161095)
I know I'm not going to convince everyone, and I know that there are other advanced options that compete (people tell me I'm missing out because I don't use an IDE with all the auto complete stuff).

But I see a lot of people using a text editor that's basically notepad, possibly with syntax highlighting. For an occasional edit that's fine, but if you regularly spend more than an hour editing a file, you would benefit from more features.

Vim has a lot if features I don't know, so I think I'm also missing out (until I learn those features). It takes investment of time to learn an advanced tool.

I'm curious, what text editor do you use?

Re:GNU nano is my editor of choice (2021) by pjmlp on Wednesday December 28, 2022 @11:08AM (#34162372)
IDEs of course, and if stuck on UNIX without an IDE, either Emacs (muscle memory goes back to XEmacs glory days) or VSCode.

Pure text editor, Notepad++.

Re:GNU nano is my editor of choice (2021) by yakshaving_jgt on Thursday December 29, 2022 @11:05AM (#34174022)
What do you think an IDE has that a proficient vim user is lacking?
Re:GNU nano is my editor of choice (2021) by giancarlostoro on Wednesday December 28, 2022 @08:32AM (#34160775)
Which vim? I prefer neovim personally, but it is not my default editor. I want JetBrains to get off their butts and implement first-party support for Neovim. They would be able to fully ditch their awful vim emulator, and I'm honestly astounded they still have not done a neovim first party plugin yet, or anyone for that matter (last I looked anyway). It would solidify vim for me permanently, being able to pop it into an IDE, and going to a command line and having the same editing experiences (minus IDE witchcraft right).
Re:GNU nano is my editor of choice (2021) by elsjaako on Wednesday December 28, 2022 @08:50AM (#34160906)
I think vim or neovim are both fine. The only reason I would caution against elvis is lack of Unicode support. They all give you most of the same interface.
Re:GNU nano is my editor of choice (2021) by giancarlostoro on Wednesday December 28, 2022 @08:54AM (#34160941)
I'm not referring to Elvis though, at least I don't think so:

https://github.com/neovim/neovim/wiki/UI-architecture

Re:GNU nano is my editor of choice (2021) by wankle on Wednesday December 28, 2022 @11:34AM (#34162667)
I've tried to like neovim but plain vi works best for me. I've tried to like nano too.

Since you brought up JetBrains, I use no products made by them, at all, any more. I use Eclipse and I don't use a vi plugin in Eclipse.

My habit is if in bash, use vi, if in an IDE (or otherwise at my Ubuntu or Windows (work...I know) desktop), use a regular type of editor.

If I were young and never worked on old Korn shell systems or other old UNIX systems I'd probably not have learned vi and would be a nano user in the shell today.

Summary, in my brain, shell == vi, IDE\|desktop == regular editor

Re:GNU nano is my editor of choice (2021) by ilyash on Wednesday December 28, 2022 @11:28PM (#34169558)
> Since you brought up JetBrains, I use no products made by them, at all, any more.

Just curious. Why?

Re:GNU nano is my editor of choice (2021) by kittyn on Wednesday December 28, 2022 @10:06AM (#34161638)
“because it’s not mainstream enough”

sounds like a skill issue

Re:GNU nano is my editor of choice (2021) by virtualritz on Wednesday December 28, 2022 @10:23AM (#34161849)
> [...] everyone [...] who doesn't use vim (or similar) is probably missing out (including the author of this article)

Did you read the article? The author used both emacs and vim. Quote:

"I don’t like either of them, for differing reasons: modal editing doesn’t really fit my mental model of how an editor should work, [...]"

I don't get how people who like modal editing can't accept that other people don't.

From my experience with editor debates this weirdly seems to be much more common than the reverse.

De gustibus non est disputandum.

Re:GNU nano is my editor of choice (2021) by tasuki on Wednesday December 28, 2022 @04:49PM (#34166467)
> I don't get how people who like modal editing can't accept that other people don't.

Hi. I like modal editing and kind of can't accept that other people don't.

I think they just haven't really tried, you know? In my view, it isn't a subjective matter of preference, rather I consider modal editing to be objectively superior: we have the whole keyboard at our disposal to enter commands and manipulate the text, not just tricky key combinations.

Sometimes the objection to modal editing is that you need to keep an eye on which mode you're in, but in my experience. If you're doing it right, you're always in normal mode, unless inserting text. When you finish inserting text, you immediately switch to normal mode.

There, I probably haven't convinced you nor anyone else, but I'm sure all the vim users are nodding along ;)

Re:GNU nano is my editor of choice (2021) by kazinator on Wednesday December 28, 2022 @06:46PM (#34167592)
There are only two kinds of non-modal editors.

1. A useless, primitive thing in which every single keystroke inserts a character or performs an edit action, and then returns to the initial state. Typically found in the simplest edit controls offered by a windowing UI, or very simple command line editors.

2. A command-oriented editor in which every action is performed by typing a line of input, terminated by Enter to execute the command. E.g. ed, almost. This is always in a command mode, which accumulates characters until Enter, executes, and returns to command mode. If there is a mode for appending lines until . (dot) is entered on a line by itself, then that is modal.

Everything else is modal.

I just fired up Nano. I made some changes and quit with Ctrl-X. Lo and behold, I was dropped into a mode in which I had to type y or n to save or not. Note that the usual action of these keys is to insert the characters y or n into the buffer. I issued y, and was dropped into another mode in which the characters I typed didn't insert into the buffer, but into a prompt asking for the file name.

Re:GNU nano is my editor of choice (2021) by dolni on Wednesday December 28, 2022 @10:56PM (#34169355)
Suggesting that nano and vim are both "modal editors" because nano has some confirmation dialogs is not a deep insight, it's just pedantry. And it ignores the entire reason why you'd describe an editor as modal: that changing modes is integral to the editing experience. You can't change modes in nano to make editing more efficient.
Re:GNU nano is my editor of choice (2021) by kazinator on Thursday December 29, 2022 @03:40PM (#34177637)
* * *
Re:GNU nano is my editor of choice (2021) by yakshaving_jgt on Thursday December 29, 2022 @11:10AM (#34174071)
> From my experience with editor debates this weirdly seems to be much more common than the reverse.

This reads like confirmation bias to me, and I would argue the inverse.

Otherwise, I agree with you. It’s ok that people have their own preferences.

Re:GNU nano is my editor of choice (2021) by elsjaako on Thursday December 29, 2022 @05:04PM (#34178652)
I get the feeling he occasionally used it, but not intensely for a long time.

Modal editing isn't something that comes naturally. You have to train yourself to use it. I believe everyone can learn to do it as if it's natural.

I learned how to use vi/vim a long time ago, and if you put me in the same position now I probably wouldn't learn to use it. It was a lot of effort. Having done it, I'm really glad I did, but it's hard to see how nice it is before you're put in the effort.

I also like dancing, and often a teacher will make you move in a way that doesn't feel natural. Months later, once you've got the hang of it, it makes total sense that that's the better way. It becomes natural. Driving with a stick shift didn't feel natural at first, now I miss the clutch when it's not there.

Sometimes the "unnatural" way is better. I'm guessing the same is true for the way chefs cut vegetables, or classical guitarists hold their guitar.

I won't fault anyone for not using vim, I understand it's a tradeoff and not everyone wants to put in the effort. And if you don't spend a lot of time editing text, it's not worth it.

Just to possibly annoy even more people: if you spend a lot of time on a keyboard, and you can't touch-type, I also feel you're missing out. (That wasn't natural for me at first either).