News for hackers. Stuff that matters.
Re:Ask HN: Is it still possible to live in a terminal? by 29athrowaway on Friday October 14, 2022 @07:06PM (#33209851)
Can you:

- Edit code

- Autocomplete

- Navigate code, find references, go to definitions

- Run your code

- Debug your code

- Test your code (including running a specific test)

- Profile your code

- Run multiple static analyzers simultaneously

- Use version control and annotate code using version control

- Do all that remotely or with containers involved

- Query a database and get results in a tabular format

- Spell checking

- Have collaborative editing

- Work with issue tracker tickets

- And more...

The sad reality is that for 99.9% of people using vim is reinventing the square wheel to produce a worse development experience and inferior code.

Re:Ask HN: Is it still possible to live in a terminal? by bananadonkey on Friday October 14, 2022 @07:31PM (#33210029)
Everything up to and including spell checking, yes. In fact none of those first items are remotely unreasonable to do in a terminal, rather surprising to see them being used as arguments against the terminal.

- vim, neovim, Emacs configured with LSP - https://git-scm.com/ - http://aspell.net/ - https://github.com/tmux/tmux - https://github.com/dbcli

Emacs also exists which runs in the terminal mostly (I only miss image rendering personally).

Collaborative editing is something I don't do much of but would guess there's a neovim plugin which could be used for backend sync.

Interacting with your issue tracker depends on the issue tracker software you use (flat file would work for example, Jira has unofficial clients, etc).

- https://www.emacswiki.org/emacs/JiraMode - https://marketplace.atlassian.com/apps/6398/jira-command-lin...

Re:Ask HN: Is it still possible to live in a terminal? by 29athrowaway on Friday October 14, 2022 @08:01PM (#33210226)
IntelliJ does all that much better than what any vim plugin can.

DataGrip wipes the floor with pgcli

How do you find duplicate code with that setup?

Re:Ask HN: Is it still possible to live in a terminal? by reissbaker on Friday October 14, 2022 @08:10PM (#33210283)
I've used IntelliJ plenty, and it's pretty bad at most of those tasks. Using the git CLI is much better for version control than the Jetbrains GUI wrapper; using Docker itself rather than a wrapper is much better for containers; etc etc. I'm sort of amazed the question of "can you do version control in a terminal" is even being asked... That's where git originated! That's the git team's primary development focus even today!

"Can you run multiple static analyzers simultaneously"... That's sort of the point of *nix systems: multiple processes running simultaneously. Using the shell is of course going to allow that, especially with something like tmux!

Most of the editor questions were also answered by my original post (and the answer was yes).

Re:Ask HN: Is it still possible to live in a terminal? by 29athrowaway on Friday October 14, 2022 @08:41PM (#33210437)
> Using the git CLI is much better for version control than the Jetbrains GUI wrapper

For some things. But for reviewing activity in git, and tracking changes across time, doing it in the terminal is unproductive and sucks. (e.g.: 10 levels deep of git blame)

> That's sort of the point of *nix systems: multiple processes running simultaneously. Using the shell is of course going to allow that, especially with something like tmux!

I meant getting a consolidated list of from them, and also having the ability to run corrective actions.

> Most of the editor questions were also answered by my original post (and the answer was yes).

Sure, but how much crap do you have to memorize? It's not a unified experience. It's a duct-taped Frankenstein where every subsystem works differently.

Re:Ask HN: Is it still possible to live in a terminal? by nequo on Friday October 14, 2022 @09:41PM (#33210808)
>> Using the git CLI is much better for version control than the Jetbrains GUI wrapper

> For some things. But for reviewing activity in git, and tracking changes across time, doing it in the terminal is unproductive and sucks. (e.g.: 10 levels deep of git blame)

Magit[1] in Emacs is quite okay. It doesn’t feel duct-taped. I haven’t used fugitive[2] in Vim but that’s a thing that exists too.

[1] https://magit.vc/

[2] https://github.com/tpope/vim-fugitive

Re:Ask HN: Is it still possible to live in a terminal? by alwillis on Friday October 14, 2022 @10:30PM (#33211127)
Fugitive is legendary for using Git inside of Vim/Neovim.
Re:Ask HN: Is it still possible to live in a terminal? by viraptor on Friday October 14, 2022 @09:47PM (#33210834)
> But for reviewing activity in git, and tracking changes across time, doing it in the terminal is unproductive and sucks

tig is great at that. "tig blame" and "," is the way to go for researching the history of some code.

Re:Ask HN: Is it still possible to live in a terminal? by reissbaker on Friday October 14, 2022 @10:27PM (#33211096)
Sure, but how much crap do you have to memorize? It's not a unified experience. It's a duct-taped Frankenstein where every subsystem works differently.

IDK, my experience with JetBrains is it's leaky abstractions all the way down, outside the core edit/refactor features. Using JetBrains Git without knowing git... I mean, I've seen people do it, but they seem pretty frustrated and confused when things go wrong.

I'd rather just learn the underlying tool once, rather than the underlying tool and also the leaky wrapper around it too.

Re:Ask HN: Is it still possible to live in a terminal? by doix on Saturday October 15, 2022 @12:59AM (#33211903)
> For some things. But for reviewing activity in git, and tracking changes across time, doing it in the terminal is unproductive and sucks. (e.g.: 10 levels deep of git blame

The shit I've seen IntelliJ users do in git repos is insane. Somehow they create merge commits between their local branch and the origin version of their branch. They've lost changes, rewritten history, all sorts of shit, with 0 understanding of what or why. I'm guessing the warnings come as a pop-up and people instinctively just click ok without reading.

> Sure, but how much crap do you have to memorize? It's not a unified experience. It's a duct-taped Frankenstein where every subsystem works differently.

From your replies it's pretty obvious you have made up your mind. But what you are describing is my exact experience with JetBrains. The good thing about JetBrains tools is that their language analysis stuff is truly state of the art and significantly better than the equivalent LSP stuff out there. Apart from that everything is a Frankenstein setup that works differently.

In vim, all those plugins are just splits. So I can navigate between them with just ctrl+w->h/j/k/l (most people rebind to ctrl + h/j/kl). Each split supports the vim hotkeys by default, because that is the design of vim.

In intellj it's an incoherent mess. Every pane has some weird fucking hotkey that makes 0 sense. You cannot just go "select the pane on the left). The hotkey is ctrl+shift+alt+7 or something insane, to the point where it's not worth it and you just need to click everything.

Re:Ask HN: Is it still possible to live in a terminal? by bananadonkey on Saturday October 15, 2022 @02:30AM (#33212309)
I find duplicate code by using a tool such as Sonar for a large codebase, or by reading and knowing the codebase if it is small enough.

But I think you mean how do I refactor duplicate code?

lsp-mode (https://emacs-lsp.github.io/lsp-mode/page/main-features/) for smart code navigation or projectile-replace (mentioned in https://with-emacs.com/posts/tutorials/search-and-replacemen...) for dumb replacements.

Re:Ask HN: Is it still possible to live in a terminal? by tpoacher on Friday October 14, 2022 @07:15PM (#33209911)
Vim? Heck I can do all that with nano ... wth are you talking about?
Re:Ask HN: Is it still possible to live in a terminal? by jalbertoni on Friday October 14, 2022 @08:02PM (#33210235)
I'm curious, how would you handle collaborative editing in nano? All the others seem doable if a bit hacky, but that one confused me.
Re:Ask HN: Is it still possible to live in a terminal? by Lio on Saturday October 15, 2022 @04:00AM (#33212783)
I’m a (Neo)Vim user rather than Nano but off the top of my head, I’d use tmux to share a Nano session on multiple computers at the same time.
Re:Ask HN: Is it still possible to live in a terminal? by tpoacher on Tuesday October 18, 2022 @04:13PM (#33253212)
Yeap, what the other guy said. I prefer byobu to vanilla tmux, but the idea is the same. Create a byobu session, detach, give it group permissions, group collaborators attach, enjoy the nano editing party. :)
Re:Ask HN: Is it still possible to live in a terminal? by ilovecaching on Friday October 14, 2022 @08:03PM (#33210241)
Yes you can do all that stuff with like 2 plugins

LITERALLY BUILTIN: - Edit code - Do all that remotely or with containers involved - Spell checking

ALE: - Autocomplete - Navigate code, find references, go to definitions - Run multiple static analyzers simultaneously

DISPATCH: - Run your code - Debug your code - Test your code (including running a specific test) - Profile your code

FUGITIVE: - Use version control and annotate code using version control

Re:Ask HN: Is it still possible to live in a terminal? by 29athrowaway on Friday October 14, 2022 @08:05PM (#33210255)
By the time you are half-way configuring that I am already done with my tasks.

By the end of the first sprint you'll have carpal tunnel syndrome.

Re:Ask HN: Is it still possible to live in a terminal? by kQq9oHeAz6wLLS on Friday October 14, 2022 @09:40PM (#33210800)
Why do you care so much what workflow some rando on the internet uses?
Re:Ask HN: Is it still possible to live in a terminal? by 29athrowaway on Friday October 14, 2022 @09:47PM (#33210835)
Because they are convinced it's a superior experience and make people waste time following their white rabbit into their byzantine, labyrinthine and improductive Twilight Zone / Planet of the Apes full of Escheresque, Kafkaesque and nonsensical shit.

Ctrl-this, Ctrl-that... Lisp and vimscript... h, j, k, l... fuck you! I want to fucking do my work, not solve a 10,000 pieces puzzle or memorize 100,000 different fucking things that follow no discernible pattern.

It's an excuse to spend all day configuring dotfiles and talking about dotfiles. Fuck dotfiles with fire from a volcano. Fuck vim AND emacs.

And if I am in a SSH session, then I'll use fucking nano. Yes, nano. Any problem with nano? I don't care. At least you can exit the fucking thing. Fuck it.

Re:Ask HN: Is it still possible to live in a terminal? by UI_at_80x24 on Friday October 14, 2022 @10:26PM (#33211089)
I'm a sysadmin, and most of what I do (editing config files) is very efficiently done in nano. Edit a vhost in apache/nginx. Change a port number on a service. edit rc.conf, etc...

But I've discovered that by using vim macros, the tedious parts of using nano became easy and FASTER then nano.

Let's say you have to declare a bunch of IP's and you can't just type a range, you have to type out each one.

192.168.0.100 192.168.0.101 ...etc... 192.168.0.199 192.168.0.200

In nano: copy/paste each line then backspace to change the last octet. TEDIOUS

In vim: write it once record a macro of doing it a second time auto-incrementing the last octet. now type: 199@w (or whatever letter you stored that macro in) BOOM, 199 new lines have been input.

That 1 use case, made me use vim more. Then I got better. Then I got faster.

Now I can edit those same old config files faster then I once did in nano. Please believe me, it's worth the learning curve. There is SO MUCH MORE available then just editing some config files.

Nano is fine. There is nothing wrong with nano. If you only edit (config) files a couple of times a year, then maybe you won't want to switch. But I'm so much better at vim then I was before, I use it to do ALL my writing and editing.

Re:Ask HN: Is it still possible to live in a terminal? by 29athrowaway on Saturday October 15, 2022 @01:38AM (#33212066)

    printf '192.168.0.%s ' {100..200} > fuck_vim.txt
Re:Ask HN: Is it still possible to live in a terminal? by GekkePrutser on Friday October 14, 2022 @10:21PM (#33211050)
Yes there's a learning curve but once you've learned that it can be more efficient. For some people key bindings are easy to remember. For others a menu is better even though it's slower to navigate.

But clearly it isn't for you. It isn't for me either, though I did try. I just don't really have a reproducible workflow (I'm not a dev). In that case the setup overhead does indeed not pay off. If you spend every day in an IDE I could definitely see it working out.

Even on my work mac I often prefer using the cli for things that others would do in the GUI. They find that archaic and overly complex. I find it simple and faster. Opinions vary :)

Re:Ask HN: Is it still possible to live in a terminal? by 29athrowaway on Friday October 14, 2022 @11:22PM (#33211408)
Not because something has a learning curve, it means it makes sense.

You could memorize the entire Sacred Scrolls from Planet of the Apes, that doesn't make it practical.

Re:Ask HN: Is it still possible to live in a terminal? by phailhaus on Friday October 14, 2022 @10:19PM (#33211027)
Literally nobody is asking you to use vim. In fact, I don't recommend it to newbies, and warn that a lot of setup is involved. But I am 100x more productive in it than any other IDE, or seen anyone else with an IDE. It works for me. It may not work for you, that's fine.
Re:Ask HN: Is it still possible to live in a terminal? by 29athrowaway on Friday October 14, 2022 @10:29PM (#33211111)
"newbies"

See, this is the shit you have to endure from vim users.

Re:Ask HN: Is it still possible to live in a terminal? by nequo on Saturday October 15, 2022 @12:31AM (#33211763)
You might be well served by not seeking out the company of vim users then. There’s better things to spend this life on than arguing about editors, plugins, and keybindings.
Re:Ask HN: Is it still possible to live in a terminal? by ilovecaching on Friday October 14, 2022 @10:19PM (#33211031)
I've been using Vim since college and nothing else and I could retire at 33 from my FAANG RSUs so it worked for me. Have fun "getting shit done" in VSCode or whatever. Honestly if someone told me they hated memorizing commands or configuring their environment in an interview I would see that as a big red flag, but you do you.
Re:Ask HN: Is it still possible to live in a terminal? by 29athrowaway on Friday October 14, 2022 @11:08PM (#33211351)
Most of it unvested stock and not enough to retire at 33.

Thanks to the great people running the economy, if you get to survive all layoffs taking place and vest that money, you'll be able to buy an avocado toast made of soylent green in the metaverse of the future. You will own nothing and be happy.

Re:Ask HN: Is it still possible to live in a terminal? by alwillis on Friday October 14, 2022 @10:43PM (#33211197)
Plenty of 1-command preconfigured Neovim distributions.

It’ll take less than 5 minutes to install a Neovim-based IDE-like environment; batteries included:

    bash <(curl -s https://raw.githubusercontent.com/lunarvim/lunarvim/master/utils/installer/install.sh)
Re:Ask HN: Is it still possible to live in a terminal? by 29athrowaway on Saturday October 15, 2022 @01:52AM (#33212115)

    echo "Fuck vim" > /etc/motd
Re:Ask HN: Is it still possible to live in a terminal? by ryandrake on Friday October 14, 2022 @11:05PM (#33211327)
Not OP, but to me, software that requires installing multiple plugins and extensions on top of it and requires much configuration in order to be useable is basically "unfinished software". It's 2022. Software not just has to work out of the box (or out of the download), it has to be packaged with everything needed to actually use it. It has to come fully configured for the most common use cases, or be able to fully configure/adapt itself at runtime. The days of sitting there installing plugins and tweaking settings and looking up how to configure it to do Common Use Case Xyz should be long behind us.

For example browsers. Whenever there is a Must Have extension that basically everyone downloads and installs, we should not be saying "See! It's great that software has plugins and extensions!" We should be saying "The development team totally missed this."

Re:Ask HN: Is it still possible to live in a terminal? by ar_lan on Saturday October 15, 2022 @01:43AM (#33212083)
This is like saying a library is incomplete because it does one thing well, and if it’s not a full-fledged framework it’s useless.

I recommend learning about Unix and the associated philosophies - you sound like there’s a lot more growth in your future!

Re:Ask HN: Is it still possible to live in a terminal? by netmonk on Saturday October 15, 2022 @03:48AM (#33212719)
To be honest, VIM doesn't require plugin installation to be fully functionnal.

The main problem with VIM is that nobody reads the documentation, and jumps directly trying to configure vim to imitate what they experienced with other softwares.

Most VIM users never understand VIM philosophy and inner mechanism supporting it. They just try to bend VIM into another graphical code editor.

It's like the meme about "exiting vim". It is pointless. Once you understand VIM you never need to exit it. Just Ctrl-z or use neovim terminal if needed.

The best challenge i was given by VIM guru, when i was asking help installing dozen of plugin, was to read the vim doc (:help) and just use for 6 months a VIM pure vanilla, without any plugin and minimal vimrc. After more than 20 years using VIM daily, i just understood i never learn how to use VIM and were just an adept of CARGO-CULT, victim of mass spread anti-pattern.

Re:Ask HN: Is it still possible to live in a terminal? by ColonelPhantom on Monday October 17, 2022 @07:52PM (#33241164)
I guess you could shell out to check for errors (for example), but isn't it in general nicer to get error messages as you go? Or how about actually intelligent autocomplete? Stock vim simply cannot do those.

What are some examples of plugins people commonly use that you think are useless?

Re:Ask HN: Is it still possible to live in a terminal? by stackbutterflow on Saturday October 15, 2022 @04:13AM (#33212853)
What you describe is rather 1995. Bloated vendor piece of software that tries to do too much and comes with a vendor manual.
Re:Ask HN: Is it still possible to live in a terminal? by nikau on Saturday October 15, 2022 @06:06AM (#33213384)
Yeah spending some time to set up a tool you will probably use for the next 30+ years is outrageous.
Re:Ask HN: Is it still possible to live in a terminal? by Too on Saturday October 15, 2022 @08:23AM (#33214168)
It's not only some rando on the internet. There's always that one co-worker with a wannabe-vim-hacker setup, that you have to help occasionally with some real work task and nothing in their setup ever works effectively (bonus points for only using DVORAK). After showing them how much easier things are with autocompletion in intellij, next week they proudly show their latest installed emacs-plugin, that only does half-assed keyword completion, without being aware of variables, imports and the program structure. Such a waste of time. Lately I've started to just refuse cooperating under such circumstances, unless they truly show they know their tools.

Mastering the commandline is of course still important, just please not for editing code.

Re:Ask HN: Is it still possible to live in a terminal? by ColonelPhantom on Monday October 17, 2022 @07:49PM (#33241143)
If you want half-assed keyword based completion, you don't need any plugins at all (e.g. ctrl-n in vim).

And if you install a proper plugin that uses language servers, you're at the same level of VSCode, which I'm pretty sure is the most used editor by a wide margin.

Your rant sounds more like you're more annoyed by "wannabe-vim-hackers" than any actual limitations of the tools.

Re:Ask HN: Is it still possible to live in a terminal? by jimjimjim on Saturday October 15, 2022 @02:02AM (#33212157)
Why do you ask a question and then belittle any responses you get?
Re:Ask HN: Is it still possible to live in a terminal? by 29athrowaway on Saturday October 15, 2022 @10:36AM (#33215210)
Why don't you read user names?
Re:Ask HN: Is it still possible to live in a terminal? by mjan22640 on Saturday October 15, 2022 @02:42AM (#33212374)
The commandline is more powerfull than an IDE due the very logic the things work, and has much higher skillcap. You apparently have some skill in an IDE, little skill in the commandline, and draw the incorrect conclusion that the IDE is better.
Re:Ask HN: Is it still possible to live in a terminal? by coxley on Saturday October 15, 2022 @02:57AM (#33212464)
Haha, damn dude. Did your step-dad use vim?