Searching in VSCode since the actual position - search

After a search, if founded, I would like the VSCode move to the next ocurrence, after my position, not to the first occurrence since the top of the code.
Is it possible? How?
Version 1.55.2

Related

Need to know cursor character position in a CRichEdit control

I have an old MFC app with multiple CRichEdit controls. Currently, the app has no "Find" capability, and I want to add it. Like Notepad, I would like the search to begin from the current cursor position. Unfortunately, as insane is it seems, I can't find any way to determine where the cursor is. I have spent hours searching forums. Even going back to the Win32 Edit control, I can find no message to query the cursor position. This seems ridiculous. Am I missing something here?
OK, I found the answer to this. The CRichEdit::GetSel() function will return the character range if there is a current selection. If there is no current selection, the start and end character offsets will be equal to the cursor position. This is not made clear in any documentation I have seen, nor have I found it in any forum.

How to search only until end of document / be warned at end of document? (LibreOffice)

Using LibreOffice Writer (version 6.0.7.3), I'm often searching for strings from within largish Writer document, and am using the ctrl+F search. While searching, I'm rather concentrated on looking at where the searched term is found from within the document text, and just press the arrow at the toolbar using mouse to get me to the next instance of the search string. I do this without actually looking at the toolbar.
When I've found the last search string from within the document, LibreOffice Writer only prints darker grey text "Reached end of document" on lighter grey background (sort of "grayed out" thing) on the toolbar. But -- me having eyes fixed on the document text and not looking at the toolbar -- I just keep on pressing the arrow button, and after second or third round get a sort of Déjà-vu feeling. Looking then at the toolbar, while not actually at the last specimen of the searched string within the document there seems to be no indication that I'm half way on my third helping...
What is the advantage of not actually allowing me (while using ctrl+F or ctrl+H at tools->options... or whatnot) to select that to me next should not go past the end of the document (by "next" momentarily becoming "first") without me being properly warned with a "yes-no-whatnot" dialog box that really would stop me from going past end, and be asked if I really want to go for a second helping?
Or have I really (again) missed something?
On my PC (Xbuntu 18.04.4 LTS , Xfce desktop environment 4.12, 32-bit) the same nastiness is found at all possible text editors:
Leafpad, version 0.8.18.1
Mousepad, version 0.4.0
Notepadqq, version v1.4.2
Gedit, version 3.28.1
Thunderbird, version 68.7.0
Firefox 75.0
LibreOffice Writer, Version: 6.0.7.3
The only one that seems to have it the way I wish is:
Notepad++, version 7.5.1 (under Wine), it has a checkbox: "wrap around"
Am I just having too narrow line of vision, or is this what everybody (except me) really only wants...
pekka
PS: I have asked the same question at https://ask.libreoffice.org/en/question/234758/ with no success...
Once again, AltSearch saves the day.
My preferred text editor also has an option: vim incremental search stop at end of file

2 spaces indentation in google Docs

To prepare an exam, I have to learn coding using google docs rather than using an IDE. It may seem idiot or impratical but the teacher really insists on that. It seems that is the same thing as Google interviews for example...
So far, I really got used with using two spaces indentation (I hate using tab indendation). And I want to learn how can I do that quickly in Google docs. Is there a shortcut or a "tips" (add-on?) for that?
For example, if you have an "if-condition" starting at the position number 4 and you want to move to the following line, it can be really convenient to have the cursor position at 4. Then, you'll add two spaces to start your block at position number 6. (ALL the if block will have at least position 6). But in Docs, when you move to the following line, the cursor always start at the beginning of the line except if you use the tab indentation. And it's really shitting if you want to indent your code properly...
Do you have a solution for that please ?
I was facing the same problem.
To write Python code in google docs, my solution is:
Switch off auto-capitalization, auto-correction and smart quotes. And other auto-substitutions so that you may write code without docs like formatting.
To do this: Tools> Preferences and uncheck the above items. Screen shots attached below.
Set tab to two spaces.
Right-click on ruler on top of page. Add left-tab stop, an arrow will appear, move this tab stop to 2 spaces from left of ruler. Try adding tab in the current line and if the tab size is OK, save this formatting.
To save:
Format > Paragraph Styles > Normal Text > Update 'Normal Text' to match.
Last, to add color(synatx highlight), you may use 'code blocks extension'.
Click install.
Now, write code in docs, select the code in google doc, click on:
Add-ons > Code Block. A pop up opens up.
Choose language : 'python' for me.
Choose theme: 'atom-one-dark'
click Format.
The code looks much like IDE, and writing more code is easier too.
While I understand that sometimes a point can be made by making students do things in a way that might not seem logical, this one doesn't make any sense to me.
Students don't learn anything useful by pressing space twice instead of letting an editor or IDE do it for them.
I wonder, is it because he/she wants it delivered in Google Docs or because they want you coding that way? If it's the latter, you won't have to hide your workaround.
I can only suggest using a good text editor, I always use the excellent and free Notepad++, and copy and paste it to and from Google Docs. Your instructor will never know. In fact, I'd be hunting around to see of there was a way to access your code files directly in Google Docs from Notepad++, or to auto-sync a folder with Google docs.
Notepad++ has syntax colouring - which will save your life - and can be set to indent with tabs or spaces to whatever indent width you specify. If not using an IDE, I only use Notepad++.
Your instructor sounds like some I had, people who cross a line from being quirky but with a point to make to just being a dick. There is absolutely no point in telling a student to code only in Google docs. Google docs is a great thing, I love it, but it is by no stretch of the imagination a coding tool.
(I see that this is an aged thread, but I'll respond in case someone else with a similar issue - like this year's class for that course - comes looking for an answer.)
You could try (ab)using bulleted lists:
Insert a bulleted list
Right click on the bullet, select "More bullets..."
In the "Symbol" selection list, choose "Format & whitespace" and select one of the whitespace options as bullet char
Repeat for as many levels (of bullet sub-lists) as you think you may need in your program
Fix indentation to match whatever feels best for you
Every time you need to write a nested block, you will have to press "tab" only once, then bullet list level is kept and the indentation with it. To go back to the outer block, just press shift-tab.
However, IMHO it doesn't worth the trouble. Generally, interview question solutions are not that large and hitting spacebar a couple of times is not much of an overhead.
It's somewhat cumbersome but you can set as many tab stops as you want, and docs will move nested tabs to the next tab stop as well. For example:
You can add tab stops by right clicking on that tab bar where you want the tab stop to be and clicking Add left tab stop. You'll want to have all text in the document selected if you want the tab stop to apply everywhere.

jsTree plugin renaming error when renaming more than one item

I have a problem with the jsTree plugin crrm when I try to rename more than one item in the tree.
Problem: When I rename more than one a white box appears over the name and I can't see what I'm typing any more. This doesn't happen the first time.
The length of the "white box" that covers it is the length of the current node name. I can see my typing if I type past the length of the box as it'll appear on the right.
And the change will work - but I can't see it when I'm typing.
Anyone know what's up?

Perform structural search and replace in bulk

In an existing code base, the call to parse dates depends on the machine's culture. I created a custom resharper search/replace pattern that can spot and fix these calls.
Is there a way quickly find and fix all the hits of this search replace pattern? I'm now doing them one by one and it's going to take forever ...
Isn't the 'Global Fix' at the end of that very blog post you link to exactly what you want?
Global Fix What we’ve just done is a manual local fix,
that is, locate the offending entry and hit Alt+Enter to apply a
QuickFix. We can do this at a global scope by using the
Pattern Catalog tool window.
1. Undo the prefix fix (so as to have several instances) 2.
Open up the Patterns Catalog 3. Select the
recently created Pattern and click on Search now.
This time, instead of the Find Results dialog, we get a Replace dialog
which displays all matching patterns and a Replace
button
4. We can select
the entries we want replacing (by default all checked). Click
Replace We’re done! ReSharper will now
replace all occurrences. So we’ve applied a QuickFix
globally.

Resources