[dev] how can I remap vis to bépo layout?

From: Damien Thiriet <damien_AT_thiriet.web4me.fr>
Date: Thu, 31 Oct 2019 13:27:28 +0100

Hello,


Since there were announcement related to vis on that
list, I'll give a try here.
Being a bépo user (a dvorak-inspired keyboard,
look at www.bepo.fr), I would like to remap some keys
in vis normal mode, namely ctrs to hjkl and hjkl to ctrs.
I tried this on my visrc.lua

-- load standard vis module, providing parts of the Lua API
require('vis')

vis.events.subscribe(vis.events.INIT, function()
   -- Your global configuration options
   -- hjkl <=> ctrs
   vis:command('map! normal h c')
   vis:command('map! normal c h')
   vis:command('map! normal j t')
   vis:command('map! normal t j')
   vis:command('map! normal k s')
   vis:command('map! normal s k')
   vis:command('map! normal l r')
   vis:command('map! normal l r')
end)

vis.events.subscribe(vis.events.WIN_OPEN, function(win)
   -- Your per window configuration options e.g.
   vis:command('set number')
end)

As a result neither of these keys do work.
This might be because mapping is recursive,
or something connected to operators.
What shall I do to switch those keys?

Damien Thiriet
Received on Thu Oct 31 2019 - 13:27:28 CET

This archive was generated by hypermail 2.3.0 : Thu Oct 31 2019 - 14:36:10 CET