Skip to content

kkangmj/markdown-code-block

Repository files navigation

Markdown Code Block

No more 6 backticks for creating code block in markdown.

Contents

Feature

Commands

Provides 19 commands. It'll soon support more commands.

  • Markdown Code Block: Generate empty code block

    generate empty code block gif
  • Markdown Code Block: Generate swift code block

    generate swift code block gif

Keyboard Shortcuts

Some of commands with keyboard shortcuts. You can customize your own keyboard shorcuts with commonly used command.

  • Markdown Code Block: Generate empty line code block

    generate empty line code block gif

    Alt + ' pressed

  • Markdown Code Block: Generate javascript code block

    generate javascript code block gif

    Alt + j pressed

Basic Usage

  1. Open command palette with Ctrl + Shift+P in Windows (Cmd + Shift+P in macOS)

  2. Type "Markdown Code Block"(or specific command) and check out commands you need!

    command palette

OR

  1. Use keyboard shortcuts or customize them with commands you often use.

Commands

  • Basic
    • Markdown Code Block: Generate empty line code block
    • Markdown Code Block: Generate empty code block
  • Language
    • Markdown Code Block: Generate python code block
    • Markdown Code Block: Generate javascript code block
    • Markdown Code Block: Generate java code block
    • Markdown Code Block: Generate c code block
    • Markdown Code Block: Generate c++ code block
    • Markdown Code Block: Generate c# code block
    • Markdown Code Block: Generate r code block
    • Markdown Code Block: Generate ruby code block
    • Markdown Code Block: Generate kotlin code block
    • Markdown Code Block: Generate swift code block
  • SQL
    • Markdown Code Block: Generate SQL code block
    • Markdown Code Block: Generate postgreSQL code block
  • Command-Line Shell
    • Markdown Code Block: Generate bash code block
    • Markdown Code Block: Generate powershell code block
  • Build Tool
    • Markdown Code Block: Generate gradle code block
  • Other
    • Markdown Code Block: Generate yaml code block
    • Markdown Code Block: Generate xml code block

Keyboard Shortcuts

Key Command
Alt + ' Generate empty line code block
Alt + p Generate python code block
Alt + j Generate javascript code block
Ctrl + Alt + j Generate java code block
Alt + k Generate kotlin code block
Ctrl +Alt + c Generate c# code block
Alt + r Generate ruby code block
Alt + b Generate bash code block

Custom Usage

  • Open keyboard shortcuts editor and change to your own keyboard shortcuts.

    keyboard shortcuts
    • File > Preferences > Keyboard Shortcuts in Windows (Code > Preferences > Keyboard Shortcuts on macOS)

Link

License

Copyright 2022 MinJu Kang

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.