Live data from Hacker News

Amp – A complete text editor for the terminal

amp.rs

81–90 of 174 posts

Re: Amp – A complete text editor for the terminal

#81
post #71

Earlier quoted context omitted.

> I never remember if f-h will move me to |hello or to h|ello. …Isn't the answer "neither"? If the cursor is somewhere before that `h`, then doing `fh` will put the cursor on that `h`. If you want to enter insert mode before that `h`, you would press `i`, or `a` to enter insert mode after the `h`.

That's half-right, I think. The question is, when using a command like "change until" or "change forward", i.e. 'ct' or 'cf', what will the effect be? In the case of 'ct', you're going to delete up until the letter, whereas in 'cf', it will include the letter you're targetting.

It's definitely exactly right, but I tried to word it in a way which didn't make me look like a know-it-all.

> The question is, when using a command like "change until" or "change forward", i.e. 'ct' or 'cf', what will the effect be?

Is this a question? You answered it accurately. The behaviour is consistent here too, though the mnemonics people often use don't always make total sense.

Re: Amp – A complete text editor for the terminal

#82
post #5

The documentation or the website doesn't list all the languages it supports, especially for jump to definition. It just says all popular languages. This is a bit concerning, because the docs also mentions no (planned) support for plug-ins yet. FWIW, I'm interested in Haskell support. For jumping to definitions and showing type of expression under cursor.

First page under symbol jump states that it is based on and can be extended using .sublime-syntax format. At this point of time I was expecting language server protocol support.

LSP support is planned! Although, the rationale for including it is for advanced language features, like "go to method". I'd be surprised if other editors were using it for syntax highlighting. I've had to jump through hoops to keep that performant on large files. Seems like putting that in a separate process would make performance even more of a challenge.

I found this after a quick search: https://github.com/Microsoft/language-server-protocol/issues...

Re: Amp – A complete text editor for the terminal

#83
post #34

> Amp is inspired by Vim's modal approach to text editing And I closed the page. Modal editing simply makes zero sense on a modern keyboard. It is awful.

In what way is modal editing awful? Modal editors are the only solution I've come across to what I see as the problem with modern keyboards and editors: the inability to do everything you want to do without moving your hands away from the home row. Intellij, eclipse, sublime text, every "modern" non-modal editor I've used expects me to move my hands to the arrow keys if I want to move the caret. This is a personal gr…

> At least a non-modified bash prompt lets me navigate using some archaic control key combinations

You can get vi-like navigation in bash with a simple `set -o vi`

Re: Amp – A complete text editor for the terminal

#84

Earlier quoted context omitted.

Sure, but "Competent users tend to have preferences" doesn't exclude slow evolution of sane-by-default preferences for programs part of a same class. A newcomer text editor, say, comes in town, settles its default configuration as the sanest of previous generations, while existing programs of the same class are (reasonably!) stuck due to compatibility. Which means newcomer text editors need less configuration, and us…

The plugins you need to make Atom/VSCode great (no experience with modern Sublime) definitely count as configuration in my book, and often come with their own configuration load. If I sit down at a new machine, they won't be there. Most of my .vimrc is a couple of lines per plugin configuring the plugins, for example.

You're going to get a fuzzy file finder, Git integration, syntax highlighting, symbol navigation, and and a package manager immediately available to you in those editors. None of those are available in Vim by default; that's the inspiration for Amp.

There are additional perks to including things by default, too. Jump mode is a good example of that: it's integrated with its select mode. You can start a selection and then switch to jump mode to move the cursor to complete the selection.

Lastly, there's simplicity in including things rather than asking new users to pick from a dizzying array of plug-in options. Rails is a good example of this: there's a lot of functionality that could have been left to 3rd-party gems, but having the framework include them by default means they'll work out of the box, and there's a single canonical solution to [sessions, templates, ORM, routing, etc].

Re: Amp – A complete text editor for the terminal

#85
post #50

Earlier quoted context omitted.

being written in rust might make it more appealing to develop, but it doesn't give any benefit to the user and I can't see it being a reason for someone to use this over vim

Rust programs tend to be more stable, more efficient, and more highly parallelized than equivalents written in other languages by developers of the same quality.

False advertisement is false. Please refrain from such statements as it actually hurts the language more.

Re: Amp – A complete text editor for the terminal

#86
post #47
post #6

>A modal, keyboard-driven interface inspired by Vim that makes navigating and editing text fast. But what does it do different than vim? Having competition is good, but I don't see any "that's why you should use amp and not vim"-reason. Where is it?

I thought it was pretty clear actually: it works out of the box with no configuration (batteries included). > Amp is complete from the start. As a long time vim user, the more advanced you get the more customized your vimrc and plugins become and you aren’t able to just walk up to vim somewhere else and be efficient (pairing with another vim user becomes impossible). Shared defaults are a powerful thing! Convention o…

I use vim because I don't want the features of a "modern" text editor. My .vimrc is fairly basic at under 100 lines, and I only have a few plugins, which is mostly syntax files and syntastic.

I don't use stuff like NerdTree (I used to, but ended up not liking it), and mostly just stick to the features that come with it. As such, I can be very productive without much configuration at all, which is much of the reason I used vim in the first place.

I don't want another spin of vim because I lose one of its biggest benefits: ubiquity. The further I deviate from the base configuration, the less useful having vim available everywhere is.

Re: Amp – A complete text editor for the terminal

#87
post #47
post #6

>A modal, keyboard-driven interface inspired by Vim that makes navigating and editing text fast. But what does it do different than vim? Having competition is good, but I don't see any "that's why you should use amp and not vim"-reason. Where is it?

I thought it was pretty clear actually: it works out of the box with no configuration (batteries included). > Amp is complete from the start. As a long time vim user, the more advanced you get the more customized your vimrc and plugins become and you aren’t able to just walk up to vim somewhere else and be efficient (pairing with another vim user becomes impossible). Shared defaults are a powerful thing! Convention o…

> Unlike Vim, Amp doesn't provide split panes, and support isn't planned

That's a pretty big missing feature that is included in vanilla vim...

Re: Amp – A complete text editor for the terminal

#88
The classic ed and its visual version which is called vi are really good-enough if done right. The central concept here is simple regexps bound to one key commands, and that these commands compose. This is the reason why vi is what it is.

https://karma-engineering.com/lab/wiki/Tools/Neovim

The only problem is that all classic vis, including vim, have been coded by amateurs and the code is a terrible mess.

nvi was good, as far as I remember.

Re: Amp – A complete text editor for the terminal

#89
post #47

Earlier quoted context omitted.

I thought it was pretty clear actually: it works out of the box with no configuration (batteries included). > Amp is complete from the start. As a long time vim user, the more advanced you get the more customized your vimrc and plugins become and you aren’t able to just walk up to vim somewhere else and be efficient (pairing with another vim user becomes impossible). Shared defaults are a powerful thing! Convention o…

> Unlike Vim, Amp doesn't provide split panes, and support isn't planned That's a pretty big missing feature that is included in vanilla vim...

Could make do with tmux panes I suppose, but I agree, if you're going to go head to head with Vim that's a big omission.

Re: Amp – A complete text editor for the terminal

#90
post #12

Installed it and played around for a bit. Nice work overall. Amp's jump mode (press `f` and elements in the buffer will be prefixed with a two character jump token) is pretty cool. Would love to see this in Vim.

Thanks! You can use it when defining selections, too. :)
Post reply on HN