Thursday, March 5, 2015

Two plugins which (you and) I will be looking into

Not much time to collect philosophizings for here have I had so instead, have links to two plugins which I have both tried briefly and failed to yet try for long enough:

  1. cmdalias. This is by Hari Krishna Dara and the short version of its story is that it replaces :cabbrev for you, or rather gives you a wrapper function which, as I understand it, creates aliases (to replace “abbreviations” as :cabbrev creates) and only allows those to be expanded when they begin a command at the Vim command line.

    I toyed with this briefly—obviously it would relate to the trick #2 of my five weird tricks, and I do use those abbreviations but I was not able (in my brief experimenting with it) to set up a suitable replacement using cmdalias. I am perfectly willing to put that down to my lack of time spent on it rather than the plugin itself for now, so I may yet post on how you can replace that trick’s code.

  2.  Seek. By Vic Goldfeld, this creates a motion using s. (I mention this one in the book, by the way, as a good source, code-wise, of inspiration for new plugin authors.) The motion takes two characters and moves the cursor to where they appear in the current line (so it’s like a more-specific f). I don’t doubt that this is useful in practice, but I use s a lot to a replace text, and was having some difficulty reconciling Seek with my current customs in that regard. More work is needed here, since Seek does consider such use (and has had more thought put into it by its author so far than by me as a user).

So. Try those out yourself (I command you), and hopefully I will have more to say about them in future postings. Meantime, happy Vimming!

No comments:

Post a Comment