Live data from Hacker News

Modeless Vim

github.com

301–310 of 398 posts

Re: Modeless Vim

#301

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…

Of course, Spacemacs provided this functionality out of the box ten years ago using evil-mode (which is actually vim, so all the motions work in vim too, not just some of them) and which-key ten years ago and it's simple to set up in vanilla Emacs too, even for a beginner (I know because this was the path I took as a beginner)

Spacemacs is a good project, but it certainly isn’t easier to set up than helix. Helix literally requires zero configuration to enable this functionality.

Re: Modeless Vim

#302

Earlier quoted context omitted.

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

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

Where do you map it that way?

Re: Modeless Vim

#304

Earlier quoted context omitted.

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

Yes, CapsLock is useless, and I've been remapping it to Ctrl since forever, which serves me a lot more than Esc.

It can be both if you care to. You don't have to choose

Re: Modeless Vim

#305

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.

You can also use Hydra for Emacs.[1] Once I discovered how to configure Hydra, I made it a habit to make one for every new major mode I need to use.

[1] https://github.com/abo-abo/hydra

Re: Modeless Vim

#306
post #224

Modeless Vim. I guess that’s a bit like a peanut butter sandwich with no peanut butter. But if that’s what you want, more power to you.

I struggle to think what person, whom doesn't interact with nearly frequently enough, would pull down this to repo just for when they may/might interact with vim

Re: Modeless Vim

#307
I tried to create something equivalent to this for a long time. I’m used to normal text editing controls, so there’s no reason for me to learn Vim’s controls. But Neovim’s syntax highlighting and other features are best in class. (I was using Mac, and so wanted to use command instead of control, which requires cooperation from your terminal emulator, adding another layer of complexity.) I got extremely close; but there were constantly little things missing that I expect from native text fields.

I gave up and switched to Sublime Text, and haven’t looked back. The advantage of an “in-terminal” editor is really just not having to break flow to edit a text file, and Sublime is so fast and simple that it works great for editing files outside of a project. Even over SSH (with RemoteSubl) or for writing git commit messages. I can share config details if people are interested.

Re: Modeless Vim

#308
post #182

Earlier quoted context omitted.

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.

Very cool!

I also want to use Command (Super or Hyper?), which really improves keyboard shortcuts. Command + left/right = jump to beginning or end of line, Option + left/right = jump to beginning/end of word. I know you can do the same with Control + Shift, but some apps don't support it. Plus Cmd+c/x/v for copy/cut/paste works fine in terminals, I don't have to remember to "code switch" my shortcut "language". Cmd+Backspace deletes the whole line, etc etc.

Re: Modeless Vim

#309
post #225
post #217

Earlier quoted context omitted.

The main difference between Vim and Helix is that Helix is not hackable at all. Its configuration allows only very basic settings. It is impossible to change almost anything in its behaviour. So it focuses on being good out of the box. Whether it succeeds or not is for everyone to judge for themselves.

Seems at least extensability is on the mind of the Helix team: > There’s two prototypes we’re exploring that could potentially exist side by side: a typed list/ML-like implementation for scripting and a Rust based interface for things that require performance. Could potentially run both in wasm but I’m personally a bit unhappy with how big wasm implementations are, easily several orders of magnitude compared to the e…

https://github.com/helix-editor/helix/pull/8675

Re: Modeless Vim

#310
post #217

Earlier quoted context omitted.

The main difference between Vim and Helix is that Helix is not hackable at all. Its configuration allows only very basic settings. It is impossible to change almost anything in its behaviour. So it focuses on being good out of the box. Whether it succeeds or not is for everyone to judge for themselves.

I think Helix have gone the right way around with their priorities. They've started by making the right things built-in that most developers would need on a day-to-day basis. It's already better than configuring vim/neovim in that regard as it just works out of the box. An example is having Tree-Sitter and LSP already configured, so you get the best syntax highlighting available, and IDE-like functionality. The custo…

I think they went the right way too, and I say that as someone who mains heavily-configured Emacs. I like installing Helix in a fresh environment by just bringing the .exe and being able to get right to work with all the features I need.
Post reply on HN