Live data from Hacker News

Slap: Terminal-based text editor

github.com

31–40 of 41 posts

Re: Slap: Terminal-based text editor

#31

Requires node.js ... EDIT: oops I'm getting downvoted, sorry for mentioning the platform. For the record, I think that JavaScript is the perfect choice of language for a terminal text editor. I can't think of a single better language and platform. :|

No worries, here's the go version :) https://github.com/nsf/godit

Re: Slap: Terminal-based text editor

#32
Nice! I've been waiting for a nice CUA terminal editor for a decade or more. So long that I wrote one in turbo vision about that long ago. The TV packages were removed however, so I've been using nano with sane key-bindings remotely, but they are always foobared when editing as root.

Re: Slap: Terminal-based text editor

#34

Nice! I've been waiting for a nice CUA terminal editor for a decade or more. So long that I wrote one in turbo vision about that long ago. The TV packages were removed however, so I've been using nano with sane key-bindings remotely, but they are always foobared when editing as root.

It exists since ages: ne (http://ne.di.unimi.it/)

Re: Slap: Terminal-based text editor

#36
Well it's interesting to see how to make a text editor in javascript (vs. one in C, for example my own: JOE). The top level libraries used seem to be: blessed, undo.js, cheerio (jQuery?), entities, lex, winston (logging), bluebird (promises), highlight.js, lazy.js (based on underscore), rc, fs, path, xtend, traverse, util, copy-paste.

I think I can see that there is heavy use of lazy.js to make string processing faster. Text buffer seems to be an array of lines...

The nearly complete lack of comments is amazing :-) The author should write some kind of hacking guide or similar documentation if he wants others to help with the project or at least to see how it works.

Re: Slap: Terminal-based text editor

#37
post #26

Very nice. But consider a lot terminal people are living in Linux. A fork uses a language that's commonly bundled with Linux distros will be awesome.

I'm pretty sure most distros have node.js (albeit an older version) in their repos. I know Ubuntu has it for years now.

Well, I just tried to install it on Debian squeezy, but I couldn't find a nodejs package.

Re: Slap: Terminal-based text editor

#38

Earlier quoted context omitted.

I think that what's objectionable about your comment is its absolute lack of information or anything that could possibly contribute to a discussion in any obvious way. What do we make of Requires node.js... ? The sentiment doesn't reflect an opinion, an argument or anything that wasn't obvious from looking at the repo.

It's gonna seem REALLY obtuse to install node.js on a machine that doesn't need node.js, just so you can do some regular maintenance. If there is any value in a terminal text editor at all, it's the ability to operate that editor remotely. Unless the machine has node.js on it already, this is just crufty. salp's choice of dependencies for what it is, is really oddball. I don't think there's any getting away from it.…

"If there is any value in a terminal text editor at all, it's the ability to operate that editor remotely."

How can you take this for granted in this Vim world we live in?

Re: Slap: Terminal-based text editor

#39

Earlier quoted context omitted.

I think that what's objectionable about your comment is its absolute lack of information or anything that could possibly contribute to a discussion in any obvious way. What do we make of Requires node.js... ? The sentiment doesn't reflect an opinion, an argument or anything that wasn't obvious from looking at the repo.

It's gonna seem REALLY obtuse to install node.js on a machine that doesn't need node.js, just so you can do some regular maintenance. If there is any value in a terminal text editor at all, it's the ability to operate that editor remotely. Unless the machine has node.js on it already, this is just crufty. salp's choice of dependencies for what it is, is really oddball. I don't think there's any getting away from it.…

> But just because it's cheap, doesn't mean it's meritless.

It has no merit as a contribution to the discussion (except maybe in the sense that people actually replied to it). For all I care, he could have a very well-founded basis for his opinion, but the fact remains that we will never know that from the body of his comment.

As for your arguments, I mostly agree, but personally I use vim (as opposed to non-terminal equivalents like gvim or macvim) locally since a lot of the work I do happens in a terminal anyway. By using it in the terminal, I can completely avoid managing windows in OS X while I work and either just drop vim to the background or use tmux to do the command line work relatively seamlessly.

Re: Slap: Terminal-based text editor

#40

What I like about the project is that it is written in JavaScript and open source. But this: a Sublime-like file sidebar You could as well say, a VIM like sidebar if you install the proper plugin. There is nothing "Sublime-like" about a sidebar, TextMate had this earlier, other editors too. What is with the proliferation of these "Sublime-like" editors lately ? Can't they just stand on their own ? This really looks l…

> There is nothing "Sublime-like" about a sidebar, TextMate had this earlier, other editors too. I don't understand why every discussion like this devolves into a discussion over who did something first. It's completely irrelevant to the point. The quote you pulled says nothing about Sublime being the only editor to have a sidebar, or Sublime being the first editor to have a sidebar. It says that Sublime has a file s…

Thinking of it from the point of view of an academic, one generally credits the first to discover/build/describe/do something. It's part of placing things into context, which is an important element of academic discourse.

Wearing the academic hat, when I read something that fails to credit The First and instead credits someone else I think to myself, "this person is uninformed and doesn't really understand X..."

Post reply on HN