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

Re: interactive registers

Expand Messages
  • Benji Fisher
    ... [snip] ... The LeftMouse() function can test whether you are in the special register window, with expand( % ), and where on the line you are, with line(),
    Message 1 of 5 , Apr 30, 2003
    • 0 Attachment
      Nagyon Álmos wrote:
      > Hello vim-fans,
      >
      [snip]
      > My questions are:
      > -How can I catch the left-click event?

      :nmap <LeftMouse> <LeftMouse>:call LeftClick()<CR>

      > -And that where it happened?

      The LeftMouse() function can test whether you are in the special register
      window, with expand("%"), and where on the line you are, with line(), col(), and
      getline().

      :help functions

      > -Or it would be much easier to create n windows
      > and copy the often-used-values into them, and
      > redefine the left-click to copy the content of
      > the whole buffer into register * ?

      That depends on how many there are, and personal preference.

      > -Or, on the whole,
      > how do you, vim-experts and gurus, do this?

      I have not tried the regview plugin, but if I have

      @a = "foo"
      @b = "bar"

      displayed in a side window, I would rather type "ap then switch windows. In TeX
      files, where line breaks are flexible, I often put

      complicated$^{\hbox{\rm expressions}}$ that get repeated

      on lines by themselves, and then use <C-X><C-L> to recall them

      :help ins-completion

      HTH --Benji Fisher
    Your message has been successfully submitted and would be delivered to recipients shortly.