Thursday, March 25, 2010

autocmd to get preceding cursor position with :bp

Hello,
My .vimrc contains only
set nocompatible
set hidden

I do the following:
gvim file1
Put the cursor on line 10, colum 23
:e file2
:bp
Result: the cursor is positioned on line 10, column 1

I would like to include an autocmd command in my .vimrc so that the
cursor after the :bp is on line 10, column 23

I tried
autocmd BufEnter * exe "normal! g`'"
but it does not work.

Thank you for your help

Jean Johner

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

To unsubscribe from this group, send email to vim_use+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.

No comments: