I'm doing a "autocmd BufNewFile" for my php class file in my .vimrc. I need to implement standard method, and I want to write them in one line. Here is my probleme, when I press 'o' to begin a newline after a oneline function, I get an "extra tab" who ruins my identation.
// "one line" example
Class Example { // 0 tab
function foo() {return ('foo');} //1 tab
function fuu(){} //2 tab, I want 1 ofc.
}
// discusting example without bug
Class Example { // 0 tab
function foo() {return ('foo'); // 1 tab
} // 1 tab
function fuu(){} // 1 tab
}
Does anyone got an idea to make this work as exepected?
Here is the interesting part of my .vimrc
set tabstop=4
set softtabstop=0 noexpandtab
set shiftwidth=4
set term=xterm-256color
syntax on
set nowrap
set mouse=a
set ruler
set colorcolumn=80
set showmatch
set list
" Showing tab
set listchars=tab:>-,trail:-
highlight SpecialKey guifg=grey ctermfg=darkgrey
set nocompatible
set number
"Better command completion
set wildmenu
set wildmode=list:longest