I've been using Vim/Neovim for 20 years, but still can't get enough of which-key[1] which I only installed ~6 months ago.
So, ergonomic or not, some people do prefer the default -- at least one person :).
Then think about the basics: why some of the most frequently used commands w/b are located so inconveniently and far away from each other (and if you reconfigure them, how unergonomic the config language is where instead of reading a sensible name like 'move_prev_word_start' you can only reference 'b' that you'd never use since, well, you've changed it to something else!)
Letters w and b may be located wherever they are located, if you can not touchtype vim is not for you for the same reason we do not learn how to run before we master how to walk.
vi (the editor) is ergonomical because I use to touchtype and vi lets me to never put the hands out of the keyboard (typically its 3 rows but vi made me to learn the 4th row with digits).
vi (the system of text moving commands) is ergonomical because it has all what might be needed right from default.
I recommend you to start exploring vi from the following 4 commands to understand at least what kind of operations can be possible - w, b, e, ge. I promise there are some ergonomics in having all the 4 ways of one word iterating problem. After understanding what did I mean you are free to see some logic in _any_ vim command. (hint - pairness, there are almost no command without at least one complement pair).
Also there is a thing called "UNIX way" (all sayings about how one thing has to do only one task) and damn, vi clones are one of the most ergonomic programs on my PC. After mastering touchtyping using keyboard gives me pleasure, after mastering vi motions doing text editing gives me pleasure as well. Achievability of this kind of pleasure is what I call ergonomics.
GUI editors with modal windows and stealing-focus popups have too much power to destroy my pleasure from the dialogue with the keyboard.
Again, how can you promise anything if you're ergonomically blind? Take you w/b pair - this is just a dumb binding, these are two of the most frequently used commands in vim, yet they are not positioned in the most convenient location (hint: home row). The Word/Backword menmonic isn't paired (that would be forward/backward), but more importantly, it makes as much sense as binding cursor keys to Left/Up/Down/Right So it fails your own "pairness" criterion in its most basic movement!
> Achievability of this kind of pleasure is what I call ergonomics.
Of course you have your own personalized definition! Why would you use that in a conversation with others, though, when they're more likely using a more common one?
> there is a thing called "UNIX way"
it doesn't do its one thing "well", so as expected, you can't paper unergonomics over with some "philosophy"!
> The Word/Backword menmonic isn't paired (that would be forward/backward)
What is paired is not a mnemonic but an action. If you start to understand that any command has a complementary command it makes your expectation from vi predictable. It happens in the following way: you learn how to do some moving you are needed, then you check the complementary action (there are 3 layers of complementarity in the word iteration problem: forward/backward, cursor on start/end and word/WORD), then you just make your muscle memory to learn what you saw, that's all!
> but more importantly, it makes as much sense as binding cursor keys to Left/Up/Down/Right So it fails your own "pairness" criterion in its most basic movement!
My thesis is that if the editor can move the cursor left then it must have an ability to move it right (and vice versa), if the editor can move the cursor upwards, then it must have an ability to move it downwards (and vice versa), nothing more. You are talking about some very specific ways to move cursor (there are plenty of them in vim to be honest) and BTW if you are comfortable with cursor keys, so why have you complained about w/b which are not laying on the home row? The home row story is about your hands laying on the keys with letters and controlling all 4 rows, not about your right hand laying on 4 keys and your left hand can not control anything except esc/meta/alt/ctrl/shift.
> Of course you have your own personalized definition! Why would you use that in a conversation with others, though, when they're more likely using a more common one?
Ergonomy is the Psychiatry domain, BTW we are not discussing ergonomic per se. We are discussion about achieving erconomic with only having some well-known instruments: keyboard, console software, display. Of course your definition of ergonomic (which you did not worked to write down here) is about wearing a hat which just reads your thoughts and outputs the correct result, but I tell you about some ways of achieving ergonomics on the hardware you obviously have, I don't tell about dreams of perfect world.
> it doesn't do its one thing "well", so as expected, you can't paper unergonomics over with some "philosophy"!
I promise I do not lie, I am teaching some people offline to touchtype and to use vi(m), but I can not teach you if you don't even ask questions. I write this comment because I work on a book about vi for noobs and I will never get tired to introduce people to see some ergonomics in the things I love which seems obscure to them. For example, if you didn't fire a single bullet you will never see what firearm products are ergonomic and what are not. If you didn't fire a single bullet towards the real enemy you can consider AR (full of bells and whistles) as ergonomical, while in reality what is ergonomical is AK (doesn't jam under the rain, doesn't afraid of the mud, allows to fire knippels against the drones instead of regular bullets). If you have never danced Salsa, you will never understand how the lead is leading and why the follower follows.
PS. Sorry for my bad English, this is not my native language and I am too lazy to polish my grammar with some modern tools. Sometimes I might misunderstand you or write down not what I really think.
Bonus is once you get used to defaults, almost every server has a Vi installed whose basic features you can use.
I agree with this, but being able to ssh into a server and just grab Helix instead of copying over my Vim config and whatever else it depends on is really nice. Makes your dev env feel a lot more portable (although also more barebones than a crazy Vim config)
Currently i just use sshfs to mount whatever directory i want to work on locally, nice to have all lsps available and also see my changes reflected on the server instantly.
I’ve been trying to get a working language server setup (so I can do things like “go to definition”) and getting a setup that feels good in Vim or Neovim just felt like too much work.
I'd be more than happy to help you configuring it to your needs.
I had to get my project to emit compile_commands.json, get clangd, figure out which things about our build process clangd was not understanding from compile_commands.json and add them in .clangd. All to achieve a level of functionality significantly jankier than just opening the damn .sln file in Visual Studio.
Once I did all that it was, as you say, very little actual stuff written in my .spacemacs. And probably could have been less if I had felt like figuring out how to get my windows emacs to find clangd on the path instead of giving up and just specifying full paths to everything.
I only persevered because emacs (unlike Visual Studio) gives you all the necessary access to its internals to build LLM Tools around its LSP functionality.
Edit: upon further thought, I don't like having to move my hand to the arrow keys to select from the auto complete list, even if there is only one thing and then hit enter, rather than hitting tab to pick whatever is left.
ctrl-n and ctrl-p should let you select next and previous from the autocomplete menu while avoiding the arrow keys.
> I had to get my project to emit compile_commands.json,
> get clangd, figure out which things about our build
> process clangd was not understanding from
> compile_commands.json and add them in .clangd
That sounds rough. This is anecdotal, but in
my Linux corner of the world, ccls has been
an easier user experience as a C and C++ LSP
since I've never had to resort to messing with
flags in the generated file.I haven't used clangd myself, though, so I can't say either way, I just know ccls works well.
By convention I tend to have the generated build system in build/ at the top-level of the repo so that the file is at build/compile_commands.json. That, or I'll arrange to have a symlink there pointing to one generated elsewhere.
The nvim snippet I use in my init.lua to setup ccls to work in that scenario is:
vim.lsp.config('ccls', {
init_options = {
compilationDatabaseDirectory = 'build',
},
})
vim.lsp.enable('ccls')
My actual config does also contain a capabilities = ... argument that forwards the default_capabilities() from nvim-cmp, but you get the point. I hope that helps in case you're curious to give neovim another spin.Lacking LSP didn't stop me from using spacemacs, though. Oh, no. emacs has an auto-complete mode that just chooses from a pool of symbols already present in open files and that turns out to be Good Enough for me to prefer editing code there vs Visual Studio, IntelliSense be damned.
My employer furnished me with a beefy enough workstation that I can have Visual Studio open (to semantic search the whole codebase for stuff I don't already known where to find and to build/run/debug) alongside emacs (for editing and general code browsing when I know where definitions live).
1. Install nvim-lspconfig plugin
2. Add `vim.lsp.enable("clangd")` to init.lua
You can even enable LSPs on a per-project basis by taking advantage of the revamped exrc feature:
1. Add `vim.opt.exrc = true` to init.lua
2. Add `vim.lsp.enable("clangd")` to $projectdir/.nvim.lua
Obviously do whatever works for you. But I do feel like most LSPs shouldn't need more than a few lines that you set and forget.
Counterpoint: the sequence should only have an opportunity to be "unfinished" if there's actually a choice to make. Showing too many choices at once can be overwhelming and in the Vim environment there are usually a ton of choices. Consider for example if I input `n10` in editing mode; that could be followed by all kinds of repeatable actions and it could be followed by another digit of the count.
I don't get it, there is always a choice to make, which is which action to continue with?
> Showing too many choices at once can be overwhelming
It can't be more overwhelming than having to remember all of those choices and using external docs/configs to look them up! Besides, it's not like there are no improvements possible and you have to show everything at once. For example, all your "all kinds of repetable actions" can be limited by the most frequently used 10 actions and an "others" submenu you could invoke separately if you were looking for something else. And your "another digit" is just a single line "0-9 continue the count", so what's the issue there?
The point is that if the input for a command is XY, there had better also be an XZ. Otherwise XY should just be X.
It's bad UI design to have the user input X and then wait for Y before doing anything when there is only one intention the user could actually have in mind. Having a popup say in effect "hey, I'm not going to do anything until you press Y" is not an improvement.
That's obviously false, the second possible intention is... cancellation. For example, you can bind Q,Q to quit the app (and no other key is prefixed with a Q), but then you could press Q mistakenly or change your mind at the last moment.
But you continue to argue with your own strawman - nothing about helpful popups changes the underlying behavior. So if your magic design is to run XY just on X press, that would be bad design, but you can still do it! And the popup will never appear because the action is complete, so no help needed.
> Exactly! Pity this basic contextual help isn't more widespread, every single app that uses a lot of keybind sequences could benefit from it, especially if it becomes a bit smarter and only shows a popup if you don't finish the sequence right away
I agree 100%. This would be helpful in so many places. That was my favorite part of the article -- one little paragraph and screenshot, but it made me desperately crave that feature almost everywhere. I agree that it'd need to be smart about it -- after a timeout, as you mentioned, is a great idea. That way it can stay out of your way if you know what you're doing, and only pop up when you hesitate.
> Customizable Layouts: choose from classic, modern, and helix presets or customize the window.
LazyVim keymaps: https://www.lazyvim.org/keymaps
Strange approach to data loss, since it doesn't have persistent undo, you can't just reopen it to the same editing state?
> After using Vim/Neovim for 20 years, I’ve tried both “build my own custom configuration from scratch” and “use someone else’s pre-buld configuration system” and even though I love Vim I was excited about having things just work without having to work on my configuration at all.
I don't really get it given how primitive the resulting Helix config is (I mean, even the most frequent commands are based off the mistaken unergonomic w/b defaults), presumably you would've been able to replicate it comletely in the first X years of using vim, and then there is no hell anymore?
> little help popup telling me places I can go. I really appreciate this because I don’t often use the “go to definition” or “go to reference” feature and I often forget the keyboard shortcut.
Exactly! Pity this basic contextual help isn't more widespread, every single app that uses a lot of keybind sequences could benefit from it, especially if it becomes a bit smarter and only shows a popup if you don't finish the sequence right away