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

jumping to a column

Expand Messages
  • Prashant Nukala
    Hi , In the course of a vim funtion , i want the cursor to jump to a particular column .(say 40 ) In the command mode i say 40| (40 followed by a pipe ) .
    Message 1 of 3 , Feb 1, 2002
      Hi ,
      In the course of a vim funtion , i want the cursor to jump to a
      particular column .(say 40 ) In the command mode i say "40|" (40
      followed by a pipe ) . but if I put the same thing in a function it will
      be interpreted as " :40| " , which is not correct
      How do i do that ?

      Thanx
      Prash
    • KONTRA Gergely
      ... norm 40| +-[Kontra, Gergely @ Budapest University of Technology and Economics]-+ ... +------- Olyan langesz vagyok, hogy poroltoval kellene
      Message 2 of 3 , Feb 1, 2002
        > In the course of a vim funtion , i want the cursor to jump to a
        >particular column .(say 40 ) In the command mode i say "40|" (40
        >followed by a pipe ) . but if I put the same thing in a function it will
        >be interpreted as " :40| " , which is not correct
        >How do i do that ?
        norm 40|

        +-[Kontra, Gergely @ Budapest University of Technology and Economics]-+
        | Email: CHANGED! kgergely@... kgergely@... (old) |
        | URL: turul.eet.bme.hu/~kgergely Mobile: (+36 20) 356 9656 |
        +-------"Olyan langesz vagyok, hogy poroltoval kellene jarnom!"-------+
        .
        Magyar php mirror es magyar php dokumentacio: http://hu.php.net
      • Christian J. Robinson
        ... Hash: SHA1 ... That s usually called normal mode . The :help calls it both command mode and normal mode, but I ve observed that most people use the term
        Message 3 of 3 , Feb 1, 2002
          -----BEGIN PGP SIGNED MESSAGE-----
          Hash: SHA1

          Today, Prashant Nukala wrote:

          > In the course of a vim funtion , i want the cursor to jump to a
          > particular column .(say 40 ) In the command mode i say "40|"

          That's usually called "normal mode". The :help calls it both command
          mode and normal mode, but I've observed that most people use the term
          "command mode" for "command-line mode".

          > (40 followed by a pipe ) . but if I put the same thing in a function
          > it will be interpreted as " :40| "

          :normal 40|

          Of course, if you need to store the number in a variable or something,
          you'll probably also need to use ":execute":

          :execute "normal " . saved_column . "|"

          See:
          :help normal
          :help execute


          - - Christian

          - --
          Fingers not found - Pound head on keyboard to continue.
          Christian J. Robinson <infynity@...> ICQ: 15869262
          http://infynity.spodzone.com/ GPG key: hkp://pgpkeys.mit.edu/0x893B0EAF
          -----BEGIN PGP SIGNATURE-----
          Version: GnuPG v1.0.6 (GNU/Linux)
          Comment: For info see http://www.gnupg.org

          iD8DBQE8WrdoNCSthIk7Dq8RAj/qAJ0YoI/gwhBSSO0z/uB/e64ia4dZpgCdH8s/
          veL21eWl/adTpS6j39+5U4U=
          =qrAG
          -----END PGP SIGNATURE-----
        Your message has been successfully submitted and would be delivered to recipients shortly.