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

RE: Can I "visually edit" mapping?

Expand Messages
  • Keith Roberts
    ... I use the above technique for one-offs, but for stuff I want to keep in my vimrc I do it differently. I have a separate project for Vim, with a separate
    Message 1 of 6 , Nov 1, 2004
    • 0 Attachment
      >-----Original Message-----
      >From: Antoine J. Mechelynck [mailto:antoine.mechelynck@...]
      >Sent: Wednesday, October 27, 2004 10:35 AM
      >To: Gary Johnson; vim@...
      >Subject: Re: Can I "visually edit" mapping?
      >
      >Gary Johnson <garyjohn@...> wrote:
      >> For this sort of thing I usually use the command-line history to
      >> recall the map command, then edit the line using the command-line
      >> editing commands or open the command-line window where I can use
      >> normal vim editing commands. See
      >>
      >> :help cmdline-history
      >> :help cmdline-editing
      >> :help cmdline-window
      >>
      >> for details and see
      >>
      >> :help cmdline.txt
      >> :help usr_20.txt
      >>
      >> for an overview.
      >>
      >> HTH,
      >> Gary
      >>
      >> --
      >> Gary Johnson | Agilent Technologies
      >> garyjohn@... | Wireless Division
      >> | Spokane, Washington, USA
      >
      >This is even better than what I thought of.
      >
      >See also
      > :help cmdline-window
      >
      >HTH,
      >Tony

      I use the above technique for one-offs, but for stuff I want to keep in
      my vimrc I do it differently. I have a separate project for Vim, with a
      separate gui window, and all the support files I generally change
      already in windows (courtesy of sessions). I can edit the mapping there
      in the vimrc buffer (particularly if I want to keep multiple iterations
      as examples, commented out, or use something from another mapping).
      When done, ^y$ puts it on the clipboard for me (since I use :set
      cb=unnamed) and I just paste it onto the command line in the other gui.
      [Or, conversely, I'll prototype it using cmdline-editing and then do
      :let @* = @: and paste it into the vimrc buffer. :)]

      -Keith
    • Antony Scriven
      ... See also http://marc.theaimsgroup.com/?l=vim&m=109476753612502&w=2 for a function to execute a line or a range. I find this more convenient than the
      Message 2 of 6 , Nov 2, 2004
      • 0 Attachment
        Keith Roberts wrote:

        > > Gary Johnson <garyjohn@...> wrote:
        > >
        > > > For this sort of thing I usually use the command-line history to
        > > > recall the map command, then edit the line using the command-line
        > > > editing commands or open the command-line window where I can use
        > > > normal vim editing commands. [...]
        >
        > I use the above technique for one-offs, but for stuff I want to keep in
        > my vimrc I do it differently. I have a separate project for Vim, with a
        > separate gui window, and all the support files I generally change
        > already in windows (courtesy of sessions). I can edit the mapping there
        > in the vimrc buffer (particularly if I want to keep multiple iterations
        > as examples, commented out, or use something from another mapping).
        > When done, ^y$ puts it on the clipboard for me (since I use :set
        > cb=unnamed) and I just paste it onto the command line in the other gui.
        > [Or, conversely, I'll prototype it using cmdline-editing and then do
        > :let @* = @: and paste it into the vimrc buffer. :)]

        See also

        http://marc.theaimsgroup.com/?l=vim&m=109476753612502&w=2

        for a function to execute a line or a range. I find this
        more convenient than the command line window for editing
        and testing commands in scripts, e.g. maps in my vimrc.

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