Go to file
Andrew Ruder 78c390b026 all.snippets: bbox and box snippet Python 3 compatibility
I'm not much of a python pro, but it appears the correct
way to iterate is next(i) instead of i.next().  i.next() has
been renamed to i.__next__() on python3, but next(i) works on both.

Pasted below is the following test script ran through python
2.6, 2.7, and 3.3:
i = iter("1,2".split(","))
next(i)
i.next()
i.__next__()
next(i)

Python 2.6.8 (unknown, Jan 26 2013, 14:35:25)
[GCC 4.7.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> i = iter("1,2".split(","))
>>> next(i)
'1'
>>> i.next()
'2'
>>> i.__next__()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'listiterator' object has no attribute '__next__'
>>> next(i)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
StopIteration
>>>

Python 2.7.6 (default, Dec  6 2013, 20:05:37)
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> i = iter("1,2".split(","))
>>> next(i)
'1'
>>> i.next()
'2'
>>> i.__next__()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'listiterator' object has no attribute '__next__'
>>> next(i)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
StopIteration
>>>

Python 3.3.3 (default, Jan  2 2014, 19:09:02)
[GCC 4.8.2] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> i = iter("1,2".split(","))
>>> next(i)
'1'
>>> i.next()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'list_iterator' object has no attribute 'next'
>>> i.__next__()
'2'
>>> next(i)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
StopIteration
>>>

Signed-off-by: Andrew Ruder <andrew.ruder@elecsyscorp.com>
2014-02-05 11:40:07 -06:00
after/plugin Finally fixed #404819 2009-07-27 16:59:04 +02:00
doc Try hard to retain the unnamed register. Patch by Gernot Höflechner - LFDM. 2014-02-03 18:14:27 +01:00
ftdetect Implemented UltiSnipsAddFiletypes 2012-04-01 16:42:34 +02:00
ftplugin do not expand tabs in snippet files. 2013-06-10 18:34:38 +02:00
plugin Escapes the cached string 2014-01-31 16:55:42 +01:00
syntax Improvements to the syntax file. 2013-03-21 11:32:17 +01:00
UltiSnips all.snippets: bbox and box snippet Python 3 compatibility 2014-02-05 11:40:07 -06:00
utils Fixes and improvements to snipmate conversion util by Steve McKinney 2012-11-24 10:32:00 +01:00
.bzrignore Ignore .bzr-repo 2010-03-05 14:31:40 +01:00
.gitignore Fixed ignored list in .gitignore 2011-12-30 08:20:54 +01:00
ChangeLog Updated ChangeLog 2012-09-01 20:13:56 +02:00
COPYING.txt Added a license file. 2013-10-29 07:22:06 +01:00
README.rst Small fixes and new c-sharp (cs) snippets by Matthew Strawbridge. 2013-04-15 07:19:07 +02:00
test.py Adds a test for the new feature 2014-02-01 01:43:43 +01:00

UltiSnips
=========

This is the official repository for UltiSnips on GitHub. It is held in sync
with the official bzr repository over at Launchpad [1] and is meant as a
convenience for contributors. Send Pull request to this repository, not
the automatic clone from vim-scripts.

Note that we do not use the Issue tracker here on GitHub because the one on
Launchpad is superior and already has a significant history. Please report
`issues over there`_.

[1] http://launchpad.net/ultisnips

.. _issues over there: https://bugs.launchpad.net/ultisnips

Screencasts
-----------

The blog posts of the screencasts contain more advanced examples of the things
discussed in the video.

* `Episode 1: What are snippets and do I need them?`__
* `Episode 2: Creating Basic Snippets`__
* `Episode 3: What's new in version 2.0`__
* `Episode 4: Python Interpolation`__

__ http://www.sirver.net/blog/2011/12/30/first-episode-of-ultisnips-screencast/
__ http://www.sirver.net/blog/2012/01/08/second-episode-of-ultisnips-screencast/
__ http://www.sirver.net/blog/2012/02/05/third-episode-of-ultisnips-screencast/
__ http://www.sirver.net/blog/2012/03/31/fourth-episode-of-ultisnips-screencast/