Skip to content

Plugin for SublimeText3 for trimming long lines in Python code.

License

Notifications You must be signed in to change notification settings

FrCln/SublimeTrimmer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages