FrCln / SublimeTrimmer

Plugin for SublimeText3 for trimming long lines in Python code.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SublimeTrimmer

SublimeText3 Plugin for formatting long lines in Python code. Works with brackets expressions and docstrings.

Example

If there is such a line in some code, which is longer than 80 symbols required by PEP8:

    print(*fill(null_square(size), list(itertools.chain(*[x.variants(size) for x in polis])), size), sep='\n')

this plugin will format it like this:

    print(
        *fill(
            null_square(size),
            list(itertools.chain(*[x.variants(size) for x in polis])),
            size
        ),
        sep='\n'
    )

Installation

In Sublime Text go to Preferences -> Browse Packeges, create a directory and copy there files sublime_trimmer.py, utils.py and Default.sublime-keymap.

Usage

Put cursor on a line that is too long and press "ctrl-shift-l" (you can change hotkey by editing file Default.sublime-keymap)

About

Plugin for SublimeText3 for trimming long lines in Python code.

License:GNU General Public License v3.0


Languages

Language:Python 100.0%