Notepad++ Style comments with /** - styles

I have a “.sql” file with 2 block comments:
/*
Comment
*/
/**
Comment
*/
capture
In the First block the colour style is the colour of the comments define.
But in the second block… No. The colour style is the base… no the colour of comments style.
Why?
It is possible to modify it?

You need to update your stylers.xml file. You should find it in your C:\Users\XXX\AppData\Roaming\Notepad++ directory. You find the following part:
<LexerType name="sql" desc="SQL" ext="">
...
<WordsStyle name="COMMENT" styleID="1" fgColor="008000" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" />
<WordsStyle name="COMMENT LINE" styleID="2" fgColor="008000" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" />
</LexerType>
and updated it to
<LexerType name="sql" desc="SQL" ext="">
...
<WordsStyle name="COMMENT" styleID="1" fgColor="008000" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" />
<WordsStyle name="COMMENT LINE" styleID="2" fgColor="008000" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" />
<WordsStyle name="COMMENT DOC" styleID="3" fgColor="008000" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" />
</LexerType>
now it should color it as you want it.

what about the following.
Use force at beginning of line
For comment line style use * as open
For comment style use the normal /* for open and */ for close
Now the trick
Use a delimiter and assign the same color as for comment
for open put in \\ \
and for close ((EOL)) ((EOL))
Looks like this does it. (note I used different colors for demonstration)

Related

with vimgrep - or other vim possibility - how can i get groups of data out of a file?

I'm trying to do a vimgrep on a file in order to get only two attributs with their values out of the xml file.
so far i can get the complete lines and i'd like with the help of groups to have a better display.
:vimgrep key= % | copen
^ I'd like to add to this command the grouping possibility with "( )" ....but without success for the moment.
i'd appreciate your help in order to have a result as explained in the "result expected"
part of the file that I'm working with :
<policy name="Menu_Controls" class="User" displayName="$(string.Menu_Controls)" explainText="$(string.IE_ExplainMenu_Controls)" presentation="$(presentation.Menu_Controls)" key="Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\AllowedControls">
<parentCategory ref="AdminApproved" />
<supportedOn ref="SUPPORTED_IE5" />
<elements>
<boolean id="MCSiMenu" valueName="{275E2FE0-7486-11D0-89D6-00A0C90C9B67}">
<trueValue>
<decimal value="0" />
</trueValue>
<falseValue>
<decimal value="1" />
</falseValue>
</boolean>
<boolean id="PopupMenu_Object" valueName="{7823A620-9DD9-11CF-A662-00AA00C066D2}">
<trueValue>
<decimal value="0" />
</trueValue>
<falseValue>
<decimal value="1" />
</falseValue>
</boolean>
<boolean id="Ikonic_Control" valueName="{F5131C24-E56D-11CF-B78A-444553540000}">
<trueValue>
<decimal value="0" />
</trueValue>
<falseValue>
<decimal value="1" />
</falseValue>
</boolean>
</elements>
</policy>
<policy name="Microsoft_Agent" class="User" displayName="$(string.Microsoft_Agent)" explainText="$(string.IE_Explain_Microsoft_Agent)" presentation="$(presentation.Microsoft_Agent)" key="Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\AllowedControls">
<parentCategory ref="AdminApproved" />
<supportedOn ref="SUPPORTED_IE5" />
<elements>
<boolean id="Microsoft_Agent_Control" valueName="{D45FD31B-5C6E-11D1-9EC1-00C04FD7081F}">
<trueValue>
<decimal value="0" />
</trueValue>
<falseValue>
<decimal value="1" />
</falseValue>
</boolean>
</elements>
</policy>
my expected result :
name="Menu_Controls" key="Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\AllowedControls"
name="Microsoft_Agent" key="Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\AllowedControls"
thanks in advance for your help.
toshi
two cmds could do it:
v/<policy /d
then
%s/.* \(name="[^"]*"\).*\(key="[^"]*"\).*/\1 \2/g
My ExtractMatches plugin provides a :YankMatches command, with which you can extract the matches and put them into a scratch buffer. As a one-liner:
:execute 'YankMatches \<\%(name\|key\)="[^"]*"' | new | put!
Result:
name="Menu_Controls"
key="Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\AllowedControls"
name="Microsoft_Agent"
key="Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\AllowedControls"
If you find :vimgrep and the quickfix list really helpful, you can use the editqf.vim plugin to make the quickfix list of your grep results editable, and then use e.g. a variation of the :%s command given in #Kent's answer to strip off the extraneous stuff.

