Will Fris's WordPress Weblog











{20101016}   recursively open all `webby`-files with vim

JaY, i can be even lazier with typing

Okay, it took a few minutes to figure out
but i now have a way to recursively open all `webby`-files
while typing only two letters
in my terminal/command-line/commandprompt/sli/shell/bash/sh/whatever…

To be able to do so i use two aliases
in my ~/.bash_aliases file( which gets sourced in my ~/.bashrc file ).
I use bash on ubuntu and do not yet know if this will work on other boxes…

`webby`-files can mean anything ofcourse, but at this moment it means the following for me:

files ending in : .phtml , .php , .css , .js or .htaccess

The two aliases in ~/.bash_aliases

alias web_files='find . -regex '\''.*\.\(php\|phtml\|css\|js\|htaccess\)'\'' '

alias vw='vim $( web_files )'

c’est tout .

Advertisements


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

et cetera
%d bloggers like this: