This commit is contained in:
hrsh7th
2021-11-08 14:56:21 +09:00
parent 40f667997a
commit 1a79d7e549

View File

@@ -77,8 +77,10 @@ end
---@return string
keymap.autoindent = function()
local keys = {}
table.insert(keys, keymap.t('<Cmd>setlocal cindent<CR>'))
table.insert(keys, keymap.t('<Cmd>setlocal indentkeys+=!^F<CR>'))
table.insert(keys, keymap.t('<C-f>'))
table.insert(keys, keymap.t('<Cmd>setlocal %scindent<CR>'):format(vim.bo.cindent and '' or 'no'))
table.insert(keys, keymap.t('<Cmd>setlocal indentkeys=%s<CR>'):format(vim.bo.indentkeys:gsub( '|', '\\|')))
return table.concat(keys, '')
end