Readit News logoReadit News
jjcm · 2 years ago
Conceptually the reasons the author give for this (syntax highlighting and other features of vim outclass other terminal-based editors) make total sense.

That said there's something absolutely defiling about this. It's like installing a V8 in a Tesla, or replacing the pumpkin in pumpkin pie.

I love that it will make VIM more accessible for more people, but I hate how they do it. Kudos to the author.

redundantly · 2 years ago
> It's like installing a V8 in a Tesla, or replacing the pumpkin in pumpkin pie.

Most pumpkin pies are actually made with butternut squash and other similar squashes, not pumpkin.

https://en.wikipedia.org/wiki/Cucurbita_moschata

https://www.thekitchn.com/whats-actually-in-your-canned-pump...

reactordev · 2 years ago
Not sure about where you’re from but where I’m from, you don’t make pumpkin pie from a can. You make it with pumpkin purée. From scratch. Get out of here with your non-pumpkin pumpkin pie propaganda.

Some pumpkin, blended into a paste, some brown sugar, an egg or two, some heavy cream and some cinnamon and crushed cloves and you have your pie filling.

Modified3019 · 2 years ago
For those curious another common major percentage of “pumpkin pie” blends (such as from Libby’s) is Dickinson squash/pumpkin which is a subspecies of Cucurbita Moschata like butternut squash. These can be found as heirloom seeds. https://www.thespruceeats.com/what-are-dickinson-pumpkins-52...

Here in the Willamette Valley of Oregon, we grow a lot of crops for seeds, of which various squashes are some. It’s amusing to see the first time, but squash grown for seed is typically just shredded in the field, with seeds collected and the flesh tossed out over the field. Results in a lot of “wtf are they doing” among those unfamiliar, because it looks exactly like pumpkins were grown just to immediately destroy them.

mypalmike · 2 years ago
If you'd left off "not pumpkin", you'd be technically correct. But it's a somewhat nuanced topic.

https://www.snopes.com/fact-check/canned-pumpkin-isnt-actual...

