All Projects → adambullmer → Sublime_docblockr_python

adambullmer / Sublime_docblockr_python

Licence: mit
Sublime Text DocBlockr for python. Simplifies writing docstring comments in Python.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Sublime docblockr python

Coffeescript Sublime Plugin
Syntax highlighting and checking, commands, shortcuts, snippets, compilation and more.
Stars: ✭ 296 (+385.25%)
Mutual labels:  sublime-text-3
Dotfiles
i3 + Plasma: using the i3 window manager on the top of KDE Plasma and other dotfiles, configurations, scripts, workarounds and practises from my Debian Sid machines.
Stars: ✭ 651 (+967.21%)
Mutual labels:  sublime-text-3
Hayaku
Fuzzy abbreviations, support for preprocessors (Sass, Less, Stylus) and a lot of other features in easily configurable set of tools for writing CSS faster
Stars: ✭ 973 (+1495.08%)
Mutual labels:  sublime-text-3
Javascript Completions
JavaScript Completions for sublime text. It helps you to write your scripts more quickly with hints and completions.
Stars: ✭ 341 (+459.02%)
Mutual labels:  sublime-text-3
Easyclangcomplete
💥 Robust C/C++ code completion for Sublime Text 3
Stars: ✭ 537 (+780.33%)
Mutual labels:  sublime-text-3
Seti st3
Seti_UI Port for ST3.
Stars: ✭ 773 (+1167.21%)
Mutual labels:  sublime-text-3
CMakeBuilder
Configure, build and test a CMake project right from within Sublime Text 3.
Stars: ✭ 27 (-55.74%)
Mutual labels:  sublime-text-3
Sublime packages
✍️ SublimeText Pageages Backups For Front-End Developer
Stars: ✭ 41 (-32.79%)
Mutual labels:  sublime-text-3
Javascriptenhancements
JavaScript Enhancements is a plugin for Sublime Text 3. It offers not only a smart javascript autocomplete but also a lot of features about creating, developing and managing javascript projects (real-time errors, code refactoring, etc.).
Stars: ✭ 592 (+870.49%)
Mutual labels:  sublime-text-3
Sublime Thinkphp
thinkphp 的 sublime 快速补全插件
Stars: ✭ 9 (-85.25%)
Mutual labels:  sublime-text-3
Chromerepl
A Sublime Text plugin to execute JavaScript in Google Chrome
Stars: ✭ 347 (+468.85%)
Mutual labels:  sublime-text-3
Sublime zk
A SublimeText3 package featuring ID based wiki style links, and #tags, intended for zettelkasten method users. Loaded with tons of features like inline image display, sophisticated tag search, note transclusion features, support for note templates, bibliography support, support for multiple panes, etc. to make working in your Zettelkasten a joy 😄.
Stars: ✭ 408 (+568.85%)
Mutual labels:  sublime-text-3
Sublimephpcompanion
A Sublime Text 3 plugin that provides cool stuff for PHP 5.3+ coding session.
Stars: ✭ 905 (+1383.61%)
Mutual labels:  sublime-text-3
Solarized
Solarized color scheme for Sublime Text 3
Stars: ✭ 314 (+414.75%)
Mutual labels:  sublime-text-3
St3 Binaryplist
Automatically converts binary property lists to XML when opened and writes them back out to binary when saved.
Stars: ✭ 35 (-42.62%)
Mutual labels:  sublime-text-3
Markdowntoc
SublimeText3 plugin which generate a table of contents (TOC) in a markdown document.
Stars: ✭ 278 (+355.74%)
Mutual labels:  sublime-text-3
Public
Repository for wallaby.js questions and issues
Stars: ✭ 662 (+985.25%)
Mutual labels:  sublime-text-3
Languagetool Sublime
Proof-reading and grammar checker for English, French, German, Polish and 20+ other languages
Stars: ✭ 55 (-9.84%)
Mutual labels:  sublime-text-3
Code Faster
Sublime Text plugin for programming contests - loads codeforces problems right into your text editor with a single button.
Stars: ✭ 38 (-37.7%)
Mutual labels:  sublime-text-3
Sublimeallautocomplete
Extend Sublime autocompletion to find matches in all open files of the current window
Stars: ✭ 906 (+1385.25%)
Mutual labels:  sublime-text-3

