Live data from Hacker News

Modeless Vim

github.com

311–320 of 398 posts

Re: Modeless Vim

#311
post #228

Earlier quoted context omitted.

Does it have syntax highlighting for the same amount of languages as vim does, out of the box? I just installed nano-7.2-1 and opened a HTML file with `nano test.html` and it opened without syntax highlight, I can see the point in authors endeavor if syntax highlighting out of the box is what they're looking for.

I mean vim does the exact same thing; you have to turn on syntax highlighting…

For reference: https://www.tuxarena.com/static/tut_nano_syntax.php

Re: Modeless Vim

#312

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 a…

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

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 :)

Re: Modeless Vim

#313

Personal anecdote: I've used Vim for many years, but I never progressed much beyond the basics, because I almost never put much active effort into learning more advanced motions. About a year ago, I discovered the Helix editor, which has a (IMO) genius feature, where pressing a key to start a motion or other action pops up a little pop-up box that shows all the possible options. It just perfectly clicks with my brain…

[deleted]

Re: Modeless Vim

#315

Earlier quoted context omitted.

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.

What's fun about this is that I was taught from my mother, and her mother before her, to use Butternut Squash when making "pumpkin pie" from scratch. This "tradition" of using Butternut Squash instead goes back to the 1930s at least.

Some areas have different ingredients depending on what’s available. Here in the United States, real pumpkin is preferred. You can use any gourd to make a pie but for the true pumpkin pie aficionados like myself, I can tell the difference when someone uses real pumpkin vs butternut squash vs sweet potato vs just creme, eggs, and brown sugar and some flour (I’m looking at you, Wegmans).

In the southeast coast of US, if you make a “pumpkin pie” with squash, you won’t be invited back next year.

Re: Modeless Vim

#316

Personal anecdote: I've used Vim for many years, but I never progressed much beyond the basics, because I almost never put much active effort into learning more advanced motions. About a year ago, I discovered the Helix editor, which has a (IMO) genius feature, where pressing a key to start a motion or other action pops up a little pop-up box that shows all the possible options. It just perfectly clicks with my brain…

Emacs has something similar in which-key. Of course GUI apps have had pop-downs from the File-Edit-View-... row [since forever?] so that things like Alt+F will show contextual actions. But at least in the Emacs community people get blown away when someone makes such a basic addition.

In Emacs, you can also insert C-h in a key combination. So you can do the basic things like

  C-h k   to pull up the help for a key combination
  C-h f   for a function 
  C-h v   for a variable
  C-h m   for currently active modes
But you can also do things like this:

  C-c C-h   to pull up every key combination that starts with C-c
Emacs has excellent discoverability out of the box thanks to this.

Re: Modeless Vim

#317
post #253

Earlier quoted context omitted.

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.

What do you do when you need Ctrl in non-vim contexts?

I just press Ctrl ?

But frankly I don't use Ctrl that much. Ctrl + L/K in Firefox (I use vimium but I prefer the native bar) And I have Ctrl + J/K to switch terminal tabs In vim I only rarely use Ctrl + I/O

Re: Modeless Vim

#318
post #302

Earlier quoted context omitted.

Best use for capslock in my book is tap for escape, hold for ctrl.

Where do you map it that way?

As my sibling commenter said, use Karabiner Elements if you are on macos. Though it's not an out-of-the-box thing.

Add this config to ~/.config/karabiner/assets/complex_modifications/custom-capslock.json

    {
      "title": "Change caps_lock to Esc and Control",
      "rules": [
        {
          "description": "Post Esc if Caps is tapped, Control if held.",
          "manipulators": [
            {
              "type": "basic",
              "from": {
                "key_code": "left_control",
                "modifiers": {
                  "optional": [
                    "any"
                  ]
                }
              },
              "to": [
                {
                  "key_code": "left_control",
                  "lazy": true
                }
              ],
              "to_if_alone": [
                {
                  "key_code": "escape"
                }
              ]
            }
          ]
        }
      ]
    }
and then in the GUI enable it in the Complex Modifications tab. Last you need to map "capslock" to "left_control" in the Simple Modifications tab.

Re: Modeless Vim

#319
post #37

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.

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.

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

Re: Modeless Vim

#320
post #105

Earlier quoted context omitted.

In most countries outside the US, squash is called pumpkin.

> In most countries outside the US [and Canada], squash is called pumpkin.

If you actually want to be pedantic, note that I did not say all countries, therefore my original statement was just as correct as your edit.
Post reply on HN