summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorDaniele Procida <daniele@vurt.org>2015-10-25 19:12:27 +0000
committerDaniele Procida <daniele@vurt.org>2015-10-25 19:12:27 +0000
commitfc07aa766325535e0d206f24dbea44c36508408d (patch)
tree920cea021c9cd7afc1c89f916b7830509c4168cb /doc
parent46f9405b39883a29d977ff28ea280700b7aecdbe (diff)
downloadpylint-fc07aa766325535e0d206f24dbea44c36508408d.tar.gz
Added notes on integration with TextMate
Diffstat (limited to 'doc')
-rw-r--r--doc/ide-integration.rst68
1 files changed, 63 insertions, 5 deletions
diff --git a/doc/ide-integration.rst b/doc/ide-integration.rst
index 30b48e5..ed0c1be 100644
--- a/doc/ide-integration.rst
+++ b/doc/ide-integration.rst
@@ -1,7 +1,7 @@
-=================
- IDE integration
-=================
+============================
+ Editor and IDE integration
+============================
To use Pylint with:
@@ -12,6 +12,7 @@ To use Pylint with:
- gedit_, see https://launchpad.net/gedit-pylint-2 or https://wiki.gnome.org/Apps/Gedit/PylintPlugin,
- WingIDE_, see http://www.wingware.com/doc/edit/pylint,
- PyCharm_, see http://blog.saturnlaboratories.co.za/archive/2012/09/10/running-pylint-pycharm.
+ - TextMate_,
Pylint is integrated in:
@@ -30,6 +31,7 @@ Pylint is integrated in:
.. _WingIDE: http://www.wingware.com/
.. _spyder: http://code.google.com/p/spyderlib/
.. _PyCharm: http://www.jetbrains.com/pycharm/
+.. _TextMate: http://macromates.com
Using Pylint thru flymake in Emacs
==================================
@@ -53,8 +55,8 @@ To enable flymake for Python, insert the following into your .emacs:
;; Set as a minor mode for Python
(add-hook 'python-mode-hook '(lambda () (flymake-mode)))
-Above stuff is in pylint/elisp/pylint-flymake.el, which should be automatically
-installed on Debian systems, in which cases you don't have to put it in your .emacs file.
+Above stuff is in ``pylint/elisp/pylint-flymake.el``, which should be automatically
+installed on Debian systems, in which cases you don't have to put it in your ``.emacs`` file.
Other things you may find useful to set:
@@ -108,3 +110,59 @@ Setup the MS Visual Studio .NET 2003 editor to call Pylint
.. image:: _static/vs2003_config.jpeg
The output of Pylint is then shown in the "Output" pane of the editor.
+
+
+.. _pylint_in_textmate:
+
+Integrate Pylint with TextMate
+==============================
+
+Install Pylint in the usual way::
+
+ pip install pylint
+
+Install the `Python bundle for TextMate <https://github.com/textmate/python.tmbundle>`_:
+
+#. select *TextMate* > *Preferences*
+#. select the *Bundles* tab
+#. find and tick the *Python* bundle in the list
+
+You should now see it in *Bundles* > *Python*.
+
+In *Preferences*, select the *Variables* tab. If a ``TM_PYCHECKER`` variable is not already listed, add
+it, with the value ``pylint``.
+
+The default keyboard shortcut to run the syntax checker is *Control-Shift-V* - open a ``.py`` file
+in Textmate, and try it.
+
+You should see the output in a new window:
+
+ PyCheckMate 1.2 – Pylint 1.4.4
+
+ No config file found, using default configuration
+
+Then all is well, and most likely Pylint will have expressed some opinions about your Python code
+(or will exit with ``0`` if your code already conforms to its expectations).
+
+If you receive a message:
+
+ Please install PyChecker, PyFlakes, Pylint, PEP 8 or flake8 for more extensive code checking.
+
+That means that Pylint wasn't found, which is likely an issue with command paths - TextMate needs
+be looking for Pylint on the right paths.
+
+Check where Pylint has been installed, using ``which``::
+
+ $ which pylint
+ /usr/local/bin/pylint
+
+The output will tell you where Pylint can be found; in this case, in ``/usr/local/bin``.
+
+#. select *TextMate* > *Preferences*
+#. select the *Variables* tab
+#. find and check that a ``PATH`` variable exists, and that it contains the appropriate path (if
+ the path to Pylint were ``/usr/local/bin/pylint`` as above, then the variable would need to
+ contain ``/usr/local/bin``). An actual example in this case might be
+ ``$PATH:/opt/local/bin:/usr/local/bin:/usr/texbin``, which includes other paths.
+
+... and try running Pylint again.