lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [lmi] master f4d9e2e 2/3: Restore last position in vim


From: Greg Chicares
Subject: [lmi-commits] [lmi] master f4d9e2e 2/3: Restore last position in vim
Date: Mon, 21 Sep 2020 13:19:15 -0400 (EDT)

branch: master
commit f4d9e2e81833add1a15903df422854fb03866875
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>

    Restore last position in vim
    
    This could be refined later, e.g., to place the cursor at upper left
    in '.git/COMMIT_EDITMSG'.
---
 gwc/.vimrc | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/gwc/.vimrc b/gwc/.vimrc
index e7916d6..b0cc532 100644
--- a/gwc/.vimrc
+++ b/gwc/.vimrc
@@ -36,6 +36,9 @@ set cinoptions=t0\ g0\ {s\ (0\ U1 comments^=:///
 " By default, vim detects '*.mak' as type make, but not '*.make'
 au BufNewFile,BufRead *.make setf make
 
+" Restore last position
+au BufReadPost * normal! g`"zv
+
 au BufReadPost,BufNewFile *.tpp set ft=cpp
 au BufReadPost,BufNewFile *.xpp set ft=cpp
 " au BufReadPost,BufNewFile *.?pp set ft=cpp



reply via email to

[Prev in Thread] Current Thread [Next in Thread]