Friday, April 26, 2024
HomeGolangGoLand’s Hidden Gems | The GoLand Weblog

GoLand’s Hidden Gems | The GoLand Weblog


Everyone knows how difficult it’s to unlock the total energy of an IDE. There’ll at all times be extra options you haven’t absolutely explored but. However we’ve all been in no less than one state of affairs the place we found a tiny characteristic or motion by chance and it pleasantly stunned us or saved us a ton of time. 

Whereas engaged on options for GoLand, our crew put collectively a set of the precise options that have been essentially the most useful in permitting us to focus extra on creativity and fewer on the repetitive “grunt work”.

Welcome hidden gems in GoLand, version by the crew! Please notice, if you’re utilizing IntelliJ IDEA with the Go plugin, in addition to every other merchandise, you’ll discover these options in your IDEs. 

Kind strains motion

The Kind strains motion is helpful if you’re trying on the textual content file with strains of information (for example, names, import paths, log information, and so forth). Alphabetical sorting helps to know the file extra simply or discover duplicating strains.

To shortly type strains in the entire file or in a code choice, select Edit | Kind Strains or Edit | Reverse Strains from the principle menu. Alternatively, you possibly can run this motion utilizing the Discover Motion command by way of ⌘⇧A on macOS or Ctrl+Shift+A on Home windows/Linux).

Open Clean Diff Window

Open Clean Diff Window will enable you overview the variations between any information, folders, textual content sources, database objects, in addition to native information and their repository variations. For instance, you possibly can open this window, paste the logs, and the IDE will present the diff, similar to it does for VCS modifications. 

You possibly can name the Open Clean Diff Window motion by urgent ⌘⇧A on macOS or Ctrl+Shift+A on Home windows/Linux. Then simply begin typing Open Clean Diff Window to find it.

Alternatively, you possibly can assign a shortcut for this motion on the Keymap web page of the IDE within the Settings below Model Management Methods | Diff & Merge.

In addition to that, you possibly can examine any piece of code copied into your clipboard by right-clicking anyplace within the editor and selecting Examine with Clipboard from the context menu.

Scratch information: ⇧⌘N / Ctrl+Alt+Shift+Insert

Generally you want a spot to edit a bit of arbitrary textual content, take just a few notes associated to the duty you’re engaged on or draft up some code outdoors the venture context. That is the place Scratch information come to rescue!  

Scratch information will not be merely notes, they assist syntax highlighting, code completion, and all different options for the corresponding file kind.

And right here’s the cherry on prime of the pie: Scratch information will not be associated to a particular venture and stay together with your IDE. You possibly can simply entry them from inside any venture, so there isn’t a want to go away your IDE.

You possibly can create a Scratch file from the principle menu. To take action, choose File | New | Scratch File or press ⇧ ⌘ N on macOS or Home windows/Linux. 

A number of cursors

A number of cursors allow you to make modifications to your code quicker by making use of modifications in a number of locations concurrently. As well as, a number of cursors are geared up with Code completion and Dwell Templates and can apply them at every caret place.

So as to add a number of carets, you possibly can press ⌥/Ctrl twice, after which with out releasing it, press the Up Arrow or Down Arrow key. You can too make a a number of choice by urgent ⌥⇧ on macOS or Shift+Alt on Home windows/Linux and dragging the caret. To delete all carets, simply press the Escape key.

Collapse All / Broaden All: ⇧⌘- /⇧⌘+ or Ctrl + Shift + NumPad + /  Ctrl + Shift + NumPad –

We learn code continuously. And generally we discover ourselves unable to determine the construction of the code we’re studying – despite the fact that it’s code that we wrote! 

Relaxation assured that there’s a simple work-around. The Collapse All and Broaden All actions enable you to navigate the wall of code extra shortly. To break down or develop all code fragments, press ⇧⌘- /⇧⌘+ on macOS and on Ctrl+Shift+NumPad +Ctrl+Shift+NumPad – Home windows/Linux.

GoLand collapses or expands all fragments inside the choice, or, if nothing is chosen, all fragments within the present file, for instance, all strategies in a file.

What’s extra –  you possibly can collapse or develop code recursively, press ⌥⌘- / ⌥⌘+ on macOS and Ctrl+Alt+NumPad + / Ctrl+Alt+NumPad –. GoLand collapses or expands the present fragment and all its subordinate areas inside that fragment.

Current Recordsdata: ⌘+E / Ctrl+E 

Current Recordsdata options enable you shortly bounce to the information you’ve opened most just lately. This motion will even open the Current Recordsdata instrument window with the checklist of the just lately opened information to allow you to navigate there. 

However, if you happen to press the identical ⌘+E on macOS or Ctrl + E on Home windows/Linux shortcut whereas the Current Recordsdata instrument window is open, then the checklist will solely show the information which were modified just lately.

That was the model about hidden gems in GoLand by the GoLand crew. What’s your timesaver within the IDE? Share it right here within the feedback or by way of Twitter, we want to hear! 



RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments