diff options
| author | Mohammad Reza Karimi <m.r.karimi.j@gmail.com> | 2026-01-04 21:28:36 -0500 |
|---|---|---|
| committer | Mohammad Reza Karimi <m.r.karimi.j@gmail.com> | 2026-01-04 21:28:36 -0500 |
| commit | 06d1242317f7159ccf3014f0a1480e7c56236ebb (patch) | |
| tree | 89863b3287ae2c7cc88cd532220f18c38e8d8657 /nvim/dot-config/nvim-final/plugin/autocommands.lua | |
| parent | 5a41da5881a11ba3fdc3890c342aa3b7eb53e0cf (diff) | |
add all sorts of things
Diffstat (limited to 'nvim/dot-config/nvim-final/plugin/autocommands.lua')
| -rw-r--r-- | nvim/dot-config/nvim-final/plugin/autocommands.lua | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/nvim/dot-config/nvim-final/plugin/autocommands.lua b/nvim/dot-config/nvim-final/plugin/autocommands.lua new file mode 100644 index 0000000..b64ac07 --- /dev/null +++ b/nvim/dot-config/nvim-final/plugin/autocommands.lua @@ -0,0 +1,7 @@ +vim.api.nvim_create_autocmd("BufWritePre", { + pattern = "*", + callback = function(ev) + vim.cmd('execute "normal! mz" | keeppatterns %s/\\v\\s+$//e | normal `z') + end, + desc = "Strip whitespace from file" +}) |
