Compare commits

..

1 Commits

3 changed files with 3 additions and 4 deletions

View File

@@ -84,7 +84,5 @@ vim.api.nvim_create_autocmd("User", {
-- Center cursor on screen whenver insert mode is activated -- Center cursor on screen whenver insert mode is activated
-- (Stops fucky wucky shit with scrollEOF) -- (Stops fucky wucky shit with scrollEOF)
vim.api.nvim_create_autocmd("InsertEnter", { vim.api.nvim_create_autocmd("InsertEnter", {
callback = function() command = "normal! zz",
vim.cmd("normal! zz")
end,
}) })

View File

@@ -14,6 +14,7 @@ Keymap("n", "<leader>bd", function() -- delete buffer
end) end)
for _, bind in ipairs({ "i", "a", "A", "I" }) do for _, bind in ipairs({ "i", "a", "A", "I" }) do
-- Pass { expr = true } as the fourth argument
Keymap("n", bind, function() Keymap("n", bind, function()
if vim.fn.getline("."):match("^%s*$") then if vim.fn.getline("."):match("^%s*$") then
return [["_cc]] return [["_cc]]