If Vim is your editor of choice, and WordPress is something you work with on a regular basis, then check out WordPress.vim – a Vim plugin for WordPress development.
Some of the features are:
- Auto-Completion for the WordPress API
- WordPress Hooks Integration
- WP-CLI Integration
- Jump to Definition in WordPress Core
- UltiSnips Snippets
- Syntax Highlighting for WordPress PHP files.
- Markdown Syntax Highlighting for readme.txt
- PHPCS Syntax Checker integrated with WordPress Coding Standards
- Search in Codex
- Integration with WpSeek API.
- Readme.txt Auto Validation.
Robert Basic shares his “current Vim setup for PHP development“. He shows how setup the Gutentags plugin, jump to definitions with CtrlP plugin, display of the current file and method in the status line, add support for PHP namespaces, improve linting with Asynchronous Lint Engine, and add support for PHPStan.
Ruslan Osipov has a very handy tutorial on how to setup Vim text editor as git merge tool, for resolving git conflicts.
Basically, run the following commands to tell git to use Vim as a merge tool (don’t forget the –global flag if you want it for all your projects, not just the current one):
git config merge.tool vimdiff
git config merge.conflictstyle diff3
git config mergetool.prompt false
With that, running “git mergetool” after a conflict was reported, will result in something like this:
The three way split window will show local version (–ours) on the left, the remote version (–theirs) on the right, and the base version with the conflict in the middle. You can then get changes from one window into another using the following Vim diffget commands:
:diffg RE " get from REMOTE
:diffg BA " get from BASE
:diffg LO " get from LOCAL
Check a few of Ruslan’s other vim-related articles.
Here is one feature of Vim you probably didn’t know about – “:smile” command.
Here’s the patch, via Hacker News.
Dear all contributors to vimrcfu,
thank you very much for all my sleepless nights this week. I’ve almost forgot how my bed looks like. On the other hand, I’ve learned a tonne and have significantly rearranged my vimrc and related files, expanding it with new bits and pieces.
The sleep I can get back. The awesome features of Vim at my fingertips now – couldn’t have happened without you.
VimGolf – a quick and fun way to learn Vim text editor. There is a whole lot of different challenges for all levels – from novice to expert – that will test your knowledge of Vim trickery.
You can also review the solutions provided by other people, from shortest to the most readable.
If you are using Vim editor to write PHP code, you probably already know about the excellent tagbar plugin, which lists methods, variables and the like in an optional window split. Recently, I’ve learned of an awesome phpctags-tagbar plugin, which extends and improves this functionality via a phpctags tool, which has a deeper knowledge of PHP than the classic ctags tool.
Once installed, you’ll have a more organized browser of your code, with support for namespaces, classes, interfaces, constants, and variables.
The team behind the greatest text editor of all times has release the new major version – Vim 8.0. It’s the first major release in 10 years! Brief overview of the changes:
- Asynchronous I/O support, channels, JSON
- Partials, Lambdas and Closures
- New style testing
- Viminfo merged by timestamp
- GTK+ 3 support
- MS-Windows DirectX support
For a more complete list and details, have a look here.
The TL;DR summary: Vim provides a lot more power now to plugin developers, so we’ll be seeing a boost in both new functionality and old ways getting better.
Here is a mandatory Slashdot discussion with your usual Vim vs. Emacs flame.
P.S.: Emacs has recently released a major update too …
Micro is a modern console based text editor, written in Go. Version 1.0.0 has been recently released. It’s cross-platform (installs as a single binary) and supports a variety of features:
- Easy to use and to install
- No dependencies or external files are needed — just the binary you can download further down the page
- Common keybindings (ctrl-s, ctrl-c, ctrl-v, ctrl-z…)
- Keybindings can be rebound to your liking
- Sane defaults
- You shouldn’t have to configure much out of the box (and it is extremely easy to configure)
- Splits and tabs
- Extremely good mouse support
- This means mouse dragging to create a selection, double click to select by word, and triple click to select by line
- Cross platform (It should work on all the platforms Go runs on)
- Note that while Windows is supported, there are still some bugs that need to be worked out
- Plugin system (plugins are written in Lua)
- Persistent undo
- Automatic linting and error notifications
- Syntax highlighting (for over 75 languages!)
- Colorscheme support
- By default, micro comes with 16, 256, and true color themes.
- True color support (set the
MICRO_TRUECOLOR env variable to 1 to enable it)
- Copy and paste with the system clipboard
- Small and simple
- Easily configurable
- Common editor things such as undo/redo, line numbers, unicode support…
Although not yet implemented, I hope to add more features such as autocompletion, and multiple cursors in the future.
If you are looking for a new editor, give Micro a try.
Here is a nice collection of screenshots (with some comments) from some really hardcore developers – people who are behind things like operating systems and programming languages, not the latest hipster startup that nobody will remember n three years. Better even, the screenshots were taken in 2002 and now, 13 years later, reiterated.
Two things I found interesting here:
- Pretty much everyone calls their setup “boring”, yet it’s obviously slow functional that very little changes over time.
- Some of these screenshots feature setups so basic, that for those people who are not too familiar with the applications used, it would be difficult to choose which screenshot is from 2002 and which one is from 2015.
And while I’m nowhere near that level of developer, I still have to say that my desktop hasn’t changed much in the last 13 years either. I am spending my days in the MATE Desktop Environment, which is a fork of Gnome to maintain the awesome Gnome 2 interface and not all that craziness of Gnome 3. And like many other people featured here, I mostly use the browser and a gadzillion of terminal windows for my work. I also have Vim keybindings burnt into my fingers, and I can’t imagine switching to something else ever. Here’s how it looks today.
I’m sure there must be a screenshot of my desktop from back in the days somewhere on this blog, but I don’t think I’ll find it.