r/PHP • u/[deleted] • Oct 03 '19
Use Vim as a PHP IDE
https://spacevim.org/use-vim-as-a-php-ide/12
11
8
u/codingracer Oct 03 '19
+1 from me. After 20 years I still don't know why laggy JAVA editors are so popular.
5
3
u/ahundiak Oct 04 '19
vim is strictly for all those newbie "must have the latest bells and whistles" developers. Real programmers use vi.
2
4
u/justaphpguy Oct 03 '19
The headlines are nice, but it's missing:
debugging
refactoring
inspections (or intellisense, whatever the concept is named)
Really, without those things (and probably), you can name it everything you want. Sure, you can add more plugins. And more. Have fun configuring them.
But it will never be an IDE.
5
u/fatboyxpc Oct 03 '19
I agree, this article is missing those things. However, with vdebug and phpactor those things are taken care of.
Vim also has excellent (and built in) ctags support, which is nice and sometimes (usually) faster than intellisense.
I'm only missing a few features that PHP Storm has, honestly, and it's a lot snappier. My setup absolutely beats PHP Storm + IdeaVim.
1
u/MattBD Oct 03 '19
I bloody love PHPactor. I maintain a legacy Zend 1 code base I'm slowly modernizing and the refactoring tools are invaluable.
I'm also using FZF to give me fast and accurate fuzzy search, and Ale to highlight issues found by CodeSniffer and Psalm. I don't feel there's anything much I want that PHPStorm has over that, and it'll run on a dirt cheap netbook for when I'm on the go.
1
u/fatboyxpc Oct 03 '19
Yep! PHP Storm does have a few options that no vim plugin I've found has, but honestly I would rarely use them. One good feature is the loop to
array_*detection/warning (invaluable for new devs!), and another super awesome one is the "find all paths to get to this function".Honestly now that LSP is a thing, PHP Storm doesn't have near the "stronghold" on PHP that people think it does, people just aren't aware of LSP yet. VSCode is kind of battling that with Inteliphense, though.
If you're into testing and you haven't seen vim-test, give it a look!
Also, there's a VIM discord made up of mostly PHP devs (but we welcome anybody) if you want an invite link I can share it!
1
1
u/oefd Oct 03 '19
I'm not going to comment on the quality of existing PHP LSP implementations because I haven't used any much at all, but in the general case the magic of LSP which integrates into vim just fine offers you refactoring help, inspections/intellisense/intelligent-autocompletion or whatever you want to call it, and automatic formatting. That's pretty IDE like, and it takes 1 plugin + installing the LSP server. If you use something like spacevim which was linked which installs, configures and integrates all the develpement envrionment tools for you out of the box, well that's even more IDE-like.
If you prefer a 'real' IDE that's fine, I'm not trying to say vim/spacevim is inherently better for having this support (and I don't even like spacevim to be honest), but saying it 'will never be an IDE' isn't terribly fair if it's not only possible to take a bunch of tools and integrate them all into the editor, but someone already did.
1
u/penguin_digital Oct 04 '19
debugging
https://github.com/vim-vdebug/vdebug
inspections (or intellisense, whatever the concept is named)
1
0
3
Oct 04 '19 edited Oct 04 '19
[removed] — view removed comment
1
Oct 04 '19
thanks I use neovim instead. and it support async job API and remote plugins. and I can write neovim plugins in PHP.
22
u/AcousticDan Oct 03 '19
no