Find all bold text and insert brackets before and after it - vba

I'm newbie in VBA. I would like to find all bold text and insert brackets before and after it.
For example, Before: This is bold text
After: {This is bold text}
I'm using MS Word

You don’t need to use VBA; Word’s UI can do it directly with Find and Replace:
Leave the “Find what” box empty, but press Ctrl-B to specify Format: Font: Bold. (You can also click the More >> button to access the Format drop-down button and select Bold from the Font dialog.)
In the “Replace with” box, type ^& (or you could type the asterisk, use the Special drop-down to choose “Find What Text”, and type the 2nd asterisk).
Click Replace All.
Each instance of bold will be “replaced” by an asterisk, the found content (i.e. the bold letter(s)), and another asterisk.
Edit: The ^& is a special code to represent “Find What Text” as a Replace option in Find and Replace. The “Special” button presents a list of available options by name for both the Find and Replace boxes, and will insert the code when you make the selection.

Related

Add suffix after specific after some characters and after number of characters Notepad++

Id like to add .pdf text after
these characters: =pd
and after 6 characters behind characters above in Notepad++
for example:
for text:
=pd374069
=pd422552
add suffix:
=pd374069.pdf
=pd422552.pdf
Press ctrl+h or go into the find/replace window. Select Replace tab and choose the Regular Expression option.
In the find text box enter (=pd\d{6}(?!\d))
In the replace window enter \1\.pdf
It will transform
SPEC SHEET=pd374053;MANUAL=pd374069;SPEC SHEET=pd422552
into
SPEC SHEET=pd374053.pdf;MANUAL=pd374069.pdf;SPEC SHEET=pd422552.pdf

Intelij: Highlist usages in plain text files?

Is there a setting in InteliJ to make it highlight usages of a word that is currently selected in plain text files similar to what Notepad and Sublime text editors do and what InteliJ does in java?
Help guide https://www.jetbrains.com/idea/help/highlighting-usages.html has Highlight usages of element at caret but that setting doesn't seem to change anything in plain text files.
To highlight all occurrences of a word in plain text, select the word and press Ctrl + F. This will open a search header filled with the selected word and all matches will be highlighted.
This is not exactly usages highlighting (since there is no real context in a plain text file), but it does what you want.
You can use Edit > Find > Highlight Usages in File Ctrl + Shift + F7.
This highlights all usages of selected text using the Find window.

Is there a functionality like Sublime's "HTML: Encode Special Characters" in Intellij IDEA

I'm looking something like the functionality given in Sublime Text by the shortcut (windows) Ctrl + Shift + P named "HTML: Encode Special Characters" but in IntelliJ IDEA. This functionality is able to transform this (as a example):
I'm a special character phrase "áéíóú ñ"
Into this:
I'm a special character phrase "áéíóú ñ"
Only by surrounding the specified text and pressing the shortcut key combination given above (again, in windows Ctrl + Shift + P).
Any thoughts?
UPDATE (07-04-2016)
By now, Intellij Idea support this feature natively (version 2016). You need to select the text you want to transform and (in OSX) Cmd+Shift+A and type "Encode" then select the action "Encode XML/HTML Special Characters"
The only caveats are that this only works (to my knowledge) in html strings.
It is not supported by IntelliJ directly, but a plugin called String Manipulation can help
From the plugin page:
Provide actions for text manipulation:
Un/Escape selected Java text
Un/Escape selected JavaScript text
Un/Escape selected HTML text
Un/Escape selected XML text
Un/Escape selected SQL text
Un/Escape selected PHP text
Trim selected text
Trim all spaces in selected text
Remove all spaces in selected text
De/Encode selected text as URL
Convert selected text to Camel Case
Convert selected text to Constant Case
Capitalize selected text
Encode selected text to MD5 Hex16
De/Encode selected text to Base64
Remove empty lines
Convert non ASCII to escaped Unicode
Convert escaped Unicode to String
Grep selected text, All lines not matching input text wil be removed. (Does not work in column mode)
Increment/Decrement selected text. Duplicate line and increment/decrement all numbers found.

Add quotation marks to selected word via shortcut

Is there any way (Plugin, Script) to add quotation marks (or square brackets or parentheses) at the beginning and the end of selected text via a keyboard shortcut in the Kate editor?
I think of something like selecting a word and then pressing Ctrl-U (this would upcase the selected word). Is there something similar for quotation marks?
The "Configure Shortcuts" menu does not provide this option.
This should be possible to do by using Kate's Javascript plugin system: http://docs.kde.org/stable/en/kde-baseapps/kate/advanced-editing-tools-scripting.html.
By finding the word at the current cursor position and inserting text before and after, you could create a “surround with quotation marks” function.
For an example of a Kate script, see here: http://kucrut.org/move-cursor-to-next-prev-paragraph-in-kate/.
One solution would be the following:
Go to Settings > Configure Kate > Editing
Activate the Auto brackets option
Now you are able to wrap the selected text with brackets.
Though there is one drawback. The Auto brackets option is "always on", meaning that once you type "(" the corresponding ")" also comes up.

A text editor which allows configuration of text to select when it is double clicked

From my experience, most text editors will, when double clicking a block of text, break the selected text by dashed lines but not for underscores.
E.g:
Double click the word 'text' of this sentence with underscores:
this_text_block
Double click the word 'text' of this sentence with dashes:
this-text-block
However, in different situations I have different needs. For example, when swapping between serverside code, html and javascript I often would like to vary the way text is selected.
Is there a text editor that allows such a distinction? Possibly one that switches depending on the type of code I am writing?