diff options
author | Valentin Popov <valentin@popov.link> | 2023-03-31 16:22:37 +0300 |
---|---|---|
committer | Valentin Popov <valentin@popov.link> | 2023-03-31 16:22:37 +0300 |
commit | c1a649ded3cc4ae01b7fa166bf61a4a2f25cfef3 (patch) | |
tree | 762e3b33d2dd9a71eb8def7875ec6e046ab6eceb /lua/autocommands.lua | |
parent | 385a4269d008f60036c027b9f4e074b1be28ec2a (diff) | |
download | nvim-config-c1a649ded3cc4ae01b7fa166bf61a4a2f25cfef3.tar.xz nvim-config-c1a649ded3cc4ae01b7fa166bf61a4a2f25cfef3.zip |
Перенос авто-команд в отдельный файл
Signed-off-by: Valentin Popov <valentin@popov.link>
Diffstat (limited to 'lua/autocommands.lua')
-rw-r--r-- | lua/autocommands.lua | 7 |
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' +}) |