cwahbong
0abfc3bece
Some refinements.
...
1. Add docstrings.
2. Re-implement get_deep_extends().
3. Remove all inners.
2014-08-01 14:32:47 +08:00
cwahbong
4784a9e126
Refactor: snippet dictionary does not keep the extend info now.
2014-08-01 14:32:47 +08:00
cwahbong
20f3832ffa
Code cleanup.
...
Full tested and does not break and old tests.
2014-08-01 14:32:47 +08:00
cwahbong
5c87806d7b
Implement priority-based clearsnippets.
2014-08-01 14:32:47 +08:00
Kevin Ballard
4b73864b74
Fix the docstring for ShellCodeToken
...
It's not vim-syntax-related, but it was bugging me.
2014-06-30 15:56:32 -07:00
Holger Rapp
ee1a2bb2b8
Escape '\\' in UltiSnipsEdit.
...
Fixes #308 .
2014-05-27 04:15:19 +02:00
Mathias Fussenegger
da5b124af5
add support for selection=old
2014-05-02 20:00:42 +02:00
Andrew Ruder
cae27fba5c
Ensure that _vim_{dec,enc} always succeeds on py3
...
In py2 we could get by with attempting to encode/decode a string and if
it failed just ignore and return. Unfortunately on py3 a string decodes
to a bytearray and a bytearray encodes to a string. We can't simply
return the original object when we fail. We choose replace for handling
bytes we don't understand.
Test case (using python3 for UltiSnips):
open a new file
:set encoding=utf-8
qa<Backspace>q
"ap
Warning: this test case makes it very difficult to exit vim cleanly and
save files!
Signed-off-by: Andrew Ruder <andrew.ruder@elecsyscorp.com>
2014-04-10 08:06:56 -05:00
Holger Rapp
a3e654fc54
_vimfiles -> vimfiles. Patch b Oberon.
2014-04-06 16:33:02 +02:00
skeept
ae70ec8956
Escape correctly file names in windows.
...
In windows when expanding snippets the names of the snippet files look weird because \ is not escaped properly.
Also I think there should be an option to show only part of the file name, say the path relative to ~/.vim, because this way most of the screen is taken with the paths of the file.
Going even further I think it would it look nicer if you had some kind of alignment for the string. Say "%2i: %-15s (%s)".
Of course this last suggestion might not be consensual, but maybe a option might be offered to the user.
2014-03-30 05:57:44 +00:00
Holger Rapp
4b4ee48858
Overwrite all snippets with lower priority on expansion.
...
Fixes #233 .
2014-03-23 17:30:44 +01:00
Holger Rapp
360f58dbf6
Show where snippets are defined in selection.
...
Fixes #184 .
2014-03-22 20:20:56 +01:00
Holger Rapp
7c34a3400b
Escape \ when asking for snippets.
...
Fixes #176 .
2014-03-22 19:53:01 +01:00
Holger Rapp
cd99bdd3b3
selection=old cannot work with UltiSnips.
...
Kind of fixes #173 .
2014-03-22 19:47:59 +01:00
Holger Rapp
69e0acd58a
Change the way placeholders are selected.
...
Fixes #157 .
2014-03-22 16:43:57 +01:00
Holger Rapp
5aaeae5e85
Do not delete child that is already gone.
...
Fixes #154
2014-03-22 11:28:44 +01:00
Holger Rapp
f40c3ac5e0
Made UltiSnipsEdit! more consistent with multiple filetypes.
2014-03-15 15:55:03 +01:00
Holger Rapp
5ac0436694
Retry unmapping when we switched buffers.
...
Fixes #229 .
2014-03-14 20:35:14 +01:00
Holger Rapp
c6906d85be
Fixed a bug in UltiSnipsEdit!
...
Closes #237
2014-03-07 10:51:04 +01:00
Holger Rapp
6398a598b5
Made UltiSnipsEdit more useful and consistent.
...
It now by default only edits private files, add a ! if you want to edit
non private files.
2014-03-06 09:10:48 +01:00
Holger Rapp
a800b51e0e
Removed no longer planned TODOs
2014-03-05 19:04:16 +01:00
Holger Rapp
147df653ae
Snippet sources can now be registered.
...
It was not clearly supported though possible before. Now there is a
tested and documented API.
2014-03-05 19:02:30 +01:00
Holger Rapp
c017806b1d
Added preliminary support for neocomplete.
...
Patch by lervag. Closes #228
2014-03-05 08:14:53 +01:00
Holger Rapp
c4fa2c03bd
Barf when using "snipmate" for UltiSnips.
...
Fixes #224
2014-02-26 20:40:01 +01:00
Holger Rapp
c690a36102
Empty lines do not end a snippet for snipMate.
2014-02-25 23:17:05 +01:00
Holger Rapp
14fca85231
Ups. Forgot to add this.
2014-02-25 23:01:58 +01:00
Holger Rapp
fe7cb4cf8d
Makes UltiSnips a drop in replacement for snipMate.
...
This includes massive refactorings and lots of new features.
2014-02-25 22:51:45 +01:00
Holger Rapp
6b8bb1b642
Launch and exit vim for each test.
...
This makes the testsuite slower, but avoids leaking state. Also the code
has to be less aware of being under test. It will also allow to to more
integration tests with other plugins that have support for UltiSnips or
that UltiSnips supports.
2014-02-22 09:26:03 +01:00
Holger Rapp
bb047c70ca
Fix priorities to work with partial matches.
...
Do not delete all lower priority snippets, only those that are defined
elsewhere too.
2014-02-19 22:09:22 +01:00
Holger Rapp
980891c3df
Dedent visual line selections before using them.
...
Fixes #217 .
2014-02-19 21:49:33 +01:00
Holger Rapp
fe2ab12c39
Removes UltiSnipsDontReverseSearchPath.
2014-02-19 21:22:01 +01:00
Holger Rapp
c1b41d0fbf
Adds 'priority' keyword and removes '!' option.
2014-02-19 21:04:52 +01:00
Holger Rapp
a949fc606e
Remove no longer needed loading of vim script from python.
2014-02-17 08:52:10 +01:00
Holger Rapp
ba772b0d14
after script maps Keys again. Needed some refactorings. This fixes supertab integration and closes #212 .
2014-02-17 08:15:04 +01:00
Holger Rapp
7ef866e1f4
Fix line numbers in python error warnings and make all.snippets work for lua too. Fixes #211 .
2014-02-17 07:36:48 +01:00
Holger Rapp
e7868dd4fb
Removed undocumented and untested g:UltiSnipsClearJumpTrigger.
2014-02-16 14:02:06 +01:00
Holger Rapp
b0cec2edbd
Removed a unnecessary property.
2014-02-15 23:56:39 +01:00
Holger Rapp
3c0cf360a2
Removed exe bit from all python files.
2014-02-15 23:44:36 +01:00
Holger Rapp
333f689762
Project is now hosted on github.
...
Removes all references to launchpad from the docs.
2014-02-15 13:16:12 +01:00
Holger Rapp
2e7e61edae
Some typos and a todo.
2014-02-15 10:48:46 +01:00
Holger Rapp
991609e461
Do not pass filename to UltiSnips#AddSnippet.
2014-02-15 09:37:40 +01:00
Holger Rapp
2eb82d127b
Moving towards Snippet providers.
...
Removed parsing responsibilities from SnippetManager and instead put
them into the new module providers. Renamed private methods on
SnippetManager that are not meant to be called by external libraries to
start with _. Refactored tests so that expected failures can be tested
and therefore removed the testing flag from SnippetManager.
2014-02-15 00:54:04 +01:00
Holger Rapp
635dc63722
Only use on dictionary in exec(). This works around wierd scoping for list comprehensions.
2014-02-14 19:28:29 +01:00
Holger Rapp
f4c6046a73
Fixed remaining test for python3 and added a shell code test using umlauts.
2014-02-14 09:35:48 +01:00
Holger Rapp
ccf44a61ff
Make iterators python 3 and 2 compatible.
2014-02-14 09:14:20 +01:00
Holger Rapp
b438af2653
Revert to the old way of making scratch buffers. Less flaky.
2014-02-14 08:29:07 +01:00
Holger Rapp
c137922918
Create UltiSnips.UltiSnips_Manager in all cases.
...
If a python module tried to load UltiSnips without the autoload file
being run first, UltiSnips_Manager was not defined. This broke YCM and
maybe others too. This fixes
https://github.com/Valloric/YouCompleteMe/issues/820 .
2014-02-13 21:24:58 +01:00
Holger Rapp
808cb08540
Fixed a bug in displaying error messages.
2014-02-13 21:24:16 +01:00
Holger Rapp
ad6e8ed21e
childs -> children.
2014-02-12 22:22:55 +01:00
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