12

In English or US keyboards keys like \, /, [ and ] are very easily typed with only one key stroke. Usually is not the same for non-english keyboards.

Is there a way to achieve the same easiness of typing for these type of keyboards?
If it is a matter of mapping keys can you please put clear instructions to do it? (Spanish layout example is welcome)

EDIT: Examples by distinct languages are very welcome!

Zsolt Botykai
  • 50,406
  • 14
  • 85
  • 110
Igor Parra
  • 10,214
  • 10
  • 69
  • 101
  • 1
    I'd be happy to hear if someone has a good strategy for finnish, also – aleator Jan 02 '12 at 20:04
  • @ib. gave some tips and details on that topic in his answer to [Vim “annoyance” with keyboard layouts][1]. [1]: http://stackoverflow.com/questions/8015231/vim-annoyance-with-keyboard-layouts – Rook Jan 02 '12 at 20:25

2 Answers2

1

I've suggested something already in the comments. Now, as far as simple mappings go, for normal mode you can always do the simple remapping of main keys.

nnoremap : >>
nnoremap ; >>

for example, for indent (I'm on Croatian keyboard layout here ... where the < and > characters are, I have ; and : ... I'm sure you understand the example). You can analogly remap all your local characters with parenthesis, brackets or any other essential characters.

Rook
  • 60,248
  • 49
  • 165
  • 242
  • +1 Your answer drives me to [What is the difference between the remap, noremap, nnoremap and vnoremap mapping commands?](http://stackoverflow.com/a/3776182/333061) what is good. I'll check more deeper this solution. THX... – Igor Parra Jan 03 '12 at 04:22
0

I personally just use the US keyboard whenever I'm programming cause I need most of these special keys as characters anyways. You could use different keymappings, but I personally don't think this is such a good solution - if you ever have to work on another machine you won't be able to use vim at all. If you need to type spanish characters you can just switch your keyboard layout back when typing.

Cubic
  • 14,902
  • 5
  • 47
  • 92
  • 1
    It is not a matter of not needing your "local characters", but more of that most people are more accustomed to their local keyboard layout than the US one. I can type in the US one, but I'm for example accustomed where the () are, where the #$% are and so on ... Also, this should've been a comment. – Rook Jan 02 '12 at 20:32
  • Yeah, I'm still not always sure what should be a comment and what an answer. I just added this as an answer because for me, it WAS the answer. Vim was just designed for the US Qwerty layout and it works best with it, and for example from the german keyboard many keys like \ are very awkward to reach. – Cubic Jan 02 '12 at 22:01
  • Yeah, have a similar problem with my layout as well (Croatian). All of the follwoing require meta or shift keys to be pressed to reach them:\/}{][<> ... – Rook Jan 02 '12 at 22:04