1

I'm using a bépo keyboard, kind of like a dvorak keyboard but for french. One of the most important aspect of using a bépo layout with vim is that I have to hjkl <-> ctsr. To do so I have this in my .vimrc :

" [HJKL] <-> {CTSR}
noremap c h
noremap C H
noremap t j
noremap T J
noremap s k
noremap S K
noremap r l
noremap R L

noremap h c
noremap H C
noremap j t
noremap J T
noremap k s
noremap K S
noremap l r
noremap L R

Right now I'm trying to use netrw, which ignored my mappings at first but I found the solution here and edited .vim/after/ftplugin/netrw.vim by copy-pasting what's above but with <buffer> after each noremap. It worked well but I wanted to remap "go up in directory" (currently mapped to -) to c (that is, h for hjkl) and "enter directory/edit file" (currently mapped to \<CR\>) to r (that is, l for hjkl). So I added this in my netrw.vim :

nmap <buffer> c -^
nmap <buffer> r <CR>

(I tried with noremap first but it didn't work and I can't wrap my head around this)

The remappings worked but... there's only a slight problem: there's a delay for c. I believe the reason is because the following mappings exist in netrw: cb and cB. I tried to unmap those but failed, and tried a few other things but I have a poor mastery of remappings and I am completely stuck.

3
  • Welcome to Vi and Vim! Not really sure whether this would solve your specific problem, but make sure to check out the vim-bepo plug-in for better Bépo support in Vim!
    – filbranden
    Jan 7, 2022 at 23:24
  • 1
    @filbranden Hi! Unfortunaly the very-few plugins for bépo support are often at the state of draft and reflect the tastes/choices of their creators, which often differ from mines... but thanks
    – BluePyro
    Jan 7, 2022 at 23:41
  • Perhaps a keymap or langmap would be better for using a different keyboard layout?
    – D. Ben Knoble
    Jan 8, 2022 at 16:57

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.