mirror of
https://github.com/ItsDrike/dotfiles.git
synced 2025-07-01 04:50:42 +00:00
Move non-plugin settings to core/
This commit is contained in:
parent
768764a899
commit
9c8191bfa7
7 changed files with 18 additions and 6 deletions
26
home/.config/nvim/lua/core/abbreviations.lua
Normal file
26
home/.config/nvim/lua/core/abbreviations.lua
Normal 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)
|
Loading…
Add table
Add a link
Reference in a new issue