Commit Graph

250 Commits

Author SHA1 Message Date
Holger Rapp
b03bb13423 TestCase for b1191617 and slightly more stable way to execute python in test cases. 2013-06-21 22:12:39 +02:00
Holger Rapp
5d6f72949d Added UltiSnips_SnippetsInCurrentScope(). Patch by Jorge (skeept) 2013-06-10 18:27:48 +02:00
Holger Rapp
e10285b382 Fix for bug 1073816 and some improvements to debug utilities. 2013-04-14 13:09:33 +02:00
Aaron Schrab
3a4991fb32 Add option for stripping of trailing whitespace
Add "s" snippet option which, if set, will cause trailing whitespace to
be stripped from lines before jumping to the next tab stop.

When used with a snippet like the following this will allow the text
from the $1 tabstop to be removed and have the space in front of that
automatically deleted when the user jumps to $2. This will work even if
using the same key for snippet expansion and jumping to the next
tabstop, whereas if the space was manually removed the key would cause
the snippet to be expanded again.

    snippet do "do block" s
    do `!p snip.rv = "|" if t[1] else""`${1:args}`!p snip.rv = "|" if t[1] else""`
    	$2
    end
    $0
    endsnippet
2012-11-24 13:25:29 -05:00
Holger Rapp
3fc86a36a8 Fix for folding problem by Aaron 2012-08-22 11:55:31 +02:00
Aaron Schrab
1f151bea64 Remove obsolete comment
Change in b319569 made this comment obsolete.
2012-08-15 23:38:41 -04:00
Holger Rapp
b319569b7b Fixed bug 1034805: Langmap with escaped characters where a problem 2012-08-15 14:13:50 +02:00
Aaron Schrab
3584ee3421 Add test with perl syntax folding
Exercise changes from commit 7335225, to check that the problem fixed by
that doesn't recur.

I've run all tests including this one both with and without the
previously mentioned commit, the new test only passes if that commit is
included.  All other tests pass in either case.
2012-08-09 13:19:51 -04:00
Aaron Schrab
8e3f419c44 Fix tests to work with new version of screen
Debian unstable currently has a pre-release version of screen 4.1.0.
This version changes the "stuff" command so that special characters get
parsed, breaking many of the tests.

Detect if the version of screen being used to run tests does this
parsing, and if so do additional escaping of characters so that tests
again work.

With this change, all tests pass with both old and new versions of
screen.
2012-08-08 19:57:55 -04:00
Aaron Schrab
2ab17b6cca Move getting buffer data into interface class
Put the code that instructs vim to write its buffer to a temporary file
and then reads that file into a python string into the VimInterface
class.  This will allow that to be done by code outside of tests.
2012-08-08 19:57:55 -04:00
Aaron Schrab
fc22af0d1e Use classes for managing vim interaction
Create classes for interacting with vim, a base class with common
methods, a class for interacting via screen, and one for interacting on
Windows.

At startup time an instance of one of these classes is created, and that
object is passed to all of the tests instead of the session.

