chore(mappings): migrate legacy mappings under the hood: remove dispatch
This commit is contained in:
@@ -19,18 +19,18 @@ sed -i -e "/${begin}/,/${end}/{ /${begin}/{p; r /tmp/DEFAULT_OPTS.6.lua
|
||||
}; /${end}/p; d; }" doc/nvim-tree-lua.txt
|
||||
|
||||
|
||||
begin="BEGIN_DEFAULT_MAPPINGS"
|
||||
end="END_DEFAULT_MAPPINGS"
|
||||
# begin="BEGIN_DEFAULT_MAPPINGS"
|
||||
# end="END_DEFAULT_MAPPINGS"
|
||||
|
||||
# generate various DEFAULT_MAPPINGS
|
||||
sed -n -e "/${begin}/,/${end}/{ /${begin}/d; /${end}/d; p; }" lua/nvim-tree/actions/init.lua > /tmp/DEFAULT_MAPPINGS.M.lua
|
||||
cat /tmp/DEFAULT_MAPPINGS.M.lua scripts/generate_default_mappings.lua | lua
|
||||
# # generate various DEFAULT_MAPPINGS
|
||||
# sed -n -e "/${begin}/,/${end}/{ /${begin}/d; /${end}/d; p; }" lua/nvim-tree/actions/init.lua > /tmp/DEFAULT_MAPPINGS.M.lua
|
||||
# cat /tmp/DEFAULT_MAPPINGS.M.lua scripts/generate_default_mappings.lua | lua
|
||||
|
||||
# help
|
||||
sed -i -e "/${begin}/,/${end}/{ /${begin}/{p; r /tmp/DEFAULT_MAPPINGS.lua
|
||||
}; /${end}/p; d }" doc/nvim-tree-lua.txt
|
||||
sed -i -e "/^DEFAULT MAPPINGS/,/^>$/{ /^DEFAULT MAPPINGS/{p; r /tmp/DEFAULT_MAPPINGS.help
|
||||
}; /^>$/p; d }" doc/nvim-tree-lua.txt
|
||||
# # help
|
||||
# sed -i -e "/${begin}/,/${end}/{ /${begin}/{p; r /tmp/DEFAULT_MAPPINGS.lua
|
||||
# }; /${end}/p; d }" doc/nvim-tree-lua.txt
|
||||
# sed -i -e "/^DEFAULT MAPPINGS/,/^>$/{ /^DEFAULT MAPPINGS/{p; r /tmp/DEFAULT_MAPPINGS.help
|
||||
# }; /^>$/p; d }" doc/nvim-tree-lua.txt
|
||||
|
||||
# generate various DEFAULT_KEYMAPS
|
||||
begin="BEGIN_DEFAULT_KEYMAPS"
|
||||
@@ -38,3 +38,9 @@ end="END_DEFAULT_KEYMAPS"
|
||||
sed -n -e "/${begin}/,/${end}/{ /${begin}/d; /${end}/d; s/callback = \(.*\),/callback = '\1',/g; p; }" lua/nvim-tree/keymap.lua > /tmp/DEFAULT_KEYMAPS.M.lua
|
||||
cat /tmp/DEFAULT_KEYMAPS.M.lua scripts/generate_default_keymaps.lua | lua
|
||||
|
||||
# help
|
||||
sed -i -e "/${begin}/,/${end}/{ /${begin}/{p; r /tmp/DEFAULT_KEYMAPS.on_attach.lua
|
||||
}; /${end}/p; d }" doc/nvim-tree-lua.txt
|
||||
sed -i -e "/^DEFAULT KEYMAPS/,/^>$/{ /^DEFAULT KEYMAPS/{p; r /tmp/DEFAULT_KEYMAPS.help
|
||||
}; /^>$/p; d }" doc/nvim-tree-lua.txt
|
||||
|
||||
|
||||
Reference in New Issue
Block a user