auto-correct can not be applied if style is "Text Body" - libreoffice-writer

When I use Tools - AutoCorrect - Apply for the first time, it works as expected. But when I use the same option again, it does not change the text. This is because the style is changed from "default" to "text body" that does not support applying autocorrect. Is this a bug?
Steps to Reproduce:
Start writer
Type adn and check it has become And
Undo (ctrl + z) make sure it has changed back to adn
Tools - auto-correct - apply. Make sure it has changed to 'and'
type adn again after space. Undo to change it back from 'and' to 'adn'. Make sure it is now "and adn"
Tools - Auto-correct - apply
Actual Results:
Text remains the same "and adn" after step 6
Expected Results:
It should change to "and and"

In my case "Apply" does not work, only "While typing" works
The only way to correct is to place the text cursor after the last index of the word and make space.
When I correct a word and then do undo, the text cursor stays after the last index + space and in this way I have the possibility to continue writing without correcting the word. Well, there will be times when I don't want to correct the word. I don't know if a similar mode is used for "Apply"

Related

How to tranform css hex to uppercase in vscode?

I'm just using vscode prettier, and I was told that hex value should be uppercase as company's standard. I've been through a search and I found their github-issue
that states,
" Personally I prefer uppercase too, but I was asked to do lowercase... But changing this would cause a lot of unnecessary churn for all Prettier users... this decision has been made and is not going to change. An option won't be added." - Sep. 29,2018
So basically, prettier transformed hex value to lowercase, and does not provide an option to change it to uppercase.
I want to ask, have they change their decision now and made an option to transform css hex value to uppercase? And if theres no really option for this in prettier, is there any alternatives to achieve this?
My basic alternative that I used is the idea of #rioV8, however I would prefer to use replace field instead of Transform to UpperCase, I think that would be more quick.
I would like to provide this as answer because it's at least working.
In vscode find #(?:[0-9a-fA-F]{3}){1,2} using regular expression, and replace it with \U$0.
Updated: how to auto transform after save
Follow this link: How to automatically run a "find and replace" after save?
Since \U$0 did not work well, we looked for alternatives.
Search by regular expression
Open a search window with cmd + shift + f, click .*, and execute a regular expression search with #(?:[0-9a-fA-F]{3}){1,2}.
Select the target string
In the search results window, use cmd + a to select all and cmd + shift + l to select the target string.
Open the command palette
Open the command palette with the cmd + shift + p.
Convert to upper case
Type upperor lower on the command palette and execute.

Microsoft Word->Field Code->{TC}

