Live data from Hacker News

Slap – A Sublime-like terminal-based text editor

github.com

101–110 of 123 posts

Re: Slap – A Sublime-like terminal-based text editor

#101

Every one of the listed features is also available in Vim. I fail to see how this is either Sublime-like besides the keybindings (since a file pane is available on both Emacs and Vim) or will cause me to leave Vim or Emacs behind. That said, I can definitely see this replacing Nano for some folks.

I think the benefit is exactly the keybindings. And the fact that it is non-modal. It works like a text field in a desktop GUI, there is almost no state. You can't mess the state up. Contrast it to vim, where I got into the habbit of bashing ESC three times to be sure I'm not in a mode. Or emacs, which is nice until it's abstractions leak, and you accidentially start editing a configurations pane or something. I am a…

About vim and the mental load, even though one of its great features is its precision, sometimes we should pour a bit of sloppiness into it. And as vim users, we shouldn't feel ashamed. This user puts it in a great way: https://news.ycombinator.com/item?id=12645523

Re: Slap – A Sublime-like terminal-based text editor

#102
post #73

> Issues: [...] Slow on single cores, Raspberry Pi A text editor that is slow on 1GHz single-core machines. What a time to be alive.

I was very puzzled about that too, so I looked at the repo and... it's written in Javascript. No wonder.

Presumably this wasn't so much a result of free choice, as of the desire to enable access to, say, Atom packages?

Re: Slap – A Sublime-like terminal-based text editor

#103
post #2

No multi cursors? :(

I can definitely dig the thought behind multi-cursors, and I think the people downstream comparing the use case to regex is a little off. I think a better analogy in vim is macros, considering you could run a macro ripping through the results of a string search (which, sure, could be regex), but you could also use it for appending/prepending to lines and patterns, which is really useful in certain cases.

Re: Slap – A Sublime-like terminal-based text editor

#104

Earlier quoted context omitted.

Agreed! I wish the sources of CygnusEd (Amiga) were open. Those guys nearly 30 years ago made a graphical text editor which on a 16 bit CPU clocked at 8MHz run circles around most today editors on 32/64 bit CPUs clocked over two orders of magnitude higher. Do we have to count optimization as a forgotten art, at least among non system developers?

This brought memories! There's a video on Youtube showing CED in action... Ladies and gentlemen, this is how a graphical text editor scrolled text 30 years ago on a 8 MHz 16 bit machine! https://www.youtube.com/watch?v=L41oIvre9K0

> 8 MHz 16 bit

... and custom blit and other processors.

Re: Slap – A Sublime-like terminal-based text editor

#105
post #50
post #49

Earlier quoted context omitted.

> It's a trade-off: Do I use a bit of mental power, and save some finger movement? hammerandtongs already suggested this: it's not a trade-off, you just didn't get to learn Vim appropriately (you say yourself that you're "part time vim user"). Vim is so convenient for its regular users not because it saves them keystrokes, but because it saves them this mental power you talk about. I don't think what commands I want…

>I don't think what commands I want to execute. I think where I want to get in the file or what should the text look like, and then the logic behind the structure of vi/Vim commands takes me there. this is gibberish unless vim comes with some sort of spinal cord dongle. either it's muscle memory or thinking but you still have to have practiced the keystrokes.

He's describing how it feels to be a good vim user, not how it works in reality. A great tennis player might say "I don't think about how to hit the ball, I just think about where I want it to go and it goes there", and that would be reasonable. Then you come in and say no that's gibberish, unless he has a spinal cord dongle hooked up to a robot that hits it for him, he has to be thinking about doing the actions, they're not automatic after all!

Re: Slap – A Sublime-like terminal-based text editor

#106
post #50
post #49

Earlier quoted context omitted.

> It's a trade-off: Do I use a bit of mental power, and save some finger movement? hammerandtongs already suggested this: it's not a trade-off, you just didn't get to learn Vim appropriately (you say yourself that you're "part time vim user"). Vim is so convenient for its regular users not because it saves them keystrokes, but because it saves them this mental power you talk about. I don't think what commands I want…

>I don't think what commands I want to execute. I think where I want to get in the file or what should the text look like, and then the logic behind the structure of vi/Vim commands takes me there. this is gibberish unless vim comes with some sort of spinal cord dongle. either it's muscle memory or thinking but you still have to have practiced the keystrokes.

Do you think about each key you want to press to type a sentence?

I expect not. Vim, for those that use it, is merely an extension of that.

Re: Slap – A Sublime-like terminal-based text editor

#107
post #24

Earlier quoted context omitted.

> Find and replace on steroids For people who don't know regular expressions...

Or Vim macros.

That's a much better analogy. Multiple cursors have the same use cases as macros, they are just performed live instead of saved and replayed.

Re: Slap – A Sublime-like terminal-based text editor

#108

Earlier quoted context omitted.

This brought memories! There's a video on Youtube showing CED in action... Ladies and gentlemen, this is how a graphical text editor scrolled text 30 years ago on a 8 MHz 16 bit machine! https://www.youtube.com/watch?v=L41oIvre9K0

> 8 MHz 16 bit ... and custom blit and other processors.

> on 32/64 bit CPUs clocked over two orders of magnitude higher

... with monster GPUs.

Re: Slap – A Sublime-like terminal-based text editor

#109
post #99
post #96

Earlier quoted context omitted.

yeah, I clicked to the colored bar to see the distribution of languages in the repo, expecting to see C/C++ or even Pyhthon, and was shocked to see that 96.5% is javascript. Well, that explains such an extensive list of features, I guess..

I'm not saying that JavaScript is an efficient choice, especially when likely depending on a gazillion NPM modules... but do you realise that python is actually an order of magnitude slower than JavaScript these days? unless the body of your performance sensitive code is within a python library python is very slow. I find the problem with most slow javascript is poorly written code and an unnecessarily deep dependenc…

CPython is of course slow. PyPy is fast-ish (and higher memory).

CPython is trivially easy to integrate with fast C though.

Re: Slap – A Sublime-like terminal-based text editor

#110
post #88
post #31

Earlier quoted context omitted.

Or just make it the default: set clipboard=unnamedplus

Wow, in all my 5 months on Vim usage I didn't learn about this. Gonna go :help clipboard now. Thanks.

Don't feel bad... 25 years vi usage here!
Post reply on HN