Plugin stuff
This commit is contained in:
@ -9,6 +9,7 @@ local cmd = vim.cmd -- Execute Vim commands
|
|||||||
local exec = vim.api.nvim_exec -- Execute Vimscript
|
local exec = vim.api.nvim_exec -- Execute Vimscript
|
||||||
local g = vim.g -- Global variables
|
local g = vim.g -- Global variables
|
||||||
local opt = vim.opt -- Set options (global/buffer/windows-scoped)
|
local opt = vim.opt -- Set options (global/buffer/windows-scoped)
|
||||||
|
local o = vim.o
|
||||||
|
|
||||||
-----------------------------------------------------------
|
-----------------------------------------------------------
|
||||||
-- General
|
-- General
|
||||||
@ -100,3 +101,14 @@ local disabled_built_ins = {
|
|||||||
for _, plugin in pairs(disabled_built_ins) do
|
for _, plugin in pairs(disabled_built_ins) do
|
||||||
vim.g["loaded_" .. plugin] = 1
|
vim.g["loaded_" .. plugin] = 1
|
||||||
end
|
end
|
||||||
|
|
||||||
|
--[[
|
||||||
|
Deletes all trailing whitespaces in a file if it's not binary nor a diff.
|
||||||
|
]]--
|
||||||
|
function _G.trim_trailing_whitespaces()
|
||||||
|
if not o.binary and o.filetype ~= 'diff' then
|
||||||
|
local current_view = fn.winsaveview()
|
||||||
|
cmd([[keeppatterns %s/\s\+$//e]])
|
||||||
|
fn.winrestview(current_view)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|||||||
@ -150,3 +150,9 @@ AppCues
|
|||||||
appcues
|
appcues
|
||||||
Skuad
|
Skuad
|
||||||
Skuid
|
Skuid
|
||||||
|
COO
|
||||||
|
Nergis
|
||||||
|
pdf
|
||||||
|
FiveTran
|
||||||
|
BigQuery
|
||||||
|
COO
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user