Multi Selection Words? [duplicate] - visual-studio-code

This question already has answers here:
How to turn off "matching" highlighting in VS Code?
(5 answers)
Closed 1 year ago.
In VS Code, when I select a word, all equal words in the text are automatically selected. Is it possible to disable this feature? Unfortunately, I don't know what it's called.

I found it!
It's this setting:
"editor.occurrencesHighlight": false

Related

Navigating word document with vbscript [duplicate]

This question already has an answer here:
How to use excel built-in constant in VBS [duplicate]
(1 answer)
Closed 4 months ago.
I want to open a word document and jumpt to page 5 with a vbscript. In vba the following works:
Set word_app = CreateObject("Word.Application")
set word_doc = word_app.documents.open(doc_path)
word_app.displayalerts = false
word_app.visible = true
word_doc.activate
word_doc.select
word_app.activewindow.selection.Goto wdGoToPage, wdGoToAbsolute, 5
but in the vbscript i just jump to page 7 (last page of doc) instead.
Instead of using the GoToItem and GoToDirection constants names, just use their number values: learn.microsoft.com/en-us/office/vba/api/word.wdgotoitem

How to add 4 spaces indent to all lines in VS Code? [duplicate]

This question already has answers here:
How to indent/format a selection of code in Visual Studio Code?
(16 answers)
Closed last year.
I am using VS Code for Python development.
BranchList=['BD','WE','BB','GB','MB']
if lastMonth[-2:]=='01':
month='Jan'
elif lastMonth[-2:]=='02':
month='Feb'
elif lastMonth[-2:]=='03':
month='Mar'
elif lastMonth[-2:]=='04':
month='Apr'
........
If I want to use 'try: except' to catch the exception(add a try: before the 1st row), all the rows below the 'try: ' should have additional 4 spaces indent. It's a very big manual work to add the 4 spaces indent for every rows. Is there any quick way to do it in VS Code?
If you highlight all the rows and press Tab, they should all indent. Shift+Tab will deindent.

How to find all occurrences of a word or a character and edit in visual studio code? [duplicate]

This question already has answers here:
Select multiple lines with cursors at each line start
(5 answers)
Closed 4 years ago.
How to find all occurrences of word or a character and select them once and edit using multi cursor in visual studio code?
I have list of users and need to add domain before names.
I have:
abc
pqr
xyz
I want :
domain\abc
domain\pqr
domain\xyz
I want to search for a new line character which will take me to the end of the each user name then by pressing home button I should reach to the beginning of each user where I will type "domain\" and it will modify each user at once.
I was able to do this in sublime text 3 by find all feature which provides multi cursor at each occurrence of character.
Is there any way to do the same in VS code ?
The easiest way to achieve this doesn't involve searching for newlines but rather by
Making a selection (Such as Ctrl+A)
Add cursor to all lines of the selection (Alt+Shift+I)
Pressing home (Home)
You can use search and replace with a simple regular expression.
Search for: ^(.+)$
Replace with: domain\\$1
Make sure to enable regular expressions (Alt+R).

How to tell VS Code format doc to wrap line after certain length? [duplicate]

This question already has answers here:
Automatically hard wrap lines at column in VSCode
(11 answers)
Closed 3 years ago.
In Visual Studio Code, when you press ALT SHIFT F to format HTML document, VS Code would wrap a line that is too long into multiple lines.
I think VS Code let the line grow too long before wrapping. Is there a setting in VS Code to tell it to wrap after certain line length?
This question is NOT a duplicate of the hard wrap question. This is about wrapping during format document process.
Open user settings: File - Preferences - Settings
Then add/edit this item:
"html.format.wrapLineLength": 80
FYI the new settings are in effect after you save the changes.
If you are formatting HTML and are annoyed that VScode formats your long lines into multiple lines, go to:
File > Preferences > Settings
Search for:
HTML › Format: Wrap Line Length
and set it to 0

How to get this type of line for code in eclipse? [duplicate]

This question already has answers here:
Vertical line between matching curly braces for java in eclipse
(8 answers)
Closed 8 years ago.
i want to know how to get thie type of line eclipse what is shortcut key for this ?
Window > Preferences > General > Editors > Text Editors -- and you can customize your editor the way you want it to be.
Here it is the Indent Guide which causes the issue. Disable it and close all open Java editors, as it is not picked up dynamically.