Tip #629: After quitting VIM, comeback to the same file position where you were while quitting.
tip karma
Rating -10/15, Viewed by 1317
created:
January 2, 2004 3:21
complexity:
basic
author:
Smart opening and closing
as of Vim:
5.7
many a times while editing a big file we may temporarily want to go to command prompt and
open the same file again. Then again you will be in the first character of the file. This is a smarter tip for
taking the cursor to the same position where you were while quitting.
Just when you want to quit VIM instead of pressing ESC :q just press ctrl+z. You can see this
[1]+ Stopped vim <filename>
you are in command prompt now. Do your work and when u want to return to VIm press fg.