简体   繁体   English

在textmate中,如何跳转到文件? 如何打开文件资源管理器?

[英]In textmate, how do I jump to a file? how to open the file explorer?

On my macbook, when I am exploring my filesystem and then open a file in textmate, it just opens the code window. 在我的macbook上,当我在浏览我的文件系统然后在textmate中打开一个文件时,它只是打开代码窗口。

How can I open the textmate file explorer? 如何打开textmate文件资源管理器?

How can I jump to a file that is in a "project"? 如何跳转到“项目”中的文件? ie that is a file within the root folder or sub folders? 即根文件夹或子文件夹中的文件?

An alternative solution, that I personally prefer, is to: 我个人更喜欢的另一种解决方案是:

Assumptions: 假设:

  • Your desired folder with the project sits at: 项目所需的文件夹位于:

    /Users/username/projects/example/ /用户/用户名/项目/示例/

Solution 1: 解决方案1:

  1. Open a new console window or console tab. 打开新的控制台窗口或控制台选项卡。
  2. Navigate inside your project folder by typing: 键入以下内容在项目文件夹中导航:

    cd /Users/username/projects/example/ cd / Users / username / projects / example /

  3. Open the current folder as Textmate project with file explorer by typing: 通过键入以下命令,将当前文件夹作为带文件资源管理器的Textmate项目

    mate . 伙伴。

Solution 2: 解决方案2:

  1. Open a new console window or console tab. 打开新的控制台窗口或控制台选项卡。
  2. Open your project within Textmate with file explorer by typing: 通过键入以下内容,在Textmate中使用文件浏览器打开项目:

    mate /Users/username/projects/example/ mate / Users / username / projects / example /

Explanation 说明

The 'mate' command starts up your Textmate editor from the command line. 'mate'命令从命令行启动Textmate编辑器。 You can pass a path argument to the 'mate' command, which does not have to be a file, but can also be a folder. 您可以将路径参数传递给'mate'命令,该命令不必是文件,也可以是文件夹。 Once you pass in a folder as an argument, Textmate will open up in project mode and therefore displays a file browser window. 将文件夹作为参数传入后,Textmate将以项目模式打开,从而显示文件浏览器窗口。

One way is to create a new project in Textmate using the New Project menu item (from the File menu) then add files and folders to the project using the buttons at the bottom of the project pane. 一种方法是使用New Project菜单项(从File菜单)在Textmate创建一个新项目,然后使用项目窗格底部的按钮将文件和文件夹添加到项目中。 Save the project with the Save Project menu item. 使用“ Save Project菜单项Save Project You can then re-open the project later by either double-clicking on the project file in the Finder or opening inside of Textmate . 然后,您可以通过双击Finder中的项目文件或打开Textmate内部来重新打开项目。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM