Visual Studio Code - previous search - visual-studio-code

I came from Sublime to Visual Studio Code and I'm looking for the history of searches in the Visual Code , what was in the Sublime with -
Ctrl+Shift+F
and then just press ↕ to navigate between previous/next search.
How could I get the same functionality on Visual Studio Code on its search text field ?
My current Version is 1.5.2

Up: Shows the previous term in history
Down: Shows the next term in history
You can customize the keybinding to your liking using history.showPrevious and history.showNext

It's Up and Down in the search edit box.
It used to be that you had to use alt, but later they added just the arrow keys by themselves. The keyboard shortcut is customizable under history.showPrevious and history.showNext

definitely it should be accessible by UI. Although the minimalistic UI is the best of VSC
you can navigate search recent history by Alt+up/donw

There is currently no search history in Visual Studio Code. But it's part of the September milestones as you can see here: https://github.com/Microsoft/vscode/issues/5508
So the feature will probably be shipped in October 2016.

Related

Is there any way to highlight a file in the Visual Studio Code explorer?

As a reminder, I would like to be able to highlight a file (in Explorer) that I have made important changes to. Highlighting it would make it easy to find again!
Visual Studio Code still doesn't provide such a feature. If you have source control, it will allow you to track modified files unless it is not available yet.

How to activate intellisense in VScode? (c#)

I just want to activate autocompletion in VS code. There's a lot of answers to that questions but NONE of it actually helped me. (so please don't mark as duplicate when other answers DON'T help) Apparently, you have to press "Ctrl+Alt+Spacebar" but this doesn't work or me. I don't see any option in the nav menu to toggle a completion mode either. Or maybe you need to create a file in your folder? I don't know! non of this worked and I don't even know how it did work when I've seen intellisense! So please help me find a way to do this, and it'll better if this would be permanent. Thanks.
First you must have an internet connection.
Then you should find extensions sidebar in vs code(you can open it by press 'Ctrl+Shift+X' or open it in top of the screen, View->Extensions).
After that you should search for C# extension that made by Microsoft(search C# in search textbox and click on first result)
Picture of searching C# extension
Then install that extension by clicking on install button
Wait a few minutes to install (e.g it took 15 minutes for me)
Now you have C# extension.
After that you should close the VsCode and open again.
Now you have auto completion (if not, you probably should press 'Ctrl+Space' while coding)
If you want to have smart auto completion, VsCode doesn't have IntelliCode for C#. IntelliCode is just for Visual Studio.
But you can use Tabnine or Copilot extension(you can search and install it like installing C# extension but you should search tabnine instead of C#)
Tabnine is good but it couldn't help me like Intellicode in Visual Studio.

Incremental search shortcut in visual studio code

Can I do "incremental search" / "incremental find" in Visual studio code, similar to eclipse and regular Visual studio? I think it's ctrl+j in eclipse and ctrl+i in visual code.
What it does is that it enables typing anywhere in the file and highlighting matches.
So I had the same issue, and the plugin that wardw found did not work with ctrl+g to cancel the search and return to editing. It turns out that siegebell, the original author of that plugin, posted a bug to the visual studio code people regarding this, and they eventually added the capability to cancel the window, but the plugin hasn't been updated in awhile.
I decided to fork the plugin, and update it myself to work. Link here.

How to copy formatted code to clipboard in VS Code

In Visual Studio Code, is it possible to copy selected code to the clipboard with the syntax highlighting? I want to be able to paste into a Word doc or e-mail.
Regular Visual Studio does this by default (it puts both text and RTF formats on the clipboard).
I see that I can "Toggle Developer Tools" and locate the div (with class="view-lines") that has the code, so maybe there is a way to use that chunk of html, but I don't see an easy way to just copy the formatted code and paste into Word or an e-mail.
According to the 1.10 changelog : https://code.visualstudio.com/updates/v1_10#_copy-with-syntax-highlighting
It is now possible with that command : editor.action.clipboardCopyWithSyntaxHighlightingAction
Type/paste it in command box (ctrl+shift+p or F1)
Use the command "Copy With Syntax Highlighting".
Highlight the code
Ctrl + Shift + p to open the Command Palette
Type / Select Copy With Syntax Highlighting
It is available since VS Code v1.43 (Feb 2020), as #robert4 mentioned in comment.
Ran into this question as I was trying to copy and paste with syntax highlighting from Visual Studio (not Code). As far as I see, it is not possible OOTB.
I am using Visual Studio Enterprise 2019 (v16.7.4), trying to copy C# code (tried CSHTML also).
BUT, I found this article, which seemed to indicate that Visual Studio Code OOTB would Ctrl+C Ctrl+V right into an Outlook email or Word document without a plugin or fancy keyboard shortcut, and I was successful!
I am using Visual Studio Code v1.49.2, and copying C# code. Copying CSHTML also worked.
I took the suggestion above, went to the command pallet, clicked on the clog to the right, and used ctl + c for the key bindings. Now, when I copy from VSCode to OneNote, I get the source formatting. It works!

Is there any Plugin to disable "Auto ID on Paste" on Visual Studio 2013?

I saw This question about the "Auto ID on Paste" tool being unavailable on newer versions of Visual Studio, and I know about the workaround that is being currently used (comment a line, paste, undo comment)
But I'm not comfortable with those workarounds, I think it would be easier if I could just install one plugin that allows me to paste elements without generating IDs automatically.
Is there any plugin that does this?
To automate the workaround, you can create the following command in Visual Commander and assign a keyboard shortcut to it:
DTE.ExecuteCommand("Edit.CommentSelection")
DTE.ExecuteCommand("Edit.Paste")
DTE.ExecuteCommand("Edit.UncommentSelection")