Code Monkey home page Code Monkey logo

github-markdown.tmbundle's Introduction

GitHub-Markdown.tmbundle

Provides some GitHub Flavoured Markdown extensions for TextMate to make working with GitHub Flavoured Markdown nicer.

Features

  • Add a new "Preview" command (overriding the existing Markdown preview) using Redcarpet to render GitHub Flavoured Markdown
  • Support triple-backtick raw blocks and support syntax highlighting for various languages (others can be added trivially). There’s also a tab trigger for inserting raw blocks: Just type a single backtick (`) and then hit the tab key.
  • Support and highlight GitHub Flavoured Markdown strikethroughs, tables, references, checkboxes and italics

You can also use nicer fonts by installing the GitHub Flavoured Markdown Font Settings bundle.

Installation

Check "Markdown (GitHub)" in TextMate 2's Preferences' Bundles.

Alternatively:

mkdir -p ~/Library/Application\ Support/TextMate/Bundles
cd ~/Library/Application\ Support/TextMate/Bundles
git clone https://github.com/mikemcquaid/GitHub-Markdown.tmbundle

Status

The above features are tested and working for my day-to-day.

Tested using TextMate 2. May work in TextMate 1 or Sublime Text; I've no idea.

Patches welcome.

Maintainers

Currently maintained by @noniq, originally created and maintained by @MikeMcQuaid

License

GitHub-Markdown.tmbundle is licensed under the MIT License. The full license text is available in LICENSE.txt.

github-markdown.tmbundle's People

Contributors

infininight avatar mikemcquaid avatar noniq avatar orta avatar sanssecours avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

github-markdown.tmbundle's Issues

Avoid code symbols showing up in "Jump to Symbols" HuD

I like to use the "Jump to Symbols" HuD to navigate the TOC of my Markdown docs. However, I realised that for certain code blocks (e.g. YAML) the symbols do actually pollute the symbol listing of the "Jump to Symbols" HuD. I am not sure if this can be controlled via this bundle or if this is actually something that has to be addressed within TextMate itself.
image

Not working for me

When I invoke Bundles>MarkDown (GitHub) Preview, I get (copied from the window)

Markdown (GitHub) Preview
README.md
Theme:  
Please install the Redcarpet and Pygments.rb RubyGems by running the following:

/usr/bin/gem install --user redcarpet pygments.rb
Ignoring bcrypt-3.1.7 because its extensions are not built. Try: gem pristine bcrypt --version 3.1.7 Ignoring binding_of_caller-0.7.3.pre1 because its extensions are not built. Try: gem pristine binding_of_caller --version 0.7.3.pre1 Ignoring binding_of_caller-0.7.2 because its extensions are not built. Try: gem pristine binding_of_caller --version 0.7.2 Ignoring byebug-8.1.0 because its extensions are not built. Try: gem pristine byebug --version 8.1.0 Ignoring byebug-8.0.1 because its extensions are not built. Try: gem pristine byebug --version 8.0.1 Ignoring byebug-6.0.2 because its extensions are not built. Try: gem pristine byebug --version 6.0.2 Ignoring byebug-3.4.0 because its extensions are not built. Try: gem pristine byebug --version 3.4.0 Ignoring debug_inspector-0.0.2 because its extensions are not built. Try: gem pristine debug_inspector --version 0.0.2 Ignoring gdal-1.0.0 because its extensions are not built. Try: gem pristine gdal --version 1.0.0 Ignoring nokogiri-1.6.7.2 because its extensions are not built. Try: gem pristine nokogiri --version 1.6.7.2 Ignoring nokogiri-1.6.7.1 because its extensions are not built. Try: gem pristine nokogiri --version 1.6.7.1 Ignoring nokogiri-1.6.6.2 because its extensions are not built. Try: gem pristine nokogiri --version 1.6.6.2 Ignoring pg-0.18.4 because its extensions are not built. Try: gem pristine pg --version 0.18.4 Ignoring posix-spawn-0.3.11 because its extensions are not built. Try: gem pristine posix-spawn --version 0.3.11 Ignoring puma-2.15.3 because its extensions are not built. Try: gem pristine puma --version 2.15.3 Ignoring redcarpet-3.3.4 because its extensions are not built. Try: gem pristine redcarpet --version 3.3.4 Ignoring sqlite3-1.3.10 because its extensions are not built. Try: gem pristine sqlite3 --version 1.3.10 Ignoring sqlite3-1.3.9 because its extensions are not built. Try: gem pristine sqlite3 --version 1.3.9 Ignoring unf_ext-0.0.7.1 because its extensions are not built. Try: gem pristine unf_ext --version 0.0.7.1 Ignoring websocket-driver-0.6.3 because its extensions are not built. Try: gem pristine websocket-driver --version 0.6.3 Ignoring yajl-ruby-1.2.1 because its extensions are not built. Try: gem pristine yajl-ruby --version 1.2.1$

So I tried
$ /usr/bin/gem install --user redcarpet pygments.rb
dyld: lazy symbol binding failed: Symbol not found: _rb_ary_new_from_values
Referenced from: /Users/gscar/.gem/ruby/2.4.0/gems/psych-2.2.4/lib/psych.bundle
Expected in: flat namespace

dyld: Symbol not found: _rb_ary_new_from_values
  Referenced from: /Users/gscar/.gem/ruby/2.4.0/gems/psych-2.2.4/lib/psych.bundle
  Expected in: flat namespace

Abort trap: 6
$ gem install --user redcarpet pygments.rb
Building native extensions.  This could take a while...
Successfully installed redcarpet-3.4.0
Successfully installed pygments.rb-1.1.2
2 gems installed

Relaunched TextMate 2.0-rc.4 and have same problem. Also Cntl-Opt-Cmd-P doesn't work, but maybe that's my issue.

Thank you for the bundle. I might not bother to comment, but my main use of Markdown is for GitHub and when I go to select Markdown, I naturally select the (GitHub) version and get the error, then I have to redo with just Markdown. And I can't make the GitHub version leave my menu, even though it's not selected in the Preferences>Bundles.

Words containing two underscores break highlighting of rest of document

Screenshot:

bildschirmfoto 2017-04-27 um 14 46 06

Note that the following headline is not highlighted at all. It seem that this is caused by the markup.italic.markdown scope extending behind the second underscore.

Here’s how the same document looks like when I disable the GitHub-Markdown bundle:

bildschirmfoto 2017-04-27 um 14 49 27

I found https://github.com/MikeMcQuaid/GitHub-Markdown.tmbundle/blob/master/Syntaxes/Markdown%20(GitHub%20Italics).tmLanguage which seems to be the culprit, but I couldn’t figure out its purpose in the first place, so I’m not sure how to fix this.

Cannot generate preview with RVM

I have set my TM_RUBY variable set per https://rvm.io/integration/textmate and if I execute `rvm current` # => in a ruby document in Textmate I get ruby-2.2.3@global.

In my console:

$ rvm current
ruby-2.2.3@global

$ gem install redcarpet pygments.rb
Building native extensions.  This could take a while...
Successfully installed redcarpet-3.3.4
Successfully installed pygments.rb-0.6.3
2 gems installed

But when I then run "Show Preview" on a Markdown document in TextMate I get the following error in the output window:

Please install the Redcarpet and Pygments.rb RubyGems by running the following:

/usr/bin/gem install --user redcarpet pygments.rb

If I uninstall the GitHub-Markdown bundle the default Show Preview command works fine.

Screenshot of Error

Configure the font

How does one pick the font?

Like others, I'm no fan of Baskerville as the default header font. But I also don't care for Helvetica much. I'd prefer to just keep the mono-space font that I use elsewhere.

I saw a similar sentiment in the forums. Is there a way to configure it?

Add xml code block support

Could you add ```xml code block support? I’m not sure how to modify the source to generate the proper modified language grammar for a pull request. However, using the Edit Bundles menu, I was able to add the following to get the desired effect by using the other highlighting entries as examples and direction from this gist:

// Addition of xml code block to github markdown bundle via direct modification
// of generated language grammar.
{
    patterns= (
        // other existing entries...
        {
            name = 'markup.raw.block.xml';
            begin = '(^|\G)\s*([`~]{3,})\s*(xml)\s*$';
            end = '(^|\G)\s*(\2)\n?';
            beginCaptures = {
        		2 = { name = 'punctuation.definition.raw.begin.markdown'; };
        		3 = { name = 'storage.type.language.markdown'; };
            };
            endCaptures = { 2 = { name = 'punctuation.definition.raw.end.markdown'; }; };
            contentName = 'text.xml';
            patterns = ( { include = 'text.xml'; } );
        }
    );
}

Markdown (Github) not showing up in Syntax list

I might have messed up my configuration by adding and removing too many Bundles manually. But I'd still like to ask for a hint on why the syntax could not be showing up after installation:

screen shot 2016-10-20 at 16 39 49

I'm missing Markdown (Github). Any ideas? I have the same problem on two different machines so I suspect the problem is more related to my setup. But I'm out of ideas on where to look for next.

Thank you for your time, I'm glad you maintain this package so that it's in TextMate out-of-the-box.

Manual Installation in TextMate2

The manual installation in TextMate 2 does not longer work. The bundles are not located in
/Application Support/Avian/. Supposedly new bundles are located in /Application Support/TextMate/Pristine Copy/Bundles but that doesn't work either

Convert to HTML fail when header is only CJK characters

runing 2.0-beta.12.26

Header item will convert to H1-6 with id.
If the contents is only CJK chars, last quotation mark for id is short.

here is a sample.

# 第一階層

top level

## 第二階層

second level

## 第三階層

third level

Show Preview shots

screen shot 2016-10-26 10 19 05

output from Convert Document to HTML

<h1 id=">第一階層</h1>

<p>top level</p>

<h2 id=">第二階層</h2>

<p>second level</p>

<h2 id=">第三階層</h2>

<p>third level</p>

I expect this output.

<h1 id="">第一階層</h1>

<p>top level</p>

<h2 id="">第二階層</h2>

<p>second level</p>

<h2 id="">第三階層</h2>

<p>third level</p>

Feature: syntax highlight code fences

Thanks for the bundle. One nice feature of the markdown package for Atom is that it syntax highlights code fenced blocks appropriately. Is that possible in TextMate 2?

syntax

math inside

hi
I believe I've installed your Git version of markdown (thanks!).

I went "there" because I am stunned to discover that plain-ole markdown in TextMate seems to ignore mathematics, sort of. In particular if I type $A_b$ and then some blah...

it treats the latex subscript mark as em and so I get

$Ab and then some blah...

it of course renders like italic and escapes the second $.

I use mathjax.

So I hoped that your tool would fix that, since my understanding is that math is resident in the git version of markdown (kramdown?). But the same thing happens.

Any suggestions?

...sorry. Edited to note that I'm using TextMate 2.0-rc.4

thanks
Ray Brock

Some of the C syntax isn't picked up within code fences

Here's a screenshot of the following C code:

Screenshot 2020-09-04 at 14 50 05

Here's the same code within code fences in a Markdown file:

Screenshot 2020-09-04 at 14 50 39

As you can see the following things are different:

  • void isn't highlighted
  • Strings within the function body aren't highlighted
  • return 0 isn't highlighted either (although I forgot to include that in the screenshot)

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.