sponsor Vim development Vim logo Vim Book Ad

back_to_recent_buffer.vim : Goes back to the previous buffer (rather than C-O previous position).

 script karma  Rating 10/4, Downloaded by 1040  Comments, bugs, improvements  Vim wiki

created by
joey twiddle
 
script type
utility
 
description
Sometimes I use Ctrl-] a few times to read some code, perhaps navigating up
and down in the files I visit.  Then I want to get back to where I was
before, but Ctrl-O may require a lot of hits.

Here we introduce an alternative, that goes back to the previous file, not
the previous position.  The default mapping is on C-U.

If you would rather go back to the last piece of code you were editing, see
last_edit_marker.vim

BUG TODO: If there is no previous buffer, will loop forever!  We could check
to see if we don't move at all, then abort.
 
install details
drop in plugin/

Edit the mapping in the script if you do not want it to overwrite C-U.
 

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
back_to_recent_buffer.vim 1.3 2012-10-24 6.0 joey twiddle Initial upload
ip used for rating: 3.91.19.28

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
   
Vim at Github