Commit Graph

1068 Commits

Author SHA1 Message Date
Holger Rapp
82ca377aaf Moved the core of the plugin into autoload. This will not really impact loading times because UltiSnips is loaded on the first CursorMovedI command anyways, but it might fix some issues with --noplugin. 2014-02-11 07:56:56 +01:00
Holger Rapp
d0c4f31c1f Improved a comment. 2014-02-10 22:07:40 +01:00
Holger Rapp
7c9d0c0c71 Refactored retaining of unnamed register to be done in VimState. 2014-02-10 21:27:51 +01:00
Holger Rapp
888ce5dac5 Fix a bug in retaining the unnamed register. 2014-02-10 21:06:04 +01:00
Holger Rapp
da1ff4087b Only load snippet files when you need to. 2014-02-10 09:02:31 +01:00
Holger Rapp
f8a07ae8e3 Do not set a filetype in scratch buffers. 2014-02-10 08:57:05 +01:00
Holger Rapp
d0e7fa747f Do not set a filetype in scratch buffers. 2014-02-10 08:54:28 +01:00
Holger Rapp
2308687d1f Small bug fix. 2014-02-10 08:48:33 +01:00
Holger Rapp
f2a9a5eb8d Refactored how snippet files are parsed. 2014-02-10 08:40:37 +01:00
Holger Rapp
f6b197e18e Small bug fix. 2014-02-08 19:56:14 +01:00
Holger Rapp
72beeb28f4 Small documentation fixes. 2014-02-08 15:53:18 +01:00
Holger Rapp
773869b1e1 All linting done. Project is now lint warning free. 2014-02-08 15:52:06 +01:00
Holger Rapp
873b5b4ad4 More linting. 2014-02-08 14:53:12 +01:00
Holger Rapp
2b72c46935 More refactorings and linting. 2014-02-08 14:41:08 +01:00
Holger Rapp
c67a59f579 More linting and refactorings mainly in _transformation.py. 2014-02-08 14:23:16 +01:00
Holger Rapp
63021206cd More linting. 2014-02-08 12:07:17 +01:00
Holger Rapp
a669654466 More linting done. 2014-02-08 10:51:31 +01:00
Holger Rapp
4005608bab Follow the Vim 7.4 convention where to place python files. 2014-02-07 10:38:44 +01:00
Holger Rapp
c78a54b158 More linting. 2014-02-07 10:20:30 +01:00
Holger Rapp
bd132bc379 More linting warnings and a small bug fix. 2014-02-07 09:50:20 +01:00
Holger Rapp
2377a4405b More linting and some code simplifications. 2014-02-07 09:03:24 +01:00
Holger Rapp
4f7cec61ae More linter warnings down. 2014-02-07 08:50:38 +01:00
Holger Rapp
fefef4e39f More lint warnings gone and simplified some code. 2014-02-06 21:42:07 +01:00
Holger Rapp
dc00dd983d Added a preliminary pylintrc to the project.
and started to fix linting errors.
2014-02-05 23:20:53 +01:00
Holger Rapp
ec8bc5b1b5 util -> indent_util 2014-02-05 21:06:46 +01:00
Holger Rapp
47479ea802 Done with simplifying __init__.py. 2014-02-05 20:58:40 +01:00
Holger Rapp
3d4e408b32 Moved SnippetsFileParser into a file of its own. 2014-02-05 20:47:05 +01:00
Holger Rapp
975aca0c8e Moved SnippetDictionary into a file of its own. 2014-02-05 20:37:07 +01:00
Holger Rapp
03bb556799 Moved VisualContentPreserver into its own file. 2014-02-05 20:31:47 +01:00
Holger Rapp
98a676f8ac Moved some code from __init__.py into a file of its own. 2014-02-05 20:26:33 +01:00
Holger Rapp
a408ba5ce9 Whitespace cleanups. 2014-02-05 20:17:23 +01:00
Holger Rapp
daf778f59c Some minor refactorings. 2014-02-05 20:12:21 +01:00
Holger Rapp
69659023fb Merge pull request #136 from aeruder/master
all.snippets: bbox and box snippet Python 3 compatibility.
2014-02-05 19:24:19 +01:00
Holger Rapp
16c46616ad Be when to map Forward and Backwards Trigger
Only map Forward and Backwards jumping trigger while inside a snippet.
Patch by Marcelo D Montu (mMontu) with fixes by me.
2014-02-05 19:19:16 +01:00
Holger Rapp
ed2a0c517f Fixed remaining tests. 2014-02-05 19:13:34 +01:00
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
Holger Rapp
a7de815f47 Started fixing the tests that broke through the remapping change. 2014-02-05 17:45:45 +01:00
Holger Rapp
2cdaac1b1c Merge branch 'master' into mMontu-master 2014-02-05 17:21:33 +01:00
Holger Rapp
4adc048c16 Try hard to retain the unnamed register. Patch by Gernot Höflechner - LFDM. 2014-02-03 18:14:27 +01:00
Holger Rapp
3e03e38dbc Merge branch 'retaining_the_unnamed_register' of git://github.com/LFDM/ultisnips into LFDM-retaining_the_unnamed_register 2014-02-03 18:02:30 +01:00
Holger Rapp
dd3f5ea189 Merge pull request #135 from ivanbrennan/fix-rails-form_for
ruby: Replace 'INLINE' tags with 'EXPR' tags in form_for snippets.
2014-02-03 02:21:39 -08:00
ivanbrennan
9770ff46cd Replace 'INLINE' tags with 'EXPR' tags in form_for snippets.
Changed ERB tag-style from '<% %>' to '<%= %>' to be compatible
with Rails 3 and newer.
2014-02-01 14:19:45 -05:00
LFDM
f26a2ce830 Adds a test for the new feature 2014-02-01 01:43:43 +01:00
LFDM
60f1089d9d Escapes the cached string 2014-01-31 16:55:42 +01:00
LFDM
bf3bfdac9c Adds eventhandler to restore the unnamed register 2014-01-31 16:33:46 +01:00
LFDM
fee8a23d2d Retains the unnamed register during jumps 2014-01-31 16:33:38 +01:00
Holger Rapp
335663d3c1 Merge pull request #132 from vitalk/jsdoc-snippets
javascript: Add snippets to write JSDoc documentation
2014-01-26 22:15:54 -08:00
Holger Rapp
0d37b48feb Merge pull request #131 from slagtermaarten/master
Tex: Added figure, item, Non-indented paragraph and Long parenthesis. Also cleaned up the snippets file.
2014-01-26 21:29:12 -08:00
Maarten Slagter
2fca23830b Added bunch of snippets to tex.snippets 2014-01-25 10:41:03 +01:00
Vital Kudzelka
b11a021397 Add snippet for the @version tag 2014-01-24 14:49:24 +03:00