ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

Markdown Table Creator

by yusufb ALL

A Sublime Text plugin to create and reformat Markdown tables

Labels markdown

Details

Installs

  • Total 1K
  • Win 602
  • Mac 519
  • Linux 256
Nov 21 Nov 20 Nov 19 Nov 18 Nov 17 Nov 16 Nov 15 Nov 14 Nov 13 Nov 12 Nov 11 Nov 10 Nov 9 Nov 8 Nov 7 Nov 6 Nov 5 Nov 4 Nov 3 Nov 2 Nov 1 Oct 31 Oct 30 Oct 29 Oct 28 Oct 27 Oct 26 Oct 25 Oct 24 Oct 23 Oct 22 Oct 21 Oct 20 Oct 19 Oct 18 Oct 17 Oct 16 Oct 15 Oct 14 Oct 13 Oct 12 Oct 11 Oct 10 Oct 9 Oct 8 Oct 7
Windows 1 0 0 0 3 0 2 0 0 0 3 0 4 0 0 1 1 0 0 0 1 2 3 3 1 1 0 1 0 1 2 2 1 1 0 3 1 1 2 1 0 0 0 2 1 0
Mac 0 0 0 1 0 1 0 0 0 1 0 0 1 0 1 0 1 1 0 0 3 0 0 3 0 1 0 3 1 3 1 2 0 0 2 2 1 0 1 0 2 2 0 0 0 0
Linux 0 1 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 1 0 0 2 1 0 1 0 1 0 0 1 1 0 1 0 0 0 0 0 0 0 0 0 0 1 0 2

Readme

Source
raw.​githubusercontent.​com

Markdown Table Creator

Markdown Table Creator is a Sublime Text plugin that helps you create and reformat Markdown tables quickly.


Demo video:

https://user-images.githubusercontent.com/1588495/202923784-16f5d2a0-920d-4dbc-a58a-0a2861f8eceb.mov

Table of Contents

Installation

via Package Control

  1. Open the Command Palette (Tools > Command Palette)
  2. Search for Package Control: Install Package and select it
  3. Search for Markdown Table Creator and select it to install

https://packagecontrol.io/packages/Markdown%20Table%20Creator

Manual Installation

  1. Open Sublime Text package directory with Sublime Text > Preferences > Browse Packages....
  2. Copy the files to User directory.

Usage

Create Markdown table

  • Type 1+ header names, separated with | (or configured extra_header_separators)
  • Type content data, separated with | (or configured extra_content_separators) (optional)
  • Select the text you want to convert to Markdown table
  • Select Markdown Table Creator from Command Palette, or hit the defined key binding

Reformat Markdown table

  • Make any change in header/content data, alignment, or table structure
  • Select the Markdown table
  • Select Markdown Table Creator from Command Palette, or hit the defined key binding

Examples

▶ Only header information

Before

City|Country|Population

After

City Country Population

▶ If you defined \ as separator in extra_header_separators such as "extra_header_separators": "\\"

Before

City\Country\Population

After

City Country Population

▶ You can also enter the data alongside the header

Before

City\Country\Population
London|UK|8M
Istanbul|Turkey|12M

After

City Country Population
London UK 8M
Istanbul Turkey 12M

▶ You can define the column alignment by putting : to the header

Before

City (Default Left)|:Country (Centered):|Population (Right):
London|UK|8M
Istanbul|Turkey|12M

After

City (Default Left) Country (Centered) Population (Right)
London UK 8M
Istanbul Turkey 12M

Configuration

Keymap

You can add a keymap with Sublime Text > Preferences > Key Bindings

Example:

{ "keys": ["alt+shift+t"], "command": "markdown_table_creator" }

Customization

{

  // This will be used to align the column when alignment is not specified with ":"
  // Can be "left" / "right" / "center"
  "default_alignment": "left",

  // Each of the characters will be used to separate header line together with "|"
  "extra_header_separators": "",

  // Each of the characters will be used to separate content lines together with "|"
  "extra_content_separators": "",

  // Enabling debug_mode will print errors after the selected text  
  "debug_mode": false,

}