Slap – A Sublime-like terminal-based text editor
github.com
github.com
A text editor that is slow on 1GHz single-core machines. What a time to be alive.
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.
Do we have to count optimization as a forgotten art, at least among non system developers?
... and custom blit and other processors.
... with monster GPUs.
About the coprocessors, surely Amiga offered a lot in this context, but I can't believe that today video cards cannot do the same with specialized hardware a hundred times faster (if we only take pure clock speed into account). There is something wrong with today software: machines get faster and faster, yet basic stuff like manipulating graphical elements didn't gain much in usability although more speed must have at least brought better granularity in dealing with events. OS complexity surely plays a role, AmigaOS occupied hundreds of Kilobytes -that's about 1/1000 of a modern OS core- but come on.... having to stuff a multicore 1GHz+ CPU plus fast GPU just to have a browser surf the net without dying is plain ridiculous.
No wonder.
Well, that explains such an extensive list of features, I guess..
CPython is trivially easy to integrate with fast C though.
set mouse=a
set mouse=aIt 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.
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).
set clipboard=unnamedplus
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<End>, 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.
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".
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.
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.
Go figure.
Roguelikes, UT, Doom, Quake , and the like from my past pushed me more than anything into learning and loving emacs keyboard bindings.
No other way to experience that sort of speed-of-thought and precision in a UI/UX for me, and certain actions within emacs very much remind me of muscle-twitch maneuvers like rocket-jumping, bunnyhopping, or reload-canceling.
Funny you bring this up, since this reminds me of another discussion: I played a lot of videogames using keyboard and mouse, whereas some of my friends still own consoles and play (more or less) precision-based shooters using gamepads. Every now and then we used to have a couple of multiplayer matches locally on someone's PS. I still tend to skip my turns and just watch the others as gamepad based aiming in shooters tends to get me really frustrated. I'm used to the mouse and forcefully having removed the additional speed and precision it gives you while aiming feels terrible. I get the same feeling if I have to use an editor without Vim-style bindings, although I'm by no means an expert Vim user.
The interesting thing there is that you won't ever find a precision-based first person shooter with crossplay between PC and consoles, because the mouse gives PC players that much of an advantage.
> 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 agree with you there, but so far I've come to the conclusion that it's strengths don't really show if you mainly edit text. The mouse is amazing for precision-based positioning, much like an analog stick can be superior to WASD because it's not limited to 8 axes and has more than just an on/off nature.
I find your other point far more important, though:
> I don't value vim enough to become fluent.
If you're not paid for the speed with which you edit text (and those jobs have become really rare nowadays), that's perfectly valid. Not everyone is interested in investing so much in a fringe activity, and we certainly would get far less done collectively if every tool would force a Vim-style learning curve on people.
This is why I liked the controls in goldeneye, perfect dark and timesplitters. They had consoles in mind from the ground up so the embraced the lack of precision controls with things like auto aiming and level design (mostly flat). Every other console shooter (including all since Halo) has tried to use controllers as though they're a keyboard/mouse.
The control scheme was also modal, where you'd have to hold down a button and not move if you wanted precision aiming.
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.
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.
I expect not. Vim, for those that use it, is merely an extension of that.
cerebellum is largely responsible for your muscle memory but premotor cortex stll needs to initialize those commands (what keys to press) then the cerebellum adjusts the precision i.e touch-typing part of it guess...
It's like you were arguing that printf("foo\n") and printf("bar\n") were some fundamentally different magic incantations in C that you need to remember separately.
I've been using emacs for decades and I don't think I've never done this. I've written my own elisp functions, packages etc (nothing too fancy, mostly text-oriented transformations) I guess I'm curious what you mean by 'editing a configuration panel'.
I think GNU nano should probably also have a commandline switch to behave like a normal CUA-compliant editor and distros should have that enabled by default. It isn't compatible with anything but pico and someone who grew up with today's machines would have never seen pico.
So, leaving such rebindings as opt-in possibilities to newcomers seems like a much more sane decision to me.
It uses ctrl+s ctrl+c type shortcuts and has mouse support, it really is slick.
Hisham's (of htop and gobolinux fame) dit editor seems to have gained such support 4 months ago.
I find myself shying away from anything too specialized that could become a crutch, maybe to my detriment.
In vim, it's:
(navigate to column)
Ctrl+v
10j (or whatever)
Shift-I
(insert text)
Escape
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.
sshfs <user>@<server>:<path> ≤mountpt≥Can you sudo over sshfs somehow without logging as root?
I was wondering if there is a way to write protected files when SSHing as a user who only has write permission through sudo.
> 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!
Lime does it https://github.com/limetext/lime, NeoVim does it.
UPDATE: From the answers below, I see that the point is the immediate visual feedback it gives.
For people who don't know regular expressions...
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.