Snippet Shortcuts
3 posts
• Page 1 of 1
Snippet Shortcuts
To add the <b> or <br /> tags, for example, in html code or php code inside quotes or heredoc, I used, with my last code editor, the CTRL+B and CTRL+ENTER keys. I wonder if it is also possible with Visual Studio 2012 and PHP Tools. For example, if I select some text and then press CTRL+B it adds <b>selected text</b>. I managed to add a snippet that replaces selected text but haven't yet found a way to assign it to CTRL+B. The only way right now is CTRL+K, then CTRL+B, then select bold and then ENTER.
By the way, this is the current snippet code:
And one more question. Is code highlighting for HTML inside php heredoc strings planned? For example:
By the way, this is the current snippet code:
- Code: Select all
<?xml version="1.0" encoding="utf-8" ?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
<CodeSnippet Format="1.0.0">
<Header>
<Title>bold</Title>
<Shortcut>b</Shortcut>
<Description>Bold Snippet</Description>
<Author>Miguel Nunes</Author>
<SnippetTypes>
<SnippetType>Expansion</SnippetType>
<SnippetType>SurroundsWith</SnippetType>
</SnippetTypes>
</Header>
<Snippet>
<Code Language="php">
<![CDATA[<b>$selected$</b>$end$]]>
</Code>
</Snippet>
</CodeSnippet>
</CodeSnippets>
And one more question. Is code highlighting for HTML inside php heredoc strings planned? For example:
- Code: Select all
echo <<<HTML
<!DOCTYPE html>
<html>
<body>
<div id=""></div>
</body>
</html>
HTML;
- Swift-R
- Posts: 7
- Joined: April 18th, 2013, 1:44 am
Re: Snippet Shortcuts
Hi,
A can't find a way to assign custom keyboard shortcut to the snippet :/ Maybe an additional extension would handle it, or we can add this feature into PHP Editor in future.
Highlighting in PHP heredoc was not planned, but it is a good idea. We can add an option for this in future update.
Thanks,
A can't find a way to assign custom keyboard shortcut to the snippet :/ Maybe an additional extension would handle it, or we can add this feature into PHP Editor in future.
Highlighting in PHP heredoc was not planned, but it is a good idea. We can add an option for this in future update.
Thanks,
Jakub Misek │ DEVSENSE s.r.o. | @misekjakub │ jakub@devsense.com │
-
Jakub Misek - Posts: 2092
- Joined: January 4th, 2012, 2:42 pm
- Location: Prague
Re: Snippet Shortcuts
Can't find an extension that does something like this.
Looking forward in seeing these features implemented in the future.
Looking forward in seeing these features implemented in the future.
- Swift-R
- Posts: 7
- Joined: April 18th, 2013, 1:44 am
3 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 40 guests