aboutsummaryrefslogtreecommitdiff
path: root/lua/autocommands.lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua/autocommands.lua')
-rw-r--r--lua/autocommands.lua7
1 files changed, 7 insertions, 0 deletions
diff --git a/lua/autocommands.lua b/lua/autocommands.lua
new file mode 100644
index 0000000..565a2a7
--- /dev/null
+++ b/lua/autocommands.lua
@@ -0,0 +1,7 @@
+local cmd = vim.api.nvim_create_autocmd
+
+-- Автоматическое удаление пробелов в конце строки
+cmd({ 'BufWritePre' }, {
+ pattern = '*',
+ command = ':%s/\\s\\+$//e'
+})