DocBlockr for Python

codecov

Based off the DocBlockr project, This extension provides the similar funtionality but for python docstrings. The default formatter for this plugin is designed around PEP-257 compliance but with more verbosity: Added variable types, listing class extensions, and listing decorators. The main goal of this project is to help developer provide better documentation by giving easy and consistent formatting.

Installation

Package Control Now you can install it with package control!

  1. Open your command pallete and type Package Control: Install Package.
  2. Find this project DocBlockr Python and press Enter.

Manually Download the release and put it in your installed packages directory yourself

  1. Go to the Latest Release and download the docblockr_python.sublime-package file.
  2. Move this file to your Installed Packages directory. (Preferences > Browse Packages... and go up one directory to see Installed Packages)
  3. If you are updating your existing install, a restart of Sublime Text will be in order.

Usage

There isn't a command pallete command to start this plugin, it is triggerg by hitting enter or tab after opening a docstring (""") at the module, class, or function level. If you wanted to simply put a new line after opening a docstring and not trigger the formatter, just hold ctrl and press enter.

Default and User Settings

You can configure which docstring format to use by updating your user settings for this package. (Preferences > Package Settings > DocBlockr Python > Settings (User)) For a full list of settings with documentation on what they affect, look at the Settings (Default) file.

Project Settings

You can also override your user settings on a per project basis by editing your project file. Any setting will be available for overriding here.

{
	"DocblockrPython": {
		"formatter": "sphinx"
	},
	"folders": [
	  // ...
	]
}

Supported Docstring Styles

Extendability

If you don't like the formatting styles above, or want to make your own style to fit your use case, you can write your own formatter. All you will need to do is extend the Base formatter class and write your formatter functions. If you're not sure about it, you can take a look at any of the other formatters in the formatters source dir and see how they did it.

from DocBlockr_Python.formatters.base import Base


class MyFormatter(Base):
    # This will be used as your settings file value,
    # and how the formatter is registered in the registry
    name = 'my'

Note: The console should yell at you if you didn't write all the abstract methods. Be sure to read the docs on the Base formatter to make sure you understand all the caveats of each formatter function.

Local Development

Below are the instructions to work on this repo locally.

  1. Clone the repo.
  2. Uninstall the plugin from sublime text.
  3. Symlink the github repo into your sublime text packages directory.
    • Debian example:
ln -s <absolute/path/to/github/repo/sublime_docblockr_python> $HOME/.config/sublime-text-3/Packages/Docblockr_Python
  1. There are no runtime dependencies
  2. Pay attention to the sublime console ctrl + `

Testing Changes

In addition to the setup instructions above, testing will require additinoal setup.

System Requirements:

Setup:

  1. Install depedencies through pipenv pipenv install --dev
  2. Run unit tests pipenv run tox

Known Issues

  • Only detects closed docstring if it is on a line of the same indentation, and has no text in front of it. Single Line docstrings are converted to block
  • The tests run in python 3.4.3, however sublime's python version is 3.3.6. This is due to the difficulty of getting a working version of 3.3.6 in a dev environment, and the differences should be minimal.

Roadmap

Things I want to do wtih this project. Not necessarily an exhaustive or prioritized list.

  • Unit Tests!
    • Needs a test harness of some sort for sublime internals.
  • CI, probably circleci
  • Coverage reporting
  • More completions!
  • Javadoc style formatter
  • Keyboard Shortcuts
  • Reparsing Docstring (switch templating style)
  • Command Pallete Commands for changing syntax
  • Dynamic completions based on chosen syntax
  • Integration back with the original DocBlockr
  • Better Syntax Highlighting within docstrings (in particular for other styles)
  • Examples of each style to completion
  • Documentation (isn't it ironic?)
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].