let g:syntastic_enable_highlighting = 1 "highlight errors and warnings
let g:syntastic_style_error_symbol = ">>" "error symbol
let g:syntastic_warning_symbol = ">>" "warning symbol
let g:syntastic_check_on_open = 1
let g:syntastic_auto_jump = 0 "do not jump to errors when detected
Then reload vim, run ``:Helptags``, and check out ``:help syntastic.txt``.
#. Open a new vim and run ``:PluginInstall`` to automatically install the
plugins. When the installation is done, close the installation "window" with ``:q``. From now on Vim will check for PEP8 errors and highlight them whenever a file is saved.
From now on, when you save into a Python file, a syntax check will be
run, and results will be displayed using Vim's `quickfix`_ mechanism
(more precisely, a location-list). A few useful commands are:
A few useful commands
"""""""""""""""""""""
* Open the list of errors: ``:lopen``, that can be abbreviated in ``:lop``
* To cross-reference other objects (e.g. reference other classes or methods) in the docstrings, use the
`cross-referencing objects <http://www.sphinx-doc.org/en/stable/domains.html#cross-referencing-python-objects>`_ syntax. ``:py`` can be omitted, see e.g. this `stackoverflow answer <http://stackoverflow.com/a/7754189>`_.
* See :ref:`metadocumentation`, for some information on how to generate the documentation.
Here is an example how to add docstring to a class.
...
...
@@ -889,19 +902,29 @@ Here is an example how to add docstring to a class.
import theano
class DoubleOp(theano.Op):
""" Double each element of a tensor.
"""
Double each element of a tensor.
Parameters
----------
x : tensor
Input tensor
:param x: input tensor.
Returns
-------
tensor
a tensor of the same shape and dtype as the input with all
values doubled.
:return: a tensor of the same shape and dtype as the input with all
values doubled.
Notes
-----
this is a test note
:note:
this is a test note
See Also
--------
:class:`~theano.tensor.elemwise.Elemwise` : You can use this to replace
this example. Just execute `x * 2` with x being a Theano variable.
:seealso:
You can use the elemwise op to replace this example.
Just execute `x * 2` with x being a Theano variable.