Thursday, June 28, 2012

It works but it doesn't work

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



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