Visual HG add shortcut to commit - visual-studio-2010

Is there a way I can create a keyboard shortcutto to a commit in Visual Studio 2010? I am using Visual HG.

using VisualHG v1.1.4 the keyboard shortcut command name is File.Commit

You can add one by going to Tools > Options > Environment > Keyboard. Then search for commit and select the command that says Mercurial.Commit (or something similar).
Update: I installed VisualHG but there is no option to customize (and add shortcut to commit). I guess this makes it a feature request!
You can probably install other Mercurial SCC package that lets you customize it.

Related

Do we have Git source control explorer in Visual Studio 2017?

We get source control explorer for the TFS source control model, and it is productive.
Do we get a similar source control explorer for Git in Visual Studio 2017?
If we do have it, how do I navigate to it?
In short, no, there is no built-in UI support for Git in Visual Studio 2017.
Alternatively, you can try the following extensions based on your source control setup.
In Visual Studio, select Tools → Extensions and Updates, select Online on the left pane, search for one of the following in the search bar in the top right:
Bitbucket → install Visual Studio Bitbucket Extension
GitHub → Install GitHub Extension for Visual Studio
Git → Install Easy Git Integration Tools
The first two do a good job of providing UI controls to work with source control as they relate to Bitbucket or GitHub in a similar fashion to regular TFS integration (that you may be familiar with). I haven't tried the third one myself, and I'm not sure what that one is like.
Please see the Solution Explorer - Folder View. This can be accessed from Solution Explorer (open with CTRL+W, S), then by clicking the Solutions and Folders toggle button. In Visual Studio 2017, it looks like this:
Though it's not a 1:1 capability of the Team Foundation Source Control Explorer view, it does have the ability to view files in the local repo, open, view history, etc.
Visual Studio does not currently have Source Control Explorer for Git repositories. You might consider voting on this User Voice item to help the product team prioritize features:
https://visualstudio.uservoice.com/forums/121579-visual-studio-ide/suggestions/4178754-visual-studio-tools-for-git-extension-microsoft-g
In Visual Studio 2019, open the folder for the work space using "File->Open->Folder...". The solution explorer, via "View->Solution Explorer", should display all the files which you can then right click to view history and other GIT operations.

Tracking changes in Visual Studio

Is it possible to set up Visual Studio (2010) for tracking changes (left color symbols) not from last file open state, but from source control commited state? This is how netbeans works and it is really great feature, especially reverting text block from editor by right click... Visual Studio default tracking mode is not much useful.
EDIT 1:
Something like this way:
EDIT 2:
Now it works with latest Git Source Control Provider (http://visualstudiogallery.msdn.microsoft.com/63a7e40d-4d71-4fbb-a23b-d262124b8f4c) extension. Good job, extension developers. Left bar is standard visual studio tracker, right bar is tracker tracking changes against last commit. See picture:
EDIT 3 (12/05/2015):
Now I use standard VS git tools and for change tracking great Git Diff Margin extension. I use it with VS2013 and 2015 and it works very well. See:
For people like me that skim straight to the answer -
OP (12/05/2015) - Now I use standard VS git tools and for change tracking great Git Diff Margin extension. I use it with VS2013 and 2015 and it works very well
Git Diff Margin
Works great for me as well!
Seems like if you have Visual Studio 2013, and you're working with GIT, it does work.
Also, you can see what happens in the Team Explorer tab.
There is no such facility in VS to do this. I rely on CTRL-Z to undo. If there are too many changes, you can do a git checkout -p -- . which will walk you through all the differences and apply the ones you need. The -p (or --patch) parameter is available on git reset, git add and git checkout.
That being said, one could write an add-in to VS to give you this view.
Also, I use CTRL+- and CTRL+SHIFT+- to move back and forth between my recent cursor positions.

How to revert file in Visual Studio 2010 (reload the file from disc)

I'm starting to use Visual Studio (2010) after years with Eclipse.
Every now and then I've found Eclipse's "Revert" feature pretty useful, that is, to reload the file from disk, discarding all changes. (Nothing to do with version control reverting.)
How can I do this with Visual Studio? Should be pretty simple but I haven't found it yet.
I know that I can do this with "undo until *-indicator disappears" but that's pretty impractical.
Unfortunately I do not know of a built-in way to do this in VS other than closing the file and reopening it without saving.
There might be some extension that does this, but I am not aware of it :(
In the current version, you find in the Explorer, in the left sidebar. Then Open Editors, and right click on the file you want to revert.
If you are using git with Visual Studio:
Solution Explorer > Right Click On File > Git > Undo Changes

Why Visual Studio's custom hotkey for GitExtensions resets after restart?

I am using GitExtensions version 2.26 Visual Studio extension they comes with. I tried to assign custom keyboard hotkey to commit command like this:
And everything works great until I will restart Visual Studio. After that hotkey gets magically un-assigned. Everything works if I select any other command, not from the GitPlugin.* group. Maybe somebody faced the same problem and found a workaround? Thanks!
As a workaround, you could grab the pull request added access keys to VS plugin menu items and build your own copy of the extension. After you copy the files from GitExtensions\GitPlugin\bin into Documents\Visual Studio 2010\Addins, you will get accelerator access keys for the Git menu. This will allow, for example, you to access Commit with Alt+G, C.

Visual studio shortcut keys equivalent to eclipse shortcut keys

I use both eclipse and visual studio (2008 right now) a lot. But there are some shortcut keys from eclipse that I really miss in Visual Studio that I haven't been able to locate. Does anyone know if these exists in Visual Studio?
Being able to search in your open window tabs - this is Ctrl+E in eclipse I think? I know you can navigate, but not search.
open type
open type heirarchy
open resource
move selected lines up or down (Alt+Up/Down)
move to last edited line (NOT Ctrl+- / Ctrl+Shift+- in VS and not Ctrl+Z, which only works if you're in the same file?)
If they don't exist, anyone got a good resource on how you can program shortcuts yourself for VS?
Just published new extension for Visual Studio:
Meet IntelliCommand (Visual Studio 2010/2012 extension)
This may help you for the moving of selected lines: Visual Studio: hotkeys to move line up/down and move through recent changes
Still searching on the others.
There is an "AsEclipse" plugin that should provide most functionality:
https://visualstudiogallery.msdn.microsoft.com/99ede732-544c-4f3b-8e38-49e4b8395075
I am a first time user of VS. Open Resource and Open Type look to be pretty well covered by Search in Solution Explorer, which is accessed using Ctrl+;
Go to Settings keymaps and search for eclipse.
If you install Eclipse Keymap from Alphabot Security plugin in VS Code.
It has most of the shortcut from eclipse.
install telerik justcode... it has all shortcuts you just need to change them to be like in eclipse ... works like a charm after 15mins
I'm not sure if following are VS or ReSharper shortcuts:
open type heirarchy: Ctrl+E, Ctrl+H
move selected lines up or down: Ctrl+Shift+Alt+UP/DOWN/LEFT/RIGHT
To get eclipse like shortcuts in vscode:
Please go to:
Ctrl+Shift+p and type java: Overview
open overview using enter
there is option under Key Bindings
Use Eclipse Key Bindings
just click it.
and you will get all eclipse shortcuts in vscode

Resources