Re: [SLUG] VIM question

From: Paul M Foster (paulf@quillandmouse.com)
Date: Thu Sep 25 2003 - 22:37:39 EDT


On Wed, Sep 24, 2003 at 06:08:59PM -0700, Michael Manchester wrote:

> I found it. I had to mount my Redhat 9.0 partition and
> stell the vimrc from it. After doing a little
> degugging
> Here is the code to put in the vimrc file to place you
> at the last line you were editing when you saved a
> file.
>
>
> if has("autocmd")
> " In text files, always limit the width of text to
> 78 characters
> autocmd BufRead *.txt set tw=78
> " When editing a file, always jump to the last
> cursor position
> autocmd BufReadPost *
> \ if line("'\"") > 0 && line ("'\"") <= line("$") |
> \ exe "normal g'\"" |
> \ endif
> endif

Thanks, Mike. I hadn't been looking for this, but it's a capability I've
enjoyed in other editors. Now I have it in Vim. ;-}

Paul
-----------------------------------------------------------------------
This list is provided as an unmoderated internet service by Networked
Knowledge Systems (NKS). Views and opinions expressed in messages
posted are those of the author and do not necessarily reflect the
official policy or position of NKS or any of its employees.



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 19:00:53 EDT