

When you save a collection of files as a project, BBEdit creates a separate file with a filename extension of. If you have common elements such as headers, footers, and navigation that appear on each page, BBEdit makes it much easier to manage your website by collecting all the files - including image, CSS, JavaScript and other ancillary files - into a BBEdit project. In addition to your main page (index.html, index.php, etc.), you may have other pages, such as an about page, a contact page, and several content pages. I'll expand on it further with some more enhanced selection of file placement etc later on, but I've gotten far enough now that it really helps.Typically you will be working on one file at a time, but as your website grows you will have more than one page. The Macro with a pop-up asking for File Name and everything is in place. way beyond my skill-level to understand - but not it's at least within my skill-level to solve for my use case! Thanks again for that! I guess there must be some kind of difference in some implementation of something. It is a bit funny though, because if I create a file via the KM-method, but do the regex manually either in TextMate or BBedit, it works fine just as before without the appearing in the file when I only do a \n-based search, and if I search for \r\n I don't get any results. So I updated the KM-action that does the replace to search for "\r\n", at which point I get the right end result. )īut with a file created through the setup from you, running the same regex replace results in a suddenly being in there before the quote at the end of each line. I might merge all this into one run now that I'm getting better at this maybe. (Basically adding a quote at the end and beginning of each line in the file except the first and last where I have another search and replace. In my normal workflow, where I've manually copy/pasted, running the KM Macro I have for some regex runs among other things a replace \n with "\n". There's stil a bit of a difference though. I tried your suggested Macro now, and it makes it much better.
#BBEDIT TABS HOW TO#
Thanks! I found a thread about this issue after posting this, but didn't quite understand how to get around it.

You're running into an unexpected consequence of working with Excel's proprietary clipboard. Any idea what I'm doing wrong or how I could get around this issue? So the structure is changed for some reason, with tabs seemingly being turned into line shifts. However, if I copy from Excel and run my test "Create File" Macro, which is just writing a Test File with Clipboard as content, it ends up looking like this (with \n representing a line shift): If I paste the old fashion way (manually) after copying from Excel, the result would look like this (with \t representing a tab and \n representing a line shift): I think I've got most of this covered, but I'm struggling with getting the content of the Clipboard to work as expected. My end goal for the Macro will be that I select the text I want in Excel, execute the Macro which then copies the selected text, asks me for the name of the File, creates the file, runs the regex covered by the existing Macro, and voila. But I thought I'd take the automation one step further by also including the actual creation of the file. The last section has been simplified a lot now, by having a KM Macro that runs all the different regex on whatever file I've got selected in Finder - which is great.

One of the most annoying tasks I frequently do is: copy something from Excel, paste it into TextMate, run some regex search and replace, and store the result down as a file. Trying to learn some more things here, and have been running into an issue with creating files from a clipboard.
