fix esc_insertmode settings not getting applied in chadrc (#422)

This commit is contained in:
siduck76 2021-09-10 16:21:54 +05:30
parent 4fcf9524ee
commit cafd078e8f
3 changed files with 4 additions and 8 deletions

View File

@ -120,10 +120,6 @@ end
-- below are all plugin related mappings
M.better_escape = function()
vim.g.better_escape_shortcut = plugin_maps.better_escape.esc_insertmode or { "" }
end
M.bufferline = function()
local m = plugin_maps.bufferline

View File

@ -40,7 +40,10 @@ M.autosave = function()
end
M.better_escape = function()
local m = require("core.utils").load_config().mappings.plugin.better_escape.esc_insertmode
vim.g.better_escape_interval = config.options.plugin.esc_insertmode_timeout or 300
vim.g.better_escape_shortcut = m
end
M.blankline = function()

View File

@ -166,11 +166,8 @@ return packer.startup(function()
"jdhao/better-escape.vim",
disable = not plugin_status.esc_insertmode,
event = "InsertEnter",
config = function()
require("plugins.configs.others").better_escape()
end,
setup = function()
require("core.mappings").better_escape()
require("plugins.configs.others").better_escape()
end,
}