Thursday, June 28, 2012

Re: It works but it doesn't work

Hi,

howard Schwartz wrote:
> I've got two simple ex commands in a larger script. When I run them on the
> file, direct from the ex command line, they work fine. When I run them from
> the script, they do not work. Even If I simply jut put the commands below in
> a simple script file, script.vim, enter my main file and execute
>
> :source script.vim <ENTER>
>
> The commands do not do their job on the file. Why would they work, if run
> directly, but not, if run within a script?
>
> set wrapscan
> "wrap long lines

did you really mean wrapscan? From you comment it seems you wanted ot

set wrap

> g/^.\{80,}$/gqgq
> "join hyphnated words at end of lines
> g/[^-]-\n/s/-\n\([^ ]*\)/\1 /

Regards,
Jürgen

--
Sometimes I think the surest sign that intelligent life exists elsewhere
in the universe is that none of it has tried to contact us. (Calvin)

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

No comments: