Live data from Hacker News

Modeless Vim

github.com

181–190 of 398 posts

Re: Modeless Vim

#181
post #46

Earlier quoted context omitted.

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

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

We should concede that /etc/profile ought to disable that with stty by default.

Re: Modeless Vim

#182
post #147

Earlier quoted context omitted.

That's why I think MacOS is superior: it actually uses the "meta" key for useful stuff. So, Cmd-W would close the tab, and Ctrl-W would probably still delete a word (can't check right now, but it has a lot of 80s-era keyboard shortcuts for text still working)

macOS uses a lot of Emacs bindings. Ctrl-a for beginning of line, ctrl-e for end, etc etc. And, agreed, macOS' use of shortcuts is fantastic and I wish I could replicate it on Linux.

If you use gnome/xfce:

    gsettings set org.gnome.desktop.interface gtk-key-theme "Emacs"

    xfconf-query -c xsettings -p /Gtk/KeyThemeName -s Emacs
Try both commands.

Re: Modeless Vim

#184
post #46
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.

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

Remapping Ctrl-O denies the ability to switch modes. That’s what turns this from simply an opinionated config to a breaking change.

Re: Modeless Vim

#185
Does anybody really struggle so much with vim that in the occasional circumstance they have to quickly edit files on a remote server, they are totally brickwalled, and need to install a total conversion config?

That seems insane to me. A few years ago I decided to "get good" at vim, and I learned a handful of new tricks. A few new ways to select text, macros, new ways to navigate, etc. But before that, I was perfectly capable of navigating documents and editing them with the arrow keys, just using "i" and "".

It seems like the only person for whom this would be helpful is someone who has no clue what vim is, and doesn't understand modes at all. That kind of person is likely not going to be able to even find this repo, let alone install the configuration.

Re: Modeless Vim

#186
post #42

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.

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.

Re: Modeless Vim

#187

Earlier quoted context omitted.

Modes are the core concept on which Vim's design is structured. They organize both the interface and the user's mental model of the text editing process. I did a quick case-insensitive search over Vim's help files, and they matched 'mode' 4470 times. The first thing you must learn (to use Vim) is that it is modal. And this detail really tends to stand out when first meeting Vim. I think "modal" is a nice word to conc…

There are 13875 matches for mode in the Emacs docs. Modes are even more foundational to Emacs than to Vim. A new user will encounter a dozen modes by simply starting to use Emacs for a few minutes. Every buffer has a major mode, and there can be many minor modes enabled per buffer or globally. The entire editor is built on a tree of modes, all inheriting from the aptly named Fundamental Mode. At a basic level, each m…

Emacs uses the word "mode" to mean something different than Vim does.

An Emacs "mode" corresponds more closely to what Vim calls "plugins" (Emacs's "major modes" are like Vim's "filetype plugins", and Emac's "minor modes" are like Vim's other "plugins").

Vim's modes are more foundational in the sense that all Vim plugins are structured and organized in terms of the same set of modes. The core of Vim is the modes (insert, command, etc.), which are then customized. Emacs calls the customizations themselves "modes".

I don't consider Vim's definition of "modal" contrived, and I don't consider Emacs to be "modal" in the same way (though you can of course customize it to be).

Re: Modeless Vim

#188
post #139

Earlier quoted context omitted.

Well, reasonable people can have different, even more reasonable explanations for that 'fact'! https://news.ycombinator.com/item?id=25099049

[flagged]

Personally, I find it a bit tiring that the usual response coming from the vim userbase towards someone not liking vim is either a) you obviously didn't learn it well enough, or b) you must be a bad programmer.

Sure, vim is a great tool, but it's just a tool. You're perfectly allowed to not like it and/or prefer to use other tools.

Re: Modeless Vim

#189

Earlier quoted context omitted.

You can make it with homemade butternut squash puree too, and it will taste better because of its sweetness. Give it a try sometime.

That’s a butternut squash pie, not a pumpkin pie. ;) Try with pumpkin, nutmeg, cinnamon, and cloves… it’s that old timer pumpkin pie taste.

In Australia it’s known as “butternut pumpkin”. Anyway I always used kabocha squash.

Re: Modeless Vim

#190

> Instead of remembering cryptic commands I use vim and nothing about its commands are "cryptic" to me. You want to "go to definition"? You press "gd" as in "(g)o to (d)efinition". What's cryptic about this?

Exactly. The whole reason I use vim is because it's like a conversation. If you want to talk about cryptic shortcuts, look at IntelliJ. Why should Ctrl+B be Go to Declaration?
Post reply on HN