TextMate

TextMate是macOS 10.9+的图形文本编辑器。(TextMate is a graphical text editor for macOS 10.9+)

Github星跟蹤圖

TextMate 将苹果对操作系统的做法带入了文本编辑器的世界。通过桥接UNIX基础和GUI,TextMate的精挑细选使专家脚本编写者和新手用户都受益。

亮点列表
  • 在项目中搜索和替换能力
  • 自动缩进常见操作,如粘贴文本
  • 括号和其他字符的自动配对
  • 剪贴板历史记录
  • 列选择和列输入
  • 从当前文档完成单词
  • CSS选择器一样精确的操作和设置范围
  • 声明性语言语法的优美混合和黑客
  • 用于处理多个文件的动态大纲
  • 使用Tab-able占位符展开触发词为代码块
  • 在处理项目时使用文件选项卡
  • 折叠代码块
  • 函数弹出供快速查看和导航
  • 用你最喜欢的脚本语言编写插件
  • 可录制宏,无需编程
  • 正则表达式搜索和替换(grep)
  • 从内部文档运行shell命令
  • 支持 Darcs, Perforce, SVK, and Subversion
  • 支持超过50种语言
  • 用最少的按键在项目文件之间切换
  • 主题化的语法高亮颜色
  • 视觉书签跳转到文件之间的地方
  • 作为(S)FTP程序的外部编辑器
  • 与Xcode一起工作,可以构建Xcode项目

概覽

名稱與所有者textmate/textmate
主編程語言Objective-C++
編程語言Objective-C (語言數: 12)
平台Mac
許可證GNU General Public License v3.0
發布數307
最新版本名稱v2.0.23 (發布於 2021-10-12 22:04:33)
第一版名稱v2.0-alpha.9284 (發布於 2012-08-19 20:35:02)
創建於2012-08-08 16:25:52
推送於2024-03-18 14:48:31
最后一次提交2021-10-12 21:39:21
星數14.2k
關注者數1k
派生數1.7k
提交數5.8k
已啟用問題?
問題數0
打開的問題數0
拉請求數90
打開的拉請求數11
關閉的拉請求數354
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?

TextMate

Download

You can download TextMate from here.

Feedback

You can use the TextMate mailing list or #textmate IRC channel on freenode.net for questions, comments, and bug reports.

You can also contact MacroMates.

Before you submit a bug report please read the writing bug reports instructions.

Screenshot

textmate

Building

Bootstrap

To bootstrap the build you need to run ./configure (in the root of the source tree). You can set a few (environment) variables read by this script that change the generated build file:

  • builddir — location of built files. Defaults to ~/build/TextMate.
  • identity — for Apple’s codesign. Defaults to ad-hoc signing, which does not use an identity at all.
  • boostdir — location of boost includes. By default it will search various locations including MacPorts and Homebrew.
  • sparsedir — location of sparsehash includes. By default it will search various locations including MacPorts and Homebrew.

In the simplest case (assuming Homebrew is installed) you would run:

brew install ragel boost multimarkdown hg ninja capnp google-sparsehash libressl
git clone --recursive https://github.com/textmate/textmate.git
cd textmate
./configure && ninja

If you're using MacPorts then instead run this line to install dependencies:

sudo port install ninja ragel boost multimarkdown mercurial sparsehash libressl

Unless you’re using Homebrew then Cap’n Proto must be manually installed. Feel free to submit a PR to update configure.

If port fails with a build error then likely you need to agree (system-wide) to Apple’s Xcode license:

sudo xcodebuild -license

Prerequisites

Building TextMate has the following dependencies:

In practice hg (mercurial) is only required for the SCM library’s tests so you can skip this dependency if you don’t mind a failing test.

If you want to avoid the libressl linker warnings about being built for different deployment target then run brew edit libressl and make the following change:

-    system "./configure", *args
+    system "env", "LDFLAGS=-mmacosx-version-min=10.8", "CFLAGS=-mmacosx-version-min=10.8", "./configure", *args

Afterward you must rebuild using: brew reinstall --build-from-source libressl

Building from within TextMate

You should install the Ninja bundle which can be installed via PreferencesBundles.

After this you can press ⌘B to build from within TextMate. In case you haven't already you also need to set up the PATH variable either in PreferencesVariables or ~/.tm_properties so it can find ninja and related tools; an example could be $PATH:/opt/local/bin.

The default target is TextMate/run. This will relaunch TextMate but when called from within TextMate, a dialog will appear before the current instance is killed. As there is full session restore, it is safe to relaunch even with unsaved changes.

If the current file is a test file then the target to build is changed to build the library to which the test belongs (this is done by setting TM_NINJA_TARGET in the .tm_properties file found in the root of the source tree).

Similarly, if the current file belongs to an application target (other than TextMate.app) then TM_NINJA_TARGET is set to build and run this application.

Build Targets

For the TextMate.app application there are two symbolic build targets:

ninja TextMate      # Build and sign TextMate
ninja TextMate/run  # Build, sign, and (re)launch TextMate

To clean everything run:

ninja -t clean

Legal

The source for TextMate is released under the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

TextMate is a trademark of Allan Odgaard.

去到頂部