{"id":33328,"date":"2019-10-10T11:36:06","date_gmt":"2019-10-10T11:36:06","guid":{"rendered":"https:\/\/blog.jetbrains.com\/go\/?p=1887"},"modified":"2019-11-14T16:58:35","modified_gmt":"2019-11-14T16:58:35","slug":"top-25-editing-features-of-goland-ide-part-3","status":"publish","type":"go","link":"https:\/\/blog.jetbrains.com\/zh-hans\/go\/2019\/10\/10\/top-25-editing-features-of-goland-ide-part-3","title":{"rendered":"Top 25 Editing Features of GoLand IDE \u2013 Part 3"},"content":{"rendered":"<p>Today we publish the last part of the series about the Top 25 Editing Tips. In case you missed the previous articles, you can go back and read <a href=\"https:\/\/blog.jetbrains.com\/go\/2019\/10\/04\/top-25-editing-features-of-goland-ide-part-1\/\">part 1<\/a> and <a href=\"https:\/\/blog.jetbrains.com\/go\/2019\/10\/08\/top-25-editing-features-of-goland-ide-part-2\/\">part 2<\/a> before you read this and give your productivity a boost.<\/p>\n<p>Let&#8217;s see what&#8217;s in this article:<\/p>\n<ul>\n<li><a href=\"https:\/\/blog.jetbrains.com\/go\/2019\/10\/10\/top-25-editing-features-of-goland-ide-part-3\/#clipboard-operations\">Clipboard operations<\/a>\n<ul>\n<li><a href=\"https:\/\/blog.jetbrains.com\/go\/2019\/10\/10\/top-25-editing-features-of-goland-ide-part-3\/#compare-with-clipboard\">Compare with clipboard<\/a><\/li>\n<li><a href=\"https:\/\/blog.jetbrains.com\/go\/2019\/10\/10\/top-25-editing-features-of-goland-ide-part-3\/#paste-from-history\">Paste from history<\/a><\/li>\n<li><a href=\"https:\/\/blog.jetbrains.com\/go\/2019\/10\/10\/top-25-editing-features-of-goland-ide-part-3\/#adding-a-package-from-the-clipboard\">Adding a package from the clipboard<\/a><\/li>\n<\/ul>\n<\/li>\n<li><a href=\"https:\/\/blog.jetbrains.com\/go\/2019\/10\/10\/top-25-editing-features-of-goland-ide-part-3\/#general-tips\">General tips<\/a>\n<ul>\n<li><a href=\"https:\/\/blog.jetbrains.com\/go\/2019\/10\/10\/top-25-editing-features-of-goland-ide-part-3\/#switch-to-the-editor\">Switch to the editor<\/a><\/li>\n<li><a href=\"https:\/\/blog.jetbrains.com\/go\/2019\/10\/10\/top-25-editing-features-of-goland-ide-part-3\/#hide-all-tool-windows\">Hide all tool windows<\/a><\/li>\n<li><a href=\"https:\/\/blog.jetbrains.com\/go\/2019\/10\/10\/top-25-editing-features-of-goland-ide-part-3\/#speed-typing\">Speed Typing<\/a><\/li>\n<li><a href=\"https:\/\/blog.jetbrains.com\/go\/2019\/10\/10\/top-25-editing-features-of-goland-ide-part-3\/#search-everywhere\">Search Everywhere<\/a><\/li>\n<li><a href=\"https:\/\/blog.jetbrains.com\/go\/2019\/10\/10\/top-25-editing-features-of-goland-ide-part-3\/#local-history\">Local History<\/a><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>And here are the tips from the other articles in the series:<\/p>\n<ul>\n<li><a href=\"https:\/\/blog.jetbrains.com\/go\/2019\/10\/04\/top-25-editing-features-of-goland-ide-part-1\/#code-generation\">Code generation<\/a>\n<ul>\n<li><a href=\"https:\/\/blog.jetbrains.com\/go\/2019\/10\/04\/top-25-editing-features-of-goland-ide-part-1\/#implement-an-interface\">Implement an interface<\/a><\/li>\n<li><a href=\"https:\/\/blog.jetbrains.com\/go\/2019\/10\/04\/top-25-editing-features-of-goland-ide-part-1\/#structure-tags\">Structure Tags<\/a><\/li>\n<li><a href=\"https:\/\/blog.jetbrains.com\/go\/2019\/10\/04\/top-25-editing-features-of-goland-ide-part-1\/#custom-structure-tags\">Custom Structure Tags<\/a><\/li>\n<li><a href=\"https:\/\/blog.jetbrains.com\/go\/2019\/10\/04\/top-25-editing-features-of-goland-ide-part-1\/#generate-a-test\">Generate a test<\/a><\/li>\n<\/ul>\n<\/li>\n<li><a href=\"https:\/\/blog.jetbrains.com\/go\/2019\/10\/04\/top-25-editing-features-of-goland-ide-part-1\/#text-selection\">Text selection<\/a>\n<ul>\n<li><a href=\"https:\/\/blog.jetbrains.com\/go\/2019\/10\/04\/top-25-editing-features-of-goland-ide-part-1\/#expanding-shrinking-selection\">Expanding\/shrinking selection<\/a><\/li>\n<li><a href=\"https:\/\/blog.jetbrains.com\/go\/2019\/10\/04\/top-25-editing-features-of-goland-ide-part-1\/#multiple-selections\">Multiple selections<\/a><\/li>\n<li><a href=\"https:\/\/blog.jetbrains.com\/go\/2019\/10\/04\/top-25-editing-features-of-goland-ide-part-1\/#select-all-occurences-in-a-file\">Select all occurrences in a file<\/a><\/li>\n<\/ul>\n<\/li>\n<li><a href=\"https:\/\/blog.jetbrains.com\/go\/2019\/10\/08\/top-25-editing-features-of-goland-ide-part-2\/#navigation-between-files\">Navigation between files<\/a>\n<ul>\n<li><a href=\"https:\/\/blog.jetbrains.com\/go\/2019\/10\/08\/top-25-editing-features-of-goland-ide-part-2\/#navigate-to-file\">Navigate to file<\/a><\/li>\n<li><a href=\"https:\/\/blog.jetbrains.com\/go\/2019\/10\/08\/top-25-editing-features-of-goland-ide-part-2\/#navigate-between-opened-files-using-the-switcher\">Navigate between opened files using the Switcher<\/a><\/li>\n<li><a href=\"https:\/\/blog.jetbrains.com\/go\/2019\/10\/08\/top-25-editing-features-of-goland-ide-part-2\/#recent-files\">Recent Files<\/a><\/li>\n<li><a href=\"https:\/\/blog.jetbrains.com\/go\/2019\/10\/08\/top-25-editing-features-of-goland-ide-part-2\/#recent-locations\">Recent Locations<\/a><\/li>\n<\/ul>\n<\/li>\n<li><a href=\"https:\/\/blog.jetbrains.com\/go\/2019\/10\/08\/top-25-editing-features-of-goland-ide-part-2\/#structure-and-navigation\">Structure and navigation<\/a>\n<ul>\n<li><a href=\"https:\/\/blog.jetbrains.com\/go\/2019\/10\/08\/top-25-editing-features-of-goland-ide-part-2\/#structure-popup\">Structure popup<\/a><\/li>\n<li><a href=\"https:\/\/blog.jetbrains.com\/go\/2019\/10\/08\/top-25-editing-features-of-goland-ide-part-2\/#jump-to-the-navigation-bar\">Jump to the Navigation Bar<\/a><\/li>\n<li><a href=\"https:\/\/blog.jetbrains.com\/go\/2019\/10\/08\/top-25-editing-features-of-goland-ide-part-2\/#select-in\">Select in&#8230;<\/a><\/li>\n<li><a href=\"https:\/\/blog.jetbrains.com\/go\/2019\/10\/08\/top-25-editing-features-of-goland-ide-part-2\/#go-to-from-a-test\">Go to\/from a test<\/a><\/li>\n<li><a href=\"https:\/\/blog.jetbrains.com\/go\/2019\/10\/08\/top-25-editing-features-of-goland-ide-part-2\/#type-hierarchy\">Type Hierarchy<\/a><\/li>\n<li><a href=\"https:\/\/blog.jetbrains.com\/go\/2019\/10\/08\/top-25-editing-features-of-goland-ide-part-2\/#call-hierarchy\">Call Hierarchy<\/a><\/li>\n<li><a href=\"https:\/\/blog.jetbrains.com\/go\/2019\/10\/08\/top-25-editing-features-of-goland-ide-part-2\/#show-usages\">Show usages<\/a><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p><!--more--><\/p>\n<h2 id=\"clipboard-operations\">Clipboard operations<\/h2>\n<p>A basic copy-paste operation is something you probably already very frequently use and you might be wondering what the IDE can do with something as simple as the clipboard?<\/p>\n<h3 id=\"compare-with-clipboard\">Compare with clipboard<\/h3>\n<p>GoLand has a built-in diff viewer for code, revisions, and even images. To invoke it, select any pair of files and press <em>Ctrl+D<\/em> on <em>Windows\/Linux<\/em> and <em>\u2318D<\/em> on <em>macOS<\/em>.<\/p>\n<p>If you have selected a single file, the IDE will prompt you to select another file to compare it to. To quickly compare the editor with the clipboard, choose <em>View | Compare with Clipboard<\/em>.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-1889\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2019\/10\/go-25-top-editing-features-19-compare-files.gif\" alt=\"25 top editing features - 19 - compare files\" width=\"1500\" height=\"640\" \/><\/p>\n<h3 id=\"paste-from-history\">Paste from history<\/h3>\n<p>Speaking of the clipboard, GoLand keeps track of everything you put in the clipboard. Anytime you want to paste one of your previously copied items, press <em>Ctrl+Shift+V<\/em> on <em>Windows\/Linux<\/em> and <em>\u2318\u21e7V<\/em> on macOS, to go to the <em>Choose Content to Paste<\/em> popup window.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-1890\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2019\/10\/go-25-top-editing-features-20-paste-from-history.gif\" alt=\"25 top editing features - 20 - paste from history\" width=\"1500\" height=\"640\" \/><\/p>\n<h3 id=\"adding-a-package-from-the-clipboard\">Adding a package from the clipboard<\/h3>\n<p>We can&#8217;t talk about the clipboard without mentioning that whenever the IDE detects a possible import path of a package in the clipboard it will suggest installing it as a module or adding it to the GOPATH, depending on the project type. This is all done locally, of course, so no data is sent to us.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-1891\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2019\/10\/go-25-top-editing-features-21-install-package-from-clipboard.gif\" alt=\"25 top editing features - 21 - install package from clipboard\" width=\"1500\" height=\"640\" \/><\/p>\n<h2 id=\"general-tips\">General tips<\/h2>\n<p>Let&#8217;s close the series with some generic tips and tricks that will make your life easier whenever you use the IDE.<\/p>\n<h3 id=\"switch-to-the-editor\">Switch to the editor<\/h3>\n<p>Throughout this article, we&#8217;ve seen a lot of (tool) windows opening or appearing. How can we quickly get back to the editor? We can press the Esc key and the focus will switch back to the editor. The tool window you\u2019re switching from will preserve its visibility state in this case.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-1892\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2019\/10\/go-25-top-editing-features-22-switch-to-the-editor.gif\" alt=\"25 top editing features - 22 - switch to the editor\" width=\"1500\" height=\"640\" \/><\/p>\n<h3 id=\"hide-all-tool-windows\">Hide all tool windows<\/h3>\n<p>You can hide all the tool windows in the IDE and quickly switch to the editor via <em>Ctrl+Shift+F12<\/em> on Windows\/Linux, and <em>\u2318\u21e7<\/em>F12 on <em>macOS<\/em>.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-1893\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2019\/10\/go-25-top-editing-features-23-hide-all-tool-windows.gif\" alt=\"25 top editing features - 23 - hide all tool windows\" width=\"1500\" height=\"640\" \/><\/p>\n<h3 id=\"speed-typing\">Speed Typing<\/h3>\n<p>I mentioned the Speed Typing feature a few times, but what actually is it? It&#8217;s the ability to type anything in a list and have the results filtered. You can then use the arrow keys to move through the list, or press <em>Esc<\/em> to dismiss the filter.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-1894\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2019\/10\/go-25-top-editing-features-24-speed-typing.gif\" alt=\"25 top editing features - 24 - speed typing\" width=\"1500\" height=\"640\" \/><\/p>\n<h3 id=\"search-everywhere\">Search Everywhere<\/h3>\n<p>If you need to search for anything \u2013 from IDE settings to parts of your code \u2013 then <em>Search Everywhere<\/em>, <em>Shift+Shift<\/em>, is there to help. You can even toggle the settings from the search results and it can be used with fuzzy searching.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-1895\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2019\/10\/go-25-top-editing-features-25-search-everywhere.gif\" alt=\"25 top editing features - 25 - search everywhere\" width=\"1500\" height=\"640\" \/><\/p>\n<h3 id=\"local-history\">Local History<\/h3>\n<p>Yes, we know, this is the 26th tip, but no tips list would be complete without mentioning the <em>Local History<\/em> feature.<\/p>\n<p>Why?<br \/>\nHave you ever done some editing, had something working, then after a little more editing, things have stopped working? Or you accidentally deleted all the work you did that day (or week), because of a wrong command?<\/p>\n<p>Then <em>Local History<\/em> will come to the rescue.<\/p>\n<p>You can invoke it at any time by using the <em>Local History<\/em> command either via <em>Search Everywhere,<\/em> or by right-clicking on the folder\/file.<\/p>\n<p>You can also see the difference between different points in time, and you can put labels on known points in time to make sure that you can always return to a safe state. Labels get automatically added when tests pass, for example.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-1897\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2019\/10\/go-25-top-editing-features-26-local-history.gif\" alt=\"25 top editing features - 26 - local history\" width=\"1500\" height=\"640\" \/><\/p>\n<p>That\u2019s it for today\u2019s post. We hope you enjoyed it and discovered a few new things along the way.<br \/>\nAs usual, let us know your thoughts in the comments section below, on <a href=\"https:\/\/youtrack.jetbrains.com\/issues\/Go\" target=\"_blank\" rel=\"noopener\">our issue tracker<\/a>, or <a href=\"https:\/\/twitter.com\/GoLandIDE\" target=\"_blank\" rel=\"noopener\">via Twitter<\/a>. And send your suggestions on what kind of articles or tips would you like to see next.<\/p>\n","protected":false},"author":828,"featured_media":0,"comment_status":"open","ping_status":"open","template":"","categories":[808,2347],"tags":[3955,83,91,1508],"cross-post-tag":[],"acf":[],"_links":{"self":[{"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/go\/33328"}],"collection":[{"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/go"}],"about":[{"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/types\/go"}],"author":[{"embeddable":true,"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/users\/828"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/comments?post=33328"}],"version-history":[{"count":0,"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/go\/33328\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/media?parent=33328"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/categories?post=33328"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/tags?post=33328"},{"taxonomy":"cross-post-tag","embeddable":true,"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/cross-post-tag?post=33328"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}