On May 11, 2015, at 09:11, Brian Christiansen <[email protected]> wrote:
> When I'm using auto-complete with CSS, I get items like this:
> 
> display: <#none|inline|block|inline-block|list-item|run-in|compact|marker#>;
> 
> Is there a way from the keyboard to select one of those options, that isn't 
> "highlight and delete everything that's not the option you want"? 

______________________________________________________________________

Hey Brian,

I'm not sure I understand exactly what you want, especially since I don't do 
CSS.

What I think I'm reading is that you want to be able to emplace the clipping - 
then make a selection of the desired option via the keyboard - and then remove 
the other options.

What I've done is change the clipping text so that the options are tokenized.

You expand the clipping and <TAB> to the desired option - then you run the 
AppleScript with a keyboard shortcut to remove the undesired text.

-------------------------------------------------------------------------------------------

The Clipping:

display: 
@<#none#>|<#•inline•#>|<#•block•#>|<#inline-block#>|<#list-item#>|<#run-in#>|<#compact#>|<#marker#>@;

* Items with bullets are reserved expansion-tokens in BBEdit.
* @ character marks beginning and end of replacement text.

-------------------------------------------------------------------------------------------

tell application "BBEdit"
  tell front text window
    set _sel to selection
    set start_Line to line (get startLine of _sel)
    set replaceText to replace "<#•?|•?#>" searchingString (_sel's contents as 
text) using "" options {search mode:grep}
    set replaceText to replace "\\@.+?\\@" searching in start_Line using 
replaceText options {search mode:grep}
    select insertion point after start_Line
  end tell
end tell

-------------------------------------------------------------------------------------------

Let me know if I've got this wrong, or something needs adjusting.

--
Best Regards,
Chris

-- 
This is the BBEdit Talk public discussion group. If you have a 
feature request or would like to report a problem, please email
"[email protected]" rather than posting to the group.
Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>

--- 
You received this message because you are subscribed to the Google Groups 
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].

Reply via email to