Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Highlight method definitions

When I look at my code I am needing some time (even though parts of a second) to differenciate between the several method/property definitions. (Sorry for my bad English) It would be nice if method borders would be more highlighted.

What I want is

  • a seperator between methods or
  • a highlighted (e.g. bold) method name or
  • somewhat else

that shows me more highlighted where a method ends and where the next method begins.

I searched a related Display item in Options->Environment->Fonts and Colors. But did not find the right one.

like image 713
brgerner Avatar asked Sep 03 '26 20:09

brgerner


2 Answers

I had an interest in the same thing, so I decided to write an extension. It puts a rounded border around constructors, static methods and methods. When the signature scrolls off the screen, it puts it vertically up the left hand side of that border.

Yes, methods should be small enough that identifying the start/finish is easy to parse visually "just from the code", but we're not always modifying code we've written and especially in the case of poorly written God Objects and methods that do way too much, this sort of thing can be very helpful.

I also wanted to be able to easily see the constructor and static methods among the others (people don't always organize their code the same way), so my extension allows separate coloring rules for each along with a few other little tweaks that you can configure in the editor.

I've released it for Visual Studio 2013 and Visual Studio 2015 in the extension gallery - here's the details with links to each

like image 67
mdip Avatar answered Sep 05 '26 10:09

mdip


You can try the VS10x Editor View Enhancer:

Overview

VS10x Editor View Enhancer is a Visual Studio 2013/2012/2010 extension whose goal is to add new visual features to the built-in code editor. It currently features type and member definitions emphasizing, end-of-block details, clickable hotspots (C# and VB documents).

like image 44
Danny Spanners Avatar answered Sep 05 '26 10:09

Danny Spanners