I'm creating a page of guitar strumming patterns on my site, and the
format I use often requires more than one space between characters.
So far, I've been accomplishing this by copy/pasting the space entity.
This is slow and repetitive work, though. It would speed things up if
I could just copy the strum pattern in my browser (they're in other
locations on my site), paste them into the html file in BBEdit,
highlight it, and then tell BBEdit to convert the spaces to the
entity.
I tried a program called SmartyPants, but it only converts dashes and
smartquotes.
Thank for your help,
Rob
> Hello,
>
> I'm creating a page of guitar strumming patterns on my site, and the
> format I use often requires more than one space between characters.
> So far, I've been accomplishing this by copy/pasting the space entity.
Although your description is fairly clear, we'd probably all be able to guide you better if you could provide samples of what you are starting with (the HTML) and how you want it to end up. I suspect more than one person could suggest using the PRE element if you want to preserve spacing exactly as it currently exists.
> This is slow and repetitive work, though. It would speed things up if
> I could just copy the strum pattern in my browser (they're in other
> locations on my site), paste them into the html file in BBEdit,
> highlight it, and then tell BBEdit to convert the spaces to the
> entity.
Have you tried Find and Replace (and selecting the "Selected text only" checkbox)? Simply enter a space in the search field and in the replace field enter and then click the "Replace All" button.
I hope that helps.
Ted
And though the current page I'm working on isn't live, it looks
something like this:
http://www.heartwoodguitar.com/strum-patterns.php
My goal is to copy and paste the strumming patterns from song pages
into the a table with as little work as possible.
Using the PRE element would probably work, except that I've already
spent about 20 hours on the project and changing my approach now may
not be worth it. Isn't there a way to convert spaces to
quickly?
Find and replace works pretty well--just a hassle to reconfigure it
after I've used it to do something else.
Thank you!
Rob
forgot, if you have tabs
Search : \t
Replace : \ \ \ \
Bill Hernandez
Plano, Texas
> Find and replace works pretty well--just a hassle to reconfigure it
> after I've used it to do something else.
With recent versions of BBEdit, you can save Find and Replace combinations which then allows you to select them (the combination) from a menu to populate the corresponding fields with one click (sort of), or with a little AppleScript you could write a command that could be called by a keyboard combination that applies the Find and Replace on the current selection. Check the documentation on how to do all of this for your version as the exact method varies between versions.
Ted
Even though it would change your work flow and change your approach,
your really might be happier in the long run using the PRE element for
your formatting. If you ever (when you ever) want to go back and edit
the space-based formating, it will be much easier with mono-spaced PRE
formatting than with six character formatted spaces.
Just my opinion though.
You could use Apple's Automator to create a shortcut. BBEdit has some nice components that you can use from inside Automator.
If you choose to create a workflow "as service" (Snow Leopard required) you will get a menu Item meaning you can select text in your browser, right click and choose your workflow from the Service submenu in the context menu.
I did not test it but it should work some way like this:
1: Open Automator and create a new workflow as service
2: Add the BBEdit action "Search and Replace" and populate it with the patterns provided by others in this thread
3: Add the "Copy to clipboard" action
You can now copy text in your browser, choose this workflow from the context menu and the replaced text will be waiting when you arrive in BBEdit. You could even economize one step more if you dare using the BBEdit action "Set Contents of BBEdit Document" on step 3 (but have an eye on the settings).
Regards
Roland
> --
> You received this message because you are subscribed to the
> "BBEdit Talk" discussion group on Google Groups.
> To post to this group, send email to bbe...@googlegroups.com
> To unsubscribe from this group, send email to
> bbedit+un...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/bbedit?hl=en
> If you have a feature request or would like to report a problem,
> please email "sup...@barebones.com" rather than posting to the group.
>
> To unsubscribe, reply using "remove me" as the subject.
Greg Shenaut