0

I'm currently editing some websites. What I usually do is edit the html/css files in vim (from the command line) and then preview them in Safari (and intermittently in firefox an chrome to see if that also works).

Yet I was updating my website to use the SSI capabilities my new web host offers. Eg. I'm SSI-ing my menu code, instead of loading it in an iframe. This however requires every link in the menu to be an absolute path /style/menu.css instead of ../style/menu.css (where the path was modified depending on the location).

This however breaks my offline viewing capabilities: ignoring the fact that I cannot view anything that uses SSI when previewing the files, I cannot view anything using the absolute paths. This means that nothing on my website is formatted as should be (the css files can't be found). This is because my browser goes looking in the local directory / instead of the location where the file is actually stored.

Is there a method that allows me to still preview changes offline? I would prefer something that still allows me to use vim, since vim is awesome.

I'm on mac.

1 Answer 1

2

Honestly, nothing beats having a local apache instance... and editing files in VIM. Once installed, it takes only a minute to setup additional "sites" so you can have dozens of private websites running on your machine that only you have access to... until you upload it to a production server.

2
  • how would I go about doing this? Would this support SSI (which would be awesome!)?
    – romeovs
    Jan 25, 2012 at 18:02
  • Download and install apache. Configure to taste... and yes... it would support SSI, as it is a full-blown apache server.
    – TheCompWiz
    Jan 25, 2012 at 18:09

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .