Corrected lines to be no longer than 78 characters

This commit is contained in:
Vincent Zee
2015-03-01 00:17:23 +01:00
parent 5aac29d245
commit 7e385158c7
24 changed files with 494 additions and 429 deletions
+49 -38
View File
@@ -29,31 +29,33 @@ following lines::
With these settings, newlines are inserted after 79 characters and indentation
is set to 4 spaces per tab. If you also use Vim for other languages, there is a
handy plugin called indent_, which handles indentation settings for Python source
files.
handy plugin called indent_, which handles indentation settings for Python
source files.
There is also a handy syntax plugin called syntax_ featuring some improvements over
the syntax file included in Vim 6.1.
There is also a handy syntax plugin called syntax_ featuring some improvements
over the syntax file included in Vim 6.1.
These plugins supply you with a basic environment for developing in Python.
To get the most out of Vim, you should continually check your code for syntax
errors and PEP8 compliance. Luckily PEP8_ and Pyflakes_ will do this for you.
If your Vim is compiled with :option:`+python` you can also utilize some very handy
plugins to do these checks from within the editor.
If your Vim is compiled with :option:`+python` you can also utilize some very
handy plugins to do these checks from within the editor.
For PEP8 checking, install the vim-pep8_ plugin, and for pyflakes you can
install vim-pyflakes_. Now you can map the functions ``Pep8()`` or ``Pyflakes()``
to any hotkey or action you want in Vim. Both plugins will display errors at
the bottom of the screen, and provide an easy way to jump to the corresponding
line. It's very handy to call these functions whenever you save a file. In
order to do this, add the following lines to your :file:`.vimrc`::
install vim-pyflakes_. Now you can map the functions ``Pep8()`` or
``Pyflakes()`` to any hotkey or action you want in Vim. Both plugins will
display errors at the bottom of the screen, and provide an easy way to jump to
the corresponding line. It's very handy to call these functions whenever you
save a file. In order to do this, add the following lines to your
:file:`.vimrc`::
autocmd BufWritePost *.py call Pyflakes()
autocmd BufWritePost *.py call Pep8()
If you are already using syntastic_, you can set it to run Pyflakes on write
and show errors and warnings in the quickfix window. An example configuration
to do that which also shows status and warning messages in the statusbar would be::
to do that which also shows status and warning messages in the statusbar would
be::
set statusline+=%#warningmsg#
set statusline+=%{SyntasticStatuslineFlag()}
@@ -112,8 +114,8 @@ TextMate
--------
`TextMate <http://macromates.com/>`_ brings Apple's approach to operating
systems into the world of text editors. By bridging UNIX underpinnings and GUI,
TextMate cherry-picks the best of both worlds to the benefit of expert
systems into the world of text editors. By bridging UNIX underpinnings and
GUI, TextMate cherry-picks the best of both worlds to the benefit of expert
scripters and novice users alike.
Sublime Text
@@ -124,18 +126,21 @@ Sublime Text
extraordinary features and amazing performance.
Sublime Text has excellent support for editing Python code and uses Python for
its plugin API. It also has a diverse variety of plugins, `some of which <https://github.com/SublimeLinter/SublimeLinter>`_
allow for in-editor PEP8 checking and code "linting".
its plugin API. It also has a diverse variety of plugins,
`some of which <https://github.com/SublimeLinter/SublimeLinter>`_ allow for
in-editor PEP8 checking and code "linting".
Atom
----
`Atom <https://atom.io/>`_ is a hackable text editor for the 21st century,
built on atom-shell, and based on everything we love about our favorite editors.
built on atom-shell, and based on everything we love about our favorite
editors.
Atom is web native (HTML, CSS, JS), focusing on modular design and easy plugin development.
It comes with native package control and plethora of packages. Recommended for Python
development is `Linter <https://github.com/AtomLinter/Linter>`_ combined with
Atom is web native (HTML, CSS, JS), focusing on modular design and easy plugin
development. It comes with native package control and plethora of packages.
Recommended for Python development is
`Linter <https://github.com/AtomLinter/Linter>`_ combined with
`linter-flake8 <https://github.com/AtomLinter/linter-flake8>`_.
@@ -147,9 +152,10 @@ PyCharm / IntelliJ IDEA
`PyCharm <http://www.jetbrains.com/pycharm/>`_ is developed by JetBrains, also
known for IntelliJ IDEA. Both share the same code base and most of PyCharm's
features can be brought to IntelliJ with the free `Python Plug-In <http://plugins.intellij.net/plugin/?id=631>`_.
There are two versions of PyCharm: Professional Edition (Free 30-day trial)
and Community Edition(Apache 2.0 License) with fewer features.
features can be brought to IntelliJ with the free
`Python Plug-In <http://plugins.intellij.net/plugin/?id=631>`_. There are two
versions of PyCharm: Professional Edition (Free 30-day trial) and Community
Edition(Apache 2.0 License) with fewer features.
Eclipse
@@ -172,9 +178,10 @@ Spyder
------
`Spyder <http://code.google.com/p/spyderlib/>`_ is an IDE specifically geared
toward working with scientific Python libraries (namely `Scipy <http://www.scipy.org/>`_).
It includes integration with pyflakes_, `pylint <http://www.logilab.org/857>`_
and `rope <http://rope.sourceforge.net/>`_.
toward working with scientific Python libraries (namely
`Scipy <http://www.scipy.org/>`_). It includes integration with pyflakes_,
`pylint <http://www.logilab.org/857>`_ and
`rope <http://rope.sourceforge.net/>`_.
Spyder is open-source (free), offers code completion, syntax highlighting,
a class and function browser, and object inspection.
@@ -195,11 +202,13 @@ NINJA-IDE
`NINJA-IDE <http://www.ninja-ide.org/>`_ (from the recursive acronym: "Ninja-IDE
Is Not Just Another IDE") is a cross-platform IDE, specially designed to build
Python applications, and runs on Linux/X11, Mac OS X and Windows desktop operating
systems. Installers for these platforms can be downloaded from the website.
Python applications, and runs on Linux/X11, Mac OS X and Windows desktop
operating systems. Installers for these platforms can be downloaded from the
website.
NINJA-IDE is open-source software (GPLv3 licence) and is developed in Python and
Qt. The source files can be downloaded from `GitHub <https://github.com/ninja-ide>`_.
NINJA-IDE is open-source software (GPLv3 licence) and is developed
in Python and Qt. The source files can be downloaded from
`GitHub <https://github.com/ninja-ide>`_.
Eric (The Eric Python IDE)
@@ -210,8 +219,8 @@ offering sourcecode autocompletion, syntax highlighting, support for version
control systems, python 3 support, integrated web browser, python shell,
integrated debugger and a flexible plug-in system. Written in python, it is
based on the Qt gui toolkit, integrating the Scintilla editor control. Eric
is an open-source software project (GPLv3 licence) with more than ten years of active
development.
is an open-source software project (GPLv3 licence) with more than ten years of
active development.
Interpreter Tools
@@ -221,15 +230,16 @@ Interpreter Tools
Virtual Environments
--------------------
A Virtual Environment is a tool to keep the dependencies required by different projects
in separate places, by creating virtual Python environments for them. It solves the
"Project X depends on version 1.x but, Project Y needs 4.x" dilemma, and keeps
your global site-packages directory clean and manageable.
A Virtual Environment is a tool to keep the dependencies required by different
projects in separate places, by creating virtual Python environments for them.
It solves the "Project X depends on version 1.x but, Project Y needs 4.x"
dilemma, and keeps your global site-packages directory clean and manageable.
For example, you can work on a project which requires Django 1.3 while also
maintaining a project which requires Django 1.0.
To start using and see more information: `Virtual Environments <http://github.com/kennethreitz/python-guide/blob/master/docs/dev/virtualenvs.rst>`_ docs.
To start using and see more information:
`Virtual Environments <http://github.com/kennethreitz/python-guide/blob/master/docs/dev/virtualenvs.rst>`_ docs.
Other Tools
:::::::::::
@@ -273,7 +283,8 @@ BPython
-------
`bpython <http://bpython-interpreter.org/>`_ is an alternative interface to the
Python interpreter for Unix-like operating systems. It has the following features:
Python interpreter for Unix-like operating systems. It has the following
features:
* In-line syntax highlighting.
* Readline-like autocomplete with suggestions displayed as you type.