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

Re: vertical split width

Expand Messages
  • Tony Mechelynck
    ... To copy to the clipboard from gvim (or from X-enabled console Vim running in an xterm, or from Windows console Vim compiled with +clipboard), yank to
    Message 1 of 6 , Dec 1, 2007
    • 0 Attachment
      molecula21 wrote:
      > how do i change the width of a vertical split window?. i know how to
      > do that with a horizontal split by adding the folowing to .vimrc
      >
      > if buffwin(1)
      > map + <C-W> +
      > map - <C-W> -
      > endif
      >
      > but it seams harder to do it on a vertical splited window...
      >
      >
      > another question: how do i copy text from vim to outside vim? e.g. i
      > had to write down the previous piece of my vimrc because i just didn't
      > figure out a way to copy it to this post...

      To copy to the clipboard from gvim (or from X-enabled console Vim running in
      an xterm, or from Windows console Vim compiled with +clipboard), yank to
      register plus.

      For a snippet of your vimrc: use linewise-visual, then

      "+y
      or
      :'<,'>y +

      (where Vim fills in '<,'> when you hit the colon key). The latter can also be
      used outside Visual mode with a normal range, as in

      :.-2,.+4y+

      to yank the current line to the clipboard, together with 2 lines above it and
      4 lines below it.

      To copy the whole file currently being edited to the clipboard, use a
      different range:

      :1,$y+
      or
      :%y+

      For something that Vim prints out on the bottom line (such as the output of
      ":version") use the ":redir" command, as in

      :redir @+
      :version
      :redir END

      which copies the "version" page of your current Vim to the clipboard.

      For non-clipboard-enabled versions of Vim, you will have to save to a file
      instead, as in

      :.-2,.+4w! clipboard.txt
      or
      :redir! version.txt
      :version
      :redir END


      Best regards,
      Tony.
      --
      "As an adolescent I aspired to lasting fame, I craved factual
      certainty, and I thirsted for a meaningful vision of human life -- so I
      became a scientist. This is like becoming an archbishop so you can
      meet girls."
      -- Matt Cartmill

      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_use" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    • Tony Mechelynck
      ... Easiest IMHO is dragging the vertical separation with the mouse. Or else, in a script you could use e.g. ... to give (if possible) 50 columns to the
      Message 2 of 6 , Dec 1, 2007
      • 0 Attachment
        molecula21 wrote:
        > how do i change the width of a vertical split window?. i know how to
        > do that with a horizontal split by adding the folowing to .vimrc
        >
        > if buffwin(1)
        > map + <C-W> +
        > map - <C-W> -
        > endif
        >
        > but it seams harder to do it on a vertical splited window...

        Easiest IMHO is dragging the vertical separation with the mouse. Or else, in a
        script you could use e.g.

        :setlocal winwidth=50

        to give (if possible) 50 columns to the current vertically-split window.

        See also
        :help CTRL-W_<
        :help CTRL-W_>

        Best regards,
        Tony.
        --
        "Benson, you are so free of the ravages of intelligence"
        -- Time Bandits


        --~--~---------~--~----~------------~-------~--~----~
        You received this message from the "vim_use" maillist.
        For more information, visit http://www.vim.org/maillist.php
        -~----------~----~----~----~------~----~------~--~---
      • Bill McCarthy
        ... Since you didn t specify your OS, I ll assume it s Windows. If you set the clipboard to unnamed, a simple yank, or any operation that goes to unnamed, will
        Message 3 of 6 , Dec 1, 2007
        • 0 Attachment
          On Sat 1-Dec-07 7:24pm -0600, molecula21 wrote:

          > another question: how do i copy text from vim to outside vim? e.g. i
          > had to write down the previous piece of my vimrc because i just didn't
          > figure out a way to copy it to this post...

          Since you didn't specify your OS, I'll assume it's Windows.
          If you set the clipboard to unnamed, a simple yank, or any
          operation that goes to unnamed, will save to the clipboard.

          Then from your windows app, paste from the clipboard
          (usually ctrl-v).

          :h 'cb'|/unnamed

          --
          Best regards,
          Bill


          --~--~---------~--~----~------------~-------~--~----~
          You received this message from the "vim_use" maillist.
          For more information, visit http://www.vim.org/maillist.php
          -~----------~----~----~----~------~----~------~--~---
        • molecula21
          thank you all! problem solved! --~--~---------~--~----~------------~-------~--~----~ You received this message from the vim_use maillist. For more
          Message 4 of 6 , Dec 3, 2007
          • 0 Attachment
            thank you all! problem solved!
            --~--~---------~--~----~------------~-------~--~----~
            You received this message from the "vim_use" maillist.
            For more information, visit http://www.vim.org/maillist.php
            -~----------~----~----~----~------~----~------~--~---
          Your message has been successfully submitted and would be delivered to recipients shortly.