So I am having a problem. This is what I can create on one of my laptop:
On another, when I created something that has {TC} in it, the whole field code disappeared.
For the example above, if on the other computer, both are running Office 2010,
I can input the code to create the table of content from:
{TOC \f \h \z \f 1\t "Heading 1,1,Heading 2,2,Heading 3,3,Title,1}
to
{TC}
The moment I type in TC, the whole {} disappears.
Other field codes work just fine, except for {TC}. So my question is how do I get {TC} to show on my other laptop?
Thank you for your time.
Apparently, I found my answer.
When I searched google for my answer, most sites give this as a solution:
For Word 2010, go to File->Options->Advanced
Under Show document contents: Select "Show field code instead of their values"
This is the equivalent of pressing Alt+F9, which DID NOT solve my problem.
Apparently, the solution to get {TC} to show in your document is in:
go to File->Options->Display
and check to always show HIDDEN TEXT.
I hope this helps someone in the future.
Yeah, the disappearing TC code is annoying at first -- seems like it's broken. Other codes work, but why does that disappear, even if entering manually? Word instantly sets TC code to Hidden, even the field code itself.
To temporarily toggle this visible without permanently changing your display to show Hidden Text, you can use the normal Ctrl-Shift-8, which toggles display of spaces, paragraph marks, tabs, and Hidden Text, on and off. This is a good keyboard shortcut to have in your standard back of tricks anyway. It is frequent in Word that you need to toggle paragraph marks on and off, because paragraph formatting is attached to the Paragraph mark, and when they're hidden, it can be tricky to fix various formatting issues.
The original post was a few years ago, but I fear things have gotten worse since then, not better. I am using Word 365 v2201, which should be up to date. The other day, I wasted hours on trying to resolve this issue with TC field codes.
First I tried entering them using Insert > Quick Parts > Field. Word creates what looks like a field code, but it behaves as normal text. Messing around with the various controls to toggle field display and hidden text etc etc, has absolutely no effect. It is basically a faux field. And of course, it is completely ignored when compiling the TOC.
Next, I tried entering it manually, by using Ctrl + F9 to either create a blank field or convert some existing text into a field. Same result as above.
As with the original post, this seems to afflict only the TC field code. Other codes work fine, including TOC. And if I create a TOC field, then edit the code to TC, it immediately loses its properties as a field. If I then put the O back in, it immediately behaves as a field once again. Unlike in the original post, adjusting the settings for field display and/or hidden text, have no impact.
In the end, the only solution was to create the field using Alt + Shift + o to open the Mark Table of Contents Entry dialog box. And finally, this works!

Find and Replace in Xcode Using Regular Expression

I'm wondering, is there a way that you can do a search for all words that have the word "pPath" in them and replace them with "mutablePath" in Xcode. For instance, there are certain instances where there could be pPath_0 or pPath_50, I just want to replace them all with "mutablePath". Is there a regular expression I can use for this if it's possible?
EDIT #1: I mean to actually replace the whole word pPath_50 or (any word that has pPath in it) with mutablePath. Doing a simple find and replace will only replace the word "pPath" with "mutablePath".
EDIT #2: I found out that if you click the magnifying glass next to the search bar, then click "Show Find Options", you can select "Regular Expression" from a pull down menu and use it to do a search for a regular expression. I'm assuming that the regular expression language used for this is common to other things, does anyone know what the regular expression is to search for any word that has pPath at the beginning of it?
I found that you actually can use regular expressions on find and replace in Xcode 4.3. Simply click on the magnifying glass next to the search box (or the area where you enter in the text to search). Select "Show Find Options", then under "Style" choose "Regular Expression". I'm not too familiar with regular expressions, but I believe it uses syntax that is similar to a lot of other modules that implement them. For instance, I was able to solve my problem using "pPath_\w*".
Yes - Go to Search Navigator (left pane) - Click on the drop down for 'Find' and you will see replace.

Formatting Objective-C code

I cut and paste Objective-C examples off Safari into Xcode but the formatting gets messed up. I know I can do multiple find and replace for { and \r, but is there a one button fix somewhere? Xcode option / plugin.
TextEdit plugin etc?
Answer: I created an AppleScript in TextWrangler
tell application "TextWrangler"
activate
replace "- (" using "\\r- (" searching in text 1 of text document "untitled text" options {search mode:literal, starting at top:true, wrap around:false, backwards:false, case sensitive:false, match words:false, extend selection:false}
select find window
select text 1 of find window
replace ";" using ";\\r" searching in text 1 of text document "untitled text" options {search mode:literal, starting at top:true, wrap around:false, backwards:false, case sensitive:false, match words:false, extend selection:false}
select find window
replace "{" using "{\\r" searching in text 1 of text document "untitled text" options {search mode:literal, starting at top:true, wrap around:false, backwards:false, case sensitive:false, match words:false, extend selection:false}
select find window
replace "//" using "\\r//" searching in text 1 of text document "untitled text" options {search mode:literal, starting at top:true, wrap around:false, backwards:false, case sensitive:false, match words:false, extend selection:false}
end tell
Control + I will do some degree of formatting on whatever text you have selected.
Re-indenting in Xcode 4 should solve most formatting issues you might have. However, if you're still not happy with the result, you'll have to go third-party.
I used to change my code formatting quite regularly. I'd go to update some old code, only to find that it was written using deprecated, now unfamiliar, formats.
I've been using Uncrustify to adapt old files to new formats. It's got quite a few options, but is still lacking. However, it should suffice for most cases.
Configure xcode's preferences such that tab always indents. Then go with whatever select-all-then-tab gives you for formatting. It is good enough and doing anything involving formatting that is not automatic is a complete waste of time.

Simple eclipse search problem

I use the eclipse File Search option very much to search all files in my workspace for a certain content. But how do I specify that it should only return hits from a fixed search criteria? As an example I would like to find all occurrences of the string:
com.mystuff.data
but I also get all the hits for:
com.mystuff.data.ui
How do I make a "this-string-only-search" when searching files in my workspace??
If I understand you correctly, Eclipse don't provide option to search exact word.
You can use regular expression for it.
You can use \bSearchKeyword\b to find exact word.
I suggest that you use regular expressions.
Here are the steps:
Select the checkbox "Regular expression" which is located beside the "Containing text" field.
In the "Containing text" field write: com.mystuff.data\D\W
Note that:
\D means "no digit"
\W means "no alphanumeric"
In case you would like to refine the regular expression, click Ctrl-SPACE, in order to get the regular expression assistance.
Hope this helps.
Best regards
Maybe slightly off-topic but this got me tripped and brought me here - maybe useful for somebody else:
In the Eclipse standard Find/Replace dialogue the section 'Options' (that includes the option 'Whole Word') may be hidden if the Find/Replace dialogue window was previously resized to a smaller size, without any clue to its presence. Resizing it larger brings back the options section. See: https://bugs.eclipse.org/bugs/show_bug.cgi?id=355206
and attached shots.
Eclipse standard Find/Replace dialogue search for Whole Word regards several characters (including period) besides a space as a word delimiter, so you indeed cannot distinguish between "com.mystuff.data" and "com.mystuff.data.ui"
E.g. search 'Stack' with option 'Whole Word' checked:
will match:
Stack
Stack overflow
Stack.overflow
Stack,overflow
Stack[overflow]
Stack(overflow)
Stack-overflow
Stack/overflow
will not match:
Stackoverflow
Stack2overflow
Stack_overflow
Simplest way is to add space in the start and end of your search term.
Try SHFT+ CTRL+R, then on right upper angle select Working Set, then name and specify your resources.
Create Work Set as above, then CTRL+H check checkbox All occurency, then select your Work Set. Or maybe you can create work set in CTRL+H.