Wednesday, 19 August 2009

 

Useful ZSH Commands for Vim

(When I used bash, I wrote small scripts to achieve the following)

We frequently re-edit the most recent files, I have aliases/scripts for many of following as they are a bit clunky to type.

vi *(.om[1]) # vi newest file
vi -p *(.om[1,3]) # open 3 newest files in tabs (gvim)
vi *(m0) # re-edit all files changed today!
ls *(^m0) # files NOT modified today
ls -l *(m4) # list files modified exactly 4 days ago
vi **/main.php # where ever it is in hierarchy
ls (x*~x[3-5]) # list files x* except x3 to x5
vi !$ # vi last parameter
vi !-2:2 # second parameter of second but last command
vi !$:r.php # vi last parameter but change extension to .php
^mian^main # modify previous command (good for correcting typos)
^php^cfm # modify previous command replace php by cfm

more zsh tips and tricks here

Labels: , ,


Comments:

Post a Comment

Subscribe to Post Comments [Atom]





<< Home

This page is powered by Blogger. Isn't yours?

Subscribe to Posts [Atom]