{"id":849,"date":"2015-01-31T15:42:51","date_gmt":"2015-01-31T15:42:51","guid":{"rendered":"http:\/\/blog.wholetomato.com\/?p=849"},"modified":"2015-01-31T15:42:51","modified_gmt":"2015-01-31T15:42:51","slug":"tools-to-understand-new-code-coloring","status":"publish","type":"post","link":"https:\/\/stage.wholetomato.com\/blog\/tools-to-understand-new-code-coloring\/","title":{"rendered":"Tools to understand new code: Enhanced Syntax Coloring"},"content":{"rendered":"<p>In my previous posts as guest contributor to this blog, I showed you how to\u00c2\u00a0use <a href=\"https:\/\/stage.wholetomato.com\/blog\/2014\/10\/27\/tools-to-understand-new-code-go-to\/\">Go-To<\/a> tools and different\u00c2\u00a0<a href=\"https:\/\/stage.wholetomato.com\/blog\/2014\/11\/23\/tools-to-understand-new-code-find\/\">Find<\/a> commands in\u00c2\u00a0Visual Assist. In this post, I describe improvements to syntax coloring available in Visual Assist, then close with a\u00c2\u00a0description of a tool window that combines several functions of the IDE and Visual Assist.<\/p>\n<p>As in my previous\u00c2\u00a0posts, I will use\u00c2\u00a0<a href=\"http:\/\/irrlicht.sourceforge.net\/\" target=\"_blank\">Irrlicht Engine<\/a>\u00c2\u00a0as my example project.<\/p>\n<p><strong>Enhanced Syntax Coloring<\/strong><\/p>\n<p>Syntax coloring in the IDE\u00e2\u20ac\u201dwhatever the version\u00e2\u20ac\u201dmakes code nice\u00c2\u00a0to read, and for me, faster to write. But, it&#8217;s the enhancements to coloring in Visual Assist that make code\u00c2\u00a0really easy to understand.<\/p>\n<p>Let me compare default coloring of an older IDE, VS2008, with that of Visual Assist. (The comparison is similar\u00c2\u00a0for newer IDEs.) To the observant programmer, there are some real differences in what the IDE and Visual Assist provide:<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/stage.wholetomato.com\/blog\/wp-content\/uploads\/2015\/01\/blog_color.png?ssl=1\"><img decoding=\"async\" data-attachment-id=\"850\" data-permalink=\"https:\/\/stage.wholetomato.com\/blog\/tools-to-understand-new-code-coloring\/blog_color\/\" data-orig-file=\"https:\/\/i0.wp.com\/stage.wholetomato.com\/blog\/wp-content\/uploads\/2015\/01\/blog_color.png?fit=857%2C500&amp;ssl=1\" data-orig-size=\"857,500\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"blog_color\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/stage.wholetomato.com\/blog\/wp-content\/uploads\/2015\/01\/blog_color.png?fit=300%2C175&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/stage.wholetomato.com\/blog\/wp-content\/uploads\/2015\/01\/blog_color.png?fit=857%2C500&amp;ssl=1\" class=\"alignnone size-full wp-image-850\" src=\"https:\/\/i0.wp.com\/stage.wholetomato.com\/blog\/wp-content\/uploads\/2015\/01\/blog_color.png?resize=660%2C385&#038;ssl=1\" alt=\"blog_color\" width=\"660\" height=\"385\" srcset=\"https:\/\/i0.wp.com\/stage.wholetomato.com\/blog\/wp-content\/uploads\/2015\/01\/blog_color.png?w=857&amp;ssl=1 857w, https:\/\/i0.wp.com\/stage.wholetomato.com\/blog\/wp-content\/uploads\/2015\/01\/blog_color.png?resize=300%2C175&amp;ssl=1 300w, https:\/\/i0.wp.com\/stage.wholetomato.com\/blog\/wp-content\/uploads\/2015\/01\/blog_color.png?resize=768%2C448&amp;ssl=1 768w, https:\/\/i0.wp.com\/stage.wholetomato.com\/blog\/wp-content\/uploads\/2015\/01\/blog_color.png?resize=360%2C210&amp;ssl=1 360w\" sizes=\"(max-width: 660px) 100vw, 660px\" data-recalc-dims=\"1\" \/><\/a><\/p>\n<p>If you look carefully, Visual Assist uses separate\u00c2\u00a0colors for meaningful separation of symbols:<\/p>\n<ul>\n<li>classes\/structures\/types &#8211; these appear blue\u00c2\u00a0by default, as if they were keywords. I know they won&#8217;t change, and I won&#8217;t change them.<\/li>\n<li>variables &#8211; dark blue,\u00c2\u00a0or navy to be precise, so I know the symbols have values and can be modified.<\/li>\n<li>preprocessor macros &#8211; fuchsia, so I know to be cautious in how I use these.<\/li>\n<li>methods &#8211; also brown, which\u00c2\u00a0lets me find\u00c2\u00a0quickly\u00c2\u00a0the external references in a block of code.<\/li>\n<\/ul>\n<p>In addition to more meaningful coloring, I can display so-called stable symbols, like function names from third-party libraries, in italics. (See GetSystemInfo and QueryPerformanceFrequency in my example.) The italics tell me nobody has overridden a well-known symbol, and that I can trust its behavior. When I&#8217;m\u00c2\u00a0surprised <em>not<\/em> to see a symbol in italics, sometimes I take time to find out what&#8217;s different about it.<\/p>\n<p><strong>VA View<\/strong><\/p>\n<p>I&#8217;m going to jump abruptly to one last\u00c2\u00a0feature of Visual Assist that is handy for the new user: the VA View. The learning curve for the VA View is a bit steeper than it is for the other commands I&#8217;ve described, but I think the effort\u00c2\u00a0is worth it.<\/p>\n<p>The VA View\u00c2\u00a0is a handy tool that combines\u00c2\u00a0several functions of the IDE and Visual Assist, all in a compact interface. I usually make\u00c2\u00a0the VA View a tab in the same docked tool window as the\u00c2\u00a0Solution Explorer and Class Browser. The VA View gives me most of what I use\u00c2\u00a0in the other two tool windows, and\u00c2\u00a0I switch to the Solution Explorer or Class Browser only when absolutely necessary.<\/p>\n<p>Here is an example of the VA View, docked to the left of my source window in VS2008:<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/stage.wholetomato.com\/blog\/wp-content\/uploads\/2015\/01\/blog_vaview.png?ssl=1\"><img decoding=\"async\" data-attachment-id=\"851\" data-permalink=\"https:\/\/stage.wholetomato.com\/blog\/tools-to-understand-new-code-coloring\/blog_vaview\/\" data-orig-file=\"https:\/\/i0.wp.com\/stage.wholetomato.com\/blog\/wp-content\/uploads\/2015\/01\/blog_vaview.png?fit=642%2C389&amp;ssl=1\" data-orig-size=\"642,389\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"blog_vaview\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/stage.wholetomato.com\/blog\/wp-content\/uploads\/2015\/01\/blog_vaview.png?fit=300%2C182&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/stage.wholetomato.com\/blog\/wp-content\/uploads\/2015\/01\/blog_vaview.png?fit=642%2C389&amp;ssl=1\" class=\"alignnone size-full wp-image-851\" src=\"https:\/\/i0.wp.com\/stage.wholetomato.com\/blog\/wp-content\/uploads\/2015\/01\/blog_vaview.png?resize=642%2C389&#038;ssl=1\" alt=\"blog_vaview\" width=\"642\" height=\"389\" srcset=\"https:\/\/i0.wp.com\/stage.wholetomato.com\/blog\/wp-content\/uploads\/2015\/01\/blog_vaview.png?w=642&amp;ssl=1 642w, https:\/\/i0.wp.com\/stage.wholetomato.com\/blog\/wp-content\/uploads\/2015\/01\/blog_vaview.png?resize=300%2C182&amp;ssl=1 300w, https:\/\/i0.wp.com\/stage.wholetomato.com\/blog\/wp-content\/uploads\/2015\/01\/blog_vaview.png?resize=360%2C218&amp;ssl=1 360w\" sizes=\"(max-width: 642px) 100vw, 642px\" data-recalc-dims=\"1\" \/><\/a><\/p>\n<p>From top to bottom, the VA View has:<\/p>\n<ul>\n<li>a drop-down for quick opening of any file in my solution. I can type partial matches in the list that opens, letting me find most files faster than I can with the Solution Explorer.<\/li>\n<li>a drop-down for quick locating of symbols in my solution. This drop-down also supports filtering. If I know the name of a symbol, or most of it, I can jump to its definition faster than any other method of the IDE.<\/li>\n<li>a most-recently-used (MRU) list of files and methods\u00e2\u20ac\u201dones that I&#8217;ve recently modified or visited. (Right+click in the MRU to adjust its settings.) Typically, the MRU lets me jump faster than tabbing windows or navigating back with Ctrl+-.<\/li>\n<li>a hovering class browser (HCB) that tells me about the symbol\u00c2\u00a0I&#8217;m hovering over, or class I&#8217;m in. (Right+click to adjust this one as well.) In my example, the HCB is showing me SParticle members because my caret is somewhere in SParticle.<\/li>\n<\/ul>\n<p>Again, the learning curve for the VA View is a little steeper than simpler features of Visual Assist\u00e2\u20ac\u201dlike\u00c2\u00a0syntax coloring. But, the VA View is ready handy and worth the little bit of time it takes to know it. And if you&#8217;re a keyboard user, you&#8217;ll be happy to know\u00c2\u00a0the entire interface to the VA View is available without a mouse.<\/p>\n<p><strong>Summary<\/strong><\/p>\n<p>In my three-part\u00c2\u00a0series, I tried to show new users of Visual Assist\u00c2\u00a0how to make use of the tool, especially when you land\u00c2\u00a0in front of a completely new code base. The stock IDE\u00c2\u00a0has many\u00c2\u00a0features to\u00c2\u00a0help you, but Visual Assist goes well beyond\u00c2\u00a0in functionality and performance.<\/p>\n<p><strong>Learn More<\/strong><\/p>\n<p>You can learn more about Enhanced Syntax Coloring and the VA View in the documentation for Visual Assist:<\/p>\n<ul>\n<li><a href=\"http:\/\/docs.wholetomato.com\/default.asp?W179\">Enhanced Syntax Coloring<\/a><\/li>\n<li><a href=\"http:\/\/docs.wholetomato.com\/default.asp?W222\">VA View<\/a><\/li>\n<\/ul>\n<p><em>This article was contributed by\u00c2\u00a0Bartlomiej Filipek, who writes\u00c2\u00a0at\u00c2\u00a0<a href=\"http:\/\/www.bfilipek.com\/\" target=\"_blank\">Code And Graphics<\/a>\u00c2\u00a0&#8211;\u00c2\u00a0a technical blog about\u00c2\u00a0C++ and OpenGL.<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In my previous posts as guest contributor to this blog, I showed you how to\u00c2\u00a0use Go-To tools and different\u00c2\u00a0Find commands in\u00c2\u00a0Visual Assist. In this post, I describe improvements to syntax coloring available in Visual Assist,&#8230;<\/p>\n","protected":false},"author":66190671,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_coblocks_attr":"","_coblocks_dimensions":"","_coblocks_responsive_height":"","_coblocks_accordion_ie_support":"","_jetpack_newsletter_access":"","_jetpack_newsletter_tier_id":0,"footnotes":""},"categories":[672],"tags":[],"class_list":["post-849","post","type-post","status-publish","format-standard","hentry","category-tips-and-tricks"],"aioseo_notices":[],"jetpack_featured_media_url":"","jetpack_likes_enabled":true,"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/pfhqii-dH","amp_enabled":true,"_links":{"self":[{"href":"https:\/\/stage.wholetomato.com\/blog\/wp-json\/wp\/v2\/posts\/849","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/stage.wholetomato.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/stage.wholetomato.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/stage.wholetomato.com\/blog\/wp-json\/wp\/v2\/users\/66190671"}],"replies":[{"embeddable":true,"href":"https:\/\/stage.wholetomato.com\/blog\/wp-json\/wp\/v2\/comments?post=849"}],"version-history":[{"count":4,"href":"https:\/\/stage.wholetomato.com\/blog\/wp-json\/wp\/v2\/posts\/849\/revisions"}],"predecessor-version":[{"id":855,"href":"https:\/\/stage.wholetomato.com\/blog\/wp-json\/wp\/v2\/posts\/849\/revisions\/855"}],"wp:attachment":[{"href":"https:\/\/stage.wholetomato.com\/blog\/wp-json\/wp\/v2\/media?parent=849"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/stage.wholetomato.com\/blog\/wp-json\/wp\/v2\/categories?post=849"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/stage.wholetomato.com\/blog\/wp-json\/wp\/v2\/tags?post=849"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}