Skip to content

Instantly share code, notes, and snippets.

@robmccormack
Last active December 21, 2015 07:28
Show Gist options
  • Save robmccormack/6271245 to your computer and use it in GitHub Desktop.
Save robmccormack/6271245 to your computer and use it in GitHub Desktop.
Test for proofreading - Markdown language

#The Joy of Coding a Simple Plugin

Rob Smith on August 30, 2013 with 48 Commments

Tutorial Details

Program: Some programm
Version: 2.0
Difficulty: Beginner
Estimated Completion Time: 45 minutes

Icon by: http://www.aha-soft.com/

In this tutorial, I'll show you you a way to create a really simple plugin that is both a simple and amazing plugin. We'll cover theses basics:

  1. Plugin programming language (Python)
  2. Snippets
  3. Settings files

Coming from a Java-based editor, I'm impressed with the blinding speed of Sublime Text. Curiously, there is currently no enforced time limit for the evaluation. Once in a while, you'll get a message encouraging you to register, but the software continues to work perfectly.

The TOP 5 reasons to create your own plugin

  • With a basic knowledge, you can easily customize existing plugins to your needs
  • For small specific tasks, like the one you're about to learn, a larger plugin can be "too much" and get in your way
  • You may find that with just a few lines of code, you will create a plugin that you'll use every day
  • It's fun
  • It's fun!

Let's get crazy bullets:

  1. This is a list item with two paragraphs. Now is the time for all good ment to come to the aid of the party.

    This paragraph is part of bullet 1, since it is indented. Now is the time for all good ment to come to the aid of the party.

  2. And finally, this is last bullet in list.

TIPx

This is intended and an important tip.

Heading two

The above header should be an H2 tag. Now, for a list of fruits:

  • Red Appples
  • Purple Grapes
  • Green Kiwifruits from France.

Here is some programming code:

import sublime
import sublime_plugin
import datetime


class ToDoDateCommand(sublime_plugin.TextCommand):
    def run(self, edit):
        d = datetime.datetime.now().strftime("%d %b %Y (%a)")
        self.view.run_command("insert_snippet",
            {"contents": "TODO ${1:yourname} - ${2:note} @ " + d })
@Rob-McCormack
Copy link

test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment