Live data from Hacker News

Slap – A Sublime-like terminal-based text editor

github.com

41–50 of 123 posts

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

#41
post #36

Earlier quoted context omitted.

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.

How can you insert text in a column-wise fashion? Not using a macro or some such.

In vim, it's:

(navigate to column)

Ctrl+v

10j (or whatever)

Shift-I

(insert text)

Escape

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

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

I wish this or a similar editor was written in a language like Nim. Then you could just compile it on an older version of CentOS, link statically, and cp it anywhere you need it. Or something that supports simple ./configure && make.

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

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

I wish this or a similar editor was written in a language like Nim. Then you could just compile it on an older version of CentOS, link statically, and cp it anywhere you need it. Or something that supports simple ./configure && make.

Does the install script fail or take too long?

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

#44

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…

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

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

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

I wish this or a similar editor was written in a language like Nim. Then you could just compile it on an older version of CentOS, link statically, and cp it anywhere you need it. Or something that supports simple ./configure && make.

Some systems you can't install anything; they're locked down. So, knowing VIM and nano is very helpful. Actually, this is the major reason I never try other editors; I have to work with legacy, locked down systems (on occasion), so it is easier for me to just stay with one editor that I know.

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

#46
post #41
post #36

Earlier quoted context omitted.

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.

How can you insert text in a column-wise fashion? Not using a macro or some such. In vim, it's: (navigate to column) Ctrl+v 10j (or whatever) Shift-I (insert text) Escape

With the substitute command and an appropriate range. This sort of operation is extremely rare, though, so it's not the sort of thing you worry about when you're using a limited environment that has vi with no ability to install vim.

Besides, it's far more common that you'd want to do an operation like this but the columns happen to be misaligned. Then you're reaching for substitute anyway. Might as well master the more flexible tool.

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

#47

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…

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 the editor of my choice, even when working on remote machines.

Finally, I grew up playing video games and using a computer, complete with modern input. 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 prefer an editor that treats the mouse like it's useful, rather than an add on that you can enable with extensions if desired.

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

#48

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…

I can see where you're coming from when it comes to comfort with the mouse, though I don't think you should emphasize it too much if you've never experienced some kind of "never leave the keyboard" system that you're fluent in. It may or may not be faster than a mouse, but it's faaaaar more precise and for me feels very satisfying in a tactile sense.

Though in my experience, once you go all in, you start trying to get it to work on everything; in my case that means vim keybindings for everything, including web browser, and it can be a bit jarring to give it up when you use someone else's computer.

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

#49

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…

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

It's very similar to proficiency in any other editor, except Vim has so much more to offer with regard to editing (both in first-order commands and in composing the commands). So much more that watching how a proficient Vim user edits a file is akin to observing a stage magician. Most of the people cannot keep up with the changes to the text.

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

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

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

Post reply on HN