Coding in NECTO Studio
The code editor in NECTO Studio, powered by the Monaco Editor (the same editor that powers Visual Studio Code), provides a rich set of features designed to enhance the coding experience and improve productivity.
Let's perform an overview of the key features!
Syntax Highlighting
- Purpose: Enhances code readability by color-coding different elements such as keywords, variables, strings, comments, and operators.
Code Navigation
Effective coding involves more than just writing code. It also includes navigating your codebase efficiently, locating definitions, references, and symbols quickly. NECTO Studio offers a range of features to facilitate seamless code navigation. Down below you will see some of those features.
Switch Header/Source (SHIFT+F4)
Switching between header and source files is a common task when working with C/C++ projects. NECTO Studio allows you to quickly toggle between the .h and .c/.cpp files associated with the same module.
-
How to Use:
-
Press SHIFT+F4 to switch between the header and source files of the current module.
Go to Definition (F12)
Quickly navigate to the definition of functions, variables, or classes by right-clicking on the symbol and selecting "Go to Definition" or pressing F12.
Go To Declaration
This feature lets you jump to the declaration of a variable, function, or type directly from its usage.
Go to References (SHIFT+F12)
Finding all references of a particular symbol helps in understanding where and how it is used across the project.
-
How to Use:
-
Place the cursor on the symbol you are interested in.
- Press SHIFT+F12 to list all references to the symbol within the project.
- Navigate through the list to view each reference in context.
Go to Workspace Symbol... (CTRL+T)
Quickly search and navigate to any symbol within the entire workspace.
-
How to Use:
-
Press CTRL+T to open the Go to Workspace Symbol dialog.
- Start typing the name of the symbol you want to find.
- Select the desired symbol from the list and press Enter to navigate to it.
Go to Symbol... (CTRL+SHIFT+O)
This feature is similar to Go to Workspace Symbol but scoped to the current file. It helps you quickly find and navigate to symbols within the file you are currently editing.
-
How to Use:
-
Press CTRL+SHIFT+O to open the Go to Symbol dialog.
- Begin typing the symbol name, and the list will filter based on your input.
- Select the desired symbol and press Enter to jump to it.
Peek Definition (Alt+ F12)
View a small inline window showing the definition of a symbol without leaving the current context. Use Alt+F12.
-
How to Use:
-
Right-click on the symbol and select Go To Declaration from the context menu.
- Alternatively, you can use a keyboard shortcut (typically F12 or another configured key) to quickly navigate to the declaration.
Code Completion
Code completion helps you write code faster by predicting and suggesting completions for partially typed words and phrases.
-
How to Use:
-
Tabnine AI Code Auto-Completion: Go to: File -> NECTO Preferences -> Miscellaneous settings; enable use TabNine code completion option.
- Basic Completion: Suggests keywords, variables, functions, and other syntactic elements as you type.
Code Snippets
Code snippets are pre-written pieces of code that can be inserted into your codebase to save time and reduce errors.
- Predefined Snippets: Quickly insert common code structures and templates by typing a shortcut and pressing Tab. For example, typing if followed by Tab might insert an if statement template.
IntelliSense
IntelliSense provides intelligent code suggestions, parameter info, quick info, and member lists as you type, enhancing your coding efficiency.
-
How to Use:
-
As you type, IntelliSense will display context-aware suggestions.
- Use CTRL+Space to manually trigger suggestions if needed.
Refactoring Tools
- Rename Symbol: Easily rename variables, functions, or other symbols across the entire codebase while maintaining consistency. Use F2 to rename.
Code Folding
- Fold/Unfold Code Sections: Collapse and expand code sections to focus on specific parts of your code. Click the arrow icons in the gutter or use shortcuts like Ctrl+Shift+[ to fold and Ctrl+Shift+] to unfold.
Multi-Cursor and Selection
-
Multiple Cursors: Place multiple cursors in the editor to make simultaneous edits in different locations. Use Alt+Click to add a cursor.
-
Column Selection: Select columns of text for simultaneous editing. Use Shift+Alt+Arrow Keys for rectangular selection.
-
Next occurrence: Use CTRL+D to select the next occurrence of the current selection.
-
Multiple Cursors and selections: Press CTRL+SHIFT+ALT+Arrow keys to create multiple cursors and make selections.
Find and Replace
-
Find: Quickly search for text within the current file using Ctrl+F.
-
Replace: Replace occurrences of text with new content using Ctrl+H.
-
Find in Files: Search across multiple files in the project using Ctrl+Shift+F.
Debugging Support
-
Debug: Start debugging code to inspect the current state by pressing F9.
-
Watch Variables: Monitor specific variables during debugging sessions by right clicking on the variable and using Add to Expression action item or by pressing CTRL+I.
-
Step Through Code: Perform Continue Debug, Step over, into, out or run to line functions using F6, F8, F7, CTRL+F8 and F4, respectively.
These features of the NECTO Studio code editor, powered by the Monaco Editor, provide a comprehensive and efficient environment for coding, making it easier for developers to write, navigate, and manage their code effectively.
Command Palette
The Command Palette in NECTO Studio is a powerful feature that provides quick access to a wide range of commands and actions within the IDE. Here’s an in-depth explanation of the Command Palette and its properties.
Command Palette Overview
The Command Palette can be accessed using the shortcut CTRL+F1. It is an interface that allows users to execute commands by typing their names, making it easier to navigate and control the IDE without using the mouse. This feature is particularly useful for users who prefer keyboard shortcuts and want to increase their productivity.
Key Properties of the Command Palette
Here are the key properties and functionalities of the Command Palette in NECTO Studio:
-
Quick Access to Commands
-
Allows users to quickly search and execute commands by typing keywords.
-
Commands can be related to project management, code editing, debugging, and more.
-
-
Context Awareness
-
The Command Palette is context-aware, meaning it can show relevant commands based on the current state or selection in the editor.
-
For example, different commands might be available when editing code versus when managing project files.
-
-
Integration with Monaco Editor
-
As NECTO Studio uses Monaco Editor, the Command Palette leverages Monaco’s robust command framework.
-
This ensures a seamless experience with powerful code editing capabilities.
-
-
Command Categories
-
Commands are categorized for easier navigation. Categories might include:
- File operations
- Edit operations
- View and layout commands
- Project and workspace management
- Debugging commands
- Terminal and console commands
-