[I'll just add one more note, not mentioned in the article, which is that typical Jack-o'-lantern pumpkins are quite awful for cooking. Much worse than any canned pumpkin. If you want to cook with fresh pumpkin, research the varietals that are known for good texture and flavor. Don't grab a carving pumpkin from the pile.]

myrandomcomment · 2 years ago
In my household for the last 20 years, it is made from pumpkin. First from sweet pumpkins we would pick up every year at the Halloween pumpkin patch that we as a family tradition would take our daughter too. Now it is made from ones grown in our own garden. They are simple to grow. Pick them, roast them, purée them and freeze until needed. We also make a lovely spicy Indian style pumpkin soup from the purée. The pie is quite different from any store purchased pie and well worth it.
scythe · 2 years ago
I've heard this claim various times, but it doesn't really make a lot of sense. Butternut squash has a carb:fiber ratio of about 6:1. Canned pumpkin is more like 3.5:1. Sure, the USDA might be lax on the precise definition of the word "pumpkin", but I don't expect them to go so easy on the nutrition data.

As Wikipedia notes:

>The term [pumpkin] is most commonly applied to round, orange-colored squash varieties, though it does not possess a scientific definition and may be used in reference to many different squashes of varied appearance.

If the article is simply intending to say that it does not usually come from squashes that are orange, oblate and ridged, then that's fair. But I don't think it's mostly butternut squash, and I don't see why manufacturers would try to hide using the most popular variety of squash.

bluedino · 2 years ago
In the US, canned pumpkin is 100% pumpkin, and the big name frozen pumpkin pies all list pumpkin, not butternut squash or other imitators.

And then you have sweet potato pie...

jb1991 · 2 years ago
In most countries outside the US, squash is called pumpkin.
thayne · 2 years ago
But butternut squash is pretty similar to pumpkin. They are both winter squash, and the definition of pumpkin is a little fuzzy anyway. This would be more like replacing the pumpkin with apples.
kazinator · 2 years ago
Ah, I always wondered why pumpkin pies are relatively delicious, while pumpkin is gross. I chalked it up to the sugar.

(Chalk and sugar in the same sentence just made me think of Macdonald's milk shakes.)

globular-toast · 2 years ago
Emacs runs in a terminal. Vim isn't installed everywhere, Vi is. If you're going to install an editor and a config you might as well just install Emacs.
quesera · 2 years ago
I believe only the BSDs install real vi in the base OS.

Everywhere else, when you type vi, you get vim. Some neophile Linux distros provide neovim instead.

Regardless, vi and vim (and neovim) are the same in basic operations.

It's still functionally correct that "vi is always installed" and no additional action is necessary for basic text editing.

diggan · 2 years ago
> Vim isn't installed everywhere, Vi is

Doesn't most major distributions alias vi to vim nowadays? I think I've also come across vi being aliased to vim-tiny if I remember correctly.

Hamuko · 2 years ago
For those who don't know, there are at least two different V8-powered Teslas.

https://youtu.be/x-6kHjF1U1E?t=402

https://twitter.com/FthePump1/status/1738425546621825468

hegzploit · 2 years ago
for a moment there, I was wondering why they'd install a JavaScript engine in a tesla.
jerpint · 2 years ago
It’s similar to preferring guitar hero because a real guitar has too many frets and too many chords to learn
berkes · 2 years ago
I guess it's the end-goal then, though. If your goal is to become a rockstar and play the guitar in a band, GH is probably a very bad route to it. But if it is to "have fun" its perfect.

Same with this vim: if you just need an editor that is recognisable and "not weird" then this modeless vim might be useful; though why not just install nano, pico, gedit, notepad++ or even notepad.exe?

cwillu · 2 years ago
More like learning the clavicord.

“But your fingers aren't touching the strings!”

goldenshale · 2 years ago
Seriously, it hurts. It makes sense, but it hurts. If only there were a more gentle path to editor modes. Maybe some simple graphical representation of the modes and commands that could be down in the corner? Like a dynamic vim infographic that clued a user into the most likely commands.
tester457 · 2 years ago
Helix is beginner friendly. It's keybindings make more sense than vim's.
scythe · 2 years ago
>If only there were a more gentle path to editor modes. Maybe some simple graphical representation of the modes and commands that could be down in the corner?

I taught myself vim by setting the vim cheat sheet to be my terminal background, though I greyed it out slightly so it didn't obscure what I was typing. Once you have that there are only a few phrases you really need to know: "+p, "+y, "+d to access the system clipboard, :split and :vsplit, C-w w to switch windows, and g C-g for word/char count.

https://www.glump.net/_media/howto/desktop/vim-graphical-che...

Symmetry · 2 years ago
If I had a lot more free time, I've been noodling with some designs for a text editor with modes. It would start up by default in the equivalent of vim's insert mode where all the normal CUA keybindings (e.g. ctrl-c for copy) worked. But with many more. Then, if you go to the equivalent of normal mode you can just press X to do the same thing ctrl-X does in insert mode.
csdvrx · 2 years ago
> I hate how they do it

What exactly do you hate?

The site says:

> > Ctrl+S to save, select text using Shift+←/→/↑/↓, and copy/paste using Ctrl+C/V.

I haven't setup Control-S, but I have very similar bindings: Shift and arrows for selecting, then Alt or Control-Shift for moving the selection around, as shown on https://raw.githubusercontent.com/csdvrx/CuteVim/main/record...

Also, like the author I have a shortcut to change themes (F9) and another to toggle invisible chars (F8), and I try to use the top of the screen as much as possible (I show the offset in hex, the row and column position etc).

I like how vim is modal, but some Windows shortcuts (like Control-C) just make too much sense to given them up on Linux: I have put `stty intr ^X` because using Shift-Control-C to copy from the terminal was way worse.

Having a few chording shortcuts give you the best of both worlds!

BTW, all of the other shortcuts proposed on this site make a lot of sense to me: I do expect Ctrl-F to search, and Ctrl-T to open tabs, I think I will copy a few :)

arcanemachiner · 2 years ago
Back in my day, when we pressed Ctrl+S, the terminal froze, and that's just the way we liked it.

https://unix.stackexchange.com/questions/12107/how-to-unfree...

u801e · 2 years ago
> I like how vim is modal, but some Windows shortcuts (like Control-C) just make too much sense to given them up on Linux

Ctrl-C does work in the GUI. That said, one thing I like about Linux is being able to highlight text using the mouse and then pasting it by middle-clicking. I don't have to interact with the keyboard at all to copy and paste text that way.

ttyprintk · 2 years ago
Remapping Ctrl-O denies the ability to switch modes. That’s what turns this from simply an opinionated config to a breaking change.
1vuio0pswjnm7 · 2 years ago
"That said there is something absolutely defining about this."

Not expecting anyone to agree, but this is how I feel when using minimal shells that do not implement vi editing, e.g., set -V or set -o vi. Busybox/toybox is one example. In the aggregate, I actually do more editing on the command line than I do in vi. If the shell is permanently set to emacs-like keys and editing then I am constantly switching back and forth to "vi mode" everytime I edit a text file and return to the shell, i.e., nonstop.

deadbabe · 2 years ago
I disagree. It makes no more sense than turning a modeless editor into a modal one. Just use the right tool for the job.
xp84 · 2 years ago
Or if you hate modes, it’s like installing a Tesla motor in a car that was originally powered by the screaming souls of the damned :)
zhenyakovalyov · 2 years ago
In Jef Raskin’s ‘Humane Interface’, there’s a good justification to why modes are evil, mainly leading to excessive user errors, so it’s not that surprising.
scotty79 · 2 years ago
> It's like installing a V8 in a Tesla

