From c1a649ded3cc4ae01b7fa166bf61a4a2f25cfef3 Mon Sep 17 00:00:00 2001 From: Valentin Popov Date: Fri, 31 Mar 2023 17:22:37 +0400 Subject: Перенос авто-команд в отдельный файл MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Valentin Popov --- lua/autocommands.lua | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 lua/autocommands.lua (limited to 'lua/autocommands.lua') 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' +}) -- cgit v1.2.3