Posts for: #Zsh

zsh fun

I have been playing with zsh a bit today. Here is the outcome:

  • use vim to view man pages; this requires manpageview.vim vim plugin.

     function vman() { vim -c ":RMan ${*}" ; }
    
  • these function store the current directory in X clipboard and then restore the path from the clipboard, which is handy when you want to restore the path in another xterm…

     function xpwd () { pwd | xclip -i ; xclip -o ; }
     function xcd () { cd `xclip -o` ; }
    
Read more →

vimgrep alias

I’ve been using Solaris recently… since yesterday. First reactions: How can anyone use their command line tools!?

Fortunately the system I was on had zsh and vim.

Here is a macro I use to avoid Solaris grep:

    function vimgrep () { tmp="$@" ; vim -c "vimgrep $tmp | copen" ; }

(I could not figure out a way to do it w/o the tmp variable)

Now you can do things like:

Read more →