StanAngeloff / php.vim

An up-to-date Vim syntax for PHP (7.x supported)
477 stars 69 forks source link

Forces tab character indent of second line of docblock comment #41

Closed jsit closed 6 years ago

jsit commented 9 years ago

If I begin a comment block with this:

/**

and hit enter, my next line is:

\t*

(tab character \t at beginning of line)

This should really be a space; also it only seems to happen when tabstop is set to 2.

StanAngeloff commented 9 years ago

As far as I can tell, there is nothing in php.vim that controls what character gets inserted on new lines. Could you execute the following command (press :, paste each command and then <Return> to execute):

echo &expandtab . ' ' . &tabstop . ' ' . &shiftwidth

and also do the same for:

echo &rtp

...then paste the output of both commands here.

StanAngeloff commented 9 years ago

If you are still experiencing this issue, please post below and I'll re-open.

nclavaud commented 8 years ago

Experiencing the same issue here. When I start typing a docblock comment and hit return after the first \** line, then the cursor on the new (second) line is shifted to the right.

expandtab: 1
tabstop: 4
shiftwidth: 4

rtp:
~/.vim
~/.vim/bundle/Vundle.vim
~/.vim/bundle/nerdtree
~/.vim/bundle/ctrlp.vim
~/.vim/bundle/ctrlp-py-matcher
~/.vim/bundle/vim-twig
~/.vim/bundle/vim-airline
~/.vim/bundle/vim-colors-solarized
~/.vim/bundle/vim-airline-themes
~/.vim/bundle/vim-gitgutter
~/.vim/bundle/vim-fugitive
~/.vim/bundle/apiblueprint.vim
~/.vim/bundle/plantuml-syntax
~/.vim/bundle/vim-phpqa
/var/lib/vim/addons
/usr/share/vim/vimfiles
/usr/share/vim/vim74
/usr/share/vim/vimfiles/after
/var/lib/vim/addons/after
~/.vim/after
~/.vim/bundle/Vundle.vim
~/.vim/bundle/Vundle.vim/after
~/.vim/bundle/nerdtree/after
~/.vim/bundle/ctrlp.vim/after
~/.vim/bundle/ctrlp-py-matcher/after
~/.vim/bundle/vim-twig/after
~/.vim/bundle/vim-airline/after
~/.vim/bundle/vim-colors-solarized/after
~/.vim/bundle/vim-airline-themes/after
~/.vim/bundle/vim-gitgutter/after
~/.vim/bundle/vim-fugitive/after
~/.vim/bundle/apiblueprint.vim/after
~/.vim/bundle/plantuml-syntax/after
~/.vim/bundle/vim-phpqa/after
StanAngeloff commented 8 years ago

@nclavaud, how did you install php.vim, I can't see it in your bundles? Can you temporarily remove the syntax file and see if the indentation improves?

nclavaud commented 8 years ago

I've uninstalled php.vim just before running the rtp command. That's why it does not show up in the output. Sorry for that.

I've installed php.vim again, and the indentation bug is back. Then, I've removed the syntax file bundle/php.vim/syntax/php.vim, and the indentation bug is gone.

I've uninstalled all other plugins, keeping only php.vim, and I still have the bug:

expandtab: 1
tabstop: 4
shiftwidth: 4

rtp:
~/.vim
~/.vim/bundle/Vundle.vim
~/.vim/bundle/php.vim
/var/lib/vim/addons
/usr/share/vim/vimfiles
/usr/share/vim/vim74
/usr/share/vim/vimfiles/after
/var/lib/vim/addons/after
~/.vim/after
~/.vim/bundle/Vundle.vim
~/.vim/bundle/Vundle.vim/after
~/.vim/bundle/php.vim/after

(and no bug when the syntax file is removed).

StanAngeloff commented 6 years ago

This issue reminds me of #58. Closing and archiving this conversation.