Loading ...
Sorry, an error occurred while loading the content.

Re: my first function

Expand Messages
  • Tomas Zellerin
    ... Commands in functions are those of command mode. You should generally prepend : to get help on command mode commands ... You may want to know there is
    Message 1 of 3 , Apr 29, 2002
    • 0 Attachment
      On Mon, Apr 29, 2002 at 10:46:27AM +0200, Raphael Bauduin wrote:
      > Hi,
      >
      > I've read the usr_41.txt help page, but I'm still having some troubles....
      >
      > One of the things I encountered is that, in my function, using 'p' will print
      > the current line. I thought it would put the register (as in normal mode), but in my
      > function I have to use put to have this behaviour.
      >
      > Is there documentation available about all those things to know when writing a
      > function (using put and not p, -1 moves one line above,...)?
      > Where do I have to look?
      > :he p
      > gives the explaination of the normal mode, and not the explanation of the
      > command in a function.
      Commands in functions are those of command mode.
      You should generally prepend : to get help on command mode commands
      :help :p
      :help :put
      :help command-mode

      You may want to know there is :norm function that executes commands in
      normal mode
      :normal p
      :help normal
    • Raphael Bauduin
      Hi, I ve read the usr_41.txt help page, but I m still having some troubles.... One of the things I encountered is that, in my function, using p will print
      Message 2 of 3 , Apr 29, 2002
      • 0 Attachment
        Hi,

        I've read the usr_41.txt help page, but I'm still having some troubles....

        One of the things I encountered is that, in my function, using 'p' will print
        the current line. I thought it would put the register (as in normal mode), but in my
        function I have to use put to have this behaviour.

        Is there documentation available about all those things to know when writing a
        function (using put and not p, -1 moves one line above,...)?
        Where do I have to look?
        :he p
        gives the explaination of the normal mode, and not the explanation of the
        command in a function.

        Thanks for your help.

        Raph
        --
        Free Software and Open Source Developers Meeting
        See you at the 2002 edition. Check the 2001 sessions on www.opensource-tv.com
        Visit http://www.fosdem.org and become member of the mailing list!
      • Raphael Bauduin
        Looking further in the documentation, I think I got it right: by default, in functions, you are in : mode (don t remember the name :-) So, I have to use ...
        Message 3 of 3 , Apr 29, 2002
        • 0 Attachment
          Looking further in the documentation, I think I got it right:
          by default, in functions, you are in ':' mode (don't remember the name :-)

          So, I have to use
          :normal p
          or
          :put

          to put the register.

          Sorry for this monologue :-)

          Raph

          On Mon, Apr 29, 2002 at 10:46:27AM +0200, Raphael Bauduin wrote:
          > Hi,
          >
          > I've read the usr_41.txt help page, but I'm still having some troubles....
          >
          > One of the things I encountered is that, in my function, using 'p' will print
          > the current line. I thought it would put the register (as in normal mode), but in my
          > function I have to use put to have this behaviour.
          >
          > Is there documentation available about all those things to know when writing a
          > function (using put and not p, -1 moves one line above,...)?
          > Where do I have to look?
          > :he p
          > gives the explaination of the normal mode, and not the explanation of the
          > command in a function.
          >
          > Thanks for your help.
          >
          > Raph
          > --
          > Free Software and Open Source Developers Meeting
          > See you at the 2002 edition. Check the 2001 sessions on www.opensource-tv.com
          > Visit http://www.fosdem.org and become member of the mailing list!

          --
          Free Software and Open Source Developers Meeting
          See you at the 2002 edition. Check the 2001 sessions on www.opensource-tv.com
          Visit http://www.fosdem.org and become member of the mailing list!
        Your message has been successfully submitted and would be delivered to recipients shortly.