feat: add open file to last selected line
This commit is contained in:
parent
7c42df55a5
commit
639aa33b90
1 changed files with 9 additions and 0 deletions
|
@ -4,3 +4,12 @@ require "nvchad.options"
|
|||
|
||||
-- local o = vim.o
|
||||
-- o.cursorlineopt ='both' -- to enable cursorline!
|
||||
|
||||
vim.api.nvim_create_autocmd("BufReadPost", {
|
||||
pattern = { "*" },
|
||||
callback = function()
|
||||
if vim.fn.line "'\"" > 1 and vim.fn.line "'\"" <= vim.fn.line "$" then
|
||||
vim.api.nvim_exec2("normal! g'\"", {})
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue