addressalign-toparrow-leftarrow-rightbackbellblockcalendarcameraccwcheckchevron-downchevron-leftchevron-rightchevron-small-downchevron-small-leftchevron-small-rightchevron-small-upchevron-upcircle-with-checkcircle-with-crosscircle-with-pluscontroller-playcrossdots-three-verticaleditemptyheartexporteye-with-lineeyefacebookfolderfullheartglobegmailgooglegroupshelp-with-circleimageimagesinstagramFill 1light-bulblinklocation-pinm-swarmSearchmailmessagesminusmoremuplabelShape 3 + Rectangle 1ShapeoutlookpersonJoin Group on CardStartprice-ribbonprintShapeShapeShapeShapeImported LayersImported LayersImported Layersshieldstartickettrashtriangle-downtriangle-uptwitteruserwarningyahoo

Stockholm Vim Message Board › AltGr and curly/square brackets on a keyboard with Swedish layout

AltGr and curly/square brackets on a keyboard with Swedish layout

Christoffer H.
Stockholm, SE
Post #: 1
Okay, so I've been using vim for a few years and have come to the point that I feel that I need to find a better solution for the AltGr+7|8|9|0 issue when programming.

My first step was to try to remap Caps lock as a left hand AltGr but without luck (not possible due to Vim reading sequence of bytes and not keypresses afaik).

Next step was to remap specific Alt+# directly to corresponding bracket character. The actual mapping was <Esc>+# but it worked in Vim (with the terminal I used). Though as the actual mapping depends on what type of terminal I use this isn't a viable long term solution.

Anyone else here that have any solution to my problem?
Christoffer H.
Stockholm, SE
Post #: 2
The solution I ended up with was to change the function of caps lock in my OS (Xubuntu) instead of in the Vim settings.

### Caps Lock as AltGr
setxkbmap -option "lv3:caps_switch"

### Menu as Caps Lock
xmodmap -e "keycode 135 = Caps_Lock"

Anyway, haven't decided on how to load these settings during bootup/login just yet.
William 'zyk' E.
user 108875262
Stockholm, SE
Post #: 1
Try putting the commands in your ~/.xsessionrc file

I usually put all my X autorun commands there (works on debian with Xorg + awesomewm or KDE 3.5)
Powered by mvnForum

Our Sponsors

People in this
Meetup are also in:

Sign up

Meetup members, Log in

By clicking "Sign up" or "Sign up using Facebook", you confirm that you accept our Terms of Service & Privacy Policy