Bill McCarthy wrote:
On Tue 15-Aug-06 7:42pm -0600, Hari Krishna Dara wrote:

I haven't been following the thread, but thought the below information
is relevant.

The commands that can't be followed by a '|' are listed under ":help
:bar". There are some tricks to workaround, such as using :exec and
<NL>, but they don't work for function.

Yes, that's a very handy reference.  Another way to get
there is ":h :|"

A combination of :exec and <NL> can be used:

exec "function! T()\<NL>call input('T')\<NL>endfunction"

Neat!  I see \<LF> also works here, but not \<CR> (which I
used frequently).


I don't see \<LF> in the help, but IIUC you can use (within double quotes)

        \n      special \ escape
        \<NL>     newline in <> notation
        \<C-J>    Ctrl-J (newline)
        \012 (or \12 if followed by other than [0-7])   octal
        \x0A (or \xA or \xa if the next character is not [0-9A-Fa-f])   hex
        \X0A    (or ...)        hex
        \u000A (or \uA or \ua if the next...)   Unicode hex
        \U000A                  ditto
^J (an actual linefeed, entered by hitting Ctrl-V followed by Ctrl-J; it sometimes shows up as ^@)

Not sure if I cought them all, but I "think" all of these are synonymous and mean a line-feed character. (see ":help expr-quote" and "help key-notation")


Best regards,
Tony.

Reply via email to