Re: [SLUG] VIM question

From: Michael Manchester (mchester@yahoo.com)
Date: Wed Sep 24 2003 - 21:08:59 EDT


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

Enjoy
Mike M.

--- Levi Bard <levi@bard.sytes.net> wrote:
> > Since going to Debian my vim doesn't return me to
> > where I last was in the file I was editing. I've
> > searched google and vim.org and can't seem to find
> > what I need to add to my .vimrc file to make this
> > happen. I would like to be able to be on line 200
> of a
> > 500 line file and return back to line 200 or what
> ever
> > when I edit that file again a day or two later.
>
> To my recollection, I've never had an installation
> of vim that has behaved
> like that. I always find my place with the search
> '(esc)/regex' and "jump
> to line" '(esc):linenum' functions.
>
> Levi
>
-----------------------------------------------------------------------
> 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.

=====
---------------------------------
The requirements said
"Windows 95/98/NT or better"
So I installed Linux
---------------------------------

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com
-----------------------------------------------------------------------
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 - 18:55:10 EDT