Giter Club home page Giter Club logo

markdowntablecreator's Introduction

Markdown Table Creator

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


Demo video:

MarkdownTableCreator_demo.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,

}

markdowntablecreator's People

Contributors

yusufb avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

markdowntablecreator's Issues

Vertical table

Hello, I'd like to use tables that have the leftmost column as the 'header' and one or more right columns with data.

Here's an example:

Item1|Data
Item2|Data
Item3|Data

Formatted as:

I Item1 | | | Data
I Item2 | | | Data
I Item3 | | | Data

In this example, I'm using a vertical bar '|' to separate the items in the leftmost column from the data. It could be any character, a colon, for example.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.