bbedit

Escape double quotes of HTML attributes output by PHP

霸气de小男生 提交于 2019-12-19 04:09:17
问题 Often when writing PHP I'll have it output some HTML like this - echo "<a href="../" title="link title">".$link_text."</a>"; Obviously this won't parse as I need to escape the double quotes in the attributes of the <a> element. Is there a regex that would quickly do this rather than me manually adding the backslashes? One other thing - the regex shouldn't escape double quotes outside of the tag (e.g. where I've appended the $link_text variable. Any ideas? 回答1: You should just use single

regex substitute several special characters with other special characters in Textwrangler

泪湿孤枕 提交于 2019-12-11 15:39:59
问题 The character ̈ (unicode 0x308) cannot be represented in the “Western (ISO Latin 9)” encoding. I need to replace several (3) of this special characters in many txt-files. Ideal would be one single regex command for the TEXTWRANGLER editor application I run on my Mac so I can use in the find&replace function of Textwrangler (similar to BBedit). Here are the 3 special chars: ä into ä ö into ö ü into ü (please note the first letter persists of two chars (e.g. the a and the ̈ unicode 0x308)

AppleScript how to find pattern and set it to a record or list?

别来无恙 提交于 2019-12-11 06:55:05
问题 In AppleScript I know how to do a typical find with something like: tell application "BBEdit" activate open find window find "memberFunction\\(\\)" searching in text 1 of text document "theFile" options {search mode:grep, wrap around:true} with selecting match end tell and I can do a multi file search find: tell application "BBEdit" activate find "memberFunction\\(\\)" searching in {file "path:to:project.bbprojectd:"} options {search mode:grep, showing results:true} end tell but I'd like to

Why is my search in BBEdit causing a “stack overflow” error?

℡╲_俬逩灬. 提交于 2019-12-05 20:22:40
I'm stumped about a "stack overflow" error--"out of stack space (application error code: 12246)--that I'm getting in BBEdit when I do a "replace all", searching for (@article(((?!eprint|@article|@book).)*\r)*)pmid = {(.+)}((((?!eprint|@article|@book).)*\r)*(@|\r*\z)) and replacing with \1eprinttype = {pubmed}, eprint = {\4}\5 I can use these same patterns manually, doing one-at-a-time find & replace, without any errors, even once the match no longer occurs. I can also avoid the error by working on smaller files. I suspect that it's my inefficient and sloppy regex coding that's to blame, and

Auto-convert tab to 4 spaces in TextWrangler?

允我心安 提交于 2019-11-28 20:00:23
Is there a preference in Textwrangler to redefine a tab as 4 spaces? In Vim this is set expandtab in the vimrc, but I don't know how to set it in TW besides clicking "Detab" when I'm done editing the document. Thanks, Kevin Go to "Preferences" -> "Editor Defaults" -> "Auto-expand tabs," and then set tabs to 4 spaces. Then restart TextWrangler for changes to take place. For docs that already exist you have to hit the "Text options" button in the top of the editor window of the open document. It's the button that looks like a "T" with a light switch next to it. In that drop down there is the

Show SOME invisible/whitespace characters in Eclipse

寵の児 提交于 2019-11-28 03:02:47
A long while back I transitioned to doing all my web application development in Eclipse from BBEdit. But I miss one little feature from BBEdit. I used to be able to show invisible characters like tabs but not show other invisibles like spaces. I know that I can bulk turn all of these on in Eclipse, but I wonder if there is a way to show only some invisibles in Eclipse. Aaron Digulla Unfortunately, you can only turn on all invisible (whitespace) characters at the same time. I suggest you file an enhancement request but I doubt they will pick it up. The text component in Eclipse is very

Auto-convert tab to 4 spaces in TextWrangler?

a 夏天 提交于 2019-11-27 12:37:30
问题 Is there a preference in Textwrangler to redefine a tab as 4 spaces? In Vim this is set expandtab in the vimrc, but I don't know how to set it in TW besides clicking "Detab" when I'm done editing the document. Thanks, Kevin 回答1: Go to "Preferences" -> "Editor Defaults" -> "Auto-expand tabs," and then set tabs to 4 spaces. Then restart TextWrangler for changes to take place. 回答2: For docs that already exist you have to hit the "Text options" button in the top of the editor window of the open

Show SOME invisible/whitespace characters in Eclipse

可紊 提交于 2019-11-26 23:55:17
问题 A long while back I transitioned to doing all my web application development in Eclipse from BBEdit. But I miss one little feature from BBEdit. I used to be able to show invisible characters like tabs but not show other invisibles like spaces. I know that I can bulk turn all of these on in Eclipse, but I wonder if there is a way to show only some invisibles in Eclipse. 回答1: Unfortunately, you can only turn on all invisible (whitespace) characters at the same time. I suggest you file an