Mi sono guardato intorno ma non ho trovato una risposta a questo. Ho un server CentOS 6.2 in esecuzione con lo stesso .vimrc del mio server CentOS 5.8, tuttavia quando premo invio in VIM sul mio server 6.2, aggiunge il primo carattere della riga precedente se si tratta di un determinato carattere (% o # sono i quelli che ho visto). Questo è ciò che accade a VIM (Le linee secondi sono di destra dopo aver colpito entrare, ma senza scrivere altro):VIM aggiunge un carattere a una nuova riga al momento di premere invio
# <enter>
#
% <enter>
%
Ecco la mia 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
Ran un diff contro di esso e quello sul mio server 5.8 (dove non ho questo problema) e non c'era alcuna differenza. Qualche idea sul perché questo possa accadere?
+1 per: 'Il professor VIM dice che '87% degli utenti preferisce jj su esc ', jj abrams non è d'accordo' –
Dipende dai plugin di tipo file. –