Using Vim on (Tiny) NON-QWERTY Custom Keyboards
Вставка
- Опубліковано 13 тра 2024
- It's time to talk about using Vim with custom non-qwerty keyboards. I'm not a Vim expert by any means and this video is just sharing what I've learned in the hope it helps others. I use Vim professionally for all my coding so have got things running pretty smoothy. I use a very unusual 18 key custom keyboard using a non-qwerty layout so there are some things I've done that make all this not only possible but very enjoyable!
In this video I look at how we can deal with HJKL when they are no longer your home keys. I also look at two other modes in Vim that don't get covered by the normal remapping as well as how to minimise knock-on remapping effects.
I also look at the three concepts that work so well with custom keyboards and Vim: Repeat key, home row mods and use of the leader key.
My config: benvallack.com/downloads/.vimrc
--------------------------------------------------------------------------
📽️ Check out my main channel @BenVallack for more keyboard content and all kinds of other adventures in design, usability and workflow!
--------------------------------------------------------------------------
🎬 My UA-cam camera gear:
--------------------------------------------------------------------------
Using these links to buy items helps support this channel at no cost to you!
📷 Camera:
Amazon UK: amzn.to/3fFHMQO and amzn.to/3Zjn9QH
Amazon US: amzn.to/2VasWIQ and amzn.to/3vLBdVM
📸 Lenses:
Amazon UK: amzn.to/36cawNP amzn.to/36eVZ3W amzn.to/3VOIkat
Amazon US: amzn.to/3q8QY4Y amzn.to/3QkVOJQ
🎤 Mic:
Amazon UK: amzn.to/36cVgjM
Amazon US: amzn.to/36bAyAU
🎧 Audio interface:
Amazon UK: amzn.to/3mfkAeN
💡Studio light:
Amazon UK: amzn.to/3Csigdo
Amazon US: amzn.to/3IYDimb
🎶The music in my videos:
artlist.io/Ben-572654
🔌Save £50 when you switch to Octopus Go with this link (UK): share.octopus.energy/aqua-eag...
--------------------------------------------------------------------------
Contents:
--------------------------------------------------------------------------
0:00 Intro
1:26 Sorting out HJKL
4:15 Repeat Key
4:50 Mouse Reporting
5:36 Changing Split Focus
6:16 Netrw Navigation
6:43 Three Useful Concepts
This guy is a keyboard Chad.
Holy shit, man. This has gone so incredibly far - from the early Planck-video, and now to this. It's just bonkers how far you've gone down this rabbit hole. On behalf of all of us, thanks for taking the time!
Heh it's been a blast - you're very welcome. Definitely only scratching the surface with Vim for sure. Neovim is my next move thanks to comments on here!
@@BenVallacksKeyboards looking forward to it!
One of my favorite channel making separate channels that somehow go even more in-depth in the nerdy topics that interests me, thanks a lot for all your work! We love it!
Thanks so much! Yeah I’m getting pretty fast now in bursts - still quite error prone though. Which is interesting.
I'm in the middle-end of building my first 40% split and I cannot WAIT to get into all this and understand it better. Thanks for sharing so much with us
Thank you SOOOO much for those insights.
Seeing some of those configurations from both vim and keyboard just gave me so many ideas to solve my issues.
Looking forward for that homerow mods video. Thanks!
Super looking forward to a home row mods video!
awesome! this video is 8:40 long but its content is a whole world to learn and practice! thanks for sharing!
This was a great video. I've found I like smaller and smaller keyboards as I've gone through my journey but Emacs has been my biggest hangup. The mod chording for all the actions feels quite unnatural, and as a vim expat I'm fighting some muscle memory but wanted to give Emacs a try, as is, without the vim-style keybind layers.
The repeat key seems like something I should borrow, and might just give it a try.
Thank You Ben!
Great video! I used to re-map "hjkl" as well as I switched to colemak-dh. Unfortunately, this did not work well in case I had to ssh to another machine and use a standard vim config. Now I have a dedicated navigation layer switch on my main right thumb key, which has the arrow keys on the corresponding keys and it works like a charm!
Good plan. Yeah that trips me up sometimes too.
This is my concern too.. Need to think of a good solution without having to hold a modifier
Look into Nix the package manager, not the OS. You could setup your vimconfig along other stuff in a repo and apply that config inside your SSH session in a temporary environment.
Awesome! Vim is probably the biggest reason to why i have been reluctant to go away from qwerty. Looking forward to see more Vim videos! 👍
I switched to dvorak recently, I didn't remap hjkl and I like their placement better than with qwerty to be honest.
On dvorak layout, once I reach hjkl I have access to the four keys without having to move my hands unlike with qwerty.
Glad you're liking repeat key! I feel it's super underappreciated in the layout/keyboard community.
It wasn't very usable in ZMK last I checked because it couldn't be rolled. Hopefully that's been fixed.
Ah that's interesting, I hadn't noticed any issues with rolling. WIll do some more testing to check that. It's been quite hard incorporating it into normal typing - mostly used for Vim! Will do some videos on ISRT and custom layouts soon. Want to shine a light on the community!
I love that "vertical" keyboard
I've seen others say this before but you should really give neovim a look. It is the way forward for vim. Configuration and plugin writing is done in lua. It was super easy for me to write a little function that remaps my keybindings for Colemak by only defining a mapping dictionary.
P.S.: For anybody looking to want to have a more IDE experience out of the box I can recommend LunarVim. It's basically just a layer (useable completely separately) running on top of neovim with lots of stuff pre-configured.
Will definitely take a look!
I've learnt a lot from The Primagen's video on his nvim setup: "0 to LSP : Neovim RC From Scratch". Might be helpful also.
Nice, keyboard only channel! Hoping that one day you'll upload a guide to ZMK for complex functions that is beginner friendly. I bought my mechanical keyboard but can't work out how to create the layout I want :')
Cheers! ZMK tutorials are going to be big part of this channel with a doubt.
Just found you a couple weeks ago. Really cool to see someone break away from convention and try to design around humans.
this is next level vim wizzard
I've enjoyed all the information you've put out in your journey building custom keyboard layouts. One thing I've noticed is your use of zmk, for wireless keyboards. We're you planning on diving deeper on customizing zmk in the future and pairing/troubleshooting split keyboards?
Yep will definitely do some vids on ZMK on here.
Great video!
super cool! could you tell us more about that desk-clasping tenting setup you've got going on?
Imagine if you put TTP223 Capacitive Switch Button Module underneath the key cap and connected the three circuit points of that module to the PCB board. You could make finger resting positions key presses. Very useful for modifier keys and layer switching! Could you do a video on attempting this hardware?
what a madlad
if you like vim, then neovim has a lot of really nice plugins, and tmux is great for working remove on a server :D
I've been wanting to try out a keyboard like this though I can't yet build my own keyboard (because reasons). I'm thinking of mapping this layout to my keyboard and taking it from there.
However I'm not that nerdy yet and still just a linux noobie. Would using xorg work with that, layers and all?
I just got my first mechanical board and I'm using it to try out colemak. The "how do i vim?" question was weighing heavily so thanks for the ideas in this video.
Using default Vim keymap with Colemak still works pretty well, you just have to remember that down in up and up is down. In my case, I have a layer where the arrows keys are exactly where hjkl are on Qwerty.
@@RedSkyWhisper colemak splits up the navigation keys and trying to retain the homerow positioning has various knock-on effects. It's a lot of muscle memory to unlearn.
@@springogeek like Ben I learnt Colemak while learning Vim so I guess it was easier that way. Once you learn Colemak you’ll know where the keys are anyway. I still use hjkl to navigate between panes without issue. Unlearning something is not hard it just takes time.
Finally!
I don't know if I've missed it, but have you done a video where you go through how your latest keyboard layout works? I'm really curious to hear more about it
ua-cam.com/video/5RN_4PQ0j1A/v-deo.html this one is the same layout minus the repeat key and direct to caps second alpha layer. I talk about them as future ideas in the video though.
nice, gruvbox
Hi, I have a question, if you got to use dvorak?
Is there still a planned followup for the remainder of the vimrc?
How is the keyboard attached to the adjustable arms? Is is glued in some way?
Tenting puck. It’s a tripod mount screwed to through holes in the PCB. Video coming soon on that
qwerty is best for vim, since the letters under my strongest fingers, k, j, d, f never appear next to each other in written english nor in c++. because of this, it is possible to map chords of these keys to advanced functionality in insert mode. many users use the chord "kj" to go to normal mode, it is awesome.
Ah very interesting indeed!
You could also just set this up as a combo in your keymap, it's nice to have even outside of vim. In my case I have the `jkl` and `sdf` combos mapped to ESC.
It's a trade-off. I have been using Colemak with vim pretty much daily for about a year now. The kind of JK cording definitely doesn't work as well because the letters on your home row/movement keys are very likely to be typed together. But I feel the ease of typing with Colemak just completely outways that downside. I still use chording with a sort of leader key but definitely not as extensive as I used to with normal qwerty
Hey Ben in your videos of your main channel you are using like a pillow to put your keyboard vertical. What pillow are you using for that?
The iBeani laptop stand: amzn.to/3QAXqQ7 (UK) amzn.to/3GsCp5m (US alternative)
Please make video about how programming from ipad or even from phone works, really interested in this theme
Yeah will definitely do this soon.
How do you get around plugins not using your remappings? Like, in the explorer view, it's still hjkl for navigation, even after remapping, which is annoying.
There is a separate config for the file explorer - I remap those as well. I think I look at that in the video actually.
*making sure VIM works well before switching to a sub 40 layout kb *
I’ve mostly been dabbling with vim and using the ideavim plugin for webstorm. One thing that seems to work for me is having the arrow keys in a layer mapped to the vim positions. They are interchangeable for a lot of the basic stuff in vim and then I effectively have that functionality globally throughout my system. I use a 34 key layout with colemak.
what’s a “leader” key? is the repeat key a vim special or a zmk special?
Leader key is a vim config thing - you can define your own shortcuts with it. It’s basically an empty namespace to set up easy shortcuts without using modifier keys. So it works by tapping the leader key first then you tap the letter key directly after it. You can set whatever you like as the leader key itself. Repeat key is a ZMK feature, the keyboard itself makes that work.
How's your typing speed going?
80-100 still - don’t think it’s going to improve much beyond that. Accuracy still not quite what I’d like either.
Do you find this layout to be an advantage compared to a 40% keyboard?
Yes and no. The reduction in finger movement is genuinely amazing, but it comes at the price of being hard to type accurately on at speed. More details on this in the next video coming to this channel soon
Did you make that keyboard stand yourself?
Stand by next next video on that.
unrelayed but why not use neovim over vim? i find that plugins like telescope-nvim and harpoon are simply too useful
Will check all that cheers - sounds interesting! I’m definitely at the start of the vim journey!
TJ DeVries, creator of telescope and a contributor to neovim, has some good videos on it. He made a recent one on how to quickly get setup with an IDE-like environment called "Effective Neovim: Instant IDE". He also runs through all the cool things you can do with Lua in neovim, which makes it so easy for different plugins to interact with each other.
@@notgate2624 sounds great will check it out.
Explain the keyboard
Here you go!
ua-cam.com/video/c18vkHG_7tY/v-deo.html
Connecting as root?! Blasphemy!!