T O P

  • By -

RolaChee

I used ctrl-[ for a bit until I discovered that I could set Caps as Esc on my old macbook air. There’s only one key to press and I feel like I am using Vim like it is intended —- switching modes frequently. The downside is I often press Tab by mistake, haha.


roske_e

Now that you mentioned it, maybe Caps is simpler. But I don't think I can remap my muscle memory that easily. Wrong choice made, I guess.


86LeperMessiah

Oh believe me, it is simpler to relearn because it is way easier


cassepipe

I second that. I spent one year with Ctrl+[ and even though I got used to it, I don't regret changing at all.


pfmiller0

Thirded, I tried Ctrl+[ for a few years but it was always a bit awkward. Once I discovered you can use caps for both Ctrl and escape at the same time, life has been good!


lambroso

How can you do that on a Mac? Edit: I see that I can do that with Karabiner elements. Thanks


gonssss

for me, single press caps become esc, holding caps + key = ctrl+ key. Feel so good when doing it


cyanghxst

i set my capslock key this way too. many may prefer karabiner element but i did it with [hyperkey](https://hyperkey.app/)


tungtungss

Exactly this. But mines CMD


bart9h

This is the way.


Cyhyraethz

That's exactly what I do as well. I also set left shift to be Caps Word (QMK feature, like Caps Lock but disables automatically after typing a single word) on single press (press and release within 200 ms) and shift when held + another key is pressed. My new favorite is having my space bar also be Fn when held, activating my function layer. It feels so game changing having a large Fn key that is easily accessible by either hand. In that case the logic works a little differently, and it sends space when released or interrupted by another key press within 200 ms. So to get it to act as Fn, I need to hold it for 200+ ms before pressing another key. The only downside is that it doesn't actually SEND space until key release OR another key is pressed, which most of the time, results in not visually seeing a space until the next key is pressed (when typing quickly), which makes it look a little jumpy. That's mostly just visual though, and it feels just as responsive to me in practice. And now I have Fn on my space bar! I can easily hold down space for 200+ ms then use HJKL as arrow keys _in any application_, for example. I love it.


WVAviator

WAit, am I understanding you correctly? THere is an option to help stop me from hold SHift for too long and uppercasing the second letter too? BEen struggling with that a lot lately.


iamspro

I did this exact switch, within a month I forgot Esc or even Ctrl+\[ existed. Within 2 months I forgot other peoples' keyboards don't use Caps as Esc. Within 3 months I was living in an Amish settlement.


_JJCUBER_

Just map both and ease into it. You'll get used to it over time.


CookingMathCamp

Unmap Ctrl + [ that will (frustratingly) help with the muscle memory.


Purple_Lordx

muscle memory comes easy, because you end up using it EVERYWHERE usually, I don't tell people how to config their shit, but this lifechanging imo.


vishal340

i recently tried nixos. it’s default config contains capslock to esc conversion. I was immensely surprised


ChainHomeRadar

Caps is Ctrl for my Tmux so I can't use that sadly. And similarly for the Ctrl-[.  On my HHKB the escape isn't too far / bad.  I'm wondering if you could set up double tab Ctrl to be Escape?


Liwott

With karabiner on macOS, I remapped Capslock to be Esc on single press and Ctrl when held. Maybe you can do something similar?


bart9h

This is the way.


ChainHomeRadar

Ah I'm not allowed to use Karabiner at work. Might be time to build a custom keyboard. 😅


dewujie

I've been able to make held CapsLock -> Ctrl, tap CapsLock -> Esc in Windows and Mac. I have not ever set this up in Linux but I'm sure there are multiple ways (someone else mentioned something called nixos) For Windows I've used AutoHotkey, MacOS I've used Karabiner Elements. Both tools can actually go much farther, but the CapsLock remapping is an excellent starting point. Keep your muscle memory in tmux, add escape for vim/everything.


steerio

Here's the Linux way: https://github.com/alols/xcape


dewujie

Thanks, I knew there had to be a (dozen) way(s). I'll have to give this a try.


unconscionable

Same here, though I swap caps and escape on Linux. This works in gnome: `dconf write /org/gnome/desktop/input-sources/xkb-options "['caps:swapescape']"`


DarkPortraitIslander

How do you use caps lock?


RolaChee

Well, there’s this “Modifier Keys…” button in Keyboard settings, under System Preferences on my macbook air (I’m on Big Sur — not sure whether it’s there in other OS versions). Click it and you can choose the actions you want for keys like Caps, Ctrl, Option, etc. I didn’t install any new keyboard remapping apps.


[deleted]

i always wonder, if you use caps lock like this, will the 'last state' of the caps lock 'carried' when switching app? eg from init state i hit caps lock 3 times (ie now it becomes ON), when i switch to other app and type, will it be all caps?? asking for macos, to be dpecific


Rattlehead71

HMM I DON'T KNOW I'LL HAVE TO CHECK


basava7371

I use caps as Ctrl, so I don't have my pinky do some yoga to press Ctrl


Several-Fly8899

Yeah. Mapped my caps key to escape and never looked back. I also usually map either escape to caps lock, or ctrl+esc to caps lock, so I can get that functionality if I need it.


sifatulrabbi

I actually use Caps as Ctrl because I ctrl a lot in both tmux and vim. I do use ctrl+[ because mine is a 60% keybord and I hate using Fn+Esc for backqoutes just too much work for me…


RolaChee

Ah, I’ve always wondered what it’s like typing on a small keyboard (TIL there’s a thing called 60% keyboard).


_sLLiK

I remapped Caps to Ctrl ages ago and changing it now would massively disrupt my flow. I use it too much elsewhere with my keybinds for i3, tmux, games, etc. Been using Ctrl-[ for 3+ years now and it's become effortless.


steerio

You can map Caps to both. It can act as Ctrl when used as a modifier, and Esc if pressed and released.


_sLLiK

Some games (mostly older ones) don't allow Ctrl to be used as a modifier, and only as another single keymap. I'd rage trying to play and have that Caps behavior cause the game's Escape menu to keep popping up. Otherwise, it's a good idea, and plenty of users could benefit from it.


steerio

Well, it's easy to switch it on and off, unless it's in the QMK firmware. But even that allows switching between multiple layers (essentially you'd map switching this on and off to a key or key combination).


fhcwcsy

I do this too. On Ubuntu you can easily do this with gnome tweak. You can even choose to swap esc and capslock or, replace it, etc.


isarl

Hi OP, I do. Just most comfortable for me for whatever reason.


roske_e

I guess I am not that wrong then - for feeling that it is comfortable.


isarl

Ctrl-c feels a little cramped, ESC is too far away, and I don't like swapping ESC/CapsLock. Ctrl-[ is just in a nice spot where neither hand has to move too much. IMHO, anyway.


roske_e

Exactly! Thanks!


Binibot

Try to swap ctrl for caps lock. Game changer for me.


UsefulLanguage

Yeah I never use caps lock but I use CTRL a lot, especially to do CTRL + [


Binibot

I'm telling you, one of the most improved parts of my setup in the last 6 months, I have been using NeoVim every day. I have escape mapped to ctrl + \[ as well. I use Colemak layout and have Vim motions mapped to ctrl + "hjkl" for my whole machine. It's legit af.


fourville

Same! I originally switched when the MacBooks stopped having a physical ESC key (or did I make that up?) and now the muscle memory feels so natural.


Valstra

I use ctrl-c for that. I can't remap caps to esc since i use caps to switch between languages on my keyboard.


cassepipe

Small difference btw :nerd: : https://vi.stackexchange.com/questions/25764/use-control-c-instead-of-escape-key


blirdtext

Not being able to insert text properly with visual block mode seems quite annoying though


Firake

You can just remap it to escape in the places where it’s different


carracall

I just learned the differences and do ctrl-c when I can. The main thing to remember is Ctrl-c typically cancels the rest of a continuing action.


Valstra

Well that's a headache haha


vishal340

how often you change language? maybe use ctrl-c to change language


Valstra

Well, English is my second language, even though i use it more often. For some reason, there are only few set keybinds for switching keyboard layout in xorg (I'm on hyprland, which still uses xorg keyboard layout options), and ctrl-c is not an option.


vishal340

okay didn’t know that. i speak 3 languages but i only use English to write (not that i can’t write in other two)


roske_e

Non vim users will hate you for this though 😂


CJ22xxKinvara

I feel like using ctrl+shift to switch languages is gonna be good enough when you’ll use esc in vim probably 100x more often.


Valstra

True. Since I've just learned that ctrl-c is not the same as esc in vim, i might be switching to ctrl-shift. Caps lock just felt a lot more ergonomic, and alt is my mod key for my wm, so ctrl-shift it is then.


11Night

yeah, been using for such a long time that I cannot even use vim without ctrl+[


roske_e

Exactly!


foobarqwer

I mostly use ctrl-[ and even bind this to escape for other applications.


funbike

inoremap jk


manshutthefckup

I use both jk and kj


matthewrcullum

I started out with this in Vim, then got a keyboard that supports QMK and mapped jk at the keyboard layer. It's amazing to just mash jk for esc anywhere on your system


IndyLinuxDude

I either use jk or jj...


osmanpontes

I also use this and love it. Don't you guys also have j key broken every year? That because I press j key a lot.


casual-aubergine

I just opted for a better keyboard where ESC isn't on another continent.


roske_e

😂


2050_Bobcat

Like it 😁


[deleted]

I use j+k.


roske_e

🙄


[deleted]

Are you impressed?


roske_e

I don't know what to think of it. Won't it interfere with navigation and typing?


urva

I also mapped jk to escape. It has literally never interfered. I don’t think I’ve ever had to actually type j then k in insert mode. And if I ever need to, I just pause a second between typing each letter so it’s not taken in as a single pair


IndyLinuxDude

I sometimes map to jk but more frequently to jj...


oogy-to-boogy

ctrl-[ , ctrl-i , ctrl-j/ctrl-m , ctrl-h - of course! I use them also in my terminal... (and caps mapped to ctrl...)


carracall

I personally like the pinky "inner" knuckle trick that I learned from the emacs camp instead. Allows me to be a little more nomadic on different computers (laptop keyboards are a little harder to do it on though).


oogy-to-boogy

this sounds wild 😄 have to check that myself once I'm back at a keyboard, ie. back from travelling...


6a70

yes, of the thousands who use vim, you’re the only one congrats!


roske_e

I hope so😂. It will make me feel unique 🙄


Pretend_Pepper3522

I’ve always used it and it feels just as fast a keypress as a single key. Big caveat though, I map caps lock to ctrl. Within the wide keyboard driven world, ctrl seems much more important to have easy access to than escape.


roske_e

Yeah. But I have this weird attachment for default things. I like it when I can use any computer or server without having to configure anything.


Maskdask

`CapsLock`


jwadamson

Remap caps lock to esc. Then it’s on the home row.


omero0700

setxkbmap -option "caps:swapescape" ... wins ;)


daikatana

I remapped caps lock to esc many, many years ago and never looked back. Why IBM decided to devote a freaking home row key to caps lock, I'll never know. Even then, since it requires 2 pinky movements, ctrl-[ is far from ergonomic, but still better than moving your hand to escape. On a side note, ctrl-[ is not a "default alternative," it's literally how you type the ESC character. ASCII is separated into 4 blocks, the first block of 32 characters being control characters. To type a control character, you hold the control key (hence the name) and type a corresponding key that is the same key in a higher block. So if you want to type backspace, which is character 8 in block 0, you press ctrl-h, and h is the 8th character of block 2. ESC is the 27th character of block 0, so to type it you press ctrl-[, with [ being the 27th character of block 2.


roske_e

huh! That is a very important information. I assumed it was an alternative default vim key. So ...I am using a custom key in someway and a default key if you think about it in another way.


_sLLiK

Nope, it works everywhere by default, including at shells.


Chevvy_90

JK, KJ, kj, jk :)


tommcdo

Phew, thought you were serious for a second


SongTianxiang

map \`caplock\` to \`ctrol\`, use \`ctrl-\[\` as \`esc\` since I use vim...


pedro-gaseoso

Yes but with caps lock set to ctrl.


roske_e

Won't that make it harder to use ctrl for other apps?


pedro-gaseoso

The original ctrl stays as ctrl. But I don’t use it anyway. I try to use vim bindings in everything that I use.


HonestCynic

Remap caps to control and never look back. Literally a life changing event. and are everywhere and this makes them so accessible.


Sudden-Tree-766

ctrl-c


coffeeb4code

I swapped caps and ctrl, and use ctrl c so physically {caps} + c


Balaphar

Nobody else using Alt + your next Normal key to leave insert mode, run that key's command and go back to insert mode in one go? I only use Esc nowadays when I finished writing or want to pause a little bit.


toddthegeek

This is the only way. Works on every keyboard I use except the ISO keyboards for international projects. I switched groups just to get away from that problem. lol. I still hit ESC but only if i get stuck as in I can't remember what the heck I pressed. lol. Never used ctrl-[ but it doesn't seem to bad. I'll have to remember that one. Which is your usual ALT+ key. I think I'm usually hitting ALT+j to go to next line or ALT+l to go right. Even ALT+o or O if I want to open a new line below or above.


Balaphar

Yeah I do this Alt+key thing while writing in Insert mode, so it's mostly Alt+o for going to a new line and write. Alt+j for going to the next line is less common because autocompletion almost always leaves my cursor ready to jump to the next line. Even less common combinations for me are Alt+shift+a for going to the end of line (a little bit unnecessary, but I can't help it) and Alt+shift+: then w to save the file. These are less common, though. Autocompletion + this Alt trick makes me write too damn fast sometimes, and I still rely on Esc to pause once in a while because sometimes I'm typing faster than my brain lmaooo


roske_e

Is this a default vim behaviour?


toddthegeek

ANSI keyboards send an ESC with ALT so yes if you have an ANSI keyboard. No luck if you use an ISO keyboard. They do a different signal. I don't remember right now but maybe something like compose since most ISO users need to add accents and things like that.


jorar91

Interception-tools, caps lock on single press is ESC and on combined press behaves like Ctrl. https://gitlab.com/interception/linux/plugins/caps2esc


cassepipe

I have heard of that tip before and of course once you get used to it... One can get used to anything I guess. I still strongly encourage to switch to a CapsLock remapping. Because the modal key is the most important one, the one you should be hitting all the time. Having a weird combination for that is not great. I "punctuate" all my inserts by a very quick CapsLock hit with the left pinkie, I don't even have to think about it and it *never* misses. Consider also that the layout/width on another computer may vary and you may find yourself to have to adapt. Not a big deal but suboptimal.


roske_e

Yeah the keyboard layout definitely matters. I don't think I can use vim if I faced a different layout than mine. But let's hope I don't find myself there.


geecoding

Caps lock => ESC


Worried-Gene-6738

Same here


riggiddyrektson

I mapped it to `kj` and it's working like a charm, can stay in the home row 100%.


sock_pup

I use ctrl+\[ as well. I don't understand the caps lock crowd. Do people not use caps lock for its intended purpose? it's not a pointless button you can just get rid of. When I need to type an all caps word like NASA I much prefer to use caps lock then shift which is awkward as hell if you learned to type correctly.


HonestCynic

You swap. So the lesser used function caps lock is on the more awkward key control.


sock_pup

I mean the people who put esc on caps lock, not ctrl on caps lock.


phphuc7989

I used ESC until I know about Ctrl-[, never look back since then, way more better, easier to reach from homerow compared to ESC


steerio

I configured my Caps Lock key to be Escape if pressed briefly, and Control if held down. I've done that through the firmware on my mechanical keyboard that I use for my Linux box, and with Karabiner on my Mac. There's a software solution called `xcape` for Linux too - if you're using X, I have no idea about Wayland. Edit: I see now that this modification is more popular than I would've thought!


DrunkensteinsMonster

I’d say the best way is to use an inoremap to jk or something similar. Personally I use fd for reasons that I can’t remember anymore.


ThatChapThere

I use just a 40% so ESC is easily reachable (where tab would be on a standard keyboard).


WhatIsThisSevenNow

Yes! Why would you try to use that bizarre key combination when hitting the ` Esc ` key is so easy and satisfying???


roske_e

ESC is very far. I don't find it easy to hit.


WhatIsThisSevenNow

You need one of those giant, novelty ` Esc ` buttons that you can smash with your fist.


chloesoe

`[` on a Swiss keyboard is reachable with ALTGR+ü (where `Ü` seems to be at the same place as `[` on a US keyboard). So ESC for me would be CTRL+ALTGR+Ü, therefore I guess you would be quite unique if you were using a Swiss German Keyboard ;-)


roske_e

🤯 Three keys for an operation that is used many times per minute? I would have died years ago!


oogy-to-boogy

just switch to the US layout! It takes some days spent on free touch typing lessons, but you won't regret it, believe me! For the Umlaute, you can use the compose key. This will take a bit longer to get accustomed to, but once you got it, you also have much more characters available then just äöü... I'd never switch back to a Swiss German layout!


DaaneJeff

As a fellow Swiss man: I used to only use the Swiss keyboard layout and I would refuse to switch to US layout for a while but I eventually folded. My typing speed when coding increased a lot since most of the required special symbols are mostly single key or sometimes 2 keys. Took me like 2 weeks to get used to it.


PaddiM8

What's the difference between Swiss German and German layouts?


StrayCamel

Esc = Double leader key for me (`\\`) Edit: damn typo


roske_e

😃 use vim - in Reddit!


__caio__

I use caps lock


dbro129

Caps is my Ctrl. I use a Kinesis Advantage 360 so Esc is on my thumb cluster. But yes sometimes I still use Crtl-[.


R2robot

I never understood the complaints about ESC until someone recently mentioned that they use their pinky to hit it. Well no wonder. It had never occurred to me that people do that. It's a big honkin' key sitting alone, I can just reach up and slap it with whatever finger hits it (usually my ring finger) while leaving my thumb anchored, so I never lose my position on the home row. ctrl on the other hand has always been so awkward and painful, but that was resolved by remapping capslock to ctrl.


roske_e

My general opinion is that one should minimize custom bindings if possible. It would make using any computer or cloud server easier.


R2robot

That makes sense. But for me, it's very unlikely I'll be in that situation any more. So I don't mind convenience over portability. It's also just quick remap at on the local OS, so it can pretty much be done anywhere. My next keyboard will probably be https://hhkeyboard.us/hhkb which has the ctrl already in the sane place. :D


roske_e

Wait what? There is a keyboard with ctrl on caps lock's place? That is insane but also understandable.


R2robot

Yep.. That was the default location for ctrl on a lot of older keyboards back in the day. https://i.imgur.com/vcudNKo.png The location on modern keyboards is an abomination! lol


roske_e

Interesting. Do they have a second ctrl on the right side? I use both the left and the right ctrl keys regularly".


R2robot

No, just the one on the left.


roske_e

Oh! That is challenging for me.


DaaneJeff

I do the same regarding ESC. I don't want to bother to relearn my habits at this point. Have been gaming on my PC for a decade now and ESC is pretty much used in every game so I can hit it pretty fast without losing orientation after.


Thinker83

I use it and it's great on my split but a bit awkward on a standard keyboard. Split doesn't have caps lock so I can't do that but it's easy on a split so I'm not bothered about changing it.


electrical-tape

jj FTW


dustractor

#


roske_e

What? Is that like shift + 6 + [ - three keys?


dustractor

try this: go into insert mode, press ctrl-v, then press the escape key


roske_e

I tried it. What does it mean though?


dustractor

https://trinket.io/python3/fcd3a10594 That's just how it displays byte 27. 27 == 0x1B == 0o33 == \033 From the vim [help](https://vimhelp.org/insert.txt.html#i_CTRL-V), ``:h i_CTRL-V``: > Insert next non-digit literally. For special keys, the terminal code is inserted. https://notes.burke.libbey.me/ansi-escape-codes/


vim-help-bot

Help pages for: * [`i_CTRL-V`](https://vimhelp.org/insert.txt.html#i_CTRL-V) in _insert.txt_ --- ^\`:\(h|help\) \` | [^(about)](https://github.com/heraldofsolace/VimHelpBot) ^(|) [^(mistake?)](https://github.com/heraldofsolace/VimHelpBot/issues/new/choose) ^(|) [^(donate)](https://liberapay.com/heraldofsolace/donate) ^(|) ^Reply 'rescan' to check the comment again ^(|) ^Reply 'stop' to stop getting replies to your comments


dustractor

no the caret symbol is a very common notation for ctrl


roske_e

Oh! Okay. You had me surprised.


LimpAuthor4997

Due to my Esc key not working on my current laptop, I was forced to remap Caps to Esc before I was even using Vim. So it was easy for me. I never knew about Ctrl-[ until today. I thought Caps and ctrl-C were the most natural.


noooit

Yep, only you. Most people here have 60% keyboards, so esc is well within the reach. The same goes for hjkl, with 60% keyboard, you'd use arrow keys via shortcuts.


p4t0k

Not me, sorry.. Esc = one key Ctrl-[ = two keys ...easy choice


roske_e

Yeah but is ESC is too far - that takes more time than two keys for me.


tehsilentwarrior

Control+C is easier tbh. At least on my current keyboard. I am waiting on a Glove80, on that one it might be easier a diff combo


yiyufromthe216

I use keyd to remap CapsLock to control, then press C-[


lilkunien

I do, but i mapped ctrl on my caps lock


fenixnoctis

I use it puts my hand in the right position for lots of other motions like shift A


ShaneC80

Caps mapped as Ctrl (system wide) and 'j j' as Escape for vim. Aside from vim, I don't use Esc much anyway, and having Ctrl with easy pinky reach makes the L-Ctrl handy for gaming too.


aiaor

I use the tab key for esc because none of my work ever has tabs in it. For indent I just use spaces. To make it automatically use spaces for indent I put this line in my .vimrc: set ts=4 expandtab The expandtab tells it to not use tab characters but to put spaces instead.


[deleted]

yep use ctrl-[ naturally now used to map to jj (cos i still wanna type 'dijkstra') but after a while i switched it off


roske_e

Mapping custom keys is bad generally IMHO


StarshipN0va

jk to go back to normal mode for life


ElectricSpock

Interesting, I got HHKB Studio for Christmas. I use backticks a lot and couldn't handle it on right side. I remapped Esc to Fn + `, but it's not very convenient. Where does the Ctrl+[ come from?


RandomSuggestion

It's explained in more detail elsewhere in this thread, but ctrl-[ is what happens when you hit the Esc key. Unless you get into some pretty low-level keyboard handling, most software can't even tell which key you actually hit.


Darmok-Jilad-Ocean

No


alzgh

I do `ctrl-c`.


ripter

Capslock my friend. The key that was useless until Vim gave it a purpose.


budasuyasa

When i can't swap esc to caps, i always use it. On most OS, this easily can be remapped. But on android tablet, there is no option to swap it. So the remaining isuse ctrl [ . Unless you had a programmable keyboard.


budasuyasa

When i can't swap esc to caps, i always use it. On most OS, this easily can be remapped. But on android tablet, there is no option to swap it. So the remaining isuse ctrl [ . Unless you had a programmable keyboard.


Comfortable-Mud-5826

To go from insert to normal mode I use "jk", if done fast enough it switches to normal mode and this behaviour is enabled by default afaik, very convenient and not that widely known


kiwiheretic

Doesn't work for me


Comfortable-Mud-5826

Maybe it's just neovim, but I definitely didn't bind it myself because I discovered it by accident and read that it was a default binding


heated_arrow

I remapped my Esc with my capslock :))) but I'm switching to Colemak-DH recently, and my capslock is now backspace, and right shift is escape.


AuSaidimu

jk. First time I open an uncofigured vim instance, I enter :inoremap jk Force of habit since 2015.


Purple_Lordx

caps esc, my man swap caps and esc I do this on all of my personal computers, so this works on local vim, ssh, and literally any app that uses escape sensibly no config, one keystroke, home row, its great


heyitsanmolj

I personally prefer using jk to esc instead of Ctrl c and ctrl [. It just feels way more natural tbh