News for hackers. Stuff that matters.
Re:Show HN: Warp, a Rust-based terminal by nicoburns on Tuesday April 05, 2022 @02:15PM (#30922744)
I doubt their compelling features will be in OSS terminals any time soon. I’ve wanted a terminal that has a decent multi line editor for years, and there’s nothing out there.
Re:Show HN: Warp, a Rust-based terminal by andrewzah on Tuesday April 05, 2022 @02:31PM (#30922950)
Vim supports multiline editing and I'd imagine emacs does as well. In bash/zsh, <ctrl-x ctrl-e> opens up $EDITOR so you can use whatever you're accustomed to anyhow.

Most of these features are already available if one spends a bit of time configuring their terminal/shell.

Re:Show HN: Warp, a Rust-based terminal by kreetx on Tuesday April 05, 2022 @05:26PM (#30925256)
Is multiline editing popular/useful? Thus far, the only occasions I've seen it shown is when someone is demonstrating it.
Re:Show HN: Warp, a Rust-based terminal by tomxor on Tuesday April 05, 2022 @05:50PM (#30925490)
I use the visual-multi plugin [0] all day in vim/neovim.

I don't like using tons of plugins but multi cursor with with selective invocation like the ctrl-d of sublime etc was the main thing I missed when moving to vim. (I use visual block mode too but it's not the same thing).

https://github.com/mg979/vim-visual-multi.git

Re:Show HN: Warp, a Rust-based terminal by andrewzah on Tuesday April 05, 2022 @05:32PM (#30925312)
I'd say so, I find myself using it somewhat regularly.

It's pretty easy in vim once you learn how to use visual block mode. That or using Sed to replace text in a selection or the entire file.

http://paulrougieux.github.io/vim.html#Edit_multiple_lines

Re:Show HN: Warp, a Rust-based terminal by jzm2k on Wednesday April 06, 2022 @12:19AM (#30928427)
They are very useful! As a long time Vim user who switched to Kakoune[0] a while back, I didn't even realize I needed a good multiline cursor from my editor before it tried Kakoune. Highly recommend it!

[0] https://kakoune.org/

Re:Show HN: Warp, a Rust-based terminal by nicoburns on Tuesday April 05, 2022 @06:14PM (#30925769)
If you need to pass lots of arguments to a command it's super useful. Typically I don't do this because it's quite unwieldly with a standard readline editor, but I could if multiline editing was available!
Re:Show HN: Warp, a Rust-based terminal by chaxor on Tuesday April 05, 2022 @09:18PM (#30927279)
Put `set -o vi` in your .bashrc

That's all you need - you don't need a whole program that collects all of your information.

Re:Show HN: Warp, a Rust-based terminal by mplanchard on Tuesday April 05, 2022 @05:32PM (#30925317)
I use it not infrequently for crafting big ol bash pipelines to put into scripts, specifically via emacs’ `shell` terminal emulator.
Re:Show HN: Warp, a Rust-based terminal by achenet on Wednesday April 06, 2022 @04:15AM (#30929715)
Thank you for sharing this tip ^_^
Re:Show HN: Warp, a Rust-based terminal by zhengt on Tuesday April 05, 2022 @06:41PM (#30926044)
While this can be done in zsh/bash, it takes investment to understand how to use multiline specifically. And then once you leave the terminal, the same keystroke does not do anything for you.

One of Warp is that you don't have to think twice about it because it behaves similarly to text fields everywhere else on your computer.

In the terminal, I often have the feeling that personal computing revolution from Xerox PARC & Apple Computer never happened.

Re:Show HN: Warp, a Rust-based terminal by robryk on Tuesday April 05, 2022 @07:05PM (#30926287)
This works in everything that uses libreadline to accept user input (unless the binary has specifically configured library differently iiuc), so should work in all shell-like interfaces. You can customize the shortcuts in inputrc, likewise, for all libreadline-using binaries. By default, readline tries to be emacs-like. You can ask it to be vi-like, or reconfigure lots of its shortcuts to be similar to an editor you like. To be fair, "escape to real editor" is not a thing you usually do in an editor, so that will remain special.
Re:Show HN: Warp, a Rust-based terminal by mftb on Tuesday April 05, 2022 @02:52PM (#30923277)
This stuff has been in the major shells for years, through excellent editor integration. For emacs and vi it's pretty much free. If you want to integrate with a different editor, it's totally doable.

Most of the stuff sibling comment is referring to center around the feature:

'edit-and-execute-command' in bash. There is a similar incantation for zsh.

I summon it with, 'ESC v' in both.

Re:Show HN: Warp, a Rust-based terminal by nicoburns on Tuesday April 05, 2022 @03:53PM (#30924112)
If I open an editor then my scrollback history isn't visible (or is in a separate window). Maybe vim and emacs offer this, but that's a big commitment just for a terminal. Warp has GUI-grade editing (mouse support, etc) with things like multiple cursors in a very nice interface.
Re:Show HN: Warp, a Rust-based terminal by a5aAqU on Tuesday April 05, 2022 @04:22PM (#30924497)
Ctrl-z will put Vim to sleep. You can look at the history and then type `fg` to bring the Vim back to the foreground.
Re:Show HN: Warp, a Rust-based terminal by kreetx on Tuesday April 05, 2022 @05:33PM (#30925324)
In emacs a shell is like a text buffer where you can simply search or move around as you would do in a text file. To get command history you'd just execute `history` and then ctrl+s (find) it, or move to it with the cursor.
Re:Show HN: Warp, a Rust-based terminal by NoGravitas on Tuesday April 05, 2022 @04:50PM (#30924838)
So does Emacs. I kind of assume vim and neovim do too, these days.
Re:Show HN: Warp, a Rust-based terminal by mftb on Tuesday April 05, 2022 @04:45PM (#30924783)
Normally I would pull the command I need multi-line editing for back from shell history, using the search operator '!' and print predicate ':p' before invoking bash's 'edit-and-execute-command' on it. I suppose while in the editor then I might need history again, but I can't recall it being an issue.
Re:Show HN: Warp, a Rust-based terminal by oblio on Wednesday April 06, 2022 @03:44AM (#30929514)
Three words for 2 tests regarding these features:

1. discoverability

2. wide spread use.

Bash and zsh fail both tests.

Re:Show HN: Warp, a Rust-based terminal by oblio on Wednesday April 06, 2022 @08:26AM (#30931257)
I love how my previous comment is downvoted with no answer by I assume bash and zsh fanboys when these kinds of features are barely used by users, because they can't be easily found.

Use something like fish to see what real feature discoverability for a shell looks like.

And I say this as a zsh user that has waded through the mountains of obscure documentation to set it up. Don't fall into Stockholm syndrome and think that if you went through hardship, others should, too.

99% of bash/zsh discussion threads are someone going: "here is awesome feature I found" (where frequently that feature is something that should have been painfully obvious to notice) and then 100 replies: "that's so cool and useful, I never knew about it and I've been using bash/zsh for N > 5 years".

Re:Show HN: Warp, a Rust-based terminal by mftb on Sunday April 10, 2022 @12:50AM (#30974556)
I have no idea who downvoted you or why they did so. I'm seeing your reply for the first time. From what I can see, our priorities in our tools are different. Discoverability and widespread use of particular features are not near the top of my list. I have read the bash manual. For the tools I use most, I've found it to be a good investment, that has paid me great dividends.
Re:Show HN: Warp, a Rust-based terminal by a5aAqU on Tuesday April 05, 2022 @04:19PM (#30924447)
> a terminal that has a decent multi line editor for years

You can use ctrl-x ctrl-e in most terminals.

https://unix.stackexchange.com/questions/85391/where-is-the-...

Re:Show HN: Warp, a Rust-based terminal by anthk on Tuesday April 05, 2022 @06:45PM (#30926082)
>You can use ctrl-x ctrl-e in most terminals.

Shells, not terminals.

Re:Show HN: Warp, a Rust-based terminal by EuAndreh on Tuesday April 05, 2022 @04:15PM (#30924394)
In Bash:

    C-x C-e
This opens $EDITOR, and when you finish editing and close it, it runs the code.
Re:Show HN: Warp, a Rust-based terminal by root_axis on Tuesday April 05, 2022 @03:13PM (#30923562)
haha well "decent" is in the eye of the beholder, I'd argue that vim is not only "decent" but by far the best general purpose IDE available.
Re:Show HN: Warp, a Rust-based terminal by TheDong on Tuesday April 05, 2022 @04:01PM (#30924213)
> I’ve wanted a terminal that has a decent multi line editor for years, and there’s nothing out there.

You can go the other direction.

Install neovim. Run `:terminal`. optionally run `:help Terminal-mode` first so you can figure out how to get out.

Re:Show HN: Warp, a Rust-based terminal by chaxor on Tuesday April 05, 2022 @09:10PM (#30927221)
Doesn't `set -o vi` do this for you? Place it in .bashrc and you're good to go.

It's great to use this with awesomewm for windows management, and vimium for browser control. Then you can develop in vim, bash in vim, browse in vim, and switch windows with vim. You don't have to learn 10 different, unintuitive, and ridiculous hotkeys for each different program or level.

Re:Show HN: Warp, a Rust-based terminal by tasuki on Tuesday April 05, 2022 @05:14PM (#30925128)
I use pretty out of the box zsh with vi-mode and it... just works for multiline editing? I can simply move down and up with j/k...
Re:Show HN: Warp, a Rust-based terminal by jart on Tuesday April 05, 2022 @05:27PM (#30925264)
It depends how you define multiline but check out: https://github.com/jart/bestline
Re:Show HN: Warp, a Rust-based terminal by AdwinWhite on Tuesday April 05, 2022 @11:00PM (#30927999)
Multiline works out of box in fish shell. I'm not sure how terminal is relevant here.
Re:Show HN: Warp, a Rust-based terminal by sitkack on Tuesday April 05, 2022 @03:25PM (#30923710)
Terminals are largely owned by graybeard maintainers that aren’t interested in innovating the Unix command line. This is not a difficult change.