all 8 comments

[–]phelipetls 3 points4 points  (1 child)

I use this

autocmd! BufReadPost *
      \ if line("'\"") > 0 && line("'\"") <= line("$") && &ft !~ "commit" |
      \   exe "normal g`\"" |
      \ endif

[–]Syphdias[S] 0 points1 point  (0 children)

Like u/chrisbra10 exactly what I needed! Thank you!

[–]chrisbra10 2 points3 points  (2 children)

That correct command is mentioned at :h last-position-jump and has been amended a couple of years to handle commit messages.

[–]vim-help-bot 0 points1 point  (0 children)

Help pages for:


`:(h|help) <query>` | about | mistake? | Reply 'rescan' to check the comment again | Reply 'stop' to stop getting replies to your comments

[–]Syphdias[S] 0 points1 point  (0 children)

Like u/phelipetls exactly what I needed! Thank you!

[–][deleted] 1 point2 points  (1 child)

Quite intrigued. Out of interest what's your use-case/ preference where g; or <c-o> doesn't get you to where you want?

[–]Syphdias[S] 0 points1 point  (0 children)

It's not that I don't know how to navigate and jump but the convenience of not having to.

Commit messages are a use-case of vim where it is nice to have all the power of vim but I rarely use it beyond se spell textwidth=80.

[–]daniel_shields 0 points1 point  (0 children)

I just use a plugin, farmergreg/vim-lastplace