Tuesday, October 5, 2010

paste in vim creates stupid result

Hi,

I have the following problem with vim. I am trying to copy the following text from an xterm:

# -----------------------------------------------------
def external_call(command):
    """
    Makes an internal call to the shell (with the
    current set environment), wait for completion
    and returns the output and error of the command.
    @param command: command to be executed internally
    @return: a tuple (status, output, error)
    """

into a vim session (by using shift - middle mouse button), but the result is as follows:

# -----------------------------------------------------
def external_call(command):
    """
        Makes an internal call to the shell (with the
            current set environment), wait for completion
                and returns the output and error of the command.
                    @param command: command to be executed internally
                        @return: a tuple (status, output, error)
                            """

which is not what I want! My .vimrc contains the following content:

:set number
:set paste
:set mouse=a

autocmd FileType * set tabstop=2|set shiftwidth=2|set noexpandtab
autocmd FileType python set tabstop=4|set shiftwidth=4|set expandtab
autocmd BufEnter * set ai sw=4 ts=4 sta et fo=croql
set softtabstop=4 " makes the spaces feel like real tabs


Any idea how to change the settings so that the text is correctly inserted into vim?


Thanks
  Alex

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments:

Post a Comment