Skip to content

Instantly share code, notes, and snippets.

@SmileyChris
SmileyChris / install.rst
Last active November 19, 2019 18:56
Better wrapping of docstring text with Sublime Text 2. Run: patch ~/.config/sublime-text-2/Packages/Default/paragraph.py < paragraph.diff

To install in Sublime Text 3, you'll need to extract the py file from the default package before patching it.

Here are short instructions to do it in Linux. First change to the directory that you have sublime text, unzip the file, and patch it:

cd /opt/sublime_text
unzip Packages/Default.sublime-package paragraph.py -d ~/.config/sublime-text-3/Packages/default
curl https://gist.githubusercontent.com/SmileyChris/4340807/raw/paragraph.diff | patch ~/.config/sublime-text-3/Packages/default/paragraph.py

Or if you've downloaded the diff, you can just patch it from that rather than `curl`ing:

from django import template
from django.utils.safestring import mark_safe
import ttag
register = template.Library()
class Render(ttag.helpers.AsTag):
"""
A block tag that renders its contents to a context variable.