

Slap: Terminal-based text editor - kolodny
https://github.com/slap-editor/slap

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

:|

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

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

I will agree that just dropping a "Requires node.js..." is kind-of a cheap
trick. The idea being that people will read what they want and assume that's
what the grandparent meant. But just because it's cheap, doesn't mean it's
meritless.

~~~
boomlinde
_> 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.

------
AlexeyBrin
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 like a nice project and I
don't see the need to pitch it with "Sublime like" features.

Also, I assume that a "Sublime-like" editor has at least some of the Sublime
Text plugin capabilities. I've seen no mention of plugins on the project page.

Love this quote too:

    
    
        ... many other features that will make you leave nano, vim, and emacs behind

~~~
gtCameron
> 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 sidebar, and this project has a file sidebar that is like
Sublime. That is pretty basic statement of fact, your comments about other
editors having sidebars is a complete non sequitur.

~~~
mwfunk
The "who did it first" stuff is always one of the most aggravating tangents in
tech forum discussions. I truly just do not get it. Sometimes it's people
reminiscing about computer history, which I usually enjoy, but most of the
time it's someone who just wants to crap on whatever the thing being discussed
is. It's a less downvotable way of saying, "I think this thing you just wrote
is stupid, and my token excuse for saying this is because someone else did it
before you, so nyah nyah nyah".

The canonical example IMO is the development of the modern GUI: in the '90s,
people who liked to argue about dumb stuff would say that Windows is crap
because it was "just a reimplementation" of Mac OS; this was usually followed
up by some equally stupid argument from someone else about how the Mac was
stupid because it was "just a reimplementation" of the Xerox Alto, and I'm
sure that would be followed up by some primordial neckbeard claiming that the
Xerox Alto was a steaming pile because it just a reimplementation of ENIAC
with better graphics.

Also: GNU/Linux.

------
lechevalierd3on
Comments are harsh today, to me this is a very promising project.

Calling it The sublime Text text-based if it does not (yet?) have the features
that defines Sublime (multiple cursors, split screen, fuzzy search/commands)
might not be the best move.

------
owenversteeg
I think a good chunk of the reason why people use Sublime is because it looks
so damn good. I was hoping this would too, but I guess that's difficult with a
terminal-based editor.

Also, anyone know which (if any) of the patched Powerline fonts [0] have the
hand unicode icon? (It's slap's icon, and it looks ugly without it.)

[0] [https://github.com/Lokaltog/powerline-
fonts](https://github.com/Lokaltog/powerline-fonts)

------
baumbart
Leave Emacs? Never, ever. A fool who thinks he could beat the power of Lisp!
:P

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

------
peatmoss
I believe Lime Text that was mentioned here previously also has terminal
support in addition to a couple different GUI front ends:
[http://limetext.org/contribute.html](http://limetext.org/contribute.html)

------
afaqurk
This is so freakin cool. I assume you will receive a lot of criticism from VIM
die-hards for your key bindings. But I love it.

Good job!

~~~
hk__2
Not only VIM but also UNIX people, because of ^C and ^Z.

~~~
jjcm
I'm definitely hard-coded to not use ctrl+c or ctrl+z for copy/undo inside of
a terminal, but I can see how this would make it easier for those just
starting out to get used to terminal commands. Homogenizing our hotkeys with
the ones used in GUIs isnt a bad thing, but it's certainly going to make
things hairy for a while if more command line tools follow suit (how do I know
which ones use which? Could lead to some very costly mistakes when I try to
copy).

------
bluedino
What options are out there for mouse integration on regular console vim? Or is
it best to just run gVim/MacVim/etc?

~~~
codethulu
:set mouse=a

~~~
aye
Wow, life just got a lot better.

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

~~~
sprash
It exists since ages: ne ([http://ne.di.unimi.it/](http://ne.di.unimi.it/))

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

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

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

~~~
mariuz
Here is the binary for debian

[https://github.com/nodesource/distributions](https://github.com/nodesource/distributions)

Usually i install from source

wget
[http://nodejs.org/dist/v0.10.31/node-v0.10.31.tar.gz](http://nodejs.org/dist/v0.10.31/node-v0.10.31.tar.gz)

tar -zxvf node-v0.10.31.tar.gz

cd node-v0.10.31

./configure

make ; sudo make install

