10 Tips for Faster Synergy Development in Visual Studio
✕
  • Solutions
    • Legacy Application Modernization
    • Modern UI/UX
    • Data Visibility
    • Enterprise Application Integration
    • Development Environment Optimization
    • Cloud Migration
    • Security
    • High Availability and Resilience
  • Products
    • Language
    • Development Environment
    • Connectivity and Open-Source Tools
    • Release Strategy
    • Roadmap
  • Services and Support
    • Professional Services Group
    • Developer Support
    • Application Support
  • Learning
    • Events
    • Online Courses
    • Learning Resources
    • Blog
    • Synergy-e-News
  • Company
    • Leadership
    • Careers
    • Contact
    • News
  • +1-916-635-7300
  • Get Support
  • Documentation
  • Resource Center
✕
            No results See all results
            10 Tips for Faster Synergy Development in Visual Studio
            • Solutions
              • Legacy Application Modernization
              • Modern UI/UX
              • Data Visibility
              • Enterprise Application Integration
              • Development Environment Optimization
              • Cloud Migration
              • Security
              • High Availability and Resilience
            • Products
              • Language
              • Development Environment
              • Connectivity and Open-Source Tools
              • Release Strategy
              • Roadmap
            • Services and Support
              • Professional Services Group
              • Developer Support
              • Application Support
            • Learning
              • Events
              • Online Courses
              • Learning Resources
              • Blog
              • Synergy-e-News
            • Company
              • Leadership
              • Careers
              • Contact
              • News
            • +1-916-635-7300
            • Get Support
            • Documentation
            • Resource Center
            ✕
                      No results See all results
                      10 Tips for Faster Synergy Development in Visual Studio
                      • Solutions
                        • Legacy Application Modernization
                        • Modern UI/UX
                        • Data Visibility
                        • Enterprise Application Integration
                        • Development Environment Optimization
                        • Cloud Migration
                        • Security
                        • High Availability and Resilience
                      • Products
                        • Language
                        • Development Environment
                        • Connectivity and Open-Source Tools
                        • Release Strategy
                        • Roadmap
                      • Services and Support
                        • Professional Services Group
                        • Developer Support
                        • Application Support
                      • Learning
                        • Events
                        • Online Courses
                        • Learning Resources
                        • Blog
                        • Synergy-e-News
                      • Company
                        • Leadership
                        • Careers
                        • Contact
                        • News
                      • Home
                      • Blog
                      • Development Tools
                      • 10 Tips for Faster Synergy Development in Visual Studio
                      SQL Replication Enhancements
                      December 4, 2020
                      CodeGen 5.6.5 Released
                      January 24, 2021

                      10 Tips for Faster Synergy Development in Visual Studio

                      Published by Phil Bratt on January 21, 2021
                      Categories
                      • Development Tools
                      Tags

                      Visual Studio is consistently one of the highest trending IDEs on the market. It has powerful features to increase code productivity. Because of this, Synergex brought traditional Synergy coding into Visual Studio. But how do you use it? I would like to focus on some of the hotkeys and organizational features available inside Visual Studio that will help developers navigate their code.

                      Editing Code

                      1. Easy commenting: While testing code, there are times when you want to disable large sections of code so that you can run alternative code to see the differences. In Visual Studio, you can highlight the code you want to comment out and press CTRL K + C to comment out the lines. You can press this key combination multiple times to add a ‘;’ to the front of each line or CTRL K + U to remove a comment character from each line. The toolbar also contains buttons to comment and uncomment lines:
                      2. Multiple line edits: One of my favorite features in Visual Studio that I’m surprised hasn’t made its way into other Microsoft products is the ability to edit multiple lines at once. If you press ALT + SHIFT and (while still holding them) push the UP or DOWN arrow keys, you can expand the cursor to multiple lines. This means that when you press a key, it will edit all of those lines with that key stroke. For example, let’s say you have multiple WRITES statements in your code:
                        writes(chnout, rec_1)     
                        writes(chnout, " ")
                        writes(chnout, rec_2)
                      3. Now you want to add an error list to handle record locking on each line. Well, you can use ALT + SHIFT to add the identical error list to each line, which beats copying and pasting to each line.

                        writes(chnout, rec_1)       [$ERR_LOCKED=errloc]     
                        writes(chnout, " ")         [$ERR_LOCKED=errloc]
                        writes(chnout, rec_2)       [$ERR_LOCKED=errloc]
                      1. Simple duplication: Speaking of copy and paste, how annoying is it to click, then hold SHIFT, then END, then CRTL C, then click, and then CTRL V? That’s tedious. It was tedious to write it out. If you want to copy the line you are on, you can duplicate the line of code with CTRL D.

                      Collapsing and expanding code

                      You may have noticed that when you create a main routine, subroutine, or function, a “-“ appears to the left of the editor. This allows you to collapse that code section to make it easier to edit large pieces of code.

                      1. Collapsible labels: You will also notice that internal subroutines/labels are not naturally collapsible. But what if you wanted to make a label collapsible because you have so many of them? You would surround the code with .REGION/.ENDREGION along with a title for the region. (I usually stick with the name of the label.) For example:
                        .region "erroloc"
                        errloc,
                        repeat
                        begin
                        ...
                        .endregion

                      With .REGION/.ENDREGION in place, you will now get the “-“ around that section that you can collapse.

                      1. Hotkeys: A number of hotkeys can be used to collapse and expand these sections:

                      Toggle outlining expansion – CTRL M + M
                      Toggle all outlining – CRTL M + L
                      Stop outlining – CRTL M + P
                      Stop hiding current – CRTL M + U
                      Collapse to definitions – CTRL M + O

                      Navigating code

                      There are also a few features that can be used to navigate your code that I find extremely helpful:

                      1. If you are on a BEGIN or END in code and want to go to the matching END or BEGIN, while the cursor is on the BEGIN or END, press CRTL ] to move the cursor to its pairing statement.
                      2. If you are on a variable or subroutine and want to jump to where it is defined in the code, you can either press F12 or right-click and select “Go to definition.”
                      3. With this jumping around, you can also push CTRL – to go back to where you were or CTRL + to go forward.

                      Debugging code

                      To round off this list, there are a number of function keys that are useful during a debugging session in Visual Studio:

                      1. To step into the line of code you are on, so you can see the code run through a subroutine, class, etc., use F11. To step over and go to the next line of the currently executing source code, press F10.
                      2. While coding or debugging, pressing F9 will toggle adding or removing a breakpoint on the current line.

                      Those are my 10 tips for navigating through Visual Studio and making use of its code editing and hotkey features. You can also find our video about Visual Studio hotkeys here. Keep in mind that most of these keys can be changed or customized inside Visual Studio by selecting Options from the Tools drop-down menu. Hope you found some of these helpful.

                      If you haven’t moved your Synergy development environment to Visual Studio yet, what are you waiting for? Check out our solution for modernizing your development environment and accessing a superior debugging and build experience. You can also reach out to your account executive to discuss how we can help you move to Visual Studio or train your developers to get the most out of their new environment.

                      Share
                      73

                      Leave a ReplyCancel reply

                      This site uses Akismet to reduce spam. Learn how your comment data is processed.

                      • Announcing SDI 2023.09.1521
                      • Switching Source Control Paradigms
                      • Announcing New Synergy/DE Feature Release and Support for .NET 6+ on Linux
                      • New Learning Resources on Synergex Website
                      • Announcing SDI 2023.08.1404
                      • Announcements
                      • Beta Testing
                      • Case Studies
                      • Code Exchange
                      • CodeGen
                      • CTO's Thoughts
                      • Development Tools
                      • DevPartner Conference
                      • Education
                      • Events
                      • Harmony Core
                      • Hiring
                      • Industry News
                      • Just for Fun
                      • Licensing
                      • News
                      • Open Source
                      • OpenVMS
                      • President's Thoughts
                      • Professional Services Group
                      • Release Notifications
                      • Security
                      • Software
                      • Software Development
                      • Success Stories
                      • Tech Article
                      • UI
                      • Uncategorized

                      STAY CONNECTED with Synergex

                      • Facebook
                      • LinkedIn
                      • Twitter
                      • YouTube
                      SOLUTIONS
                      • Legacy Applications Modernization
                      • Modern UI/UX
                      • Data Visibility
                      • Enterprise Application Integration
                      • Development Environment Optimization
                      • Cloud Migration
                      • Security
                      • High Availability
                      PRODUCTS
                      • Language
                      • Development Environment
                      • Connectivity and Open-Source Tools
                      • Release Strategy
                      • Roadmap
                      SUPPORT
                      • Professional Services Group
                      • Developer Support
                      • Application Support
                      LEARNING
                      • Events
                      • Online Courses
                      • Learning Resources
                      • Blog
                      • Synergy-e-News
                      COMPANY
                      • Customers
                      • Leadership
                      • Careers
                      • Contact
                      10 Tips for Faster Synergy Development in Visual Studio

                      Privacy  |  Security  |  Terms  |  © 2023 Synergex

                                No results See all results