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

motion in edit command

Expand Messages
  • scott2237
    group-- i have a simple script that calls up my current action items log, as follows: 31 Jan 2004 14:56 Sat bai.vim -- edit current ai (action
    Message 1 of 3 , Jan 31, 2004
    • 0 Attachment
      group--

      i have a simple script that calls up my current
      action items log, as follows:

      " 31 Jan 2004 14:56 Sat
      "
      " bai.vim -- edit current ai (action items) module
      "
      " TODO: have it take us to the bottom of the module

      let z = "c:\\txt\\ai_" . strftime("%Y%m") . ".txt"
      execute "e " . z

      what i am wanting is for it to drop me at the bottom
      of the module, with for example a "normal G" or a
      "normal 100%" -- i am thinking "normal" since commands
      in the edit command added with "+" are for ex commands,
      but the syntax is eluding me...

      any help will be appreciated...

      toothpik
    • Gumnos (Tim Chase)
      ... Well, you could append the $ command to your execute statement, something like execute e .z. |$ plus or minus some levels of escaping on that pipe.
      Message 2 of 3 , Jan 31, 2004
      • 0 Attachment
        > let z = "c:\\txt\\ai_" . strftime("%Y%m") . ".txt"
        > execute "e " . z
        >
        > what i am wanting is for it to drop me at the bottom
        > of the module, with for example a "normal G" or a
        > "normal 100%" -- i am thinking "normal" since commands
        > in the edit command added with "+" are for ex commands,
        > but the syntax is eluding me...

        Well, you could append the "$" command to your execute statement, something
        like

        execute "e ".z." \|$"

        plus or minus some levels of escaping on that pipe. That's the ex equiv. of
        issuing a "G" in visual mode.

        HTH,

        -tim
      • Michael Geddes
        ... let z = c: txt ai_ . strftime( %Y%m ) . .txt execute e + . z //. ... From: scott2237 [mailto:scott2237@yahoo.com] Sent: Sunday, 1 February 2004
        Message 3 of 3 , Feb 1, 2004
        • 0 Attachment
          :help :edit
          :help +cmd

          let z = "c:\\txt\\ai_" . strftime("%Y%m") . ".txt"
          execute "e + " . z

          //.

          -----Original Message-----
          From: scott2237 [mailto:scott2237@...]
          Sent: Sunday, 1 February 2004 8:46 AM
          To: vim@...
          Subject: motion in edit command


          group--

          i have a simple script that calls up my current
          action items log, as follows:

          " 31 Jan 2004 14:56 Sat
          "
          " bai.vim -- edit current ai (action items) module
          "
          " TODO: have it take us to the bottom of the module

          let z = "c:\\txt\\ai_" . strftime("%Y%m") . ".txt"
          execute "e " . z

          what i am wanting is for it to drop me at the bottom
          of the module, with for example a "normal G" or a
          "normal 100%" -- i am thinking "normal" since commands
          in the edit command added with "+" are for ex commands,
          but the syntax is eluding me...

          any help will be appreciated...

          toothpik
        Your message has been successfully submitted and would be delivered to recipients shortly.