Live data from Hacker News

Slap – A Sublime-like terminal-based text editor

github.com

31–40 of 123 posts

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

#31
post #28
post #22

Earlier quoted context omitted.

> copying/pasting with OS clipboard support It is supposed to be in vim, but I always forget how to use it and the few time I tried it just didn't work.

"+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

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

#32
post #20

Earlier quoted context omitted.

Not trying to diminish the use of multiple cursors (I have certain fondness for them despite not using them extensively due to my choice of editor), but using regexes you can still do that (i.e. with /^/ and /$/, which I use constantly with vim-style search and replace)

Pressing ctrl-d a couple of times, seeing what will change, and typing something is most of the time easier and faster than thinking about a regex. At least that's how I feel

Yep, I can see that being easier depending on what you prefer, I just wanted to point out that the feature wasn't unique to multiple cursors, since it was being described as "find and replace on steroids".

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

#33
post #20

Earlier quoted context omitted.

Not trying to diminish the use of multiple cursors (I have certain fondness for them despite not using them extensively due to my choice of editor), but using regexes you can still do that (i.e. with /^/ and /$/, which I use constantly with vim-style search and replace)

Pressing ctrl-d a couple of times, seeing what will change, and typing something is most of the time easier and faster than thinking about a regex. At least that's how I feel

I'm one of those vim enthusiasts which installs vim keybinding in pretty much every editor i use and still agree.

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

#34
post #24

Earlier quoted context omitted.

Find and replace on steroids, meaning the flexibility of moving the cursors around in all instances of a find and making edits near the beginnings and ends of lines, for example.

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

Or Vim macros.

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

#35
post #24

Earlier quoted context omitted.

Find and replace on steroids, meaning the flexibility of moving the cursors around in all instances of a find and making edits near the beginnings and ends of lines, for example.

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

Yes, for most people.

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

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

Same here. That is, until I find out that only vi's there and not full-on vim. While vi is smaller and even more ubiquitous, it pains me that it lacks visual mode.

Visual mode is a crutch! I'm used to vi so I never use it. There are faster, more flexible ways of doing anything you'd do in visual mode with plain vi commands.

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

#38
post #17
post #2

No multi cursors? :(

What is the use of multiple cursors? Something that does not boil down to copy-paste programming. UPDATE: From the answers below, I see that the point is the immediate visual feedback it gives.

Similar use to reg ex based find and replace but with less thought needed. Useful for those that prefer just editing rather than composing regular expressions.

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

#40

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 part time vim user, and generally like it, but sometimes I find the mental load of the key bindings too high. Anything more complex than d, and I have to stop a moment and think about it. In that time, I can just hit the cursor keys (and Home, PgDn, ...) a couple of times.

It's a trade-off: Do I use a bit of mental power, and save some finger movement? Then I go for the vi way. Or do I use less mental power, and delegate tasks to my fingers and eyes to do autonomically? Then I go for the sublime / notepad / VS way. I might press the arrow key a couple of times, overshoot, go back, ... it may look inefficient, but it's not slower, just a different use of resources.

I've been looking for a Sublime style editor for the terminal for ages. Actually, way before sublime, I've been looking for an edit.com style editor - Nano is one thing, but I want one that respects CUI-like conventions. Shift for selecting, CTRL+C for copy, .... I will definitely check this out.

Post reply on HN