rygwdn@gmail.com
53f3df59db
added ability to skip tests depending on platform
2011-02-28 22:41:04 -04:00
rygwdn@gmail.com
45bad8667c
try to ensure that the GVIM window is open before sending keys to it
2011-02-28 22:00:47 -04:00
rygwdn@gmail.com
da3f4077ee
merged with trunk
2011-02-28 20:49:15 -04:00
Holger Rapp
e5591e2517
Dummy commit to overwrite old tags on launchpad
2011-02-21 09:34:12 +01:00
Holger Rapp
81be10835c
Initialize output variable in tests, so that less timing errors occure. This makes testing more stable on my system
2011-02-20 23:15:04 +01:00
Holger Rapp
9eb0e5b810
Parsing ultisnips takes even longer
2011-02-20 21:22:37 +01:00
Holger Rapp
cee3b423fc
Fix some 'No such mapping' warnings which led to random test failures on my system
2011-02-20 21:18:45 +01:00
Holger Rapp
37f28fe580
Sleep a bit after sourcing widelands in tests. Increases reliability on my system
2011-02-20 21:18:25 +01:00
Holger Rapp
91520a2160
Refactored test cases
2011-02-20 20:58:43 +01:00
Holger Rapp
70ba6f0083
Added another test case that encloses the snippet
2011-02-20 20:54:16 +01:00
Holger Rapp
461e81d6a2
Added stricter test case that show the problem and implement fixes for them
2011-02-20 20:49:32 +01:00
rygwdn@gmail.com
e66d4adfda
Added initial support for testing on windows.
...
Focuses a GVim window, which is assumed to be in the ultisnips directory,
then starts sending key presses to it. Please don't change the active
window while it's running!
2011-02-20 13:11:51 -04:00
rygwdn@gmail.com
1e068f102a
Add test to ensure that anon snippets aren't added to the list of snippets.
2010-12-18 13:59:00 -04:00
rygwdn@gmail.com
98b396ff24
Fixes Bug #427676 .
...
- Adds the idea of anonymous snippets with new method on SnippetManager to expand a snippet without adding it.
- Adds two new functions for adding new snippets, and expanding anonymous snippets.
- Adds tests for the above functionality.
2010-12-18 13:07:46 -04:00
rygwdn@gmail.com
b065b5cf30
Fixes Bug #691575 .
...
Deals with the case where there are multiple matches on the line. Tries all
matches until one fits!
2010-12-17 22:38:56 -04:00
rygwdn@gmail.com
fbb339d03e
add option to not expand tabs in snippet
2010-11-22 10:14:47 -04:00
rygwdn@gmail.com
eff5ec2c66
use shiftwidth again as per bug comments
2010-11-22 09:59:06 -04:00
rygwdn@gmail.com
23924c3249
use sts instead of sw for initial tabs
2010-11-18 13:30:07 -04:00
rygwdn@gmail.com
c20c76be71
Fixes bug #676998 .
...
- Adds a new module for handling indentation to bring everything together.
- Uses shiftwidth to replace initial tabs in snippets, this is closer to
what you would get if you were to type the snippet out by hand.
- Replaces code in SnippetUtil with common class.
- Replaces the code in launch() with the common class to properly, and
consistently indent the lines.
- Changes the tests to use shiftwidth instead of tabstop as per the bug.
- Fixes the indentation in python snippets to use tabs instead of spaces.
2010-11-18 12:58:15 -04:00
Holger Rapp
13331a8aba
Fixed a bug if a snippet contains folding markers. Call normal zv (show current line) after each insertion
2010-09-23 10:49:39 +02:00
Holger Rapp
14da7e5bf9
Fixed a small typo
2010-08-22 13:57:19 +02:00
Holger Rapp
5340bb174e
New failing tests
2010-08-21 12:06:03 +02:00
Holger Rapp
5aac3f5836
Implemented a fix for select mode mappings along the lines of the suggestions by Ryan. Added tests. Documentation is still missing
2010-08-20 09:32:12 +02:00
Holger Rapp
b5fe29bc0f
Fixed a TODO and removed some which do not seem to be reasonable at this point in time
2010-08-19 14:02:03 +02:00
Holger Rapp
686bacb7a2
All TrailingNewline tests pass now. Others broke though
2010-08-19 13:35:06 +02:00
Holger Rapp
6ba2c53ffc
Added the test cases. Only commented the easiest in so far
2010-08-19 10:26:10 +02:00
Holger Rapp
6b38c5d186
added a testcase for bug 501727
2010-08-18 10:11:29 +02:00
Holger Rapp
aede01607d
Made tests more stable: repetitions are now done slower
2010-08-17 17:05:35 +02:00
rygwdn@gmail.com
4b85266929
Added documentation for globals, and fixed docs for locals.
...
Fixed error messages to match tests.
Changed endsnippet -> endglobal for global snippets.
2010-08-17 00:12:30 -03:00
rygwdn@gmail.com
e025da5cf2
Changed local variables in python code blocks to persist across blocks in a snippet.
...
Removed "snips.locals".
Also added ability to use file-wide "global" snippets.
Added tests for both.
2010-08-16 21:59:41 -03:00
Holger Rapp
c9d0ff4c4a
Added a test for bug 423701, which seems to have been fixed already
2010-08-15 15:08:51 +02:00
rygwdn@gmail.com
64eaac4f9a
added docs for new functionality and test for example in docs.
2010-08-08 22:15:34 -03:00
rygwdn@gmail.com
4a3b2310ab
give match object to python blocks.
2010-08-08 21:49:03 -03:00
rygwdn@gmail.com
4851a8277e
Added support for multi-word snippets.
2010-08-08 21:32:36 -03:00
rygwdn@gmail.com
1167fd6729
added basic regular expression matching.
2010-08-08 19:29:46 -03:00
rygwdn@gmail.com
d6c174e9df
merged with upstream
2010-07-29 23:11:46 -03:00
rygwdn@gmail.com
6a98c5439d
typo fixes!
2010-07-29 22:42:38 -03:00
rygwdn@gmail.com
784097cd21
added unit tests for new python snippetutil.
2010-07-29 22:38:24 -03:00
Holger Rapp
b437f30fc7
Applied patch from Chris Chambers
2010-07-12 14:52:12 +02:00
Holger Rapp
5d116bac33
Merged with clearsnippets branch from Michael Henry. Only very minor changes on my part
2009-10-13 09:56:12 +02:00
Holger Rapp
31cd328236
Cleaned python 2.6 workaround up a bit
2009-09-17 14:26:57 +02:00
Holger Rapp
e12f7f3b9c
Fixes for python 2.6
2009-09-17 14:11:43 +02:00
Michael Henry
99e8842ca5
A "clearsnippets" feature
...
=========================
It's difficult for the user to control which of the default
bundled snippets are active in his environment. The
'runtimepath' variable must be set to the root of the ultisnips
installation, which brings in all of the bundled snippets.
Though the user may individually override the definition of the
bundled snippets using the "!" flag, the method has a couple of
problems:
- There's no way to remove a snippet, only to override it (and
each snippet must be overridden individually).
- The "!" flag currently doesn't remove the overridden snippets
from the "list snippets" command.
It might be considered a feature that "!" doesn't actually
remove the snippets from the "list snippets" command, though
perhaps that's an unintended effect. In any case, it would be
more convenient to allow the user to selectively remove the
bundled snippets from his environment.
A patch is provided in the following branch to address these problems:
http://code.launchpad.net/~drmikehenry/ultisnips/clearsnippets
The branch's primary purpose is the addition of a
"clearsnippets" command that may be placed in a user's
~/.vim/UltiSnips/ft.snippets file. The user may clear all
lower-priority snippet for that file type with the line:
clearsnippets
Alternatively, he may clear individual snippets by listing their
triggers:
clearsnippets trigger1 trigger2
A few changes were made to the testing system as part of the
incorporation of this new feature. These changes include:
- The "extends" directive is now supported on multiple lines
throughout file.
- A completely empty .snippets file is now possible.
- The test.py scripts now handles most of the vim setup,
simplifying the running of the tests. The invocation of Vim
now reduces to:
vim -u NONE
Instructions for running the tests are included at top of
test.py, where they should be more visible to interested
users; UltiSnips.vim now just points to test.py's
instructions.
- A new function vim_quote() encodes an arbitrary string into a
singly-quoted Vim string, with embedded quotes escaped.
- SnippetsFileParser() now allows file_data to be passed
directly for unit testing, avoiding the need to create files
in the filesystem for test purposes.
- A new _error() function reports errors to the user. At
runtime, this function uses :echo_err in general, but also can
append error text to current buffer to check for expected
errors during unit tests.
- Added error checks to snippets file parsing, along with unit
tests for the parsing.
- Increased retries from 2 to 4 (on my system, occasionally the
timing still causes tests to fail).
2009-09-08 20:15:10 -04:00
Holger Rapp
4948c5f7f7
Applied Michael Henrys patch for w option
2009-08-30 20:39:27 +02:00
Holger Rapp
441d0d21cf
Applied patch by Michael Henry to fix a bug that ultisnips doesn't exit at ts zero
2009-08-30 20:15:06 +02:00
Holger Rapp
eafbe00a56
Applied suggested patch by Michael Henry to fix problem with tab not being accepted even though ultisnips does nothing with it
2009-08-30 20:04:17 +02:00
Michael Henry
66ba0686d9
Snippet mode is now exited after final tabstop zero is encountered.
2009-08-25 19:18:06 -04:00
Michael Henry
9a19e9c573
Fixed problem with tab being ignored on failed snippet expansion.
2009-08-24 06:28:54 -04:00
Michael Henry
66d35419a4
Added support for snippet option "w" for word-boundary triggers.
2009-08-23 18:44:19 -04:00
Holger Rapp
4721cb0a9b
Stabilized another test by making it muuuuch slower
2009-08-17 17:33:28 +02:00
Holger Rapp
3cf98270de
Implemented listing of current snippets following the suggestion of jceb. This patch took another route than his suggestion, but should be functional equivalent
2009-08-16 20:55:08 +02:00
Holger Rapp
de9e35b8f7
Fixed stupid bug introduced in last revision
2009-08-16 18:50:14 +02:00
Holger Rapp
cd0b859b62
Implemented i option (inword snippet expansion) along the line of the patch by jceb, also added his test cases
2009-08-16 16:34:54 +02:00
Holger Rapp
f4515daeee
Fixed bug 411010
2009-08-09 15:00:20 +02:00
Holger Rapp
5eaed114db
Fixed 407144. Also added test cases for it
2009-08-02 10:35:23 +02:00
Holger Rapp
fdb6622073
Fixed test case for expandtab. Expected functionality has changed in the last commit
2009-07-30 19:52:42 +02:00
Holger Rapp
8fb1412791
- fixed a bug related to indentexpr. vim just has too many options
...
- expandtab and ts options are now taken into consideration when expanding tabs
2009-07-29 09:49:44 +02:00
Holger Rapp
274ef83833
Fixed bug #405502 . Also added a test case for it
2009-07-28 08:04:53 +02:00
Holger Rapp
5ee8b842eb
Fixed some bugs related to char escaping in snippet definitions. fixes #401687
2009-07-22 12:08:21 +02:00
Holger Rapp
d0a50ae9d2
Made trigger keys configurable. Added support for setting forward jump and expand to the same key
2009-07-21 10:21:05 +02:00
Holger Rapp
c3dff61ef1
Fixed a small bug with string escaping in transformations. Went over the c snippets from TextMate, reworked them to work without any shell code (for compatibility sake)
2009-07-19 17:12:57 +02:00
Holger Rapp
47a7948526
Conditional replaces can now be nested
2009-07-19 16:44:29 +02:00
Holger Rapp
0943961479
Added support for b option. Some snippets can be defined to only be valid at the beginning of the line
2009-07-18 00:51:19 +02:00
Holger Rapp
c1494c6d83
A small refactoring
2009-07-18 00:14:20 +02:00
Holger Rapp
5d2a39a0c5
Fixed a inconsequent handling of indent: indent was different for recursive snippets then for the othermost snippet
2009-07-17 23:42:33 +02:00
Holger Rapp
93b3cc7126
Added support for overwriting of previous snippet definitions
2009-07-17 23:33:48 +02:00
Holger Rapp
e9c1dd597a
All done. Ready for intial release I guess
2009-07-16 18:08:32 +02:00
Holger Rapp
3e25a15469
Fixed the annoying bug
2009-07-16 17:49:35 +02:00
Holger Rapp
3f760eaebf
Only one critical known bug remaining in recursive expansion
2009-07-16 17:34:36 +02:00
Holger Rapp
118045a24a
Added more test cases for recursive tabstops, fixed some bugs that occured
2009-07-16 17:00:25 +02:00
Holger Rapp
8e46b5ba11
Beginning of recursive snippet expansion. This still has more bugs than a dog has fleas
2009-07-16 14:10:59 +02:00
Holger Rapp
b15199bab1
Removed and reordered some TODOs
2009-07-16 10:21:32 +02:00
Holger Rapp
318b2726ae
Fixed bug 400105 and 400114
2009-07-16 10:16:30 +02:00
Holger Rapp
f60417cdee
Slowed another test down, added a TODO for a bug that I ran into
2009-07-15 23:16:57 +02:00
Holger Rapp
7a34de5613
Added box snippets for python. Added a test case for completion inside of snippets
2009-07-15 18:16:42 +02:00
Holger Rapp
717ae7586c
Fixed a stupid bug where == and bzr commit -m "Fixed a stupid bug where == and boxes -d shell= were used. Instead it should have been is and is not"= were used. Instead it should have been is and is not
2009-07-15 17:40:24 +02:00
Holger Rapp
001bb70975
Added support for vimscript interpolation
2009-07-15 16:28:33 +02:00
Holger Rapp
79d342ddb4
Added support for interpolated python code
2009-07-13 11:36:13 +02:00
Holger Rapp
93121595c9
Added a missing newline
2009-07-12 17:34:10 +02:00
Holger Rapp
53f464e3a0
Fixed a bug with indenting in snippets. Autoindent is now supported
2009-07-12 17:23:39 +02:00
Holger Rapp
ba6e0662b5
Added the possibility to backspace over newlines in tabstops
2009-07-10 18:34:46 +02:00
Holger Rapp
49aa031a95
Sleep after each char send through screen which makes testing even slower but more reliable
2009-07-10 13:26:52 +02:00
Holger Rapp
86e7b3a1b5
The project now has a name: UltiSnips
2009-07-10 12:47:54 +02:00
Holger Rapp
3bcbdac872
- Fixed a bug in parsing of definition files
...
- implemented shell code interpolation
- implemented multiline tabstop selection (needed for shell code interpolation)
2009-07-10 12:06:58 +02:00
Holger Rapp
fa513f7619
Removed a TODO that was handled
2009-07-10 09:37:53 +02:00
Holger Rapp
982e32712f
Removed a TODO reminder that was fixed
2009-07-10 09:36:04 +02:00
Holger Rapp
8d9c04c675
Fixed a corner case in jumping: When a TS was selected and the next one was jumped too and was a TS with zero lenght, the cursor moved one too far
2009-07-10 09:35:21 +02:00
Holger Rapp
ade790cc60
Nearly fixed all bugs with Tab in DefText
2009-07-10 08:46:49 +02:00
Holger Rapp
447b800f70
Some bugs remain with tabstops in default text
2009-07-09 17:49:59 +02:00
Holger Rapp
307d822ffa
Halfway through with tabstop in default text
2009-07-09 17:04:57 +02:00
Holger Rapp
ccfa5d7a73
Expand is now <tab>, forward is <c-j> and backwards is <c-k>
2009-07-09 15:30:23 +02:00
Holger Rapp
3b921ca515
Fixed a bug that prevented newlines in the first column in snippets
2009-07-09 10:43:45 +02:00
Holger Rapp
130706b915
TextObjects.py no longer needs the vim module. Now the VimBuffer also needs removing
2009-07-09 10:20:25 +02:00
Holger Rapp
d3ab4730f9
There is now always only one active snippet, if another is launched, the current one gains an child
2009-07-08 20:08:32 +02:00
Holger Rapp
2d6c5d8a76
Refactored the code in different files. This makes Stuff a bit more Readable
2009-07-07 22:28:09 +02:00
Holger Rapp
5dba8710f7
Added tests for tabstops in tabstops
2009-07-07 10:27:05 +02:00
Holger Rapp
9adaccabf1
Added a very basic fetching utility that fetches TextMate Bundle Snippets from the TextMate site and writes out a file that is compatible with us. Also added a new critical feature/bug that needs fixing: Tabstops in Default Text of Tabstops
2009-07-07 09:41:09 +02:00
Holger Rapp
3ac62a0315
The next important todos
2009-07-06 23:29:17 +02:00
Holger Rapp
09e50acae1
Added the one hundreds test with many tabstops and many mirrors
2009-07-06 23:26:01 +02:00
Holger Rapp
ddd4a574f4
Added support for transformations in default text of tabstops
2009-07-06 21:45:30 +02:00
Holger Rapp
97315a1add
Added tests for transformations in tabstop default texts. Fixed a todo in the code
2009-07-06 21:16:02 +02:00
Holger Rapp
ee882dd769
Fully implemented backspacing while tab is selected
2009-07-06 18:34:12 +02:00
Holger Rapp
8c8f3b9769
A first attempt to add the feature to backspace a default text away
2009-07-06 17:44:04 +02:00
Holger Rapp
4261a6d17a
Added two more tests for the escape bug
2009-07-06 16:57:22 +02:00
Holger Rapp
fdc3c17d3f
Fixed the annoying bug when directly escaping after selecting a tabstop
2009-07-06 16:55:48 +02:00
Holger Rapp
02684225a8
Added tests for leaving snippets above or below
2009-07-06 16:43:24 +02:00
Holger Rapp
d8cd3f3d08
Snippets are now dropped when cursor reached /bin/zsh
2009-07-06 11:47:27 +02:00
Holger Rapp
52a91f17fe
Only jump to the end of a snippet when there is no Zero Tabstop defined
2009-07-06 11:35:18 +02:00
Holger Rapp
531a9c174d
Fixed a bug with indented single line snippets. A new line was added after them before
2009-07-06 10:40:07 +02:00
Holger Rapp
657af1a9cb
Added support for exiting snippet if moved out left or right
2009-07-06 10:31:12 +02:00
Holger Rapp
bf5b4c8290
Tabstops no longer receive text when user moved the cursor while inputting.
2009-07-05 22:25:01 +02:00
Holger Rapp
0e54082713
Further refactored unittests by moving runTest up into _VimTest. Now all non test base classes run a dummy test, which doesn't hurt so much
2009-07-05 18:51:12 +02:00
Holger Rapp
4a3821059d
Further refactored test by replacing cmd function through keys variable
2009-07-05 18:46:08 +02:00
Holger Rapp
58731e251d
Removed escape function int tests, added a constant for it
2009-07-05 13:20:58 +02:00
Holger Rapp
3e34086b8e
Made test execution faster and also a bit more reliable. The remaining problem is the screen stuff command :/
2009-07-05 00:53:30 +02:00
Holger Rapp
e5715d8d5e
Removed some oververbose debug output
2009-07-05 00:26:19 +02:00
Holger Rapp
f1f5bb1518
Snippet updates
2009-07-04 23:32:37 +02:00
Holger Rapp
87b0c199ae
A slight optimization
2009-07-04 23:15:37 +02:00
Holger Rapp
a54127268f
Renabled a test that was accidentally disabled
2009-07-04 23:04:12 +02:00
Holger Rapp
f308e96832
Fixed a bug when tabstops were behind mirrors
2009-07-04 23:01:23 +02:00
Holger Rapp
4eae66c1b8
Added support for multiple defined triggers
2009-07-04 21:58:13 +02:00
Holger Rapp
0aa37bf1f7
Added support for proper indenting
2009-07-04 17:59:50 +02:00
Holger Rapp
22cc4e7f45
All snippets are dropped when user exits out to normal mode with <Esc>. Changed how tab behaves at the end of all triggers
2009-07-04 17:36:06 +02:00
Holger Rapp
bf35ed08fb
Added support for proper startup and support for working with supertab
2009-07-04 16:08:14 +02:00
Holger Rapp
e88378c10b
Fixed cursor movement when there were mirrors in front or above it
2009-07-04 15:01:19 +02:00
Holger Rapp
1d5a81b0c3
Before fixing cursor movement stuff
2009-07-04 12:14:13 +02:00
Holger Rapp
fcf5766388
Implemented all regular expression stuff that textmate knows about
2009-07-03 17:50:52 +02:00
Holger Rapp
bce4cb7202
added textmate like backreference and casefoldings in transformations
2009-07-03 16:13:39 +02:00
Holger Rapp
7438a73d2b
Fixed a bug with one char tabstops. Began working on transformation
2009-07-03 13:54:35 +02:00
Holger Rapp
7c6c726b78
Added more tests for the default mirror features
2009-07-03 12:11:09 +02:00
Holger Rapp
c767fc0dcc
Added support for mirrors in TabStop defaults
2009-07-03 12:05:34 +02:00
Holger Rapp
6f25b53761
All tests pass except for my Favorite :(
2009-07-03 11:39:46 +02:00
Holger Rapp
4392de37bb
Everything but mirrors work now again
2009-07-03 10:59:55 +02:00
Holger Rapp
55fdbeea08
Finally fixed the multiline expansion bug. Much still remaining
2009-07-02 21:24:56 +02:00
Holger Rapp
9272abd865
More refactoring. Moved some code from ChangeableText into a common base class
2009-07-02 16:20:13 +02:00
Holger Rapp
13b9b12934
Got rid of tabstop in mirror
2009-07-02 16:02:02 +02:00
Holger Rapp
d5705c7559
Some refactoring
2009-07-02 15:41:58 +02:00
Holger Rapp
c6116f12ce
Basic multiline replacing now works. all tests pass
2009-07-02 14:22:13 +02:00
Holger Rapp
86bbd40ea9
Trying to get multiline mirrors & tab values to work
2009-07-02 11:48:35 +02:00
Holger Rapp
f7e0624c8b
Modified tests so that they test each snippet in the middle of other text. This revealed a few bugs which are fixed now
2009-07-02 09:49:42 +02:00
Holger Rapp
ad7241bc82
Refactored some more, got rid of delta_row and delta_col. Introduced Position as zero based coordinate frame
2009-07-02 08:25:58 +02:00
Holger Rapp
4f6d54335f
Added a test for tabstops in multiple lines
2009-07-01 20:22:12 +02:00
Holger Rapp
36a06d1b73
Some refactorings. Mostly removing unused code
2009-07-01 20:03:29 +02:00
Holger Rapp
e8aa2885b8
All tests currently pass
2009-07-01 17:11:33 +02:00
Holger Rapp
61c059ea7f
Started building in a TextObject Base class. Doing some refactoring
2009-07-01 15:29:14 +02:00
Holger Rapp
d19ddc0711
Trying to fit in Mirrors. Not so easy
2009-07-01 15:20:40 +02:00
Holger Rapp
1e3dd7b4be
Tests now work through simulating input via screen. Good solution
2009-07-01 10:39:46 +02:00
Holger Rapp
1926c49f96
Intermediate state. Multiple text tabstops are already working; testing it does not work, because i can't type from a script
2009-06-28 22:22:19 +02:00
Holger Rapp
a60e392a66
All tests now pass on python2.3. Autodetection of test cases no longer works :(
2009-06-28 14:51:27 +02:00
Holger Rapp
c86595aa28
Initial commit
2009-06-23 14:45:04 +02:00