What is the black flag icon in gutter of VS2013 - visual-studio-2013

Visual studios 2013 is showing a black flag looking icon in the left gutter of my code. It doesn't seem to have any meaning and there is nothing particularly special about that line of code. The code works fine, I just want to know why this icon is displayed and what it means.

It may be bookmark or it may be the line at which searched text is found. In this screenshot, the black mark at line 55 shows the line in which search text is found(when we search using Ctrl+Shift+F keys) and one at line 58 is bookmark.
Bookmark can be removed by holding holding Ctrl and pressing K twice. There is also option to remove it in VS menu, same icon as on the line.
Bookmarks are put on the code where we want to navigate more frequently. There is icon in VS menu shown with the arrow and bookmark icon to move forward and backward.

It could be a bookmark. See main Visual Studio menu Edit - Bookmarks.

If you are using dark theme this is a white flag. Ctrl+K, Ctrl+K removes the flag.

To elaborate on the answer given by #Imad. The icon at line 55 can be the result of a search (Ctrl+Shift+F, or Ctrl+F). You remove it by either clearing or closing the Find Results pane.
Or it might be an error indicator from the most recent compilation. These appear in the Error List pane. Fix and recompile to remove it.
Line 58 shows a bookmark. Remove it with Ctrl+K, Ctrl+K on the line in question.

When you do a Search in VS using Ctrl+shift+F -> Find all -> click on a result from the find results tab -> you can see the black pin pointing the matching line in the code.
The answer is here - Black dash / line on visual studio 2012 left margin

Related

How to disable triple click in Visual Studio

Is there a way, either built-in or by third-party extension, to disable triple-click from selecting the entire line while in a text editor? Either my mouse is too sensitive, or I'm inadvertently doing it, but more often than not, clicking a word, then copy / pasting it results in pasting of the entire line -- not my intention and very annoying. Ideally, it could be disabled (aka any click more than 1 just selects the word the cursor is over)
As already stated in the comments the problem is most likely that the word highlighting color is so similar to the color of selected text. So seems like we sometimes deselect a word instead of selecting it. And without a selection Ctrl-C copies the whole line. I had the same issue with JetBrains WebStorm. In Visual Studio for me it was ReSharper.
Changing the color helps. Tools -> Options -> Environment -> Fonts and Colors -> "ReSharper Usage of element under cursor". I made that darker such that selected text is clearly distinguishable.

How to make VSCode editor stop scrolling past bottom of a file?

In the VSCode editor when you pull the scroll bar down to the bottom of the file, all you see is a blank page, since the text has scrolled up past the top of the text editor window. This makes scrolling to the bottom difficult because you can't just pull the scroll bar quickly all the way down but have to carefully position the cursor so you can still see your code.
Very similar to How to make Visual Studio editor stop scrolling past bottom of a file?, but comments have pointed out that question/answer is for Visual Studio. This answer is for VSCode on the macOS and Windows.
The correct answer is seen here: https://stackoverflow.com/a/40588828/1189470
There is a configuration option provided in VSCode for the functionality you specified. To enable it, go to File -> Preferences -> user settings
On the right side of the editor in settings.json paste the below line at the bottom (before closing bracket), save and close.
"editor.scrollBeyondLastLine": false
This will prevent the editor from scrolling beyond the last line.
This is now exposed as a simple checkbox labeled "Editor: Scroll Beyond Last Line" in File/Apple -> Preferences.
If just for readability you would like some space at the bottom of the file - a configurable amount - try this setting as of v1.43:
editor.padding.bottom in pixels
Editor> Padding: Bottom
Controls the amount of space between the bottom edge of the editor and
the last line.
and/or
editor.padding.top // but this isn't sticky in the sense that you can scroll right past the padding top and it is gone. It doesn't stay.

Visual Studio 2015 - arbitrary cursor position on empty line

Initial note: I'm not getting any responses over on superuser to my question, so please allow me to ask this here:
I inherited a VS solution with a bunch of unorthodox settings. I'm not at liberty to wipe out all those settings and start over. So there is 1 setting I want to change back to VS default but cannot find it.
In a normal/default VS c# environment, when you click the mouse on a line of code that hasn't been written yet (empty, no spaces, no code, no tabs), the cursor automatically positions to the beginning of where the line of code should begin. If it's just inside a foreach, if, or etc, it will indent a bit from the left edge according to tab rules, etc.
But in the weird VS settings I have, wherever I click, the cursor positions at that exact spot. So if I click on col 20 of the next line, the cursor remains at col 20 rather than auto-repositioning to col 5 or wherever it should be. This is SO annoying because I can't always eyeball where the cursor should be and I end up clicking at the end of the previous line, then hitting ENTER, at which time it goes to the next line and positions the cursor at the right place.
How can I fix this?
It is controlled by the Enable virtual space option. See Visual Studio options - Text Editor - C#. By default it is off/unchecked.
I resolved this issue by applying Sergey's suggested change (Visual Studio options -> Text Editor -> C# -> Enable Virtual Space [check]), but also enabled (Options -> Text Editor -> C# -> Tabs -> Smart).

How to move a block of code to the left in text editors / ide

I use Sublime Text 3 and Visual Studio 2013, I'd like to know if it's possible and how one would be able to highlight a block of code and move or drag it to the left. This would be the opposite of highlighting a few lines of code and hitting the tab button to shift them to the right. Is it a shortcut, a macro, a simple general thing?
In Sublime Text, you can use the keyboard shortcut Ctrl] to move lines or blocks of text to the right, and Ctrl[ to move to the left.
In windows/linux, the shortcut is Ctrl+[or]
In Mac, the shortcut is Command+[or]

What does the scalpel-shaped icon in the gutter in Visual Studio 2008 mean?

What does this icon mean?
It doesn’t seem to have a tooltip, it doesn’t respond on right-click, and it doesn’t seem to want to disappear either.
It shows Find All results. (Possibly other things too!)
Edit to clarify: when you double-click an entry in a Find Results panel, the "scalpel" shows up next to the relevant line of code. Helps you pick it out by eye, I guess, as the cursor may not be very noticeable.
Further edit: this page says To jump to a match, double-click any line in the results list. The source file is displayed in the Code Editor with the insertion point placed where the matched text begins. A symbol appears in the indicator margin of the Editor to mark the line that includes the match, and the status bar displays its full text. - as they don't name it I doubt the symbol is used elsewhere.

Resources