mirror of
https://github.com/Iron-E/nvim-libmodal
synced 2024-11-18 15:25:49 +00:00
49a02ad692
This was my first plugin. Looking back on it, it was full of bad design decisions (and I have elected to keep most of the user-facing ones for backwards-compatability). This merge tries to uncrustify the plugin by standardizing the documentation, removing much unecessary code, reorganizing the internal structures, and removing references to my own made-up terminology.
22 lines
412 B
Lua
22 lines
412 B
Lua
-- Imports
|
|
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>
|