Live data from Hacker News

Slap – A Sublime-like terminal-based text editor

github.com

81–90 of 123 posts

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

#82

Earlier quoted context omitted.

Why would you leave yourself in this low practiced state? Ie you don't spend the time to become fluent, so it's always "thinking" instead of being able to just do. Incidentally you should always always leave the insert mode when you are done typing. You are never confused about state because your default is "normal mode".

Because becoming fluent has a cost value trade off, and I think there are a lot of people who simply don't think time invested in that is worth it. I touch a terminal a lot, and I don't value vim enough to become fluent. I certainly know how to use it, and I know a fair bit of the commands, but it's nowhere close to my preferred workflow. Plus, there's a huge array of tools out there to allow me to work with files in…

> Finally, I grew up playing video games and using a computer, complete with modern input.

Funny you bring this up, since this reminds me of another discussion: I played a lot of videogames using keyboard and mouse, whereas some of my friends still own consoles and play (more or less) precision-based shooters using gamepads. Every now and then we used to have a couple of multiplayer matches locally on someone's PS. I still tend to skip my turns and just watch the others as gamepad based aiming in shooters tends to get me really frustrated. I'm used to the mouse and forcefully having removed the additional speed and precision it gives you while aiming feels terrible. I get the same feeling if I have to use an editor without Vim-style bindings, although I'm by no means an expert Vim user.

The interesting thing there is that you won't ever find a precision-based first person shooter with crossplay between PC and consoles, because the mouse gives PC players that much of an advantage.

> The mouse is a first class input device, and I know how to use it effectively, quickly, and precisely to perform a wide variety of actions.

I agree with you there, but so far I've come to the conclusion that it's strengths don't really show if you mainly edit text. The mouse is amazing for precision-based positioning, much like an analog stick can be superior to WASD because it's not limited to 8 axes and has more than just an on/off nature.

I find your other point far more important, though:

> I don't value vim enough to become fluent.

If you're not paid for the speed with which you edit text (and those jobs have become really rare nowadays), that's perfectly valid. Not everyone is interested in investing so much in a fringe activity, and we certainly would get far less done collectively if every tool would force a Vim-style learning curve on people.

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

#83
post #6

The best feature of vim is its ubiquity; I feel at home on almost any computer. I find myself shying away from anything too specialized that could become a crutch, maybe to my detriment.

How often are you in situations where you can't run the editor/IDE you want? I haven't encountered this for years except the rare times I'm forced to do some editing over SSH (which is far too low-level for server management than I'd like).

Maybe not often for your average Nodejs dev, but I've had jobs where I had to edit files on special laptops all the time.

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

#84
post #78

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 had a rather long argument with someone who can't stand vim and his points were mostly salient. Vim comes with a lot of baggage (or features, depending on how you look at it) from having been designed before Windows and the assorted userland became the dominant platform. Because of that, its shortcuts aren't CUA-compliant [1]. And that is just scratching the surface. Vim and Emacs are written by people who expect t…

On the other hand, I would guess it's not just the maintainers being entrenched: If you were to redefine something like C-v to perform "+p by default, you would upset every guy that has been using Vim for some time. Not only that, but you would also really ruin the day for everyone that regularly uses it through SSH and counts on Vim's default behavior. I would guess the reactions would be orders of magnitude more vile than those to, say, systemd.

So, leaving such rebindings as opt-in possibilities to newcomers seems like a much more sane decision to me.

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

#86
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.

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?

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

#87
post #49

Earlier quoted context omitted.

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…

> 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…

Macros are the best part of vim for me. They allow me to transform large quantities of text which would be difficult to do using a regular expression even. Also, after enough use (I'd say 4 weeks in my case) a lot of the commands become muscle memory and I don't have to think about what I'm hitting. I think about a goal and know what to do to get there.

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

#88
post #31
post #28

Earlier quoted context omitted.

"+y / "+p Is generally what you want (named buffer +). http://vim.wikia.com/wiki/Accessing_the_system_clipboard I used to keep forgetting too, and then I started using it a bit (on Windows, where selecting text and shift-insert doesn't work).

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.

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

#89
post #64

Earlier quoted context omitted.

Almost every time I have to edit text over SSH, it is to change configuration files that aren't writable for my SSH user. Can you sudo over sshfs somehow without logging as root?

Note the user field in the above command. Desktop file managers can do this too.

I explicitly said "without logging as root". SSH as root is almost never allowed on production servers.

I was wondering if there is a way to write protected files when SSHing as a user who only has write permission through sudo.

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

#90
post #81

Form GitHub Readme.md: > slap is based on Github's atom/text-buffer, and as such should be very performant, even with very large files. This is cutting irony!

Seems like trolling and we got into the trap.

Poe's law: Without a winking smiley or other blatant display of humor, it is utterly impossible to parody a [software developer] in such a way that someone won't mistake for the genuine article.
Post reply on HN