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

"Select all and Copy" menu item

Expand Messages
  • Walter Briscoe
    I am a fairly naive user of the sophisticated features in vim additional to those in vi. I am interested in menu.vim used from gvim on a win32 platform. If I
    Message 1 of 1 , Nov 25, 2002
      I am a fairly naive user of the sophisticated features in vim additional
      to those in vi. I am interested in menu.vim used from gvim on a win32
      platform. If I use gvim -u NONE -U NONE foo, select some text, and do a
      copy menu item, the text remains selected. Without the -[uU] options,
      the text remains selected. I used :redir to put the outputs of :set all
      into a pair of files and compared those files. I was unable to find a
      significant difference. What is the relevant option?

      I want to add a Copy all option to the edit menu which is equivalent to
      Select all and Copy. My several attempts have failed. This is the
      current state of play:

      C:\wfb\vim\vim61> diff -c 0menu.vim menu.vim
      *** 0menu.vim Wed Nov 6 15:47:24 2002
      --- menu.vim Mon Nov 25 09:09:28 2002
      ***************
      *** 169,174 ****
      --- 169,175 ----
      vnoremenu 20.390 &Edit.&Delete<Tab>x x
      endif
      an <silent> 20.400 &Edit.&Select\ all<Tab>ggVG :if &slm != ""<Bar>exe ":norm gggH<C-O>G"<Bar>else<Bar>exe ":norm ggVG"<Bar>endif<CR>
      + an <silent> 20.402 &Edit.Copy\ all<Tab>ggVG"+y :if &slm != ""<Bar>exe ':norm gggH<C-O>G<C-O>"+y'<Bar>else<Bar>exe ':norm ggVG<C-
      O>"+y'<Bar>endif<CR>

      an 20.405 &Edit.-SEP2- <Nop>
      if has("win32") || has("win16") || has("gui_gtk") || has("gui_motif")

      C:\wfb\vim\vim61>

      You will see that my email software (quietly) splits long lines.
      I was surprised to find that "\" at the end of a line does not allow a
      vim command to be split across several physical lines. I prefer to avoid
      lines longer than 80 bytes in human-readable file. This question has
      caused me to cross-post this to vim-dev@.... Otherwise, I would have
      restricted myself to vim@...

      I have slm=mouse. gggH<C-O>G selects the whole buffer. "+y alone would
      insert "+y. <C-O>"+y produces an error bell.

      This is my first customisation of $VIMRUNTIME/menu.vim. Where should I
      put the file so it will be retained when I upgrade to vim 6.2 - if it
      ever happens?
      --
      Walter Briscoe
    Your message has been successfully submitted and would be delivered to recipients shortly.