07 May 2012

Slick ZSH Trick for Vi-Mode

Found a neat trick today for making the commandline vi-mode much more friendly.

Back-story: As I’ve been spending more time programming, I find myself more comfortable on the commandline and in VIM. Also, there’s a setting that can be placed in .bashrc and/or .zshrc to allow vi style editing of the commandline. This is all well and good but without any visual indicator of whether I’m in INSERT MODE or NORMAL MODE… well, it’s disorenting.

So the neat trick is to add code in your .zshrc to insert a right-hand side prompt (RPROMPT) that will show a notifier depending on what mode you’re in.

Add the following code (and thank you to wherever I found this trick online)

    function zle-line-init zle-keymap-select {
        zle reset-prompt
    zle -N zle-line-init
    zle -N zle-keymap-select

Have another nice trick for your .zshrc, please share it in the comments!

28 Apr 2012

My Kingdom for a Good Fuzzy Finder

I’ve been working on my VIM configurations recently which involved cleaning out cruft from when I hadn’t transitioned to using Pathogen. While doing so I realized that I wanted to take the advice of DestroyAllSoftware.com and switch away from Nerdtree to something that doesn’t involve a context switch. CtrlP to the rescue! Slick addon that I’m happy to have in my arsenal. Plus, it didn’t necessitate installing and configuring VIM with Ruby 1.8.7 as Command-T did :).

28 Apr 2012

Switching to VIMRepress

I’ve been looking for a way to lower the friction involved in blogging. Since I’m spending much of my free time on the commandline, I looked for a VIM solution. The plugin is called VimRepress and it allows you to revise, edit and post blog postings in VIM! The installation process was simple using ‘pathogen’: just a git clone of the repository into my ~/.vim/bundle, install the python-markdown module, and add a few configuration & authorization lines to my ~/.vimrc.

Add the following to your ~/.vimrc let g:vimrepress\_tags\_completable = 'true' let VIMPRESS=[{'username':'BLOG\_USER', 'password':'SECRET', 'blog\_url':'http://blog.xargs.io/'}] Now open up VIM and the blog commands start with :Blog[List, New, etc]. Source and Thanks to : Conner McD