jump to last position in nvim
This commit is contained in:
parent
539d9099f8
commit
1b286b52c3
1 changed files with 12 additions and 0 deletions
|
|
@ -31,3 +31,15 @@ vim.opt.scrolloff = 8
|
|||
vim.opt.signcolumn = 'yes'
|
||||
vim.opt.updatetime = 500
|
||||
vim.opt.colorcolumn = '80'
|
||||
|
||||
vim.api.nvim_create_autocmd('BufReadPost', {
|
||||
group = vim.g.user.event,
|
||||
callback = function(args)
|
||||
local valid_line = vim.fn.line([['"]]) >= 1 and vim.fn.line([['"]]) < vim.fn.line('$')
|
||||
local not_commit = vim.b[args.buf].filetype ~= 'commit'
|
||||
|
||||
if valid_line and not_commit then
|
||||
vim.cmd([[normal! g`"]])
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in a new issue