summaryrefslogtreecommitdiffstats
path: root/.config/nvim/lua/hooks.lua
diff options
context:
space:
mode:
authorJoe <rbo@gmx.us>2024-12-14 22:53:54 +0100
committerJoe <rbo@gmx.us>2024-12-14 22:53:54 +0100
commit29e2ad59bd578c8718c18e311f34aa44001fc8c6 (patch)
tree8a11eb8989b0521f566bec42869250d95b106eab /.config/nvim/lua/hooks.lua
parentup (diff)
downloaddotfiles-bsd-29e2ad59bd578c8718c18e311f34aa44001fc8c6.tar.gz
dotfiles-bsd-29e2ad59bd578c8718c18e311f34aa44001fc8c6.tar.bz2
dotfiles-bsd-29e2ad59bd578c8718c18e311f34aa44001fc8c6.tar.xz
dotfiles-bsd-29e2ad59bd578c8718c18e311f34aa44001fc8c6.tar.zst
dotfiles-bsd-29e2ad59bd578c8718c18e311f34aa44001fc8c6.zip
up
Diffstat (limited to '.config/nvim/lua/hooks.lua')
-rw-r--r--.config/nvim/lua/hooks.lua16
1 files changed, 8 insertions, 8 deletions
diff --git a/.config/nvim/lua/hooks.lua b/.config/nvim/lua/hooks.lua
index aeb43a9..eaf0687 100644
--- a/.config/nvim/lua/hooks.lua
+++ b/.config/nvim/lua/hooks.lua
@@ -1,8 +1,8 @@
--- vim.api.nvim_create_autocmd({"BufWritePre"}, {
--- pattern = "*",
--- callback = function(ev)
--- save_cursor = vim.fn.getpos(".")
--- vim.cmd([[%s/\s\+$//e]])
--- vim.fn.setpos(".", save_cursor)
--- end,
--- })
+vim.api.nvim_create_autocmd({"BufWritePre"}, {
+ pattern = "*",
+ callback = function(ev)
+ save_cursor = vim.fn.getpos(".")
+ vim.cmd([[%s/\s\+$//e]])
+ vim.fn.setpos(".", save_cursor)
+ end,
+})