Convert Figma logo to code with AI

sublimehq logoPackages

Syntax highlighting files shipped with Sublime Text and Sublime Merge

2,951
588
2,951
228

Top Related Projects

162,288

Visual Studio Code

60,150

:atom: The hackable text editor

14,224

TextMate is a graphical text editor for macOS 10.12 or later

36,358

The official Vim repository

4,412

Mirror of GNU Emacs

9,432

Open source Markdown editor for macOS.

Quick Overview

The sublimehq/Packages repository is a collection of syntax definitions, color schemes, and other resources for Sublime Text, a popular text editor. It provides support for various programming languages, markup formats, and configuration files, enhancing the editing experience for Sublime Text users.

Pros

  • Extensive language support, covering a wide range of programming languages and file formats
  • Regular updates and contributions from the community, ensuring up-to-date syntax highlighting and features
  • Easy integration with Sublime Text, improving the editor's functionality out of the box
  • Well-organized structure, making it easy to find and modify specific language support files

Cons

  • Limited to Sublime Text, not directly usable with other text editors or IDEs
  • Some less common languages or file formats may have incomplete or outdated support
  • Requires manual updates or package manager intervention to get the latest changes
  • Customization can be complex for users unfamiliar with the syntax definition format

Getting Started

To use the sublimehq/Packages repository with Sublime Text:

  1. Install Sublime Text from the official website (https://www.sublimetext.com/).
  2. Open Sublime Text and go to "Preferences" > "Browse Packages".
  3. Clone the repository into the Packages directory:
    git clone https://github.com/sublimehq/Packages.git
    
  4. Restart Sublime Text to apply the changes.

Alternatively, you can use Package Control:

  1. Install Package Control if not already installed.
  2. Open the Command Palette (Ctrl+Shift+P on Windows/Linux, Cmd+Shift+P on macOS).
  3. Type "Package Control: Install Package" and press Enter.
  4. Search for "Default Language Packages" and install it.

Note: Sublime Text typically comes with these packages pre-installed, so manual installation is usually unnecessary unless you want to contribute or customize the packages.

Competitor Comparisons

162,288

Visual Studio Code

Pros of VS Code

  • Larger and more active community, resulting in frequent updates and extensive plugin ecosystem
  • Built-in features like integrated terminal, Git integration, and debugging tools
  • Cross-platform support with consistent experience across Windows, macOS, and Linux

Cons of VS Code

  • Heavier resource usage, potentially slower startup times on older hardware
  • Steeper learning curve for customization due to more complex configuration options
  • Some users may find the interface cluttered compared to Sublime Text's minimalist approach

Code Comparison

VS Code (settings.json):

{
  "editor.fontSize": 14,
  "editor.wordWrap": "on",
  "files.autoSave": "afterDelay",
  "workbench.colorTheme": "Monokai"
}

Packages (Preferences.sublime-settings):

{
  "font_size": 14,
  "word_wrap": true,
  "save_on_focus_lost": true,
  "color_scheme": "Packages/Color Scheme - Default/Monokai.sublime-color-scheme"
}

Both editors allow for extensive customization through JSON configuration files, but VS Code's settings tend to be more verbose and granular compared to Sublime Text's more concise approach.

60,150

:atom: The hackable text editor

Pros of Atom

  • Open-source and highly customizable with a large ecosystem of packages
  • Built-in package manager for easy installation and updates
  • Active community with frequent updates and contributions

Cons of Atom

  • Slower performance, especially with large files or projects
  • Higher memory usage compared to lightweight editors
  • Discontinued development by GitHub (as of December 2022)

Code Comparison

Atom (JavaScript):

atom.commands.add('atom-workspace', {
  'custom:command': () => {
    console.log('Custom command executed');
  }
});

Packages (JSON):

{
  "name": "Custom Package",
  "commands": [
    {
      "caption": "Custom: Command",
      "command": "custom_command"
    }
  ]
}

The code snippets demonstrate the different approaches to defining custom commands in Atom and Sublime Text (via Packages). Atom uses JavaScript and its API for command creation, while Sublime Text relies on JSON configuration files.

Atom offers a more programmatic approach with its JavaScript-based ecosystem, allowing for complex package development. Packages, on the other hand, provides a simpler, declarative method for extending Sublime Text functionality.

While Atom's approach offers more flexibility, Packages' method is more lightweight and easier to implement for basic functionality extensions.

14,224

TextMate is a graphical text editor for macOS 10.12 or later

Pros of TextMate

  • Open-source and community-driven development
  • Extensive customization options and powerful scripting capabilities
  • Native macOS application with seamless integration

Cons of TextMate

  • Limited cross-platform support (macOS only)
  • Less frequent updates compared to Packages
  • Steeper learning curve for advanced features

Code Comparison

TextMate (Ruby bundle example):

snippet do "do |variable| ... end" b
do ${1:|${2:variable}|}
	$0
end
endsnippet

Packages (Ruby package example):

{
  "name": "do",
  "content": "do ${1:|${2:variable}|}\n\t$0\nend"
}

Both repositories provide syntax highlighting and snippets for various programming languages. TextMate offers a more comprehensive development environment, while Packages focuses on providing language support for Sublime Text. TextMate's bundles are more complex and feature-rich, whereas Packages uses a simpler JSON-based format for defining snippets and syntax rules.

TextMate's repository includes the entire text editor's source code, making it suitable for those interested in contributing to the editor itself. Packages, on the other hand, is specifically designed for extending Sublime Text's language support and is more accessible for users looking to add or modify language-specific features.

36,358

The official Vim repository

Pros of vim

  • Highly customizable and extensible through Vim script and plugins
  • Lightweight and fast, suitable for use on remote servers or low-resource environments
  • Extensive keyboard shortcuts for efficient text editing without relying on a mouse

Cons of vim

  • Steeper learning curve, especially for users accustomed to graphical editors
  • Less intuitive interface for beginners, requiring time to master basic operations
  • Limited built-in GUI features compared to modern text editors

Code Comparison

vim:

" Example Vim configuration
set nocompatible
filetype plugin indent on
syntax enable
set number
set expandtab

Packages:

{
  "name": "Example Package",
  "scope": "source.example",
  "settings": {
    "lineNumbers": true,
    "tabSize": 2
  }
}

The vim code snippet shows a basic configuration in Vim script, while the Packages example demonstrates a JSON-based configuration for Sublime Text packages. Vim's configuration is more programmatic, allowing for complex logic and customization, whereas Packages uses a declarative approach for defining syntax and editor settings.

4,412

Mirror of GNU Emacs

Pros of Emacs

  • Highly extensible and customizable with Emacs Lisp
  • Comprehensive built-in functionality, including text editing, project management, and version control
  • Large and active community with extensive documentation and packages

Cons of Emacs

  • Steeper learning curve, especially for users new to Lisp-based customization
  • Slower startup time compared to lightweight editors
  • Less modern default UI, which may require additional configuration

Code Comparison

Emacs (Emacs Lisp):

(defun hello-world ()
  (interactive)
  (message "Hello, World!"))

Packages (JSON):

{
  "name": "Hello World",
  "scope": "source.example",
  "content": "Hello, World!"
}

Summary

Emacs is a powerful, extensible text editor with a rich ecosystem, while Packages focuses on providing syntax definitions and language support for Sublime Text. Emacs offers more built-in functionality and customization options but has a steeper learning curve. Packages, on the other hand, is more specialized and easier to use for Sublime Text users. The code comparison illustrates the different approaches: Emacs uses Lisp for defining functions, while Packages uses JSON for configuration.

9,432

Open source Markdown editor for macOS.

Pros of macdown

  • Specialized Markdown editor for macOS with live preview
  • User-friendly interface with customizable themes and syntax highlighting
  • Exports to various formats including PDF and HTML

Cons of macdown

  • Limited to macOS platform, not cross-platform like Sublime Text
  • Fewer language support options compared to Packages
  • Less extensive plugin ecosystem

Code Comparison

macdown (Objective-C):

- (void)viewDidLoad {
    [super viewDidLoad];
    self.markdownView.string = self.markdown;
    [self.markdownView setNeedsDisplay:YES];
}

Packages (JSON):

{
    "name": "Markdown",
    "scope": "text.html.markdown",
    "settings": {
        "foreground": "#FFFFFF"
    }
}

Summary

macdown is a dedicated Markdown editor for macOS with a focus on user-friendly features and live preview. Packages, on the other hand, is a collection of language support files for Sublime Text, offering broader language coverage and cross-platform compatibility. While macdown provides a more specialized Markdown editing experience, Packages offers greater flexibility for various programming languages and text formats within the Sublime Text ecosystem.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

Sublime Packages

Requirements

These packages are developed against the latest build of Sublime Text in the dev channel.

The latest release of Packages shipped with Sublime Text should be tagged via git in this repository, you can find a list at https://github.com/sublimehq/Packages/tags.

Bugs may exist on older builds, and the format used is not compatible with builds older than Build 4095.

Installation

To make changes to these packages and test them locally, fork this repository. Then symlink the changed packages into your Packages folder. (Replace Python in the following commands with the name of the syntax to install.)

OS X

$ git clone https://github.com/sublimehq/Packages.git
$ ln -s `pwd`/Packages/Python ~/Library/Application\ Support/Sublime\ Text\ 3/Packages/

Linux

$ git clone https://github.com/sublimehq/Packages.git
$ ln -s `pwd`/Packages/Python ~/.config/sublime-text-3/Packages/

Windows

On Windows, you can use directory junctions instead of symlinks (symlinks require administrative rights; directory junctions don't):

# Using PowerShell
PS> git clone https://github.com/sublimehq/Packages.git
PS> cmd /c mklink /J "$env:APPDATA/Sublime Text 3/Packages/Python" (convert-path ./Packages/Python)

Alternatively, download the portable version and clone this repository directly as a subdirectory of the Data folder.

⚠️ Things to keep in mind

After you've finished, keep in mind that you're now overriding a default package. If other people make upstream changes to an overridden package, yours will be out-of-date when Sublime Text updates to a new version. To get the latest version, pull the changes from this repository.

Reference

Please refer to the official documentation:

Pull Requests

Pull requests should:

  1. Start with the name of the package in square brackets, e.g. [XML].
  2. Be as small and self-contained as is reasonable. Smaller changes are quicker to review.
  3. Include a new (or enhanced) syntax test when changing a .sublime-syntax file.
  4. Have multiple syntax tests and a set of performance measurements (old vs. new) when making significant changes.

New Packages

Pull requests for new packages won't be accepted at this stage, as new packages can cause issues for users who have a package with the same name installed via Package Control. There are some planned changes that will address this in the future.

Complex plugins such as auto complete systems and linters should generally be in a stand-alone package, rather than included in the default set of packages.

Missing Packages

This repository only contains syntax-definition-focused packages. Notably, packages such as Default and Theme - Default are not included.