On Sun, 7 May 2006, Suresh Govindachar wrote:


Hello,

 After the following command,

     :let i=0 | %g/^/let i+=1

 the display changes to show the very last line.

 How can I prevent the display from changing?

There are many other functions written to do this:

  http://www.vim.org/tips/tip.php?tip_id=1109

However, if you're looking to let i = number of lines in the buffer
(which I doubt; you probably simplified what you wanted to do), you can
just do

  :let i = line("$")

HTH :)
--
Gerald

Reply via email to