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

gvim paste from windows clipboard

Expand Messages
  • Bob Hensell
    Does anyone have a tip for me? I am running gvim 6.4 from cygwin on my XP machine. Whenever I try to paste into gvim from another application using the
    Message 1 of 14 , Mar 31, 2006
      Does anyone have a tip for me? I am running gvim 6.4 from cygwin on my XP
      machine. Whenever I try to paste into gvim from another application using
      the middle mouse button, the text gets pasted, but a ^@ also gets appended
      to each line of my text. Is there something I can put into my .vimrc file?
      I've tried the mswin.vim but that didn't help. I'm rather new to vim and
      gvim. I work with UNIX servers all day, so I'm used to vi, but I like the
      script coloring that is available in vim. Any help would be greatly
      appreciated because as it works now with the appending text, it makes it
      virtually unusable because I do a lot of pasting into my scripts.

      Thanks!

      Please note that my e-mail address has changed to rhensell@...

      Bob Hensell
      Systems Engineer
      (574)232-3784 ex.236
      Fax: (574) 232-4014
      rhensell@...
      Please reply to: mailto:ocieservice@...

      Donnell Systems, Inc.
      300 S. St. Louis Blvd., Suite 203
      South Bend, Indiana 46617

      ---------------------------------------------------------------------
      Confidentiality Notice:
      ---------------------------------------------------------------------
      The contents of this e-mail message and any attachments are intended
      solely for the addressee(s) named in this message. This communication
      is intended to be and to remain confidential. If you are not the
      intended recipient of this message, or if this message has been
      addressed to you in error, please immediately alert the sender by
      reply e-mail and then delete this message and its attachments. Do not
      deliver, distribute, copy, disclose the contents or take any action
      in reliance upon the information contained in the communication or
      any attachments.
    • Bob Hensell
      Please disregard my previous email, and reply to this email, thank you: Does anyone have a tip for me? I am running gvim 6.4 from cygwin on my XP machine.
      Message 2 of 14 , Mar 31, 2006
        Please disregard my previous email, and reply to this email, thank you:



        Does anyone have a tip for me? I am running gvim 6.4 from cygwin on my XP
        machine. Whenever I try to paste into gvim from another application using
        the middle mouse button, the text gets pasted, but a ^@ also gets appended
        to each line of my text. Is there something I can put into my .vimrc file?
        I've tried the mswin.vim but that didn't help. I'm rather new to vim and
        gvim. I work with UNIX servers all day, so I'm used to vi, but I like the
        script coloring that is available in vim. Any help would be greatly
        appreciated because as it works now with the appending text, it makes it
        virtually unusable because I do a lot of pasting into my scripts.

        Thanks!
      • David Rock
        ... Try :set paste and see if that makes a difference. I have also seen where doing a shift-click works. -- David Rock david@graniteweb.com
        Message 3 of 14 , Mar 31, 2006
          * Bob Hensell <rhensell@...> [2006-03-31 13:33]:
          > Please disregard my previous email, and reply to this email, thank you:
          >
          >
          >
          > Does anyone have a tip for me? I am running gvim 6.4 from cygwin on my XP
          > machine. Whenever I try to paste into gvim from another application using
          > the middle mouse button, the text gets pasted, but a ^@ also gets appended
          > to each line of my text. Is there something I can put into my .vimrc file?
          > I've tried the mswin.vim but that didn't help. I'm rather new to vim and
          > gvim. I work with UNIX servers all day, so I'm used to vi, but I like the
          > script coloring that is available in vim. Any help would be greatly
          > appreciated because as it works now with the appending text, it makes it
          > virtually unusable because I do a lot of pasting into my scripts.

          Try :set paste and see if that makes a difference. I have also seen
          where doing a shift-click works.

          --
          David Rock
          david@...
        • Bob Hensell
          Unfortunately, neither seem to work. Thank you for the input though! Please note that my e-mail address has changed to rhensell@ocie.net Bob Hensell Systems
          Message 4 of 14 , Mar 31, 2006
            Unfortunately, neither seem to work. Thank you for the input though!



            Please note that my e-mail address has changed to rhensell@...

            Bob Hensell
            Systems Engineer
            (574)232-3784 ex.236
            Fax: (574) 232-4014
            rhensell@...
            Please reply to: mailto:ocieservice@...

            Donnell Systems, Inc.
            300 S. St. Louis Blvd., Suite 203
            South Bend, Indiana 46617

            ---------------------------------------------------------------------
            Confidentiality Notice:
            ---------------------------------------------------------------------
            The contents of this e-mail message and any attachments are intended
            solely for the addressee(s) named in this message. This communication
            is intended to be and to remain confidential. If you are not the
            intended recipient of this message, or if this message has been
            addressed to you in error, please immediately alert the sender by
            reply e-mail and then delete this message and its attachments. Do not
            deliver, distribute, copy, disclose the contents or take any action
            in reliance upon the information contained in the communication or
            any attachments.



            -----Original Message-----
            From: David Rock [mailto:david@...]
            Sent: Friday, March 31, 2006 2:10 PM
            To: vim@...
            Subject: Re: gvim paste from windows clipboard

            * Bob Hensell <rhensell@...> [2006-03-31 13:33]:
            > Please disregard my previous email, and reply to this email, thank you:
            >
            >
            >
            > Does anyone have a tip for me? I am running gvim 6.4 from cygwin on
            > my XP machine. Whenever I try to paste into gvim from another
            > application using the middle mouse button, the text gets pasted, but a
            > ^@ also gets appended to each line of my text. Is there something I can
            put into my .vimrc file?
            > I've tried the mswin.vim but that didn't help. I'm rather new to vim
            > and gvim. I work with UNIX servers all day, so I'm used to vi, but I
            > like the script coloring that is available in vim. Any help would be
            > greatly appreciated because as it works now with the appending text,
            > it makes it virtually unusable because I do a lot of pasting into my
            scripts.

            Try :set paste and see if that makes a difference. I have also seen where
            doing a shift-click works.

            --
            David Rock
            david@...
          • Bob Davis
            why dont you just use *p which puts the window clipboard wherever. ... -- Bob Davis | Senior Advisory Software Developer - Applications Robert.Davis@Infor.com
            Message 5 of 14 , Mar 31, 2006
              why dont you just use "*p which puts the window clipboard wherever.


              Bob Hensell wrote:
              > Does anyone have a tip for me? I am running gvim 6.4 from cygwin on my XP
              > machine. Whenever I try to paste into gvim from another application using
              > the middle mouse button, the text gets pasted, but a ^@ also gets appended
              > to each line of my text. Is there something I can put into my .vimrc file?
              > I've tried the mswin.vim but that didn't help. I'm rather new to vim and
              > gvim. I work with UNIX servers all day, so I'm used to vi, but I like the
              > script coloring that is available in vim. Any help would be greatly
              > appreciated because as it works now with the appending text, it makes it
              > virtually unusable because I do a lot of pasting into my scripts.
              >
              > Thanks!
              >
              > Please note that my e-mail address has changed to rhensell@...
              >
              > Bob Hensell
              > Systems Engineer
              > (574)232-3784 ex.236
              > Fax: (574) 232-4014
              > rhensell@...
              > Please reply to: mailto:ocieservice@...
              >
              > Donnell Systems, Inc.
              > 300 S. St. Louis Blvd., Suite 203
              > South Bend, Indiana 46617
              >
              > ---------------------------------------------------------------------
              > Confidentiality Notice:
              > ---------------------------------------------------------------------
              > The contents of this e-mail message and any attachments are intended
              > solely for the addressee(s) named in this message. This communication
              > is intended to be and to remain confidential. If you are not the
              > intended recipient of this message, or if this message has been
              > addressed to you in error, please immediately alert the sender by
              > reply e-mail and then delete this message and its attachments. Do not
              > deliver, distribute, copy, disclose the contents or take any action
              > in reliance upon the information contained in the communication or
              > any attachments.
              >
              >
              >
              >
              > .
              >

              --
              Bob Davis | Senior Advisory Software Developer - Applications
              Robert.Davis@...
              Work: 603-926-9696 x3456
              Home: 603-778-0781
              Aim: dad1732
              Yim: rsdavis9
            • Bob Hensell
              That paste also appends the ^@ character at the end of my text. ... From: Bob Davis [mailto:Robert.Davis@infor.com] Sent: Friday, March 31, 2006 2:36 PM To:
              Message 6 of 14 , Mar 31, 2006
                That paste also appends the ^@ character at the end of my text.

                -----Original Message-----
                From: Bob Davis [mailto:Robert.Davis@...]
                Sent: Friday, March 31, 2006 2:36 PM
                To: Bob Hensell
                Cc: vim@...
                Subject: Re: gvim paste from windows clipboard

                why dont you just use "*p which puts the window clipboard wherever.


                Bob Hensell wrote:
                > Does anyone have a tip for me? I am running gvim 6.4 from cygwin on
                > my XP machine. Whenever I try to paste into gvim from another
                > application using the middle mouse button, the text gets pasted, but a
                > ^@ also gets appended to each line of my text. Is there something I can
                put into my .vimrc file?
                > I've tried the mswin.vim but that didn't help. I'm rather new to vim
                > and gvim. I work with UNIX servers all day, so I'm used to vi, but I
                > like the script coloring that is available in vim. Any help would be
                > greatly appreciated because as it works now with the appending text,
                > it makes it virtually unusable because I do a lot of pasting into my
                scripts.
                >
                > Thanks!
                >
                > Please note that my e-mail address has changed to rhensell@...
                >
                > Bob Hensell
                > Systems Engineer
                > (574)232-3784 ex.236
                > Fax: (574) 232-4014
                > rhensell@...
                > Please reply to: mailto:ocieservice@...
                >
                > Donnell Systems, Inc.
                > 300 S. St. Louis Blvd., Suite 203
                > South Bend, Indiana 46617
                >
                > ---------------------------------------------------------------------
                > Confidentiality Notice:
                > ---------------------------------------------------------------------
                > The contents of this e-mail message and any attachments are intended
                > solely for the addressee(s) named in this message. This communication
                > is intended to be and to remain confidential. If you are not the
                > intended recipient of this message, or if this message has been
                > addressed to you in error, please immediately alert the sender by
                > reply e-mail and then delete this message and its attachments. Do not
                > deliver, distribute, copy, disclose the contents or take any action in
                > reliance upon the information contained in the communication or any
                > attachments.
                >
                >
                >
                >
                > .
                >

                --
                Bob Davis | Senior Advisory Software Developer - Applications
                Robert.Davis@...
                Work: 603-926-9696 x3456
                Home: 603-778-0781
                Aim: dad1732
                Yim: rsdavis9
              • Bob Davis
                Dont know where the ^@ comes from. Isnt that a null? I never get it and I run gvim for winxp all day long. I edit files a samba share to a linux box. I run
                Message 7 of 14 , Mar 31, 2006
                  Dont know where the ^@ comes from.
                  Isnt that a null?
                  I never get it and I run gvim for winxp all day long. I edit files a samba share to a linux box. I run gvim on the linux box and use ssh -Y and get it to appear on my winxp cygwin X server. I can cut and paste from that gvim the same as the one running locally.


                  Bob Hensell wrote:
                  > That paste also appends the ^@ character at the end of my text.
                  >
                  > -----Original Message-----
                  > From: Bob Davis [mailto:Robert.Davis@...]
                  > Sent: Friday, March 31, 2006 2:36 PM
                  > To: Bob Hensell
                  > Cc: vim@...
                  > Subject: Re: gvim paste from windows clipboard
                  >
                  > why dont you just use "*p which puts the window clipboard wherever.
                  >
                  >
                  > Bob Hensell wrote:
                  >
                  >>Does anyone have a tip for me? I am running gvim 6.4 from cygwin on
                  >>my XP machine. Whenever I try to paste into gvim from another
                  >>application using the middle mouse button, the text gets pasted, but a
                  >>^@ also gets appended to each line of my text. Is there something I can
                  >
                  > put into my .vimrc file?
                  >
                  >>I've tried the mswin.vim but that didn't help. I'm rather new to vim
                  >>and gvim. I work with UNIX servers all day, so I'm used to vi, but I
                  >>like the script coloring that is available in vim. Any help would be
                  >>greatly appreciated because as it works now with the appending text,
                  >>it makes it virtually unusable because I do a lot of pasting into my
                  >
                  > scripts.
                  >
                  >>Thanks!
                  >>
                  >>Please note that my e-mail address has changed to rhensell@...
                  >>
                  >>Bob Hensell
                  >>Systems Engineer
                  >>(574)232-3784 ex.236
                  >>Fax: (574) 232-4014
                  >>rhensell@...
                  >>Please reply to: mailto:ocieservice@...
                  >>
                  >>Donnell Systems, Inc.
                  >>300 S. St. Louis Blvd., Suite 203
                  >>South Bend, Indiana 46617
                  >>
                  >>---------------------------------------------------------------------
                  >>Confidentiality Notice:
                  >>---------------------------------------------------------------------
                  >>The contents of this e-mail message and any attachments are intended
                  >>solely for the addressee(s) named in this message. This communication
                  >>is intended to be and to remain confidential. If you are not the
                  >>intended recipient of this message, or if this message has been
                  >>addressed to you in error, please immediately alert the sender by
                  >>reply e-mail and then delete this message and its attachments. Do not
                  >>deliver, distribute, copy, disclose the contents or take any action in
                  >>reliance upon the information contained in the communication or any
                  >>attachments.
                  >>
                  >>
                  >>
                  >>
                  >>.
                  >>
                  >
                  >
                  > --
                  > Bob Davis | Senior Advisory Software Developer - Applications
                  > Robert.Davis@...
                  > Work: 603-926-9696 x3456
                  > Home: 603-778-0781
                  > Aim: dad1732
                  > Yim: rsdavis9
                  >
                  >
                  > .
                  >

                  --
                  Bob Davis | Senior Advisory Software Developer - Applications
                  Robert.Davis@...
                  Work: 603-926-9696 x3456
                  Home: 603-778-0781
                  Aim: dad1732
                  Yim: rsdavis9
                • Bob Hensell
                  I m not sure where it s coming from either, but the more lines I copy and paste, the more ^@ s I get in gvim. I was hoping someone has seen this before, but
                  Message 8 of 14 , Mar 31, 2006
                    I'm not sure where it's coming from either, but the more lines I copy and
                    paste, the more ^@'s I get in gvim. I was hoping someone has seen this
                    before, but I'm not seeing the issue come up in any forums. Do you mind
                    sharing your .vimrc file with me?



                    Please note that my e-mail address has changed to rhensell@...

                    Bob Hensell
                    Systems Engineer
                    (574)232-3784 ex.236
                    Fax: (574) 232-4014
                    rhensell@...
                    Please reply to: mailto:ocieservice@...

                    Donnell Systems, Inc.
                    300 S. St. Louis Blvd., Suite 203
                    South Bend, Indiana 46617

                    ---------------------------------------------------------------------
                    Confidentiality Notice:
                    ---------------------------------------------------------------------
                    The contents of this e-mail message and any attachments are intended
                    solely for the addressee(s) named in this message. This communication
                    is intended to be and to remain confidential. If you are not the
                    intended recipient of this message, or if this message has been
                    addressed to you in error, please immediately alert the sender by
                    reply e-mail and then delete this message and its attachments. Do not
                    deliver, distribute, copy, disclose the contents or take any action
                    in reliance upon the information contained in the communication or
                    any attachments.



                    -----Original Message-----
                    From: Bob Davis [mailto:Robert.Davis@...]
                    Sent: Friday, March 31, 2006 3:45 PM
                    To: Bob Hensell
                    Cc: vim@...
                    Subject: Re: gvim paste from windows clipboard

                    Dont know where the ^@ comes from.
                    Isnt that a null?
                    I never get it and I run gvim for winxp all day long. I edit files a samba
                    share to a linux box. I run gvim on the linux box and use ssh -Y and get it
                    to appear on my winxp cygwin X server. I can cut and paste from that gvim
                    the same as the one running locally.


                    Bob Hensell wrote:
                    > That paste also appends the ^@ character at the end of my text.
                    >
                    > -----Original Message-----
                    > From: Bob Davis [mailto:Robert.Davis@...]
                    > Sent: Friday, March 31, 2006 2:36 PM
                    > To: Bob Hensell
                    > Cc: vim@...
                    > Subject: Re: gvim paste from windows clipboard
                    >
                    > why dont you just use "*p which puts the window clipboard wherever.
                    >
                    >
                    > Bob Hensell wrote:
                    >
                    >>Does anyone have a tip for me? I am running gvim 6.4 from cygwin on
                    >>my XP machine. Whenever I try to paste into gvim from another
                    >>application using the middle mouse button, the text gets pasted, but a
                    >>^@ also gets appended to each line of my text. Is there something I
                    >>can
                    >
                    > put into my .vimrc file?
                    >
                    >>I've tried the mswin.vim but that didn't help. I'm rather new to vim
                    >>and gvim. I work with UNIX servers all day, so I'm used to vi, but I
                    >>like the script coloring that is available in vim. Any help would be
                    >>greatly appreciated because as it works now with the appending text,
                    >>it makes it virtually unusable because I do a lot of pasting into my
                    >
                    > scripts.
                    >
                    >>Thanks!
                    >>
                    >>Please note that my e-mail address has changed to rhensell@...
                    >>
                    >>Bob Hensell
                    >>Systems Engineer
                    >>(574)232-3784 ex.236
                    >>Fax: (574) 232-4014
                    >>rhensell@...
                    >>Please reply to: mailto:ocieservice@...
                    >>
                    >>Donnell Systems, Inc.
                    >>300 S. St. Louis Blvd., Suite 203
                    >>South Bend, Indiana 46617
                    >>
                    >>---------------------------------------------------------------------
                    >>Confidentiality Notice:
                    >>---------------------------------------------------------------------
                    >>The contents of this e-mail message and any attachments are intended
                    >>solely for the addressee(s) named in this message. This communication
                    >>is intended to be and to remain confidential. If you are not the
                    >>intended recipient of this message, or if this message has been
                    >>addressed to you in error, please immediately alert the sender by
                    >>reply e-mail and then delete this message and its attachments. Do not
                    >>deliver, distribute, copy, disclose the contents or take any action in
                    >>reliance upon the information contained in the communication or any
                    >>attachments.
                    >>
                    >>
                    >>
                    >>
                    >>.
                    >>
                    >
                    >
                    > --
                    > Bob Davis | Senior Advisory Software Developer - Applications
                    > Robert.Davis@...
                    > Work: 603-926-9696 x3456
                    > Home: 603-778-0781
                    > Aim: dad1732
                    > Yim: rsdavis9
                    >
                    >
                    > .
                    >

                    --
                    Bob Davis | Senior Advisory Software Developer - Applications
                    Robert.Davis@...
                    Work: 603-926-9696 x3456
                    Home: 603-778-0781
                    Aim: dad1732
                    Yim: rsdavis9
                  • Bob Davis
                    Oh and BTW I am running gvim for windows not the gvim from cygwin. ... set nocompatible source $VIMRUNTIME/vimrc_example.vim source $VIMRUNTIME/mswin.vim
                    Message 9 of 14 , Mar 31, 2006
                      Oh and BTW I am running gvim for windows not the gvim from cygwin.

                      Lots of junk in here:

                      ---------------- start _vimrc
                      set nocompatible
                      source $VIMRUNTIME/vimrc_example.vim
                      "source $VIMRUNTIME/mswin.vim
                      behave mswin

                      " allow backspacing over everything in insert mode
                      set bs=2

                      " always set autoindenting on
                      set ai
                      set wrapscan
                      set ignorecase
                      set smartcase
                      set incsearch
                      set hlsearch
                      set scrolloff=2
                      set wildmode=longest,list
                      "let &path=&path . "," . substitute($INCLUDE, ';', ',', 'g')
                      set path=.,,c:/ctd31,c:/ctd31/inc,C:/oracle/ora81/bin,C:/WINNT/system32,C:/WINNT,C:/WINNT/System32/Wbem,C:/Program\\\ Files/Common\\\ Files/Adaptec\\\ Shared/System,C:/Inoculan,C:/SQLBase,c:/vim/vim61,c:/unix,c:/bin,c:/perl/bin,c:/scripts,c:/ctd151,C:/PROGRA~1/IBM/CLIENT~1,C:/PROGRA~1/IBM/CLIENT~1/Shared,C:/PROGRA~1/IBM/CLIENT~1/Emulator,c:/j2sdk1.4.0/bin,C:/Program\\\ Files/Microsoft\\\ SQL\\\ Server/80/Tools/BINN,c:/program\\\ files/microsoft\\\ visual\\\ studio/vc98/include,c:/program\\\ files/microsoft\\\ visual\\\ studio/vc98/mfc/include,c:/program\\\ files/microsoft\\\ visual\\\ studio/vc98/atl/include,c:/program\\\ files/centura,C:/Program\\\ Files/Microsoft\\\ Visual\\\ Studio/Common/Tools/WinNT,C:/Program\\\ Files/Microsoft\\\ Visual\\\ Studio/Common/MSDev98/Bin,C:/Program\\\ Files/Microsoft\\\ Visual\\\ Studio/Common/Tools,C:/Program\\\ Files/Microsoft\\\ Visual\\\ Studio/VC98/bin,c:/wx242/include,c:/wx242/include/wx,c:/wx242/src/common,c:/wx242/src/msw,c:/wx242/sr
                      c/generic,c:/wx242/src
                      "set path=c:/unix
                      set grepprg=grep\ -n

                      set nobackup

                      " don't wrap lines at the edge of the screen
                      set nowrap

                      " read/write a .viminfo file, don't store more than 50 lines of registers
                      "set viminfo='20,\"50
                      set viminfo=

                      " always display a status line at the bottom of window
                      set laststatus=2

                      " display the current line and col at all times
                      set ruler

                      " set 50 lines for the display, 1 for the status line
                      set lines=60
                      set columns=110
                      set mouse=a

                      " default tabstop of 4 spaces
                      set ts=4

                      " default shiftwidth of 4 spaces
                      set sw=4

                      " allow tilde (~) to act as an operator -- ~w, etc.
                      set tildeop

                      " set the make program for this program
                      if has("Win32")
                      set makeprg=nmake
                      endif

                      if has("gui")
                      " set the gui options to:
                      " g: grey inactive menu items
                      " m: display menu bar
                      " r: display scrollbar on right side of window
                      " b: display scrollbar at bottom of window
                      " t: enable tearoff menus on Win32
                      " T: enable toolbar on Win32
                      set go=gmrbtT
                      endif

                      " Don't use Ex mode, use Q for formatting
                      map Q gq

                      " make tab in v mode work like I think it should (keep highlighting):
                      vmap <tab> >gv
                      vmap <s-tab> <gv

                      "search for all occurences of word under cursor in c files in dir
                      map <f2> :grep -iIr <cword> *.cpp *.c *.h *.rc<cr>
                      " make comment out of visual block
                      vmap <f3> <esc>`>a*/<esc>`<i/*<esc>
                      " get path of current file into clipboard
                      map <f5> :let @* = expand('%:p')<cr>
                      " toggle syntax
                      map <F7> :if exists("syntax_on") <Bar> syntax off <Bar> else <Bar> syntax on <Bar> endif <CR>
                      " ?
                      map <F4> [I:let nr = input("Which one: ")<Bar>exe "normal " . nr ."[\t"<CR>
                      " fold block
                      map <F9> zf}

                      " Date/Time stamps
                      iab xstamp <C-R>=strftime("%a %b %d %H:%M:%S %Y %Z")<CR>
                      iab lastmod <C-R>="Last Modified: " . strftime("%a %b %d %H:%M:%S %Y %Z")<CR>

                      " When starting to edit a file:
                      " For *.c and *.h files set formatting of comments and set C-indenting on
                      " For other files switch it off
                      " Don't change the sequence, it's important that the line with * comes first.
                      autocmd BufRead * set formatoptions=tcql nocindent comments&
                      autocmd BufRead *.c,*.ec,*.cpp,*.h,*.pl,*.pm set sm formatoptions=croql cindent comments=sr:/*,mb:*,el:*/,://

                      " Only do this for Vim version 5.0 and later.
                      if version >= 500
                      " Set the location of my syntax overrides and read the defaults
                      if has("Win32")
                      let mysyntaxfile = $VIM . "/usersyntax.vim"
                      let myfiletypefile = $VIM . "/userfiletype.vim"
                      else
                      let mysyntaxfile = $HOME . "/vim/usersyntax.vim"
                      let myfiletypefile = $HOME . "/vim/userfiletype.vim"
                      endif

                      " Enable syntax highlighting
                      syntax on
                      endif

                      set scroll=4
                      " F5: Add a fortune and advance to the next one
                      " mX mark where we are
                      " :sp ~/.fortunes<CR> open a window on ~/.fortunes
                      " d/^--/<CR> delete until the next line starting with "--"
                      " Gp Go to the end and put the just deleted text there
                      " :wq<CR> Write the ~/.fortunes file and close the window
                      " 'XG Go to the last line of the original file
                      " A<CR><Esc> Add an empty line
                      " p put the fortune text
                      " `X return to where we started

                      "map <F5> mX:sp $VIM/fortunes.txt<CR>d/^--/<CR>Gp:wq<CR>'XGA<CR><Esc>p`X
                      "set keywordprg=hh\ /program\ files/microsoft\ visual\ studio/msdn/2000jul/1033/vclang.chm::/html/pluslang.htm
                      "set keywordprg=hh\ %docupath%/vclang.chm::/html/pluslang.htm
                      "set keywordprg=perldoc\ -f
                      "split

                      " load diff file
                      "source c:/vim/diffwin.vim
                      "source c:/vim/vim57/macros/explorer.vim
                      map <M-Space> :simalt ~<CR>

                      let html_number_color = '#00cc00'
                      map ,r :so $VIMRUNTIME/syntax/2html.vim<CR>

                      "set diffexpr="diff v:fname_in v:fname_new > v:fname_out"
                      "function MyDiff()
                      " silent execute "!diff " . v:fname_in . " " . v:fname_new . " > " . v:fname_out
                      "endfunction

                      let Flist_Ctags_Cmd = '\cygwin\bin\ctags.exe'
                      "set tags=./tags,tags,c:/wx242/include/wx/tags,c:/c/tags
                      set tags=./tags,tags,c:/visual~1/common/tags,c:\c\tags
                      nmap <silent> gw "_yiw:s/\(\%#\w\+\)\(\W\+\)\(\w\+\)/\3\2\1/<cr><c-o><c-l>

                      map <C-tab> :bn<CR>
                      nmap <unique> <Leader>app :set foldmethod=expr<CR>

                      " sal folding
                      set foldexpr=getline(v:lnum)=~'^\\.data'?'>10':getline(v:lnum)=~'\\.enddata'?'<10':getline(v:lnum)=~'^\\S'?'=':((indent(v:lnum)/&sw))
                      function SalFold()
                      let ln = v:lnum
                      let line = getline(ln)
                      if line =~ '^\.data'
                      let ret = '>10'
                      elseif line =~ '^\.enddata'
                      let ret = '<10'
                      elseif line =~ '^\S'
                      let ret = '='
                      else
                      let ret = indent(ln)/&sw
                      endif
                      return ret
                      endfunction
                      set foldexpr=SalFold()

                      " ftp stuff
                      "let g:netrw_ftp = 1

                      nnoremap <silent> <F8> :TagExplorer<CR>

                      "tab for buffers
                      let g:miniBufExplorerMoreThanOne=100
                      "let g:miniBufExplMapWindowNavVim = 1
                      set virtualedit=block

                      let g:showmarks_enable=0

                      " Based on a post by Dr. Chip Campbell
                      " Augroup LargeFile: for large files: turn undo off, etc (based on vim tip #611)
                      " {{{2
                      let g:LargeFileThreshold = 10*1024*1024 " in megabytes
                      augroup LargeFile
                      au BufReadPre * call <SID>SetLargeFileSettings()
                      augroup END
                      function! s:SetLargeFileSettings()
                      let f = expand('<afile>')
                      if getfsize(f) < g:LargeFileThreshold
                      return
                      endif
                      let b:eikeep= &ei
                      let b:ulkeep= &ul
                      set ei=FileType
                      setlocal noswf bh=unload
                      let f=escape(substitute(f,'','/','g'),' ')
                      exe "au LargeFile BufEnter ".f." set ul=-1"
                      exe "au LargeFile BufLeave ".f." let &ul=".b:ulkeep."|set ei=".b:eikeep
                      exe "au LargeFile BufUnload ".f." au! LargeFile * ". f
                      echomsg "***note*** handling a large file"
                      endfunction
                      " }}}2

                      ---------------- end _vimrc

                      Bob Hensell wrote:
                      > I'm not sure where it's coming from either, but the more lines I copy and
                      > paste, the more ^@'s I get in gvim. I was hoping someone has seen this
                      > before, but I'm not seeing the issue come up in any forums. Do you mind
                      > sharing your .vimrc file with me?
                      >
                      >
                      >
                      > Please note that my e-mail address has changed to rhensell@...
                      >
                      > Bob Hensell
                      > Systems Engineer
                      > (574)232-3784 ex.236
                      > Fax: (574) 232-4014
                      > rhensell@...
                      > Please reply to: mailto:ocieservice@...
                      >
                      > Donnell Systems, Inc.
                      > 300 S. St. Louis Blvd., Suite 203
                      > South Bend, Indiana 46617
                      >
                      > ---------------------------------------------------------------------
                      > Confidentiality Notice:
                      > ---------------------------------------------------------------------
                      > The contents of this e-mail message and any attachments are intended
                      > solely for the addressee(s) named in this message. This communication
                      > is intended to be and to remain confidential. If you are not the
                      > intended recipient of this message, or if this message has been
                      > addressed to you in error, please immediately alert the sender by
                      > reply e-mail and then delete this message and its attachments. Do not
                      > deliver, distribute, copy, disclose the contents or take any action
                      > in reliance upon the information contained in the communication or
                      > any attachments.
                      >
                      >
                      >
                      > -----Original Message-----
                      > From: Bob Davis [mailto:Robert.Davis@...]
                      > Sent: Friday, March 31, 2006 3:45 PM
                      > To: Bob Hensell
                      > Cc: vim@...
                      > Subject: Re: gvim paste from windows clipboard
                      >
                      > Dont know where the ^@ comes from.
                      > Isnt that a null?
                      > I never get it and I run gvim for winxp all day long. I edit files a samba
                      > share to a linux box. I run gvim on the linux box and use ssh -Y and get it
                      > to appear on my winxp cygwin X server. I can cut and paste from that gvim
                      > the same as the one running locally.
                      >
                      >
                      > Bob Hensell wrote:
                      >
                      >>That paste also appends the ^@ character at the end of my text.
                      >>
                      >>-----Original Message-----
                      >>From: Bob Davis [mailto:Robert.Davis@...]
                      >>Sent: Friday, March 31, 2006 2:36 PM
                      >>To: Bob Hensell
                      >>Cc: vim@...
                      >>Subject: Re: gvim paste from windows clipboard
                      >>
                      >>why dont you just use "*p which puts the window clipboard wherever.
                      >>
                      >>
                      >>Bob Hensell wrote:
                      >>
                      >>
                      >>>Does anyone have a tip for me? I am running gvim 6.4 from cygwin on
                      >>>my XP machine. Whenever I try to paste into gvim from another
                      >>>application using the middle mouse button, the text gets pasted, but a
                      >>>^@ also gets appended to each line of my text. Is there something I
                      >>>can
                      >>
                      >>put into my .vimrc file?
                      >>
                      >>
                      >>>I've tried the mswin.vim but that didn't help. I'm rather new to vim
                      >>>and gvim. I work with UNIX servers all day, so I'm used to vi, but I
                      >>>like the script coloring that is available in vim. Any help would be
                      >>>greatly appreciated because as it works now with the appending text,
                      >>>it makes it virtually unusable because I do a lot of pasting into my
                      >>
                      >>scripts.
                      >>
                      >>
                      >>>Thanks!
                      >>>
                      >>>Please note that my e-mail address has changed to rhensell@...
                      >>>
                      >>>Bob Hensell
                      >>>Systems Engineer
                      >>>(574)232-3784 ex.236
                      >>>Fax: (574) 232-4014
                      >>>rhensell@...
                      >>>Please reply to: mailto:ocieservice@...
                      >>>
                      >>>Donnell Systems, Inc.
                      >>>300 S. St. Louis Blvd., Suite 203
                      >>>South Bend, Indiana 46617
                      >>>
                      >>>---------------------------------------------------------------------
                      >>>Confidentiality Notice:
                      >>>---------------------------------------------------------------------
                      >>>The contents of this e-mail message and any attachments are intended
                      >>>solely for the addressee(s) named in this message. This communication
                      >>>is intended to be and to remain confidential. If you are not the
                      >>>intended recipient of this message, or if this message has been
                      >>>addressed to you in error, please immediately alert the sender by
                      >>>reply e-mail and then delete this message and its attachments. Do not
                      >>>deliver, distribute, copy, disclose the contents or take any action in
                      >>>reliance upon the information contained in the communication or any
                      >>>attachments.
                      >>>
                      >>>
                      >>>
                      >>>
                      >>>.
                      >>>
                      >>
                      >>
                      >>--
                      >>Bob Davis | Senior Advisory Software Developer - Applications
                      >>Robert.Davis@...
                      >>Work: 603-926-9696 x3456
                      >>Home: 603-778-0781
                      >>Aim: dad1732
                      >>Yim: rsdavis9
                      >>
                      >>
                      >>.
                      >>
                      >
                      >
                      > --
                      > Bob Davis | Senior Advisory Software Developer - Applications
                      > Robert.Davis@...
                      > Work: 603-926-9696 x3456
                      > Home: 603-778-0781
                      > Aim: dad1732
                      > Yim: rsdavis9
                      >
                      >
                      > .
                      >

                      --
                      Bob Davis | Senior Advisory Software Developer - Applications
                      Robert.Davis@...
                      Work: 603-926-9696 x3456
                      Home: 603-778-0781
                      Aim: dad1732
                      Yim: rsdavis9
                    • Bob Davis
                      There is also a way to get ^v to do paste but I have that turned off because the keys interfer with something else I do more often. bob ... -- Bob Davis |
                      Message 10 of 14 , Mar 31, 2006
                        There is also a way to get ^v to do paste but I have that turned off because the keys interfer with something else I do more often.

                        bob

                        Bob Hensell wrote:
                        > Are you saying I can copy text from, say a firefox explorer, and in gvim
                        > click where I want the text and then press "*p all at the same time to paste
                        > the text? If that is the case, seems a little out of the way to be pressing
                        > all three (4 if you include shift) keys.
                        >
                        >
                        >
                        > Please note that my e-mail address has changed to rhensell@...
                        >
                        > Bob Hensell
                        > Systems Engineer
                        > (574)232-3784 ex.236
                        > Fax: (574) 232-4014
                        > rhensell@...
                        > Please reply to: mailto:ocieservice@...
                        >
                        > Donnell Systems, Inc.
                        > 300 S. St. Louis Blvd., Suite 203
                        > South Bend, Indiana 46617
                        >
                        > ---------------------------------------------------------------------
                        > Confidentiality Notice:
                        > ---------------------------------------------------------------------
                        > The contents of this e-mail message and any attachments are intended
                        > solely for the addressee(s) named in this message. This communication
                        > is intended to be and to remain confidential. If you are not the
                        > intended recipient of this message, or if this message has been
                        > addressed to you in error, please immediately alert the sender by
                        > reply e-mail and then delete this message and its attachments. Do not
                        > deliver, distribute, copy, disclose the contents or take any action
                        > in reliance upon the information contained in the communication or
                        > any attachments.
                        >
                        >
                        >
                        > -----Original Message-----
                        > From: Bob Davis [mailto:Robert.Davis@...]
                        > Sent: Friday, March 31, 2006 2:36 PM
                        > To: Bob Hensell
                        > Cc: vim@...
                        > Subject: Re: gvim paste from windows clipboard
                        >
                        > why dont you just use "*p which puts the window clipboard wherever.
                        >
                        >
                        > Bob Hensell wrote:
                        >
                        >>Does anyone have a tip for me? I am running gvim 6.4 from cygwin on
                        >>my XP machine. Whenever I try to paste into gvim from another
                        >>application using the middle mouse button, the text gets pasted, but a
                        >>^@ also gets appended to each line of my text. Is there something I can
                        >
                        > put into my .vimrc file?
                        >
                        >>I've tried the mswin.vim but that didn't help. I'm rather new to vim
                        >>and gvim. I work with UNIX servers all day, so I'm used to vi, but I
                        >>like the script coloring that is available in vim. Any help would be
                        >>greatly appreciated because as it works now with the appending text,
                        >>it makes it virtually unusable because I do a lot of pasting into my
                        >
                        > scripts.
                        >
                        >>Thanks!
                        >>
                        >>Please note that my e-mail address has changed to rhensell@...
                        >>
                        >>Bob Hensell
                        >>Systems Engineer
                        >>(574)232-3784 ex.236
                        >>Fax: (574) 232-4014
                        >>rhensell@...
                        >>Please reply to: mailto:ocieservice@...
                        >>
                        >>Donnell Systems, Inc.
                        >>300 S. St. Louis Blvd., Suite 203
                        >>South Bend, Indiana 46617
                        >>
                        >>---------------------------------------------------------------------
                        >>Confidentiality Notice:
                        >>---------------------------------------------------------------------
                        >>The contents of this e-mail message and any attachments are intended
                        >>solely for the addressee(s) named in this message. This communication
                        >>is intended to be and to remain confidential. If you are not the
                        >>intended recipient of this message, or if this message has been
                        >>addressed to you in error, please immediately alert the sender by
                        >>reply e-mail and then delete this message and its attachments. Do not
                        >>deliver, distribute, copy, disclose the contents or take any action in
                        >>reliance upon the information contained in the communication or any
                        >>attachments.
                        >>
                        >>
                        >>
                        >>
                        >>.
                        >>
                        >
                        >
                        > --
                        > Bob Davis | Senior Advisory Software Developer - Applications
                        > Robert.Davis@...
                        > Work: 603-926-9696 x3456
                        > Home: 603-778-0781
                        > Aim: dad1732
                        > Yim: rsdavis9
                        >
                        >
                        > .
                        >

                        --
                        Bob Davis | Senior Advisory Software Developer - Applications
                        Robert.Davis@...
                        Work: 603-926-9696 x3456
                        Home: 603-778-0781
                        Aim: dad1732
                        Yim: rsdavis9
                      • Bob Hensell
                        I m using gvim from cygwin. I wonder if it has something to do with that. Please note that my e-mail address has changed to rhensell@ocie.net Bob Hensell
                        Message 11 of 14 , Mar 31, 2006
                          I'm using gvim from cygwin. I wonder if it has something to do with that.



                          Please note that my e-mail address has changed to rhensell@...

                          Bob Hensell
                          Systems Engineer
                          (574)232-3784 ex.236
                          Fax: (574) 232-4014
                          rhensell@...
                          Please reply to: mailto:ocieservice@...

                          Donnell Systems, Inc.
                          300 S. St. Louis Blvd., Suite 203
                          South Bend, Indiana 46617

                          ---------------------------------------------------------------------
                          Confidentiality Notice:
                          ---------------------------------------------------------------------
                          The contents of this e-mail message and any attachments are intended
                          solely for the addressee(s) named in this message. This communication
                          is intended to be and to remain confidential. If you are not the
                          intended recipient of this message, or if this message has been
                          addressed to you in error, please immediately alert the sender by
                          reply e-mail and then delete this message and its attachments. Do not
                          deliver, distribute, copy, disclose the contents or take any action
                          in reliance upon the information contained in the communication or
                          any attachments.



                          -----Original Message-----
                          From: Bob Davis [mailto:Robert.Davis@...]
                          Sent: Friday, March 31, 2006 3:56 PM
                          To: Bob Hensell
                          Cc: vim@...
                          Subject: Re: gvim paste from windows clipboard

                          Oh and BTW I am running gvim for windows not the gvim from cygwin.

                          Lots of junk in here:

                          ---------------- start _vimrc
                          set nocompatible
                          source $VIMRUNTIME/vimrc_example.vim
                          "source $VIMRUNTIME/mswin.vim
                          behave mswin

                          " allow backspacing over everything in insert mode set bs=2

                          " always set autoindenting on
                          set ai
                          set wrapscan
                          set ignorecase
                          set smartcase
                          set incsearch
                          set hlsearch
                          set scrolloff=2
                          set wildmode=longest,list
                          "let &path=&path . "," . substitute($INCLUDE, ';', ',', 'g') set
                          path=.,,c:/ctd31,c:/ctd31/inc,C:/oracle/ora81/bin,C:/WINNT/system32,C:/WINNT
                          ,C:/WINNT/System32/Wbem,C:/Program\\\ Files/Common\\\ Files/Adaptec\\\
                          Shared/System,C:/Inoculan,C:/SQLBase,c:/vim/vim61,c:/unix,c:/bin,c:/perl/bin
                          ,c:/scripts,c:/ctd151,C:/PROGRA~1/IBM/CLIENT~1,C:/PROGRA~1/IBM/CLIENT~1/Shar
                          ed,C:/PROGRA~1/IBM/CLIENT~1/Emulator,c:/j2sdk1.4.0/bin,C:/Program\\\
                          Files/Microsoft\\\ SQL\\\ Server/80/Tools/BINN,c:/program\\\
                          files/microsoft\\\ visual\\\ studio/vc98/include,c:/program\\\
                          files/microsoft\\\ visual\\\ studio/vc98/mfc/include,c:/program\\\
                          files/microsoft\\\ visual\\\ studio/vc98/atl/include,c:/program\\\
                          files/centura,C:/Program\\\ Files/Microsoft\\\ Visual\\\
                          Studio/Common/Tools/WinNT,C:/Program\\\ Files/Microsoft\\\ Visual\\\
                          Studio/Common/MSDev98/Bin,C:/Program\\\ Files/Microsoft\\\ Visual\\\
                          Studio/Common/Tools,C:/Program\\\ Files/Microsoft\\\ Visual\\\
                          Studio/VC98/bin,c:/wx242/include,c:/wx242/include/wx,c:/wx242/src/common,c:/
                          wx242/src/msw,c:/wx242/sr
                          c/generic,c:/wx242/src
                          "set path=c:/unix
                          set grepprg=grep\ -n

                          set nobackup

                          " don't wrap lines at the edge of the screen set nowrap

                          " read/write a .viminfo file, don't store more than 50 lines of registers
                          "set viminfo='20,\"50 set viminfo=

                          " always display a status line at the bottom of window set laststatus=2

                          " display the current line and col at all times set ruler

                          " set 50 lines for the display, 1 for the status line set lines=60 set
                          columns=110 set mouse=a

                          " default tabstop of 4 spaces
                          set ts=4

                          " default shiftwidth of 4 spaces
                          set sw=4

                          " allow tilde (~) to act as an operator -- ~w, etc.
                          set tildeop

                          " set the make program for this program
                          if has("Win32")
                          set makeprg=nmake
                          endif

                          if has("gui")
                          " set the gui options to:
                          " g: grey inactive menu items
                          " m: display menu bar
                          " r: display scrollbar on right side of window
                          " b: display scrollbar at bottom of window
                          " t: enable tearoff menus on Win32
                          " T: enable toolbar on Win32
                          set go=gmrbtT
                          endif

                          " Don't use Ex mode, use Q for formatting map Q gq

                          " make tab in v mode work like I think it should (keep highlighting):
                          vmap <tab> >gv
                          vmap <s-tab> <gv

                          "search for all occurences of word under cursor in c files in dir map <f2>
                          :grep -iIr <cword> *.cpp *.c *.h *.rc<cr> " make comment out of visual block
                          vmap <f3> <esc>`>a*/<esc>`<i/*<esc> " get path of current file into
                          clipboard map <f5> :let @* = expand('%:p')<cr> " toggle syntax map <F7> :if
                          exists("syntax_on") <Bar> syntax off <Bar> else <Bar> syntax on <Bar> endif
                          <CR> " ?
                          map <F4> [I:let nr = input("Which one: ")<Bar>exe "normal " . nr ."[\t"<CR>
                          " fold block map <F9> zf}

                          " Date/Time stamps
                          iab xstamp <C-R>=strftime("%a %b %d %H:%M:%S %Y %Z")<CR> iab lastmod
                          <C-R>="Last Modified: " . strftime("%a %b %d %H:%M:%S %Y %Z")<CR>

                          " When starting to edit a file:
                          " For *.c and *.h files set formatting of comments and set C-indenting on
                          " For other files switch it off
                          " Don't change the sequence, it's important that the line with * comes
                          first.
                          autocmd BufRead * set formatoptions=tcql nocindent comments& autocmd BufRead
                          *.c,*.ec,*.cpp,*.h,*.pl,*.pm set sm formatoptions=croql cindent
                          comments=sr:/*,mb:*,el:*/,://

                          " Only do this for Vim version 5.0 and later.
                          if version >= 500
                          " Set the location of my syntax overrides and read the defaults
                          if has("Win32")
                          let mysyntaxfile = $VIM . "/usersyntax.vim"
                          let myfiletypefile = $VIM . "/userfiletype.vim"
                          else
                          let mysyntaxfile = $HOME . "/vim/usersyntax.vim"
                          let myfiletypefile = $HOME . "/vim/userfiletype.vim"
                          endif

                          " Enable syntax highlighting
                          syntax on
                          endif

                          set scroll=4
                          " F5: Add a fortune and advance to the next one
                          " mX mark where we are
                          " :sp ~/.fortunes<CR> open a window on ~/.fortunes
                          " d/^--/<CR> delete until the next line starting with "--"
                          " Gp Go to the end and put the just deleted text there
                          " :wq<CR> Write the ~/.fortunes file and close the window
                          " 'XG Go to the last line of the original file
                          " A<CR><Esc> Add an empty line
                          " p put the fortune text
                          " `X return to where we started

                          "map <F5> mX:sp $VIM/fortunes.txt<CR>d/^--/<CR>Gp:wq<CR>'XGA<CR><Esc>p`X
                          "set keywordprg=hh\ /program\ files/microsoft\ visual\
                          studio/msdn/2000jul/1033/vclang.chm::/html/pluslang.htm
                          "set keywordprg=hh\ %docupath%/vclang.chm::/html/pluslang.htm
                          "set keywordprg=perldoc\ -f
                          "split

                          " load diff file
                          "source c:/vim/diffwin.vim
                          "source c:/vim/vim57/macros/explorer.vim map <M-Space> :simalt ~<CR>

                          let html_number_color = '#00cc00'
                          map ,r :so $VIMRUNTIME/syntax/2html.vim<CR>

                          "set diffexpr="diff v:fname_in v:fname_new > v:fname_out"
                          "function MyDiff()
                          " silent execute "!diff " . v:fname_in . " " . v:fname_new . " > " .
                          v:fname_out
                          "endfunction

                          let Flist_Ctags_Cmd = '\cygwin\bin\ctags.exe'
                          "set tags=./tags,tags,c:/wx242/include/wx/tags,c:/c/tags
                          set tags=./tags,tags,c:/visual~1/common/tags,c:\c\tags
                          nmap <silent> gw "_yiw:s/\(\%#\w\+\)\(\W\+\)\(\w\+\)/\3\2\1/<cr><c-o><c-l>

                          map <C-tab> :bn<CR>
                          nmap <unique> <Leader>app :set foldmethod=expr<CR>

                          " sal folding
                          set
                          foldexpr=getline(v:lnum)=~'^\\.data'?'>10':getline(v:lnum)=~'\\.enddata'?'<1
                          0':getline(v:lnum)=~'^\\S'?'=':((indent(v:lnum)/&sw))
                          function SalFold()
                          let ln = v:lnum
                          let line = getline(ln)
                          if line =~ '^\.data'
                          let ret = '>10'
                          elseif line =~ '^\.enddata'
                          let ret = '<10'
                          elseif line =~ '^\S'
                          let ret = '='
                          else
                          let ret = indent(ln)/&sw
                          endif
                          return ret
                          endfunction
                          set foldexpr=SalFold()

                          " ftp stuff
                          "let g:netrw_ftp = 1

                          nnoremap <silent> <F8> :TagExplorer<CR>

                          "tab for buffers
                          let g:miniBufExplorerMoreThanOne=100
                          "let g:miniBufExplMapWindowNavVim = 1
                          set virtualedit=block

                          let g:showmarks_enable=0

                          " Based on a post by Dr. Chip Campbell
                          " Augroup LargeFile: for large files: turn undo off, etc (based on vim tip
                          #611) " {{{2
                          let g:LargeFileThreshold = 10*1024*1024 " in megabytes
                          augroup LargeFile
                          au BufReadPre * call <SID>SetLargeFileSettings() augroup END function!
                          s:SetLargeFileSettings()
                          let f = expand('<afile>')
                          if getfsize(f) < g:LargeFileThreshold
                          return
                          endif
                          let b:eikeep= &ei
                          let b:ulkeep= &ul
                          set ei=FileType
                          setlocal noswf bh=unload
                          let f=escape(substitute(f,'','/','g'),' ')
                          exe "au LargeFile BufEnter ".f." set ul=-1"
                          exe "au LargeFile BufLeave ".f." let &ul=".b:ulkeep."|set ei=".b:eikeep
                          exe "au LargeFile BufUnload ".f." au! LargeFile * ". f
                          echomsg "***note*** handling a large file"
                          endfunction
                          " }}}2

                          ---------------- end _vimrc

                          Bob Hensell wrote:
                          > I'm not sure where it's coming from either, but the more lines I copy
                          > and paste, the more ^@'s I get in gvim. I was hoping someone has seen
                          > this before, but I'm not seeing the issue come up in any forums. Do
                          > you mind sharing your .vimrc file with me?
                          >
                          >
                          >
                          > Please note that my e-mail address has changed to rhensell@...
                          >
                          > Bob Hensell
                          > Systems Engineer
                          > (574)232-3784 ex.236
                          > Fax: (574) 232-4014
                          > rhensell@...
                          > Please reply to: mailto:ocieservice@...
                          >
                          > Donnell Systems, Inc.
                          > 300 S. St. Louis Blvd., Suite 203
                          > South Bend, Indiana 46617
                          >
                          > ---------------------------------------------------------------------
                          > Confidentiality Notice:
                          > ---------------------------------------------------------------------
                          > The contents of this e-mail message and any attachments are intended
                          > solely for the addressee(s) named in this message. This communication
                          > is intended to be and to remain confidential. If you are not the
                          > intended recipient of this message, or if this message has been
                          > addressed to you in error, please immediately alert the sender by
                          > reply e-mail and then delete this message and its attachments. Do not
                          > deliver, distribute, copy, disclose the contents or take any action in
                          > reliance upon the information contained in the communication or any
                          > attachments.
                          >
                          >
                          >
                          > -----Original Message-----
                          > From: Bob Davis [mailto:Robert.Davis@...]
                          > Sent: Friday, March 31, 2006 3:45 PM
                          > To: Bob Hensell
                          > Cc: vim@...
                          > Subject: Re: gvim paste from windows clipboard
                          >
                          > Dont know where the ^@ comes from.
                          > Isnt that a null?
                          > I never get it and I run gvim for winxp all day long. I edit files a
                          > samba share to a linux box. I run gvim on the linux box and use ssh -Y
                          > and get it to appear on my winxp cygwin X server. I can cut and paste
                          > from that gvim the same as the one running locally.
                          >
                          >
                          > Bob Hensell wrote:
                          >
                          >>That paste also appends the ^@ character at the end of my text.
                          >>
                          >>-----Original Message-----
                          >>From: Bob Davis [mailto:Robert.Davis@...]
                          >>Sent: Friday, March 31, 2006 2:36 PM
                          >>To: Bob Hensell
                          >>Cc: vim@...
                          >>Subject: Re: gvim paste from windows clipboard
                          >>
                          >>why dont you just use "*p which puts the window clipboard wherever.
                          >>
                          >>
                          >>Bob Hensell wrote:
                          >>
                          >>
                          >>>Does anyone have a tip for me? I am running gvim 6.4 from cygwin on
                          >>>my XP machine. Whenever I try to paste into gvim from another
                          >>>application using the middle mouse button, the text gets pasted, but
                          >>>a ^@ also gets appended to each line of my text. Is there something
                          >>>I can
                          >>
                          >>put into my .vimrc file?
                          >>
                          >>
                          >>>I've tried the mswin.vim but that didn't help. I'm rather new to vim
                          >>>and gvim. I work with UNIX servers all day, so I'm used to vi, but I
                          >>>like the script coloring that is available in vim. Any help would be
                          >>>greatly appreciated because as it works now with the appending text,
                          >>>it makes it virtually unusable because I do a lot of pasting into my
                          >>
                          >>scripts.
                          >>
                          >>
                          >>>Thanks!
                          >>>
                          >>>Please note that my e-mail address has changed to rhensell@...
                          >>>
                          >>>Bob Hensell
                          >>>Systems Engineer
                          >>>(574)232-3784 ex.236
                          >>>Fax: (574) 232-4014
                          >>>rhensell@...
                          >>>Please reply to: mailto:ocieservice@...
                          >>>
                          >>>Donnell Systems, Inc.
                          >>>300 S. St. Louis Blvd., Suite 203
                          >>>South Bend, Indiana 46617
                          >>>
                          >>>---------------------------------------------------------------------
                          >>>Confidentiality Notice:
                          >>>---------------------------------------------------------------------
                          >>>The contents of this e-mail message and any attachments are intended
                          >>>solely for the addressee(s) named in this message. This communication
                          >>>is intended to be and to remain confidential. If you are not the
                          >>>intended recipient of this message, or if this message has been
                          >>>addressed to you in error, please immediately alert the sender by
                          >>>reply e-mail and then delete this message and its attachments. Do not
                          >>>deliver, distribute, copy, disclose the contents or take any action
                          >>>in reliance upon the information contained in the communication or
                          >>>any attachments.
                          >>>
                          >>>
                          >>>
                          >>>
                          >>>.
                          >>>
                          >>
                          >>
                          >>--
                          >>Bob Davis | Senior Advisory Software Developer - Applications
                          >>Robert.Davis@...
                          >>Work: 603-926-9696 x3456
                          >>Home: 603-778-0781
                          >>Aim: dad1732
                          >>Yim: rsdavis9
                          >>
                          >>
                          >>.
                          >>
                          >
                          >
                          > --
                          > Bob Davis | Senior Advisory Software Developer - Applications
                          > Robert.Davis@...
                          > Work: 603-926-9696 x3456
                          > Home: 603-778-0781
                          > Aim: dad1732
                          > Yim: rsdavis9
                          >
                          >
                          > .
                          >

                          --
                          Bob Davis | Senior Advisory Software Developer - Applications
                          Robert.Davis@...
                          Work: 603-926-9696 x3456
                          Home: 603-778-0781
                          Aim: dad1732
                          Yim: rsdavis9
                        • Bob Davis
                          I have cywin but its at least a year old and I cant seem to find gvim. Is it located in the X11R6 dir? Sometimes I rename programs from cygwin so they dont
                          Message 12 of 14 , Mar 31, 2006
                            I have cywin but its at least a year old and I cant seem to find gvim. Is it located in the X11R6 dir?
                            Sometimes I rename programs from cygwin so they dont interfere with my windows versions. Like perl. I use the activestate version because of its better windows api's

                            bob

                            Bob Hensell wrote:
                            > I'm using gvim from cygwin. I wonder if it has something to do with that.
                            >
                            >
                            >
                            > Please note that my e-mail address has changed to rhensell@...
                            >
                            > Bob Hensell
                            > Systems Engineer
                            > (574)232-3784 ex.236
                            > Fax: (574) 232-4014
                            > rhensell@...
                            > Please reply to: mailto:ocieservice@...
                            >
                            > Donnell Systems, Inc.
                            > 300 S. St. Louis Blvd., Suite 203
                            > South Bend, Indiana 46617
                            >
                            > ---------------------------------------------------------------------
                            > Confidentiality Notice:
                            > ---------------------------------------------------------------------
                            > The contents of this e-mail message and any attachments are intended
                            > solely for the addressee(s) named in this message. This communication
                            > is intended to be and to remain confidential. If you are not the
                            > intended recipient of this message, or if this message has been
                            > addressed to you in error, please immediately alert the sender by
                            > reply e-mail and then delete this message and its attachments. Do not
                            > deliver, distribute, copy, disclose the contents or take any action
                            > in reliance upon the information contained in the communication or
                            > any attachments.
                            >
                            >
                            >
                            > -----Original Message-----
                            > From: Bob Davis [mailto:Robert.Davis@...]
                            > Sent: Friday, March 31, 2006 3:56 PM
                            > To: Bob Hensell
                            > Cc: vim@...
                            > Subject: Re: gvim paste from windows clipboard
                            >
                            > Oh and BTW I am running gvim for windows not the gvim from cygwin.
                            >
                            > Lots of junk in here:
                            >
                            > ---------------- start _vimrc
                            > set nocompatible
                            > source $VIMRUNTIME/vimrc_example.vim
                            > "source $VIMRUNTIME/mswin.vim
                            > behave mswin
                            >
                            > " allow backspacing over everything in insert mode set bs=2
                            >
                            > " always set autoindenting on
                            > set ai
                            > set wrapscan
                            > set ignorecase
                            > set smartcase
                            > set incsearch
                            > set hlsearch
                            > set scrolloff=2
                            > set wildmode=longest,list
                            > "let &path=&path . "," . substitute($INCLUDE, ';', ',', 'g') set
                            > path=.,,c:/ctd31,c:/ctd31/inc,C:/oracle/ora81/bin,C:/WINNT/system32,C:/WINNT
                            > ,C:/WINNT/System32/Wbem,C:/Program\\\ Files/Common\\\ Files/Adaptec\\\
                            > Shared/System,C:/Inoculan,C:/SQLBase,c:/vim/vim61,c:/unix,c:/bin,c:/perl/bin
                            > ,c:/scripts,c:/ctd151,C:/PROGRA~1/IBM/CLIENT~1,C:/PROGRA~1/IBM/CLIENT~1/Shar
                            > ed,C:/PROGRA~1/IBM/CLIENT~1/Emulator,c:/j2sdk1.4.0/bin,C:/Program\\\
                            > Files/Microsoft\\\ SQL\\\ Server/80/Tools/BINN,c:/program\\\
                            > files/microsoft\\\ visual\\\ studio/vc98/include,c:/program\\\
                            > files/microsoft\\\ visual\\\ studio/vc98/mfc/include,c:/program\\\
                            > files/microsoft\\\ visual\\\ studio/vc98/atl/include,c:/program\\\
                            > files/centura,C:/Program\\\ Files/Microsoft\\\ Visual\\\
                            > Studio/Common/Tools/WinNT,C:/Program\\\ Files/Microsoft\\\ Visual\\\
                            > Studio/Common/MSDev98/Bin,C:/Program\\\ Files/Microsoft\\\ Visual\\\
                            > Studio/Common/Tools,C:/Program\\\ Files/Microsoft\\\ Visual\\\
                            > Studio/VC98/bin,c:/wx242/include,c:/wx242/include/wx,c:/wx242/src/common,c:/
                            > wx242/src/msw,c:/wx242/sr
                            > c/generic,c:/wx242/src
                            > "set path=c:/unix
                            > set grepprg=grep\ -n
                            >
                            > set nobackup
                            >
                            > " don't wrap lines at the edge of the screen set nowrap
                            >
                            > " read/write a .viminfo file, don't store more than 50 lines of registers
                            > "set viminfo='20,\"50 set viminfo=
                            >
                            > " always display a status line at the bottom of window set laststatus=2
                            >
                            > " display the current line and col at all times set ruler
                            >
                            > " set 50 lines for the display, 1 for the status line set lines=60 set
                            > columns=110 set mouse=a
                            >
                            > " default tabstop of 4 spaces
                            > set ts=4
                            >
                            > " default shiftwidth of 4 spaces
                            > set sw=4
                            >
                            > " allow tilde (~) to act as an operator -- ~w, etc.
                            > set tildeop
                            >
                            > " set the make program for this program
                            > if has("Win32")
                            > set makeprg=nmake
                            > endif
                            >
                            > if has("gui")
                            > " set the gui options to:
                            > " g: grey inactive menu items
                            > " m: display menu bar
                            > " r: display scrollbar on right side of window
                            > " b: display scrollbar at bottom of window
                            > " t: enable tearoff menus on Win32
                            > " T: enable toolbar on Win32
                            > set go=gmrbtT
                            > endif
                            >
                            > " Don't use Ex mode, use Q for formatting map Q gq
                            >
                            > " make tab in v mode work like I think it should (keep highlighting):
                            > vmap <tab> >gv
                            > vmap <s-tab> <gv
                            >
                            > "search for all occurences of word under cursor in c files in dir map <f2>
                            > :grep -iIr <cword> *.cpp *.c *.h *.rc<cr> " make comment out of visual block
                            > vmap <f3> <esc>`>a*/<esc>`<i/*<esc> " get path of current file into
                            > clipboard map <f5> :let @* = expand('%:p')<cr> " toggle syntax map <F7> :if
                            > exists("syntax_on") <Bar> syntax off <Bar> else <Bar> syntax on <Bar> endif
                            > <CR> " ?
                            > map <F4> [I:let nr = input("Which one: ")<Bar>exe "normal " . nr ."[\t"<CR>
                            > " fold block map <F9> zf}
                            >
                            > " Date/Time stamps
                            > iab xstamp <C-R>=strftime("%a %b %d %H:%M:%S %Y %Z")<CR> iab lastmod
                            > <C-R>="Last Modified: " . strftime("%a %b %d %H:%M:%S %Y %Z")<CR>
                            >
                            > " When starting to edit a file:
                            > " For *.c and *.h files set formatting of comments and set C-indenting on
                            > " For other files switch it off
                            > " Don't change the sequence, it's important that the line with * comes
                            > first.
                            > autocmd BufRead * set formatoptions=tcql nocindent comments& autocmd BufRead
                            > *.c,*.ec,*.cpp,*.h,*.pl,*.pm set sm formatoptions=croql cindent
                            > comments=sr:/*,mb:*,el:*/,://
                            >
                            > " Only do this for Vim version 5.0 and later.
                            > if version >= 500
                            > " Set the location of my syntax overrides and read the defaults
                            > if has("Win32")
                            > let mysyntaxfile = $VIM . "/usersyntax.vim"
                            > let myfiletypefile = $VIM . "/userfiletype.vim"
                            > else
                            > let mysyntaxfile = $HOME . "/vim/usersyntax.vim"
                            > let myfiletypefile = $HOME . "/vim/userfiletype.vim"
                            > endif
                            >
                            > " Enable syntax highlighting
                            > syntax on
                            > endif
                            >
                            > set scroll=4
                            > " F5: Add a fortune and advance to the next one
                            > " mX mark where we are
                            > " :sp ~/.fortunes<CR> open a window on ~/.fortunes
                            > " d/^--/<CR> delete until the next line starting with "--"
                            > " Gp Go to the end and put the just deleted text there
                            > " :wq<CR> Write the ~/.fortunes file and close the window
                            > " 'XG Go to the last line of the original file
                            > " A<CR><Esc> Add an empty line
                            > " p put the fortune text
                            > " `X return to where we started
                            >
                            > "map <F5> mX:sp $VIM/fortunes.txt<CR>d/^--/<CR>Gp:wq<CR>'XGA<CR><Esc>p`X
                            > "set keywordprg=hh\ /program\ files/microsoft\ visual\
                            > studio/msdn/2000jul/1033/vclang.chm::/html/pluslang.htm
                            > "set keywordprg=hh\ %docupath%/vclang.chm::/html/pluslang.htm
                            > "set keywordprg=perldoc\ -f
                            > "split
                            >
                            > " load diff file
                            > "source c:/vim/diffwin.vim
                            > "source c:/vim/vim57/macros/explorer.vim map <M-Space> :simalt ~<CR>
                            >
                            > let html_number_color = '#00cc00'
                            > map ,r :so $VIMRUNTIME/syntax/2html.vim<CR>
                            >
                            > "set diffexpr="diff v:fname_in v:fname_new > v:fname_out"
                            > "function MyDiff()
                            > " silent execute "!diff " . v:fname_in . " " . v:fname_new . " > " .
                            > v:fname_out
                            > "endfunction
                            >
                            > let Flist_Ctags_Cmd = '\cygwin\bin\ctags.exe'
                            > "set tags=./tags,tags,c:/wx242/include/wx/tags,c:/c/tags
                            > set tags=./tags,tags,c:/visual~1/common/tags,c:\c\tags
                            > nmap <silent> gw "_yiw:s/\(\%#\w\+\)\(\W\+\)\(\w\+\)/\3\2\1/<cr><c-o><c-l>
                            >
                            > map <C-tab> :bn<CR>
                            > nmap <unique> <Leader>app :set foldmethod=expr<CR>
                            >
                            > " sal folding
                            > set
                            > foldexpr=getline(v:lnum)=~'^\\.data'?'>10':getline(v:lnum)=~'\\.enddata'?'<1
                            > 0':getline(v:lnum)=~'^\\S'?'=':((indent(v:lnum)/&sw))
                            > function SalFold()
                            > let ln = v:lnum
                            > let line = getline(ln)
                            > if line =~ '^\.data'
                            > let ret = '>10'
                            > elseif line =~ '^\.enddata'
                            > let ret = '<10'
                            > elseif line =~ '^\S'
                            > let ret = '='
                            > else
                            > let ret = indent(ln)/&sw
                            > endif
                            > return ret
                            > endfunction
                            > set foldexpr=SalFold()
                            >
                            > " ftp stuff
                            > "let g:netrw_ftp = 1
                            >
                            > nnoremap <silent> <F8> :TagExplorer<CR>
                            >
                            > "tab for buffers
                            > let g:miniBufExplorerMoreThanOne=100
                            > "let g:miniBufExplMapWindowNavVim = 1
                            > set virtualedit=block
                            >
                            > let g:showmarks_enable=0
                            >
                            > " Based on a post by Dr. Chip Campbell
                            > " Augroup LargeFile: for large files: turn undo off, etc (based on vim tip
                            > #611) " {{{2
                            > let g:LargeFileThreshold = 10*1024*1024 " in megabytes
                            > augroup LargeFile
                            > au BufReadPre * call <SID>SetLargeFileSettings() augroup END function!
                            > s:SetLargeFileSettings()
                            > let f = expand('<afile>')
                            > if getfsize(f) < g:LargeFileThreshold
                            > return
                            > endif
                            > let b:eikeep= &ei
                            > let b:ulkeep= &ul
                            > set ei=FileType
                            > setlocal noswf bh=unload
                            > let f=escape(substitute(f,'','/','g'),' ')
                            > exe "au LargeFile BufEnter ".f." set ul=-1"
                            > exe "au LargeFile BufLeave ".f." let &ul=".b:ulkeep."|set ei=".b:eikeep
                            > exe "au LargeFile BufUnload ".f." au! LargeFile * ". f
                            > echomsg "***note*** handling a large file"
                            > endfunction
                            > " }}}2
                            >
                            > ---------------- end _vimrc
                            >
                            > Bob Hensell wrote:
                            >
                            >>I'm not sure where it's coming from either, but the more lines I copy
                            >>and paste, the more ^@'s I get in gvim. I was hoping someone has seen
                            >>this before, but I'm not seeing the issue come up in any forums. Do
                            >>you mind sharing your .vimrc file with me?
                            >>
                            >>
                            >>
                            >>Please note that my e-mail address has changed to rhensell@...
                            >>
                            >>Bob Hensell
                            >>Systems Engineer
                            >>(574)232-3784 ex.236
                            >>Fax: (574) 232-4014
                            >>rhensell@...
                            >>Please reply to: mailto:ocieservice@...
                            >>
                            >>Donnell Systems, Inc.
                            >>300 S. St. Louis Blvd., Suite 203
                            >>South Bend, Indiana 46617
                            >>
                            >>---------------------------------------------------------------------
                            >>Confidentiality Notice:
                            >>---------------------------------------------------------------------
                            >>The contents of this e-mail message and any attachments are intended
                            >>solely for the addressee(s) named in this message. This communication
                            >>is intended to be and to remain confidential. If you are not the
                            >>intended recipient of this message, or if this message has been
                            >>addressed to you in error, please immediately alert the sender by
                            >>reply e-mail and then delete this message and its attachments. Do not
                            >>deliver, distribute, copy, disclose the contents or take any action in
                            >>reliance upon the information contained in the communication or any
                            >>attachments.
                            >>
                            >>
                            >>
                            >>-----Original Message-----
                            >>From: Bob Davis [mailto:Robert.Davis@...]
                            >>Sent: Friday, March 31, 2006 3:45 PM
                            >>To: Bob Hensell
                            >>Cc: vim@...
                            >>Subject: Re: gvim paste from windows clipboard
                            >>
                            >>Dont know where the ^@ comes from.
                            >>Isnt that a null?
                            >>I never get it and I run gvim for winxp all day long. I edit files a
                            >>samba share to a linux box. I run gvim on the linux box and use ssh -Y
                            >>and get it to appear on my winxp cygwin X server. I can cut and paste
                            >>from that gvim the same as the one running locally.
                            >>
                            >>
                            >>Bob Hensell wrote:
                            >>
                            >>
                            >>>That paste also appends the ^@ character at the end of my text.
                            >>>
                            >>>-----Original Message-----
                            >>>From: Bob Davis [mailto:Robert.Davis@...]
                            >>>Sent: Friday, March 31, 2006 2:36 PM
                            >>>To: Bob Hensell
                            >>>Cc: vim@...
                            >>>Subject: Re: gvim paste from windows clipboard
                            >>>
                            >>>why dont you just use "*p which puts the window clipboard wherever.
                            >>>
                            >>>
                            >>>Bob Hensell wrote:
                            >>>
                            >>>
                            >>>
                            >>>>Does anyone have a tip for me? I am running gvim 6.4 from cygwin on
                            >>>>my XP machine. Whenever I try to paste into gvim from another
                            >>>>application using the middle mouse button, the text gets pasted, but
                            >>>>a ^@ also gets appended to each line of my text. Is there something
                            >>>>I can
                            >>>
                            >>>put into my .vimrc file?
                            >>>
                            >>>
                            >>>
                            >>>>I've tried the mswin.vim but that didn't help. I'm rather new to vim
                            >>>>and gvim. I work with UNIX servers all day, so I'm used to vi, but I
                            >>>>like the script coloring that is available in vim. Any help would be
                            >>>>greatly appreciated because as it works now with the appending text,
                            >>>>it makes it virtually unusable because I do a lot of pasting into my
                            >>>
                            >>>scripts.
                            >>>
                            >>>
                            >>>
                            >>>>Thanks!
                            >>>>
                            >>>>Please note that my e-mail address has changed to rhensell@...
                            >>>>
                            >>>>Bob Hensell
                            >>>>Systems Engineer
                            >>>>(574)232-3784 ex.236
                            >>>>Fax: (574) 232-4014
                            >>>>rhensell@...
                            >>>>Please reply to: mailto:ocieservice@...
                            >>>>
                            >>>>Donnell Systems, Inc.
                            >>>>300 S. St. Louis Blvd., Suite 203
                            >>>>South Bend, Indiana 46617
                            >>>>
                            >>>>---------------------------------------------------------------------
                            >>>>Confidentiality Notice:
                            >>>>---------------------------------------------------------------------
                            >>>>The contents of this e-mail message and any attachments are intended
                            >>>>solely for the addressee(s) named in this message. This communication
                            >>>>is intended to be and to remain confidential. If you are not the
                            >>>>intended recipient of this message, or if this message has been
                            >>>>addressed to you in error, please immediately alert the sender by
                            >>>>reply e-mail and then delete this message and its attachments. Do not
                            >>>>deliver, distribute, copy, disclose the contents or take any action
                            >>>>in reliance upon the information contained in the communication or
                            >>>>any attachments.
                            >>>>
                            >>>>
                            >>>>
                            >>>>
                            >>>>.
                            >>>>
                            >>>
                            >>>
                            >>>--
                            >>>Bob Davis | Senior Advisory Software Developer - Applications
                            >>>Robert.Davis@...
                            >>>Work: 603-926-9696 x3456
                            >>>Home: 603-778-0781
                            >>>Aim: dad1732
                            >>>Yim: rsdavis9
                            >>>
                            >>>
                            >>>.
                            >>>
                            >>
                            >>
                            >>--
                            >>Bob Davis | Senior Advisory Software Developer - Applications
                            >>Robert.Davis@...
                            >>Work: 603-926-9696 x3456
                            >>Home: 603-778-0781
                            >>Aim: dad1732
                            >>Yim: rsdavis9
                            >>
                            >>
                            >>.
                            >>
                            >
                            >
                            > --
                            > Bob Davis | Senior Advisory Software Developer - Applications
                            > Robert.Davis@...
                            > Work: 603-926-9696 x3456
                            > Home: 603-778-0781
                            > Aim: dad1732
                            > Yim: rsdavis9
                            >
                            >
                            > .
                            >

                            --
                            Bob Davis | Senior Advisory Software Developer - Applications
                            Robert.Davis@...
                            Work: 603-926-9696 x3456
                            Home: 603-778-0781
                            Aim: dad1732
                            Yim: rsdavis9
                          • Benji Fisher
                            ... Try something like this. Starting in Normal mode, type = and then, at the command line, substitute(@*, n , n , g ) with a to finish that line,
                            Message 13 of 14 , Mar 31, 2006
                              On Fri, Mar 31, 2006 at 01:33:49PM -0500, Bob Hensell wrote:
                              > Please disregard my previous email, and reply to this email, thank you:
                              >
                              > Does anyone have a tip for me? I am running gvim 6.4 from cygwin on my XP
                              > machine. Whenever I try to paste into gvim from another application using
                              > the middle mouse button, the text gets pasted, but a ^@ also gets appended
                              > to each line of my text. Is there something I can put into my .vimrc file?
                              > I've tried the mswin.vim but that didn't help. I'm rather new to vim and
                              > gvim. I work with UNIX servers all day, so I'm used to vi, but I like the
                              > script coloring that is available in vim. Any help would be greatly
                              > appreciated because as it works now with the appending text, it makes it
                              > virtually unusable because I do a lot of pasting into my scripts.
                              >
                              > Thanks!

                              Try something like this. Starting in Normal mode, type "= and
                              then, at the command line,

                              substitute(@*, '\n', '\n', 'g')

                              with a <CR> to finish that line, then complete the command with p . I
                              think the first \n is right, but maybe the second should be \r or
                              something; experiment a bit. If it is correct as written, map some key
                              to do it quickly, e.g.

                              :nmap <F3> "=substitute(@*, '\n', '\n', 'g')<CR>p

                              Odd though it seems, I actually think that you do want \n twice.

                              HTH --Benji Fisher
                            • Yakov Lerner
                              ... Yakov
                              Message 14 of 14 , Apr 1 5:02 AM
                                On 3/31/06, Bob Hensell <rhensell@...> wrote:
                                > Please disregard my previous email, and reply to this email, thank you:
                                >
                                >
                                >
                                > Does anyone have a tip for me? I am running gvim 6.4 from cygwin on my XP
                                > machine. Whenever I try to paste into gvim from another application using
                                > the middle mouse button, the text gets pasted, but a ^@ also gets appended
                                > to each line of my text. Is there something I can put into my .vimrc file?
                                > I've tried the mswin.vim but that didn't help. I'm rather new to vim and
                                > gvim. I work with UNIX servers all day, so I'm used to vi, but I like the
                                > script coloring that is available in vim. Any help would be greatly
                                > appreciated because as it works now with the appending text, it makes it
                                > virtually unusable because I do a lot of pasting into my scripts.

                                :inoremap <MiddleMouse> <MiddleMouse><esc>mz:silent! %s/<c-v>000//g<cr>'za
                                :noremap <MiddleMouse> <MiddleMouse>mz:silent! %s/<c-v>000//g<cr>'z

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