码迷,mamicode.com
首页 > 其他好文 > 详细

[转载][IntelliJ IDEA]No Tabs in IntelliJ IDEA

时间:2018-04-19 10:28:56      阅读:342      评论:0      收藏:0      [点我收藏+]

标签:php   settings   alt+   com   war   quick   plain   cat   sig   

 

原文地址:http://hadihariri.com/2014/06/24/no-tabs-in-intellij-idea/

 

I often come across people complaining about some odd behaviour when it comes to editor tabs in IntelliJ IDEA or any of the other sister products such as WebStorm or PhpStorm. Some expect a different kind of behavior from tabs. Others want the ability to have different colored tabs and some want them numbered.


My advice to all of them? Switch tabs off. You don’t need tabs. 

Here’s your typical layout with Tabs 

技术分享图片

No more Tabs

That’s taking up realestate and it’s not providing you with much value other than confusing the hell out of you when you’re looking for that specific index.html file and there are a few of them open. And when you want to navigate to the different tabs, you either have some shortcut key assigned to loop through them or you’re using your mouse!


Bad. Don’t use the mouse. And here’s what you do with Tabs: 

技术分享图片

But, how do I move back and forth?

Use the keyboard with a few different options (I’m using OSX 10.5+ layout):

Recent files

Navigate to the recent files you’ve just been looking at: Cmd+E 

技术分享图片 

If you want to see the recent files you’ve just edited: Shift+Cmd+E 

技术分享图片 

And you can use the Switcher to do even faster switches: Ctrl+` 

技术分享图片

Find Types and Files

  • If you want to find a type, Cmd+O.

  • If you want to find a file, Shift+Cmd+O

  • If you want to look for a symbol, Alt+Cmd+O.

Or you can just press Shift twice and get Search Everywhere. 

技术分享图片 

Noticed how Search Everywhere by default lists Recent Files? 

And remember, most of these dialogs admit patterns such as wildcards, CCC (CamelCaseCompletion), and even going to a specific line number: 

技术分享图片

Recent Positions

  • If you want to move back and forth between where you are and where you just were: Cmd+[ to go back and Cmd+] to go forward. Of course, if your current and previous position is in different files, it will also go back and forth between them.
  • If you want to go to the last edited position: Shift+Cmd+Backspace

Bookmarks

You can also toggle bookmarks using F3 (mark) and Alt+F3 (unmark), navigate between them and also display bookmarks:

技术分享图片

Project Structure

The Project Structure can help you easily locate files. First off, hide it and activate it using Cmd+1. Secondly, while having it open you can just start typing to quickly locate a file

技术分享图片 

Once you locate the file, hit F4 or ESC to change to focus to the editor. Incidently, if you want to autoscroll to source (or from source), hit the Gear icon on the Project window and activate it: 

技术分享图片

Make sure you turn that off also. If you ever need it, invoke it using Alt+Fn+LeftArrow 

技术分享图片 

And remember, you can even invoke the New File Command with Cmd+N (only way you should be creating files, packages and folders) on the Navigation bar. It’s context-aware. 

技术分享图片

Many ways to navigate

As you can see, there are many ways to navigate a project inside IntelliJ IDEA that doesn’t necessarily include having to look through a list of tabs and figure out where you have to click next.


 

[转载][IntelliJ IDEA]No Tabs in IntelliJ IDEA

标签:php   settings   alt+   com   war   quick   plain   cat   sig   

原文地址:https://www.cnblogs.com/tuohai666/p/8879895.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!