In ext.net, how do I align a tabpanel button to the right?

I would like to align the button of the right, but keep the content tabs on the left. This is my code:
<ext:TabPanel ID="TabPanel1" runat="server" Height="295" Plain="true" DeferredRender="false" meta:resourcekey="TabPanel1Resource1">
<TabBar>
<ext:Button runat="server" Icon="ArrowOut" meta:resourcekey="fullscreenResource1">
<DirectEvents>
<Click OnEvent="edit_fullOpenAdd" />
</DirectEvents>
</ext:Button>
</TabBar>
<Defaults>
<ext:Parameter Name="autoScroll" Value="true" Mode="Raw" />
</Defaults>
<Items>
......the content ......
</Items>
</ext:TabPanel>
Any Ideas?
Thank you!
Edit: I was told to try tabCls: 'right-tab', but I do not know how to implement this.
Use TabStrip control.
Please see this example: http://examples.ext.net/#/TabPanel/TabStrip/Overview/

ZK: Menubar with Buttons

I got a ZUL Page, which is aligned by a "borderlayout". In "north" I got a Menubar, which is aligned left.
Now I want 2x Buttons and 2x Labels in "north", on the opposite direction of the Menubar (right).
I tried:
<north border="none">
<hbox width="100%">
<menubar id="menubar" width="380px">
<menu label="A">
<menupopup>
<menuitem label="A1"/>
</menupopup>
</menu>
....
</menubar>
<hbox vflex="1" hflex="1" align="center">
<div hflex="1"></div>
<label id="B"/>
<button id="C" label="C" />
<button id="D" label="D" />
<label id="E"/>
</hbox>
</hbox>
</north>
which looks fine, but when I set a value for label "b" or "e", the design gets broken.
h**p://i.imgur.com/HnRnxmj.png
The top part in the image is the right looking one, while the bottom one is screwed up. Any Idea how to fix this? The buttons are "fixed width" while both labels can "grow".
Thanks
Your spacer <div> is eating up all the space. Remove this and then set pack of the <hbox> to end.
This gives you something like that:
...
</menubar>
<hbox vflex="1" hflex="1" align="center" pack="end">
<label id="B"/>
...
As a general note I find it quite helpful to use Firefox/Firebug for debugging those layout issues. So one can easily see which resulting DOM is generated by the ZUL code.

ExpressionEngine Zoo Visitor field with Channel Images outputs four images for every one