Maybe putting diesel generator in a Tesla so you can use it even though charging is not your cup of tea.

Deleted Comment

asix66 · 2 years ago
Seems maybe author did not know that this is already built into vim?:

"easy vim", aka evim, or "vim -y". see "man vim"

That said, if modeless editor you are looking for... then vim is not the editor you're looking for. It goes against what vim is, and hamstrings it. Learning vim is a journey, and once comfort sets in, you will understand why, why vim.

danra · 2 years ago
Good to know.

Of course, I did have to google how to quit easy vim.

rgoulter · 2 years ago
> I did have to google how to quit easy vim.

For those who know how to quit vim, but want to experience "how do I quit" again, try running `:term`.

hobabaObama · 2 years ago
for any one wondering

cntrl-o --> to get to normal vim mode

then exit as usual

thih9 · 2 years ago
> It goes against what vim is, and hamstrings it

Not the first, not the last hacky project. Saying that it goes against what it is makes me think of JS V8 being used outside of browser.

Perhaps there are good reasons for not having modeless vim (or server side js for that matter), but the industry overwhelmingly accepts good enough solutions, with good enough results.

Vim go brrrrrr, I guess.

Deleted Comment

cassepipe · 2 years ago
My usual comment on any thread touching vim, as an answer to all hypothetical comments talking about how vim never clicked :

Remap the Escape key to CapsLock else you will never like vim (provided you are a normal person)

It's the most important key and you should punctuate all your inserts with it. So it'd better not be the key that's the furthest away from your fingers. The reason that's the case is an historical accident.

Don't be a victim. Remap.

P.S : Yes, I know about people using Ctrl+[, or Ctrl+C, I know you got used to it but one gets used to anything, it does not mean it's good. A weird combination isn't great and Ctrl + C has some quirks --> https://vi.stackexchange.com/questions/25764/use-control-c-i...

P.P.S : Yes, I know about `jk` it's clever ok but my mapping is system-wide and now I enjoy Escape being at the right spot for bash, zsh, fish, gdb, firenvim vim modes at no configuration cost.

joenot443 · 2 years ago
> Remap the Escape key to CapsLock else you will never like vim (provided you are a normal person)

I think this is great advice for EVERYONE, vim user or not. Someone else made this suggestion on HN some 8 years ago and I haven't looked back since.

CapsLock is essentially useless for modern computing needs, but having a No/Cancel/Quit/Esc button immediately under your left pinky is fantastic. Your brain will get used to it in a day or so, give it a try!

sodapopcan · 2 years ago
Best use for capslock in my book is tap for escape, hold for ctrl.
zeroxfe · 2 years ago
Yes, CapsLock is useless, and I've been remapping it to Ctrl since forever, which serves me a lot more than Esc.
joshmanders · 2 years ago
If I remap CapsLock to Escape, then how will I enable cruise control for awesome mode?

But seriously, I have hitting escape muscle memory engrained, I cannot remap it to any key because I won't ever think to hit capslock even if it's ergonomically "better"

sodapopcan · 2 years ago
> Ctrl+C

...and to try and avoid this being perpetuated as it always seems to: ctrl-c is NOT the identical to escape. Notably is doesn't trigger InsertLeave which means a handful of plugins won't trigger.

I think your advice can be summed up to: Remap esc to something more convenient. My capslock key is tap for escape and hold for ctrl. I use jk for escaping insert mode because why would I want to be a "victim" who has to stretch their pinky even one key when my fingers are always going to rest on JK? ;)

camtarn · 2 years ago
> Remap the Escape key to CapsLock else you will never like vim (provided you are a normal person)

I guess I'm not a normal person then? Never bothered doing the remapping and I've been an enthusiastic Vim user for a decade.

cassepipe · 2 years ago
I don't know you but that is likely.

Most people are not believers and when they find something inconvenient they abandon it. Most people do what most people are doing :-) That's not the case for me. I am a believer, I use Firefox, Signal and vim, not Chrome, WhatsApp or VsCode. And I like it that way. The problem with being a believer is that you tend to downplay issues and that can bite you sometimes. I know because I have been been bothered by Escape being too far away for one whole year and use the weird combo instead. Surely there was a good reason for things being that way but I finally asked it turned out there was not.

Maybe you are the rare person that has very long fingers or whatnot and it's not inconvenient for you but you most likely are a believer :)

MSFT_Edging · 2 years ago
Smacking the escape key constantly is probably my favorite part of using Vim. It has me smacking escape all the time to see what it does in other apps. I love when esc is just mapped to a "stop doing that" or "go back".

Also doing embedded stuff, I find the caps lock key nice for when typing out a few defines or macros.

wruza · 2 years ago
“Doesn’t mean it’s good” doesn’t mean it’s a problem either. Also, people prone to remapping already have their Ctrl there.
carb · 2 years ago
Yeah I use Ctrl far more often than Esc as I'm usually navigating code and reading it vs writing it, so Caps Lock -> Ctrl is more valuable.

Additionally, I use Ctrl outside of vim very frequently as I keep my terminal key bindings native, which means all of the command line control patterns use Ctrl (jump to front, jump to back, cut (forwards/backwards), move by word, reverse search, etc etc)

I'm still of the opinion that Ctrl+[ like the OP said would be mentioned is the best because (1) it's native and (2) it uses both hands so it's almost as fast as hitting a single key and requires no hand contortion.

- 14 year exclusive vim user

cassepipe · 2 years ago
Life can be beautiful we don't have to suffer because it's already there.

Remapping takes less than 5 seconds in MacOs and Linux. 2 minutes in Windows. And you only have to set it up once.

Also my left pinkie never misses CapsLock and I don't even have to think about it. Can't say that's the case for Ctrl+[ which I have used extensively for one year. I am really happy I switched.

crunchbang-excl · 2 years ago
The caps lock key is definitely using prime real estate on a keyboard for something that doesn't get used often.

I have taken to remapping it to a function key, moving caps lock to function+shift. Function+tab is mapped to escape, a combination I can easily press with my pinky alone.

This allows me to map a lot of the keys that would require moving my hand to function+[alphanumeric key], function+i is insert, function+u is page up, function+j is page down, function+r is home, function+f is end, and other such combinations.

I use a keyboard that supports QMK, so all of this customization is on the keyboard, but this could probably be done with software running on the computer, like AutoHotKey on Windows.

JBorrow · 2 years ago
On a Mac you can do this rebinding entirely natively within the system keyboard settings.
trws · 2 years ago
FWIW, my “jk” mapping is also global, as is my C-[ mapping. Karabiner FTW. In all seriousness I haven’t found a way to manage a “jk” mapping that so correctly and quickly handles all cases of input in anything else, on any platform. (Except of course built into the keyboard) Autohotkey can kinda sorta do it, but it takes a lot more code for an inferior result sadly.
dm319 · 2 years ago
Can I suggest going one further and have esc mapped to tap, ctrl to hold. You can also map double escape to :noh in vim, which allows you to quickly remove highlighting.

Deleted Comment

e12e · 2 years ago
But caps lock is remapped to control already! :)
aldanor · 2 years ago
You can have both. Esc on tap, ctrl on hold.

