On Wed, Feb 07, 2007 at 01:55:32PM -0700, Byron Clark wrote:
> 
> When you open an empty file in ViM it should show one empty line with
> the cursor on that line.  :0r inserts text above the first line so the
> extra line you are seeing is the one ViM creates for the new file
> being pushed to the bottom of the buffer.  That's how the line gets
> there, but I have no idea how to get rid of it.

That kind of makes sense.  Here's my workaround.  I was doing:

autocmd BufNewFile *.py 0r ~/.vim/skel.py

but now I'm doing:

autocmd BufNewFile *.py r ~/.vim/skel.py
autocmd BufNewFile *.py exe "normal 1Gddj"

Maybe there's an easier way, but this seems to be a start.  Now it even
puts me at the first blank line. :)


-- 
Andrew McNabb
http://www.mcnabbs.org/andrew/
PGP Fingerprint: 8A17 B57C 6879 1863 DE55  8012 AB4D 6098 8826 6868

Attachment: signature.asc
Description: Digital signature

--------------------
BYU Unix Users Group 
http://uug.byu.edu/ 

The opinions expressed in this message are the responsibility of their
author.  They are not endorsed by BYU, the BYU CS Department or BYU-UUG. 
___________________________________________________________________
List Info: http://uug.byu.edu/cgi-bin/mailman/listinfo/uug-list

Reply via email to