Move non-plugin settings to core/

This commit is contained in:
ItsDrike 2021-12-07 22:13:22 +01:00
parent 768764a899
commit 9c8191bfa7
No known key found for this signature in database
GPG key ID: FB8CA11A2CF3A843
7 changed files with 18 additions and 6 deletions

View file

@ -0,0 +1,26 @@
local vim = require("vim")
local fn = vim.fn
local m = require("utility.mappings")
local function cabbrev(input, result, reabbrev)
m.abbrev("c", input, result, reabbrev)
end
-- Invalid case abbreviations
cabbrev("Wq", "wq")
cabbrev("wQ", "wq")
cabbrev("WQ", "wq")
cabbrev("Wa", "wa")
cabbrev("W", "w")
cabbrev("Q", "q")
cabbrev("Qall", "qall")
cabbrev("W!", "w!")
cabbrev("Q!", "q!")
cabbrev("Qall!", "qall!")
-- Save file with sudo
cabbrev("w!!", "w !sudo tee > /dev/null %")
-- Reload lua configuration
local initlua = fn.stdpath("config") .. "init.lua"
cabbrev("reload", "luafile " .. initlua)