I haven't been able to get UltiSnips working in vim on Windows to really
test this, but I have verified that vim interactions still work.
2012-08-08 19:57:33 -04:00
Aaron Schrab
461a475d2a Have test script set vim buffer type to nofile
Instruct vim not to complain about quitting without writing the buffer
used to run tests by setting the buftype option to nofile.
2012-08-08 19:39:50 -04:00
Holger Rapp
d49db703e5 Fixed bug with mkline and noexpandtab 2012-03-24 20:15:43 +01:00
Holger Rapp
4be8a92bf6 Added Jim to the list of contributors 2012-03-11 17:30:05 +01:00
Holger Rapp
45b1d09d53 Fixed bug: / could not be escaped in Visual default text 2012-02-24 09:42:02 +01:00
Holger Rapp
874cb89401 Fixed a bug when visual expand was used after umlauts or tabs. 2012-02-16 21:42:26 +01:00
Holger Rapp
bed41564c0 Python code has access to text for VISUAL via snip.v 2012-02-12 12:33:53 +01:00
Holger Rapp
c1e5bb6c5f Visual now supports transformations 2012-02-12 12:15:54 +01:00
Holger Rapp
92209f99d2 Fixed jumping back bug after killing the current tabstop 2012-02-12 09:37:59 +01:00
Holger Rapp
164bcbc714 Fixed bug triggered by deleting the last few lines of a snippet in normal mode 2012-02-12 08:53:42 +01:00
Holger Rapp
6d6fe9dbb6 Fixed a bug when tabstop zero was deleted and then a jump attemted 2012-02-12 08:14:21 +01:00
Holger Rapp
fd03a1c7d9 Fixed a bug in snippet listing and silenced tests 2012-02-01 23:37:37 +01:00
Holger Rapp
8dd7720c29 Fix bug: List snippets didn't work after whitespace. 2012-02-01 21:39:33 +01:00
Holger Rapp
46f3258af9 Fixed a bug in snippet selection when using selection=exclusive 2012-02-01 20:31:03 +01:00
Holger Rapp
13aadb5def $VISUAL now supports default text 2012-01-31 14:20:49 +01:00
Holger Rapp
8c9bf502f2 Fixed a bug that could happen when a whole snippet was deleted. 2012-01-31 08:12:05 +01:00
Holger Rapp
e34fac23ff One error in last commit 2012-01-29 17:03:11 +01:00
Holger Rapp
da71206fce Significant bug fixes for windows. 2012-01-29 16:51:22 +01:00
Holger Rapp
ee607db3be Guess when a tabstop is overwritten 2012-01-28 17:07:37 +01:00
Holger Rapp
d537d1d438 A few more tests. 2012-01-28 17:07:37 +01:00
Holger Rapp
e69838c4bf UltiSnips should now be able to cope with formatoptions. Removed turning them off and the corresponding snippet option "f" 2012-01-28 17:07:37 +01:00
Holger Rapp
f2ce576fbd Fixed various smaller bugs I encountered 2012-01-28 17:07:37 +01:00
Holger Rapp
6226b29fb5 Added and fixed a failing test case 2012-01-28 17:07:37 +01:00
Holger Rapp
0caa5be256 Small refactoring 2012-01-28 17:07:36 +01:00
Holger Rapp
ced34ee36a Made simple insertion and deletion a little more robust 2012-01-28 17:07:36 +01:00
Holger Rapp
4e1d340a10 Remove debug output 2012-01-28 17:07:36 +01:00
Holger Rapp
13ea92dd31 More test that I thought could make trouble. 2012-01-28 17:07:36 +01:00
Holger Rapp
e8416d868d - More cleanups and fixes 2012-01-28 17:07:36 +01:00
Holger Rapp
35439b579e Now reall all TODOs in TextObjects. Also final proofread. 2012-01-28 17:07:35 +01:00
Holger Rapp
89f720c91c Improved ${VISUAL} support
- make a difference between V and v selection
- Keep proper indenting even when used inside other TextObjects
2012-01-28 17:07:35 +01:00
Holger Rapp
cf2c2ff5bc Code fixes and cleanups
- Removed code duplication in transformation and mirror
- Opening the scratch buffer will reset the current snippet
- Move is now a method of Position
- Removed Position.copy method which was not used
2012-01-28 17:07:35 +01:00
Holger Rapp
fe4d0c7117 Some fixes when handling deletions 2012-01-28 17:07:34 +01:00
Holger Rapp
947b7dc3e8 Enabled normal mode editing. All tests pass but there are some errors lurking 2012-01-28 17:07:34 +01:00
Holger Rapp
36a1bc1c17 Be less clever again about Where to check for changes.
- Remove duplicate lines from last and current text. Still,
this needs to traverse the whole buffer.
- Removed functionality from VimState that had nothing
to do with 'State'.
2012-01-28 17:07:34 +01:00
Holger Rapp
5982bdf6c3 Removed a duplicate test 2012-01-28 17:07:33 +01:00
Holger Rapp
3c65e369c2 All tests pass 2012-01-28 17:07:33 +01:00
Holger Rapp
54d946c81e Recursive Snippets and various other tests 2012-01-28 17:07:33 +01:00
Holger Rapp
da6347947f More tests enabled 2012-01-28 17:07:33 +01:00
Holger Rapp
15bb3ff34b Python code 2012-01-28 17:07:33 +01:00
Holger Rapp
71b1bb687f ShellCode and VimScript Interpolation 2012-01-28 17:07:33 +01:00