Deleted Comment

bori5 · 2 years ago
WHAT? HOW AM I GONNA TYPE MY SENTENCES THEN!?
arbitrandomuser · 2 years ago
> WHAT? HOW AM I GONNA TYPE MY SENTENCES THEN!? goto visual mode , select region to capitalize , shift - U
hannofcart · 2 years ago
As an old vim graybeard, more power to you.

I'd recommend checking out `vim -y` as well. (And once you try _that_, you'll likely have a question, the answer to which is Ctrl-l.)

To others on this thread decrying this as heresy: leave 'em be. Let everyone use whatever editor flows works for them.

Programming is hard enough without having to conform to other people's beliefs of how _you_ ought to use your own editor!

Deleted Comment

Deleted Comment

alberth · 2 years ago
IBM CUA

I’ve always wondered how different Unix/Linux would be today if decades ago a Common User Access (standardized menu system like FILE | EDIT | etc) had been defined for TUI apps (like how it was for Windows & Mac OS).

Imagine VI & EMacs having the same key bindings due to standards.

https://sqlite.org/hctree/doc/hctree/doc/hctree/index.html#s...

jfoutz · 2 years ago
vi and emacs are prehistoric. Folks now are ok with / and \ and maybe some can deal with : as a file separator.

But in the precambrian era you needed to know about ^ to edit a specific version of a file, because diffs were tracked.

They're both wonderful and amazing and can handle anything, because they had to handle everything when filesystems were like a brand new invention and nobody really knew what was good or bad, so they threw everything in.

Tough to get standards before standards exist.

anticodon · 2 years ago
Power of Vi is that its keybindings are way more ergonomical compared to IBM CUA. If you're a touch typist.

It doesn't make sense to change Vi/Vim/NeoVim keybindings because they're so convenient, composable and easy to remember.

AnonymousPlanet · 2 years ago
That is only the case if you think you have to press Ctrl using your pinky. You can use the side if your palm instead. Then CUA suddenly becomes very ergonomic. Try it. I've done this for over 15 years now across a plethora of different keyboards and also survived several years of Emacs unharmed thanks to it.
lproven · 2 years ago
So very much this. Around the end of the 1980s / start of the 1990s, all the big DOS apps switched their weird proprietary UIs out for CUA ones. Sometimes with an option to go back, but not often. Sometimes with some of the old UI as well, but mostly, big-bang.

And everything was better, the users adjusted, nobody ever looked back and we were all better off.

Sadly the memo never reached the Unix world, and those terrible 1970s are now enshrined as holy writ.

artsi0m · 2 years ago
Emacs has a mode called cua-mode with keybindings thats more simillar to ones from other modern gui programms like browser.
lproven · 2 years ago
It's a tiny tweak that gives something like 1% of the functionality.

The real, useful, working CUA mode for Emacs is here:

https://ergoemacs.github.io/

laserbeam · 2 years ago
I don't think this covers the main reason I only use vim occasionally: it is the only reasonable editor available over ssh by default on all VMs deployed in your typical org. Over there it usually has default settings, and it's not trivial to change configs or install other editors.

Worthy attempt, looks cool, but I'm still stuck with having to learn the basics of moving a cursor around reasonably :(

AlchemistCamp · 2 years ago
You can learn the basics in under 15 minutes.
laserbeam · 2 years ago
I agree with the aurhor of the library.

> Q: Why don't you just learn the vim commands?

> A: I did, but if you don't use vim regularly, you keep forgetting them.

The basics are only useful in vim, and editors that you force into vim mode. Other places one types text into which use the same conventions absent in vim: browser input fields, the url bar, email, office software, random input fields in games (I've seen single file libraries that obey the same conventions of moving across words that you get in office), publishing software, chat clients... Vim is the only outsider, and because I only need it rarely, I forget things and I accidentally use the shortcuts from other software which sometimes break things.

I know enough vim, but I keep using conventions from other software out of habit, and shortcuts do other things. Vim is great editor, but a horrible thing to use by default simply because it was made before text editing ux got standardized.

TuringTest · 2 years ago
And you can forget them in the next 15 minutes. Been there, done that.

As the article says, if you don't use it regularly you'll never learn it by heart, and Vi doesn't have any affordances that will remind you of what you learned by recognition instead of recall.

cassepipe · 2 years ago
You can make it better and remap CapsLock to be Escape. Now you are not constrained to use vim but can actually enjoy using it (and now you can try your fav shell's vim mode and become a command line ninja, imagine going up and down your command history with j/k and searching with your command history with just /)
bharrison · 2 years ago
This is precisely my use case for using vim exclusively, and why I force myself to operate with a minimal config.
bigstrat2003 · 2 years ago
Thankfully you can usually find nano installed, which is an order of magnitude superior to vi(m). If I'm in a shell I want an editor to get in, edit a couple of lines, and get out, which nano excels at.
Aaronmacaron · 2 years ago
> The config files in this repository turn vim into a modeless editor. Instead of remembering cryptic commands, you can use standard key binds, like Ctrl+S to save, select text using Shift+←/→/↑/↓, and copy/paste using Ctrl+C/V.

> This configuration is not meant for the aficionado who prefers vim over graphical editors. This is meant for people who normally use GUI editors (like VSCode), but sometimes need an editor that can run in a terminal.

I think it's unrealistic to expect users who only occasionally use vim to edit the odd config file in the terminal to fiddle with a custom vim setup.

If you're really looking for a good editor that behaves like GUI editors I really recommend micro [1]. It has mouse support by default, syntax highlighting for many languages out of the box, most keybinds are the same as in GUI editors and copy/paste works like expected.

[1] https://github.com/zyedidia/micro

abraae · 2 years ago
I attempted this within a few days of first being exposed to vi - 35 years ago.

But since I was logging into different machines all the time I soon decided it was better to just use vi the way it came out of the box, modes and all. That philosophy has served me well over the years.

sfRattan · 2 years ago
I had a similar realization early after first picking up vim in college: customization of any tool eventually hits a point of diminishing returns beyond which further alterations reduce your ability to use the tool in its default state. It's an insight I've found applies to almost any tool... From software to hardware and beyond.

Master the default behavior of a tool, and then improve your effectiveness with customization, but not so much customization that you can no longer use the tool effectively in its unmodified state. Sometimes you have to use other people's tools, and it's important to still work effectively when you do.

alentred · 2 years ago
I agree with this very much! I learnt it the hard way: my experience with many powerful tools, Vim included, was to learn the basics first, customize it to the point where you can't recognize it anymore, and then finally strip it down to the basics again, keeping only the configuration that doesn't prevent me from using the the raw features.

I used to manage complex "dotfiles" and scripts to configure a new computer, etc. I still technically do, but they are much more simple now. I just don't want to spend my time on configuring the stuff anymore, and appreciate the out-of-the-box experience much more. This by itself became a criterion when choosing new tools, frameworks, etc.

livrem · 2 years ago
I used to think like that, but 10 years ago I decided to create a git-repo for my .emacs.d and started configuring beyond the most trivial settings (and including all dependencies in the repo too). Diminishing returns? Not sure how to measure. Editor configuration was never anything I did because I thought it would somehow save time, as some seem to imply, but rather just about removing sharp edges and making the experience of editing files nicer. With everything a quick git clone away it is rare that I have to work without my configuration.
ttyprintk · 2 years ago
I totally agree, but we should concede that the defaults need to accommodate the next billion users instead. I propose that a distribution ought to have the right to:

- Easy-mode as sensible-editor

- runtime mswin.vim, set nocompatible, etc as the skel vimrc

These are easier to change than driving new users to Google “how to exit vi”.

But remapping Ctrl-O, like this post, is a breaking change.

rand0m4r · 2 years ago
Speaking about mswin.vim which does mostly what this does: what's the point of this project.
augusto-moura · 2 years ago
Do you remember which plugin/project you used at the time? The one being linked looks pretty recent [1]. Are there any other implementations?

[1]: https://github.com/SebastianMuskalla/ModelessVim/blob/main/L...

csdvrx · 2 years ago
> But since I was logging into different machines all the time

We now have actually portable executables (multiplatform, multios) that contain their own config file: you can just scp 1 binary and be done with it.

pastage · 2 years ago
Do you have a link to this? It is not always possible, arcane non x86 arches, low bandwidth connections, but time is the big thing. A binary upload just to change some lines in a machine on the other side of the world. I am lazy.