7 ms·
Workman Layout for Vim
- johncoltrane 3y agoThis makes no sense. It is _meaning_ that bounds certain Vim commands to certain keys, not the position of the keys on your keyboard. Moving the keys around doesn't change their meaning—"w" is still "w", for "word"—so making all those mappings is utterly pointless. Unless one uses a layout different from that of their physical keyboard, in which case WTF?
- linsomniac 3y agoI believe the issue boils down to qwerty-hjkl become workman-yneo. hjkl don't have _meaning_, it's all about their specific location on the keyboard. So if yneo is now left/down/up/right, you now need to do something else for yank/next/end/open.
- johncoltrane 3y ago^H, ^J, ^K, and ^L _had_ meaning and that meaning is why hjkl do what they do. Their location on the homerow of a number of layouts is an accident. And they are not very useful in practice anyway. "Remapping" the whole keyboard around them is IMO a silly idea.
- linsomniac 3y agoHow do vertical tab and form feed relate to "up" and "right"?
- johncoltrane 3y agoYou would have to ask to the engineers at Lear Siegler who made that decision many decades ago. That choice and the subsequent decision to print the arrows on the corresponding keys of a single model of their product line are why we got hjkl for cursor movement in Vi first… and now seemingly everywhere.
- eimrine 3y agoI would like to suppose this is what Home and End does on any modern keyboard.
- lupire 3y agoNope. hjkl are arrow keys. https://catonmat.net/why-vim-uses-hjkl-as-arrow-keys https://catonmat.net/why-vim-uses-hjkl-as-arrow-keys
- johncoltrane 3y ago"hjkl are arrow keys" because the arrows are printed on them and the arrows are printed on hjkl because pressing ^H, ^J, ^K, and ^L is what moved the cursor on the screen of the ADM-3A.
- lupire 3y agoYes, and H, ^J, ^K, and ^L is what moved the cursor on the screen of the ADM-3A because they are on the home row.
- eimrine 3y ago> ^H, ^J, ^K, and ^L _had_ meaning I can parse only High and Low which is what ^H and ^L do.
- johncoltrane 3y agoOn the ADM-3A, moving the cursor on the screen was done by pressing ^H, ^J, ^K, ^L. The convention had been established by no-one-knows-who at Lear Siegler even before that specific terminal model came out.
- 000ooo000 3y agoI'm not the author but have been on Workman and Vim for about 8 years. I don't think the meaning matters at all outside of the initial learning phase. Now it's all completely "muscle memory"; having to think "I want to move a word along, word starts with 'w' and 'w' is the key for moving a word along" would annihilate any efficiency modal editing gives. When I'm using Vim, it's just a matter of "I want the cursor there and I know this particular finger movement does that". I remapped probably Vim 10-15 keys 8 years ago, no issues so far.
- 000ooo000 3y agoIf anyone is interested on what I remapped, I deviated from HJKL for motion to JKLI (NEOI on Workman). I use space/shift+space for insert entry/exit, so losing I to a motion command was a nonissue. I then just mapped what NEO was to JKL. Wasn't a big deal surprisingly.
- teo_zero 3y agoIt's not all black or white. While most mappings are dictated by meaning, some are instead were chosen for their position, eg. hjkl, or relative position, eg. ? is the reverse of / just because in the US layout they are on the same key.
- eviks 3y agoIn reality there is very little meaning, there is just this false sense there is that keep all these bad defaults in place. Like, is it word forward or word backwards? W doesn't tell you. So if you're used to qwerty W it makes perfect sense to keep the much stronger muscle memory intact when switching layouts and use non-W in the same spot
- lawn 3y agoIt does make sense because Vim by default is forward looking, so `w` moves forward a word and the secondary effect is to move backward with `W`. As another example `diw` reads "Delete Inner Word", or `dap` reads "Delete Around Paragraph". It's way easier to just learn the new new keys and rely on the mnemonics IMO.
- eviks 3y agoStill doesn't, the forward looking part is misapplied for movements where you have both directions in separate keys (this principle could work for ops similar to tT (forward by default, backward shifted)), just like you can't explain why B is moving backwards by Words, not characters or something else (is there another important context you need to know that "vim is word looking by default"?). Or why it's not Below to move down And in your D example your skipped the first part - why is it not delete forward/backward by character/word? Why is it not Dump for paste just like there is this weird Yank for copy? Why not Do to execute some command? Or maybe D should do something tied to its looks. After all X is delete based on visual mnemonic of crossing something out It's even easier to learn relying on physical position mnemonics (like of your index J is go down by line, then go down by page is also index, but lower, so M). Or have adjacent fingers move left/right just like they move in cursors (Btw, letter based mnemonics are also not useful for most of the world since they're tied to English)
- lawn 3y agoJust because you could apply a different meaning to a character doesn't change the fact that some meaning, once learned, is more helpful than only relying on physical positions. Combining meaning with a physical position is even more superior than purely relying on one approach. And to me, it was far easier to switch layout while relying on mnemonics than on key position, and this continues to be true even when I add new keybindings now when I switch between multiple layouts. Maybe other brains works differently though.
- nanis 3y agoThis[1] links to http://www http://www. workmanlayout.com/blog/ which is a 404. (space inserted to avoid auto link generation). Going to the main page of that site reveals some articles from the past few years, but also has online casino and crypto links disguised as posts. E.g.: > is your premier source for crypto insights, covering the latest news, trends, and guides on blockchain, cryptocurrencies, and cybersecurity. Whether a beginner or a pro, you can find valuable information and tips to stay ahead in the Web 3.0 era. Weird and shady. I keep seeing all these people fancy keyboards and interesting looking layouts except that it takes them six to 10 attempts to type anything correctly. Don't really get the point, but having got curious about this "workman" layout and regretted trying to find out. I was thinking of a pane layout manager ... Anything like that around? [1]: https://axiomatic.neophilus.net/workman-layout-for-vim/ https://axiomatic.neophilus.net/workman-layout-for-vim/
- deleted 3y ago[deleted]
- jay3ss 3y agoYour first link is broken
- rustyminnow 3y agoCyber criminals use wordpress vulns to inject spam into old blogs. That doesn't make it less weird and shady, but might explain why it's weird and shady.
- sanswork 3y agoI touch typed qwerty for about 20 years using really bad technique(full left hand two fingers on right that roamed). When I got my first split keyboard I switched to Colemak and went through a bunch of touch typing tutorials to teach myself proper form. Without switching layouts I don't think I could have forced myself to start using proper form in qwerty.
- breckenedge 3y agoSame as you. I switched to ColemakDH for a while and noticed that it improved my Qwerty typing speed.
- jacknews 3y agoThis is a problem with alternative layouts - you have to relearn or remap all the shortcuts for different apps as well as learn the new alphabet locations. Shortcuts sometimes use mnemonics, eg p to print or whatever, but they're often just in particular locations, like V for paste for example - it's just next to 'C' for cut - so if those two keys are separated on your new layout, it's confusing, and in any case, does it matter that it's 'C' for cut - just using whatever keys are in those two locations is so ingrained in muscle memory that they should be remapped. The other issue is that most of these alternate layouts are optimized for writing prose, and sometimes make other things, code, for example, more difficult.
- drekipus 3y agoThis is why something like colemak-dh is preferred. Keeps the "location shortcuts" where they are, but moves the others, and is by far the most comfortable writing experience I've had
- sanswork 3y agoI use Colemak on my split keyboards (qwerty on my laptop and regular keyboards) and am a vim user. I just have a layer that has all my common programming symbols on my left hand and switches the homerow on the right hand back to qwerty so I can use vim navigation and it works seamlessly.
- teo_zero 3y agoI think ctrl-x, ctrl-c, and ctrl-v should have never existed. So difficult to press, for such common operations! While we still have prominent keys for rarely used functions, such as capslock, insert, etc. I have fond memories of those Sun keyboards with dedicated cut, copy and paste keys...
- pram 3y agoI’m into some pretty obscure keyboard layouts, you’ve probably never heard of them.
- ndeast 3y agoLast year during a couple month break I had between jobs I decided I would learn a new keyboard layout as it was something I always wanted to do, but never wanted to commit to the learning process while I still needed to be proficient at typing. I chose to learn Colemak-DH [0]. Before learning I was around a 75-80 WPM Qwerty touch typist. I went all in and did a lot of heavy practice. It took me around a week to be able to touch type colemak-dh (slowly) and then a further few months to touch type at speed. I didn't want to lose my ability to use Qwerty so after getting up to a moderate speed of ~45 WPM I exclusively brought my colemak flashed happy hacking keyboard to work, and left qwerty at home. I have now equalized at about 60 WPM on both layouts after 8 months, and can pretty easily swap between them. Now I don't really know what to do, nor have I noticed really any perceived benefit of switching layouts. The biggest difficulty has been vim keybinds. I really don't want to have to remap all of my vim keybinds (as like the OP article states, I think of my vim commands based on their name and qwerty representation) so I have been relying on multiple keyboard layers to handle movement keys and the like. Having to use modifiers, remember the different locations between layouts, and stealing away previous CTRL+<key> modifiers from vim to accommodate this kind of sucks. I notice no difference in wrist (dis)comfort, it's just become more mental overhead to typing, and I am kind of stuck. I guess I am waiting to have some time to think about what I want to do, but balancing two layouts doesn't seem practical, or reasonable, or efficient. [0] https://colemakmods.github.io/mod-dh/ https://colemakmods.github.io/mod-dh/
- willbush 3y agoYour story is similar to mine. I also use Colemak-DH. However, I sort of quit Qwerty cold turkey. I also used to touch type about 80 wpm on Qwerty, and because I didn't maintain it or practice while learning Colemak, I completely overwrote my muscle memory. Overall, the layout is more comfortable for me, but hard to justify especially if you rather not tamper with default keybindings. I'm also a vim keybinding user, but in Emacs evil-mode mostly. Vim keybindings are definitely made for qwerty, and to me not rebinding the keys just seemed insane. I ended up spending a weekend, reviewed all the keybindings I use, and ones I should probably use more, then wrote it all out [0]. I remapped a lot of keys back to their qwerty positions, but I also took the opportunity to make some changes that I thought would be more ergonomic. I also came up with me own mnemonic system for the re-mappings. For example: | function | before | after | new mnemonic | Commentary | |-------------------+--------+-------+-------------------+--------------------------------------------| | find file at pt | g f | g s | search file at pt | need to free up `g f' | | find file.. w/ ln | g F | g S | search file.. etc | need to free up `g F' | | end WORD | E | F | far WORD | foot/forward are other possible mnemonics | | end WORD | g E | g F | far WORD rev | foot/forward are other possible mnemonics | | end word | e | f | far word | | | end word | g e | g f | far word rev | | | find | f | s | search | right next to till :) | | rev find | F | S | rev search | | | visual mode | v | r | range | see note below | | visual lines | V | R | range lines | | | visual block | C-v | C-r | range block | | | visual restore | g v | g r | range restore | | | replace | r | v | revise | convert is another possible mnemonic | | replace mode | R | V | revise mode | | | goto mk | ` | j | jump | easier to reach and now mnemonic | | goto mk ln | ' | J | jump to line | same key as j now, which makes sense to me | Here is a minimal vim config [1] that I use if I find myself wanting to use (neo)vim. My evil-mode config [2] in Emacs. Remapping `less` keys [3]. [0] https://github.com/willbush/system/tree/main/configs/keyboard-firmware https://github.com/willbush/system/tree/main/configs/keyboar... [1] https://github.com/willbush/system/blob/main/configs/nvim/init.vim https://github.com/willbush/system/blob/main/configs/nvim/in... [2] https://github.com/willbush/system/blob/82253534b92f3ab87d8e6a3c241f59a0d9414cbe/configs/emacs/default/modules/init-editing.el#L105 https://github.com/willbush/system/blob/82253534b92f3ab87d8e... [3] https://github.com/willbush/system/blob/82253534b92f3ab87d8e6a3c241f59a0d9414cbe/users/will/less.nix#L6 https://github.com/willbush/system/blob/82253534b92f3ab87d8e...
- lyall 3y agoIn my experience as a Colemak typist and heavy vim (or vim-emulation) user, the best solution is to bite the bullet and _not_ remap any of the keys. This is obviously annoying for hjkl navigation at first but you get used to it pretty quickly. Plus there's the added benefit of being able to easily use hjkl for navigation everywhere that uses them but _doesn't_ let you remap, which is a lot of places.
- jbaber 3y agoYes. As a dvorak typist, hjkl being in eccentric locations hasn't bothered me.
- rgoulter 3y agoIn dvorak, 'hjkl' are still fairly convenient. 'jk' are adjacent. 'h' is to the left of 'l'.
- SkyPuncher 3y agoMy solution has been putting important keys on a function layer so I can still reference them easily.
- lawn 3y agoTotally agree. And I can use Vim without trouble on qwerty and on my own custom layout. The only adjustment to the layout I made when designing it was placing hjkl in reasonable positions (e.g. avoid the worst placements, but they're still not on the homerow).
- eviks 3y agoHow is it best when it's just bad? Why would you make the ergonomic of shortcuts worse when the big point of another layout is better ergonomics?
- lawn 3y agoBecause the economics aren't "just bad". The only shortcuts that might be worse on an alternative layout is hjkl, and you can argue that people way overuse them and it's better get into the habit of using other movement keys instead. I've found that Vim ergonomics are way better on my own layout[0] than on qwerty, despite hjkl not being on the home-row. [0]: https://www.jonashietala.se/series/t-34/ https://www.jonashietala.se/series/t-34/
- linsomniac 3y agoFor the longest time I wanted to learn another keyboard layout, in the 80s and 90s it was Dvorak, but vi motion keys kept me from doing it. I didn't like any of the solutions (remap, switch to qwerty for command mode, whatever)... But I always felt like I was "leaving money on the table" by not learning something better. I've decided somewhat recently that I'm just fine with qwerty, any money that I'm leaving on the table is probably fairly small because I think slower than I type... Some of that change in perspective may have been a coworker who used Dvorak, and watching that dude type was a seriously painful experience.
- eimrine 3y ago> because I think slower than I type... Do not confuse throughput with ping and not using visual cortex vs using visual cortex.
- byebyebyebye 3y agoFirst time hearing about this keyboard layout. I wonder how much marginal efficiency there is to be gained. My hands' physical travels reduced by a lot ever since I learned vim. But I don't think optimizing fingers' travel would give as much boost in overall speed. On the other hand, though, you can argue that fingers travel between keys a lot more often than between keyboard and mouse. What's everyone's experience? Was it worth it for you learning another layout?
- eimrine 3y agoOf course it worth it, but coleman/workman are for weak ppl who can not get rid of qwerty completely.
- lawn 3y ago> What's everyone's experience? Was it worth it for you learning another layout? I designed my own layout to fix my RSI, which was very worth it. But I don't think it's worth it if you're after speed, the effort is better spent practicing typing IMO. I wrote big lost about my experience here: https://www.jonashietala.se/blog/2023/11/02/i_designed_my_own_keyboard_layout_was_it_worth_it/ https://www.jonashietala.se/blog/2023/11/02/i_designed_my_ow...
- eviks 3y ago> as I remember Vim keybindings more on their associations (y = yank), than muscle memory of their original Qwerty locations Seriously doubt this for such a frequently used key as yank, which is closer to hjk that require no word-based association at all