I have a Zoo Visitor field called "member_gallery" which is a channel images field. Whenever I show the images, it creates 4 images for each one. However I do not want to output 4 images for each one. I want to output one image for each one. Here is the code I write:
{visitor:member_gallery}
{exp:channel_images:images entry_id="{entry_id}"}
<img src="{image:url:large}" alt="{image:title}" />
{/exp:channel_images:images}
{/visitor:member_gallery}
Here is the markup it spits out
<img src="http://staging.eventplanner.verityinteractive.com/images/19/images_(1)__large.jpeg" alt="Images (1)" />
<img src="http://staging.eventplanner.verityinteractive.com/images/19/images_(1)__large.jpeg" alt="Images (1)" />
<img src="http://staging.eventplanner.verityinteractive.com/images/19/images_(1)__large.jpeg" alt="Images (1)" />
<img src="http://staging.eventplanner.verityinteractive.com/images/19/images_(1)__large.jpeg" alt="Images (1)" />
<img src="http://staging.eventplanner.verityinteractive.com/images/19/images_(2)__large.jpeg" alt="Images (2)" />
<img src="http://staging.eventplanner.verityinteractive.com/images/19/images_(2)__large.jpeg" alt="Images (2)" />
<img src="http://staging.eventplanner.verityinteractive.com/images/19/images_(2)__large.jpeg" alt="Images (2)" />
<img src="http://staging.eventplanner.verityinteractive.com/images/19/images_(2)__large.jpeg" alt="Images (2)" />
<img src="http://staging.eventplanner.verityinteractive.com/images/19/images_(3)__large.jpeg" alt="Images (3)" />
<img src="http://staging.eventplanner.verityinteractive.com/images/19/images_(3)__large.jpeg" alt="Images (3)" />
<img src="http://staging.eventplanner.verityinteractive.com/images/19/images_(3)__large.jpeg" alt="Images (3)" />
<img src="http://staging.eventplanner.verityinteractive.com/images/19/images_(3)__large.jpeg" alt="Images (3)" />
To be clear, I do not want to display 4 images for every one. If you couldn't figure that out. To be extremely EXTREMELY clear, here is my question; How do I write this so I only get 1 image for each one I have uploaded, rather than 4? Thank you. I apologize for any confusion.
You don't need to use the channel entries tag within Zoo Visitor...
It looks as though you have a loop inside a loop, hence the duplication. Have you tried removing the channel entries tag?

Ribbon button should be hidden based on lead status - CRM 2011

I have custom button in lead ribbon. The custom button should be hidden when lead is qualified. How can I do that? Can any one please explain. I appreciate.
You can actually accomplish this entirely with built-in DisplayRule functionality. When a Lead is qualified, the StatusCode property is set to "Qualified", which translates into an OptionSet value of "3". You can check for the value of this property in a ValueRule and display/hide the control appropriately. I can think of two ways to achieve this:
Erik Pool's Visual Ribbon Editor
RibbonXml
<RibbonDiffXml>
<CustomActions>
<CustomAction Id="CompanyName.Form.lead.MainTab.Actions.Sample.CustomAction" Location="Mscrm.Form.lead.MainTab.Actions.Controls._children" Sequence="41">
<CommandUIDefinition>
<Button Id="CompanyName.Form.lead.MainTab.Actions.Sample" Command="CompanyName.Form.lead.MainTab.Actions.Sample.Command" Sequence="29" ToolTipTitle="$LocLabels:CompanyName.Form.lead.MainTab.Actions.Sample.LabelText" LabelText="$LocLabels:CompanyName.Form.lead.MainTab.Actions.Sample.LabelText" ToolTipDescription="$LocLabels:CompanyName.Form.lead.MainTab.Actions.Sample.Description" TemplateAlias="isv" />
</CommandUIDefinition>
</CustomAction>
</CustomActions>
<Templates>
<RibbonTemplates Id="Mscrm.Templates"></RibbonTemplates>
</Templates>
<CommandDefinitions>
<CommandDefinition Id="CompanyName.Form.lead.MainTab.Actions.Sample.Command">
<EnableRules />
<DisplayRules>
<DisplayRule Id="CompanyName.Form.lead.MainTab.Actions.Sample.Command.DisplayRule.ValueRule" />
</DisplayRules>
<Actions>
<Url Address="http://www.bing.com" />
</Actions>
</CommandDefinition>
</CommandDefinitions>
<RuleDefinitions>
<TabDisplayRules />
<DisplayRules>
<DisplayRule Id="CompanyName.Form.lead.MainTab.Actions.Sample.Command.DisplayRule.ValueRule">
<ValueRule Field="statuscode" Value="3" />
</DisplayRule>
</DisplayRules>
<EnableRules />
</RuleDefinitions>
<LocLabels>
<LocLabel Id="CompanyName.Form.lead.MainTab.Actions.Sample.LabelText">
<Titles>
<Title languagecode="1033" description="Sample" />
</Titles>
</LocLabel>
<LocLabel Id="CompanyName.Form.lead.MainTab.Actions.Sample.Description">
<Titles>
<Title languagecode="1033" description="Sample Description" />
</Titles>
</LocLabel>
</LocLabels>
</RibbonDiffXml>

Resources