From d29b84c02475e9cbd72c59528ad9950e9f26ad65 Mon Sep 17 00:00:00 2001 From: TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> Date: Wed, 4 Jun 2025 11:53:12 +0900 Subject: modified core/autocmds.lua, modified plugins/markdown.lua, modified plugins/mini.lua, modified tmux/tmux.conf --- ar/.config/TheSiahxyz/lua/thesiahxyz/core/autocmds.lua | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'ar/.config/TheSiahxyz/lua/thesiahxyz/core/autocmds.lua') diff --git a/ar/.config/TheSiahxyz/lua/thesiahxyz/core/autocmds.lua b/ar/.config/TheSiahxyz/lua/thesiahxyz/core/autocmds.lua index 5ff20f9..e6eba4c 100644 --- a/ar/.config/TheSiahxyz/lua/thesiahxyz/core/autocmds.lua +++ b/ar/.config/TheSiahxyz/lua/thesiahxyz/core/autocmds.lua @@ -142,10 +142,10 @@ autocmd("BufWritePre", { group = file_save, pattern = "*", callback = function() - -- Remove trailing spaces - vim.cmd([[ %s/\s\+$//e ]]) - -- Remove trailing newlines - vim.cmd([[ %s/\n\+\%$//e ]]) + local cursor_pos = vim.api.nvim_win_get_cursor(0) + vim.cmd([[ %s/\s\+$//e ]]) -- Remove trailing spaces + vim.cmd([[ %s/\n\+\%$//e ]]) -- Remove trailing newlines + vim.api.nvim_win_set_cursor(0, cursor_pos) end, }) @@ -256,9 +256,9 @@ vim.api.nvim_create_autocmd({ "BufRead", "BufNewFile" }, { }) -- TeX for .tex files -vim.api.nvim_create_autocmd("VimLeavePre", { - pattern = "*.tex", - command = "!latexmk -c %", +vim.api.nvim_create_autocmd({ "BufRead", "BufNewFile" }, { + pattern = { "*.tex" }, + command = "set filetype=tex", }) -- When shortcut files are updated, renew bash and lf configs with new material: -- cgit v1.2.3