lots of nonsense, neorg and autosave now in a usable state
This commit is contained in:
12
init.lua
12
init.lua
@@ -52,13 +52,21 @@ vim.opt.scrolloff = math.floor(vim.o.lines / 2) - 3
|
||||
|
||||
-- Indent
|
||||
vim.o.autoindent = true
|
||||
-- Rebind 'i' to indent properly on empty lines
|
||||
|
||||
vim.keymap.set("n", "i", function()
|
||||
if vim.fn.getline("."):match("^%s*$") then
|
||||
return [["_cc]]
|
||||
else
|
||||
return "i"
|
||||
end
|
||||
end, { expr = true, desc = "Inent properly on empty lines" })
|
||||
|
||||
vim.keymap.set("n", "a", function()
|
||||
if vim.fn.getline("."):match("^%s*$") then
|
||||
return [["_cc]]
|
||||
else
|
||||
return "a"
|
||||
end
|
||||
end, { expr = true, desc = "Indent properly on empty lines" })
|
||||
|
||||
-- Force proper keybindings
|
||||
@@ -70,8 +78,6 @@ vim.keymap.set("n", "<down>", '<cmd>echo "Use j to move!!"<CR>')
|
||||
-- C-BS for deleting whole word in insert mode
|
||||
vim.keymap.set("i", "<C-BS>", "<C-W>", { noremap = true })
|
||||
|
||||
-- Setup notifications
|
||||
|
||||
-- Keybinds for MiniSessions
|
||||
vim.keymap.set("n", "<leader>qj", function() -- quit and save session local
|
||||
MiniSessions.write(".session")
|
||||
|
||||
Reference in New Issue
Block a user