You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi Adib! Thank you very much for sharing your config files.
In your autocmds.lua file there is the following code:
-- go to last loc when opening a buffer-- this mean that when you open a file, you will be at the last positionapi.nvim_create_autocmd("BufReadPost", {
callback=function()
localmark=vim.api.nvim_buf_get_mark(0, '"')
locallcount=vim.api.nvim_buf_line_count(0)
ifmark[1] >0andmark[1] <=lcountthenpcall(vim.api.nvim_win_set_cursor, 0, mark)
endend,
})
Is it possible to ignore last position when the buffer is gitcommit type? I ask you that because sometimes I use git commit -v --amend and then, for such a scenario, it would be nice to always have the cursor at beginning of the buffer/file.
The text was updated successfully, but these errors were encountered:
Hi Adib! Thank you very much for sharing your config files.
In your
autocmds.lua
file there is the following code:Is it possible to ignore last position when the buffer is
gitcommit
type? I ask you that because sometimes I usegit commit -v --amend
and then, for such a scenario, it would be nice to always have the cursor at beginning of the buffer/file.The text was updated successfully, but these errors were encountered: