Adding new stuff
This commit is contained in:
parent
131691e143
commit
6c0a9f5b29
718 changed files with 0 additions and 0 deletions
37
vim-plugins/python-mode/pymode/__init__.py
Normal file
37
vim-plugins/python-mode/pymode/__init__.py
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
""" Pymode support functions. """
|
||||
|
||||
from __future__ import absolute_import
|
||||
|
||||
import sys
|
||||
import vim # noqa
|
||||
|
||||
|
||||
def auto():
|
||||
""" Fix PEP8 erorrs in current buffer. """
|
||||
from .autopep8 import fix_file
|
||||
|
||||
class Options(object):
|
||||
aggressive = 2
|
||||
diff = False
|
||||
experimental = True
|
||||
ignore = vim.eval('g:pymode_lint_ignore')
|
||||
in_place = True
|
||||
indent_size = int(vim.eval('&tabstop'))
|
||||
line_range = None
|
||||
max_line_length = int(vim.eval('g:pymode_options_max_line_length'))
|
||||
pep8_passes = 100
|
||||
recursive = False
|
||||
select = vim.eval('g:pymode_lint_select')
|
||||
verbose = 0
|
||||
|
||||
fix_file(vim.current.buffer.name, Options)
|
||||
|
||||
|
||||
def get_documentation():
|
||||
""" Search documentation and append to current buffer. """
|
||||
from ._compat import StringIO
|
||||
|
||||
sys.stdout, _ = StringIO(), sys.stdout
|
||||
help(vim.eval('a:word'))
|
||||
sys.stdout, out = _, sys.stdout.getvalue()
|
||||
vim.current.buffer.append(str(out).splitlines(), 0)
|
||||
Loading…
Add table
Add a link
Reference in a new issue