As promised in my last post
I have released a new version of
App::EditorTools
and have a number of screenshots of the new functionality. This version
includes App::EditorTools::Vim
, which provides an easy way to add
the vim scripts to integrate the package into Vim.
perl -MApp::EditorTools::Vim -e run > ~/.vim/ftplugin/perl/editortools.vim
And now you should have the following mappings:
App::EditorTools
Here are a few screenshots of these actions:
I was pleasantly surprise at the positive response to my last post on Stealing from Padre for Vim–particularly from the Padre developers! Seems they had hoped/planned on separating some of the tools out of the Padre core from the beginning (and many seem to be vimmers).
With their blessing and encouragement, I have pulled the editor independent parts of their PPI::Task tools into its own distribution–PPIx::EditorTools–available now on CPAN. I also adapted the current version of Padre to work wit the external package and released App::EditorTools to provide a command line interface for those editors that need it (i.e., vim). I’ll post another screencast and the Vim scripts needed to integrate it shortly.
I’m sure the Padre developers weren’t hoping to have their code absconded for those of us addicted to vim, but tsee’s recent blog post on refactoring with Padre’s lexical variable replace made me jealous–I want that for vim! So hack, hack, hack and _voila_:
When vim is shutdowns abnormally it leaves a bunch of .swp files
around.1 Given the way I program (very iterative and test focused)
those backups are rarely more current than the saved file. A great time saver
to help with recovery is the vim DiffOrig
command. After learning
about it on StackOverflow,
I put together the following bash script to find any swap files under the
current directory, open each in vim, run DiffOrig and prompt to delete after
you close vim.