When openging files jump to last row *and column*.
dblume

dblume commited on 2024-04-27 22:56:54
Showing 2 changed files, with 2 additions and 2 deletions.


I'd only been jumping to the last row with g'".
Use g`" to jump to the last row and column.
... ...
@@ -308,7 +308,7 @@ augroup END
308 308
   " When editing a file, always jump to the last cursor position...
309 309
   autocmd BufReadPost *
310 310
   \ if line("'\"") > 0 && line ("'\"") <= line("$") |
311
-  \   exe "normal! g'\"" |
311
+  \   exe "normal! g`\"" |
312 312
   \ endif
313 313
   " ...except for gitcommit where we always want to start at the top
314 314
   autocmd FileType gitcommit exe "normal! gg"
... ...
@@ -329,7 +329,7 @@ augroup END
329 329
   " When editing a file, always jump to the last cursor position...
330 330
   autocmd BufReadPost *
331 331
   \ if &ft != "gitcommit" && line("'\"") > 0 && line ("'\"") <= line("$") |
332
-  \   exe "normal! g'\"" |
332
+  \   exe "normal! g`\"" |
333 333
   \ endif
334 334
   " ...except for gitcommit where we always want to start at the top (nvim)
335 335
   autocmd FileType gitcommit exe "normal! gg"
336 336