mirror of
https://github.com/tomru/nvim.git
synced 2026-03-04 15:07:16 +01:00
remember where I left off
This commit is contained in:
@@ -6,6 +6,16 @@ vim.api.nvim_create_autocmd('TextYankPost', {
|
|||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
-- return to last cursor position when reopening a file
|
||||||
|
vim.api.nvim_create_autocmd('BufReadPost', {
|
||||||
|
callback = function()
|
||||||
|
local last_pos = vim.fn.line '\'"'
|
||||||
|
if last_pos > 1 and last_pos <= vim.fn.line '$' then
|
||||||
|
vim.cmd 'normal! g`"'
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
vim.api.nvim_create_autocmd('FileType', {
|
vim.api.nvim_create_autocmd('FileType', {
|
||||||
pattern = {
|
pattern = {
|
||||||
'checkhealth',
|
'checkhealth',
|
||||||
|
|||||||
Reference in New Issue
Block a user