mirror of https://github.com/folke/lazy.nvim.git
fix(keys): Use vim's default value for an unset g:mapleader (#316)
This commit is contained in:
parent
d5e6bdf90c
commit
3bde7b5ba8
|
@ -15,7 +15,7 @@ local M = {}
|
||||||
|
|
||||||
---@param feed string
|
---@param feed string
|
||||||
function M.replace_special(feed)
|
function M.replace_special(feed)
|
||||||
for special, key in pairs({ leader = vim.g.mapleader, localleader = vim.g.maplocalleader }) do
|
for special, key in pairs({ leader = vim.g.mapleader or "\\", localleader = vim.g.maplocalleader or "\\" }) do
|
||||||
local pattern = "<"
|
local pattern = "<"
|
||||||
for i = 1, #special do
|
for i = 1, #special do
|
||||||
pattern = pattern .. "[" .. special:sub(i, i) .. special:upper():sub(i, i) .. "]"
|
pattern = pattern .. "[" .. special:sub(i, i) .. special:upper():sub(i, i) .. "]"
|
||||||
|
|
Loading…
Reference in New Issue