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

Execute Function/Ruby Script in Visual Mode

Expand Messages
  • Matthias-Christian Ott
    Hi, normally functions or even ruby scripts run in ex mode, but sometimes it necessary to execute them in visual mode (e.g. using v_s to replace the selected
    Message 1 of 3 , Jul 2, 2006
    • 0 Attachment
      Hi,
      normally functions or even ruby scripts run in ex mode, but sometimes it
      necessary to execute them in visual mode (e.g. using v_s to replace the
      selected text). When switching back to visual mode (e.g. via ESC v) the
      selection is lost, so it's no a real solution.
      Any suggestion regarding to my problem?

      --
      Matthias-Christian Ott
    • Yakov Lerner
      ... gv restores last visual selection Yakov
      Message 2 of 3 , Jul 2, 2006
      • 0 Attachment
        On 7/2/06, Matthias-Christian Ott <matthias.christian@...> wrote:
        > Hi,
        > normally functions or even ruby scripts run in ex mode, but sometimes it
        > necessary to execute them in visual mode (e.g. using v_s to replace the
        > selected text). When switching back to visual mode (e.g. via ESC v) the
        > selection is lost, so it's no a real solution.
        > Any suggestion regarding to my problem?


        gv restores last visual selection

        Yakov
      • Yakov Lerner
        ... to make myself clearer: try gv not *after* Esc v but *instead of* Esc v. Yakov
        Message 3 of 3 , Jul 2, 2006
        • 0 Attachment
          On 7/2/06, Yakov Lerner <iler.ml@...> wrote:
          > On 7/2/06, Matthias-Christian Ott <matthias.christian@...> wrote:
          > > Hi,
          > > normally functions or even ruby scripts run in ex mode, but sometimes it
          > > necessary to execute them in visual mode (e.g. using v_s to replace the
          > > selected text). When switching back to visual mode (e.g. via ESC v) the
          > > selection is lost, so it's no a real solution.
          > > Any suggestion regarding to my problem?
          >
          >
          > gv restores last visual selection

          to make myself clearer: try gv not *after* Esc v but
          *instead of* Esc v.

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