I looked around, but could not find an answer to this. I have a CentOS 6.2 server working with the same .vimrc as my CentOS 5.8 server, however, when I press Enter in VIM on my 6.2 server, it adds the first character of the previous line if it is a specific character (% or # i saw). This is what happens in VIM (the seconds line to the right after entering the input, but without entering anything else):
# <enter> # % <enter> %
Here is my .vimrc:
set autoindent set smartindent set tabstop=4 set shiftwidth=4 set showmatch set number imap jj <Esc> " Professor VIM says '87% of users prefer jj over esc', jj abrams disagrees " Indenting ******************************************************************* set ai " Automatically set the indent of a new line (local to buffer) set si " smartindent (local to buffer) " Cursor highlights *********************************************************** "set cursorline "set cursorcolumn " Set an orange cursor in insert mode, and a red cursor otherwise. " Works at least for xterm and rxvt terminals. " Does not work for gnome terminal, konsole, xfce4-terminal. "if &term =~ "xterm\\|rxvt" " :silent !echo -ne "\033]12;red\007" " let &t_SI = "\033]12;orange\007" " let &t_EI = "\033]12;red\007" " autocmd VimLeave * :!echo -ne "\033]12;red\007" "endif " Searching ******************************************************************* set hlsearch " highlight search set incsearch " Incremental search, search as you type set ignorecase " Ignore case when searching set smartcase " Ignore case when searching lowercase " Colors ********************************************************************** "set t_Co=256 " 256 colors set background=dark syntax on " syntax highlighting "colorscheme darkzen
Determine the difference from it and that on my server 5.8 (where I don't have this problem), and there was no difference. Any idea why this could be happening?
Josh b
source share