Vim, 8 spaces after { <ENTER>
I need to use four spaces as indent in project I'm working in. That is my .vimrc:
"Autouzupelnianie nawiasow
"inoremap { {<CR>}<C-O>O
inoremap { {}<LEFT>
inoremap [ []<LEFT>
inoremap ( ()<LEFT>
syntax on
set autoindent
set number "pokazywanie numerow lini
set modifiable
set write
filetype indent on "wlaczenie rozpoznawania wciec
set showmatch "nawiasy
"Backup
set backup
set backupdir=/home/mat/Backup/vim/
let g:html_use_css="1" "htmle uzywaja css 开发者_如何学JAVA
"Wrap
set linebreak
set wrap
set nolist
"Tabulacja
"
"set smartindent
set tabstop=4
set expandtab
set shiftwidth=4
set softtabstop=4
"Plugin snippMate
filetype plugin on
But when i hit { and then hit enter i've got:
{
<8 spaces> SOMETHING
Depending on the filetype, a filetype plugin may be overriding your vimrc settings. Check in $VIMRUNTIME/ftplugin/{filetype}.vim
and $VIMRUNTIME/after/ftplugin/{filetype}.vim
. Also $VIMRUNTIME/indent/{filetype}.vim
and the after
version of that.
I faced the same problem.
The solution is to command this after a colon :
set autoindent
set tabstop=4
Or you can command:
set tabstop=4 autoindent
精彩评论