Code and Hacks

Stuff I've stumbled on or figured out... mostly Perl, Linux, Mac and Cygwin.

My Photo
Name:
Location: CA, United States

Perl hacker, investor and entrepreneur.

Saturday, July 4, 2009

Stealing from Padre for Vim part 3

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:

  • ,pp - Show a menu of the functions availabe from App::EditorTools
  • ,pL - Lexically rename the variable under the cursor (make sure the cursor is at the start of the variable for now
  • ,pP - Rename the package based on the path of the current buffer
  • ,pI - Introduce a temporary variable

Here are a few screenshots of these actions:

Lexically Rename Variables:
vim-renamevar
Rename Package based on the current file's path:
vim-renamepackage
Introduce Temporary Variable
vim-introtempvar

I'd love to hear feedback and any suggestions for future PPI based tools that Vim, Padre and other editors could leverage.

I also have to note that the editortools-vim script from App::EditorTools was very easy to put together (although it still needs a fair amount of clean-up work and documentation) since is was based on Ricardo's App::Cmd--very easy to use and feature rich.

** Updated 7/5/09 10:37am: moved the screencasts to an external server and fixed some spelling

Labels: ,

5 Comments:

Blogger Ahmad M. Zawawi said...

Great work! But do any of these animated gif screenshots supposed to do anything? Hosting them on blogspot does not work as you may already know.

July 4, 2009 at 9:36 PM  
Blogger SolidState said...

@Ahmad, if you click on the picture you will see the animated gif - works fine for me at least.

July 5, 2009 at 3:49 AM  
Blogger Ahmad M. Zawawi said...

@SolidState Oh. I was using the latest chrome >3.0.190 which has the animated gif not working bug.

Thanks.

July 6, 2009 at 12:03 AM  
Blogger Andrew Grangaard said...

oooh! this looks really interesting. Thank you!

July 22, 2009 at 9:49 AM  
Blogger Pat Regan said...

I threw together a quick App::EditorTools wrapper for Emacs:

http://blog.patshead.com/blog/2010/03/a-quick-port-of-appeditortools-to-emacs.html

March 8, 2010 at 2:03 PM  

Post a Comment

Subscribe to Post Comments [Atom]

<< Home