0

I've been a long-time Visual SVN user, but now have to use TFS (TFVC) at work.

Am still trying to find a workflow that works for me.

My question: Does the VS2017's TFS plugin have the equivalent of the following Visual SVN functionalities?

Or if not, what would the recommended alternatives be?

1. Icon overlay for solution folders?

The TFS VS plugin does not appear to show icon overlay for solution folders?

enter image description here

2. Highlight different/modified lines in gutter?

Highlights lines that have been modified locally (compared to server/repository).

enter image description here

2.1 Navigation using keyboard shortcuts?

Navigating between differences (local copy vs server/repository copy) inside Visual Studio 2017 (without leaving the VS text editor)

  • alt + ]: next difference in local copy
    • VisualSVN.NextDifference
  • alt + [: previous difference in local copy
    • VisualSVN.PreviousDifference
  • ctrl + alt + z: revert differences at selection
    • VisualSVN.RevertThisBlock

Once again, by differences, I mean:

  • the local (working/checked out) copy, compared to the repository's copy.
  • not on-disk/saved/session copy

In both cases above, my current TFS workflow involves using a separate compare tool.

If I have to make edits, it's either in the compare tool (where I lose intellisense and code completion), or constantly switching back to the VS text editor.

enter image description here

Thanks

jayars
  • 1,347
  • 3
  • 13
  • 25

1 Answers1

2

Note that TFS is a tool that provides source code management (either with TFVC or Git), reporting, requirements management, project management... etc, but not for developing/editing the codes...

  1. Icon overlay for solution folders?

By default there isn't such a feature for Team Explorer. This mainly depends on the Plugins/Extensions. And I cannot find an existing extension to achieve that. You can try to write your own extension or modify based on the existing ones if possible. This article may helps: Why am I not seeing the Icon Overlays in Shell Extensions TFS Power tools ?

  1. Highlight modified lines in gutter?

If you mean editing the online codes in TFS, then unfortunately no such a feature. However you can check out the files in Visual Studio, then edit the files in VS. VS can highlight the changes as you mentioned.

alt + ] and alt + [: navigate to next/previous modification

In VS code editor, by default you can use Ctrl + - (View.NavigateBackward) shortcut.

And Ctrl + Shift + - (View.NavigateForward) shortcut, or assign custom shortcuts for them.

ctrl + alt + z: revert modifications in selection

In VS code editor, you can use Ctrl + z to undo, and Ctrl + y to redo.

For the comparison, you can use VS compare the files, you can also integrate other compare tools (e.g. Beyond Compare or ExamDiff Pro) into VS, reference my answer in another thread: Visual Studio TFVC Merge Lines Misaligned


UPDATE:

If you mean pick/undo/redo the changes between local copy and remote repository copy, unfortunately no such built-in features in VS.

However you can integrate other compare tools such as Beyond Compare into VS, then you can edit the file within the compare tool.

Using Beyond Compare as an External Diff Tool:

Go to Tools | Options | Source Control | Visual Studio Team Foundation Server, then click Configure User Tools and then Add. Enter the following:

  • Extension: *
  • Operation: Compare
  • Command: <Path to BCompare.exe>
  • Arguments: %1 %2 /dn1:%6 /dn2:%7 /nh

e.g:

Copy the changed lines from repo file to local file, you can select Next Section and Prev Section navigating to Next and previous difference. Also you can use the shortcuts within the compare tool, e.g Ctrl + R to copy select lines or current section to right pane.

enter image description here

Andy Li-MSFT
  • 28,712
  • 2
  • 33
  • 55
  • thanks for the reply Andy. I think you might've misunderstood my question on keyboard shortcuts (navigation/undo/redo against server/repository copy, not saved copy). I've updated my question, and would appreciate if you could confirm if the feature is/is not in Visual Studio's TFS source control plugin/Team Explorer. Thanks. – jayars May 14 '18 at 00:58
  • @jayars If you mean pick/undo/redo the changes between local copy and remote repository copy, unfortunately no such built-in features in VS. However you can integrate other compare tools such as `Beyond Compare` into VS, then you can edit the file within the compare tool. See the updated answer. – Andy Li-MSFT May 14 '18 at 06:03
  • Thanks Andy, that answered my questions – jayars May 14 '18 at 07:49