Skip to main content
2 of 2
eliminated useless crap
Raven
  • 1.4k
  • 4
  • 16
  • 26

How can I associate special logic with file extensions?

Is there an easy way to have arbitrary text editors call special logic based on a file extension?

For example, let's say I had a zip file that had a collection of files.

text.txt image.jpg othercrap.crap 

Is there a way to have text editors automatically run commands when opening the file via something like vi myarchive.zip based on the file extension?

Raven
  • 1.4k
  • 4
  • 16
  • 26