jamesoff.net




3
Apr
2009
0

Using gvim to edit mail in Outlook

Before you go any further, this isn’t about having gvim embedded in Outlook, or using it automatically as an external editor.

This method lets you use one keystroke to edit a mail in gvim and when you close gvim, it’s put back into the Outlook compose mail window.

(more…)


Permalink | Posted in Exim and email vim and tagged  



6
Mar
2008
3

vim as a man-page reader

Sure, why not :)

This goes in your zshrc:

  vman() {
    if [ $# -eq 0 ]; then
      /usr/bin/man
    else
      if man -w $* >/dev/null 2>/dev/null
      then
        /usr/bin/man $* | col -b | vim -c 'set ft=man nomod' -
      else
        echo No man page for $*
      fi
    fi
  }
  alias man='vman'

And this goes in your vimrc (in a suitable augroup):

  autocmd FileType man setlocal ro nonumber nolist fdm=indent fdn=2 sw=4 foldlevel=2 | nmap q :quit

Now you’ll get nicely highlighted man pages with folded sections, and you can hit q to quit just like less.

Vim as a manpage viewer


Permalink | Posted in FreeBSD Linux Sysadmin and tagged