nvim-libmodal/examples/lua/layer-simple.lua

21 lines
398 B
Lua
Raw Normal View History

local libmodal = require 'libmodal'
2020-05-26 02:27:21 +00:00
2022-04-26 15:33:37 +00:00
-- create a new layer
libmodal.layer.enter(
{
n = { -- normal mode mappings
gg = { -- remap `gg`
rhs = 'G', -- map it to `G`
2022-04-26 15:33:37 +00:00
noremap = true, -- don't recursively map
},
G = { -- remap `G`
rhs = 'gg', -- map it to `gg`
2022-04-26 15:33:37 +00:00
noremap = true -- don't recursively map
}
2020-05-26 02:27:21 +00:00
}
},
'<Esc>'
)
2020-05-26 02:27:21 +00:00
2022-04-26 15:33:37 +00:00
-- the layer will deactivate when you press <Esc>