I came across the second edition of the Prentice Hall’s “A Practical Guide to Linux Commands, Editors, and Shell Programming” by Mark G. Sobell (original link). This is a rather lengthy book at just over 1,000 pages, covering everything from history of Linux and basic commands, all the way to bash, Perl, and sed, and how things work both on the inside and outside.
It’s probably not one of those books to read from cover to cover, but quite handy to keep as a reference and flip a few pages once in a while.
This is hilarious! I think CommitStrip is just responding to these recent stats.
Jon Cairns wrote “Using Vim as a PHP IDE” blog post a good five years ago, but a lot of it still relevant and useful. It covers all the usual – syntax highlighting, syntax checking/linting, tags and auto-completion, coding style and mess detecting, unit testing and debugging. As many other similar guides, he links to a variety of plugins and provides configuration tips.
OK, this one is socially funny and statistically cool – Stack Overflow question on how to exit Vim editor was viewed over a million times in the last few years. Now, there’s a breakdown of all sorts of statistics about who gets stuck in Vim the most. It’s pretty amazing the kind of questions and answers one can ponder at when having access to a lot of statistical data.
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.