nvim-libmodal/examples/lua/layer-simple.lua
2022-04-26 11:33:37 -04:00

21 lines
398 B
Lua

local libmodal = require 'libmodal'
-- create a new layer
libmodal.layer.enter(
{
n = { -- normal mode mappings
gg = { -- remap `gg`
rhs = 'G', -- map it to `G`
noremap = true, -- don't recursively map
},
G = { -- remap `G`
rhs = 'gg', -- map it to `gg`
noremap = true -- don't recursively map
}
}
},
'<Esc>'
)
-- the layer will deactivate when you press <Esc>