OK. I've got a text file that looks like this:

pre

and a function that looks like this:

function! Test_func()
  exe "normal ggVGyGobottom\<Esc>pVG"
  '<,'>s/pre/post/
endfunction

The first line leaves me with a file that looks like this:

pre
bottom
pre

with the bottom "pre" selected. At this point I can run the second line as a
separate command to get:

pre
bottom
post

But, when I include the second line in the function and run the function as
a whole, I get:

post
bottom
pre

I'm baffled.
-- 
View this message in context: 
http://old.nabble.com/Function-behaving-unexpectedly.-Very-confused.-tp28799920p28799920.html
Sent from the Vim - General mailing list archive at Nabble.com.

-- 
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

Reply via email to