12 ms·
Slap – A Sublime-like terminal-based text editor
- hartator 9y agoNo multi cursors? :(
- insulanian 9y agoYeah, my first thought too. Multi cursors are one of the most important features of ST - no much benefit without those.
- cyruscm 9y agoOn a side note, a multi cursors package does exist for vim
- drchickensalad 9y agoIt's not the same at all. Calling it that is an insult to sublime multi-cursors.
- nine_k 9y agoWhat 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.
- Antrikshy 9y agoFind 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.
- saghm 9y agoNot 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)
- thiagobbt 9y agoPressing 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
- saghm 9y agoYep, 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".
- y4mi 9y agoI'm one of those vim enthusiasts which installs vim keybinding in pretty much every editor i use and still agree.
- mrkgnao 9y agoEmacs' evil-mode provides "live" search-and-replace. I can't imagine using the vanilla Vim behavior any more.
- saghm 9y agoI've been trying out spacemacs for the past few weeks, and I really love this feature as well
- coldtea 9y ago>Find and replace on steroids For people who don't know regular expressions...
- mixedCase 9y agoOr Vim macros.
- gjjrfcbugxbhf 9y agoI find that both have their uses.
- flukus 9y agoThat's a much better analogy. Multiple cursors have the same use cases as macros, they are just performed live instead of saved and replayed.
- evan_ 9y agoYes, for most people.
- coldtea 9y agoThat shouldn't be coding or should invest some hours for learning regexes...
- AwesomeBean 9y agoTry doing this with regular expressions. https://gifs.com/player/G6m3vQ https://gifs.com/player/G6m3vQ
- kwouk 9y agoThe ability to use multiple cursors is one of Sublime Text's defining features, so describing an editor as being Sublime-like without that feature is somewhat of a letdown.
- gjjrfcbugxbhf 9y agoSimilar 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.
- kaishiro 9y agoI can definitely dig the thought behind multi-cursors, and I think the people downstream comparing the use case to regex is a little off. I think a better analogy in vim is macros, considering you could run a macro ripping through the results of a string search (which, sure, could be regex), but you could also use it for appending/prepending to lines and patterns, which is really useful in certain cases.
- tuvistavie 9y agoThis looks interesting, but the last commit is 5 months ago. Is the project still in active development?
- techwizrd 9y agoEvery 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.
- iaml 9y agoYou can control vim with mouse? Huh, TIL.
- gatlinnewhouse 9y agoWhat plugins are these?
- Tenobrus 9y agoBoth Vim and Emacs have had mouse support built in for decades.
- equalunique 9y agoYes. In vim: set mouse=a
- hjek 9y agoIf you enable it in .vimrc: set mouse=a
- coldtea 9y agoParent means "control", not "select text".
- fredoliveira 9y agoAnd that's exactly what `set mouse=a` allows. You can switch tabs, resize panes, etc.
- 9y ago
- magoon 9y agoThe 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.
- equalunique 9y agoSame 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.
- chongli 9y agoVisual 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.
- lp251 9y agoHow 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
- chongli 9y agoWith 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.
- jcoffland 9y agoHow do you compare two pieces of code side-by-side? I suppose you could create terminals and arrange then how you like but that's not much different than vim. I use gtk emacs with three frames arranged side-by-side on a 40" monitor. Not being able to compare code this way would really slow me down.
- xaduha 9y agoI never really used Sublime, but I find the idea of splitting an editor into frontend and backend to be worth exploring. Lime does it https://github.com/limetext/lime https://github.com/limetext/lime, NeoVim does it.
- aashiks 9y agoEmacs does it too. https://www.emacswiki.org/emacs/EmacsAsDaemon https://www.emacswiki.org/emacs/EmacsAsDaemon
- barnabes 9y agoThis looks like an excellent addition to the family of terminal-based editors. Truly looking forward to trying it out at work.
- caub 9y agoCan you drag text?
- soupbowl 9y agoWhen I am getting friends into the terminal or I don't feel like copying my vim configs to a server I use micro now: https://micro-editor.github.io/ https://micro-editor.github.io/ It uses ctrl+s ctrl+c type shortcuts and has mouse support, it really is slick.
- didibus 9y agoThis looks pretty great, I'll try it out thanks.
- type0 9y agoIt is slick but it desperately needs multi cursor support and sadly there has been no progress on that - https://github.com/zyedidia/micro/issues/5 https://github.com/zyedidia/micro/issues/5
- digi_owl 9y agohttps://github.com/hishamhm/dit https://github.com/hishamhm/dit Hisham's (of htop and gobolinux fame) dit editor seems to have gained such support 4 months ago.
- mixmastamyk 9y agoI use ne for a terminal-based CUA editor right now, though this slap project looks promising. sudo apt install ne In the past I've used nano with some sane key bindings, but they would often be missing on remote machines. Ten+ years ago I built a turbovision work-alike from setedit. I'm afraid that the node requirement and lack of Debian repo would rule it out in many situations, like remote editing. Too much work to get it installed on ephemeral boxes. Could someone start a project like this with C and Python plugins? I'd like to contribute. Guess I'll stick with ne or sshfs and main editor for now.
- andrepd 9y ago> Issues: [...] Slow on single cores, Raspberry Pi A text editor that is slow on 1GHz single-core machines. What a time to be alive.
- btschaegg 9y agoAlso: A terminal-based text editor written on top of node using parts of Atom. Well, I'll give it a try if I have some time. I'm very curious what those "amazing features that make you drop Emacs" might be ;-) Edit: Actually, does anyone know what the problem with a single core might be? If it's written in Javascript, it can't be that strongly relying on concurrency, can it? Or is it just the fact that it has to share "its" CPU core with the rest of the system? Edit2: TIL: There's a library providing react-bindings for terminal interfaces[1]. I have to admit, I would've never expected that. [1]: https://github.com/Yomguithereal/react-blessed https://github.com/Yomguithereal/react-blessed
- 49531 9y agoReact Blessed is a really fun library too! Makes terminal tools a bit easier to write
- squarefoot 9y agoAgreed! 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?
- amiga-workbench 9y agoOnly programmer time/effort matters anymore, to hell with the end users time, productivity, battery life and whatever other applications they happen to be running.
- squarefoot 9y agoThis brought memories! There's a video on Youtube showing CED in action... Ladies and gentlemen, this is how a graphical text editor scrolled text 30 years ago on a 8 MHz 16 bit machine! https://www.youtube.com/watch?v=L41oIvre9K0 https://www.youtube.com/watch?v=L41oIvre9K0
- still_grokking 9y agoForm 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!
- notdang 9y agoSeems like trolling and we got into the trap.
- LeoNatan25 9y agoPoe'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.
- LeoNatan25 9y agoIs this a joke? A command line text editor, written in JS and Node? The sad? "Slow on single cores, Raspberry Pi" How low will the software development world stoop to?
- jimjimjim 9y agoJavascript. Is there anything it can't ruin?
- powerage99 9y agoAnother terminal editor that's similar: https://github.com/rgburke/wed https://github.com/rgburke/wed