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

25680Re: jumping to a column

Expand Messages
  • Christian J. Robinson
    Feb 1, 2002
      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 . "|"

      :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

      -----END PGP SIGNATURE-----
    • Show all 3 messages in this topic