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
634fdeb282
Fixed two small bugs with text object positioning.
2012-01-31 07:53:43 +01:00
Holger Rapp
36cba73046
Removed a no longer needed todo
2012-01-30 20:43:49 +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
bcf8cc8a6d
Change globbing patterns for snippets to follow Vim more closely
2012-01-28 17:07:37 +01:00
Holger Rapp
5ebad7351c
Fixes for Python 3
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
5325d3bfa4
Fixed a bug in the last commit
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
0f37d62f8a
No longer cache the whole buffer, only the last range
2012-01-28 17:07:37 +01:00
Holger Rapp
2dc4148f0f
We now require py >= 2.6
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
3efd38305e
Fixed a bug concerning python locals.
...
The update order of children must be spacial,
otherwise python codes are not executed in order
which means that locals might or might not be defined.
2012-01-28 17:07:36 +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
7ece270e3f
Really removed debug output
2012-01-28 17:07:36 +01:00
Holger Rapp
4e1d340a10
Remove debug output
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
a4f8e12c24
VimBuffer.cursor.line is no 0 based
2012-01-28 17:07:36 +01:00
Holger Rapp
30286f5446
Introduced _vim as wrapper around vim that makes compatibility stuff transparent to users. Remove usage of vim from everywhere else.
2012-01-28 17:07:36 +01:00
Holger Rapp
c1c10b1c34
Renamed all modules to lower_case to be more PEP8y
2012-01-28 17:07:36 +01:00
Holger Rapp
c01230e2cf
Moved unittests for various components into own files
2012-01-28 17:07:35 +01:00
Holger Rapp
400ac852d2
Remove Span class
...
It was not really in much use
2012-01-28 17:07:35 +01:00
Holger Rapp
f8d6285e49
Fix selection of tabstop when selection=exclusive
2012-01-28 17:07:35 +01:00
Holger Rapp
35439b579e
Now reall all TODOs in TextObjects. Also final proofread.
2012-01-28 17:07:35 +01:00
Holger Rapp
f9566d1fc7
Remaining TODOs in TextObjects
2012-01-28 17:07:35 +01:00
Holger Rapp
08e099bacb
More refactorings and cleanups. Fixed various TODOs
2012-01-28 17:07:35 +01:00
Holger Rapp
ca63cbdf57
Code cleanup and fixes
...
- Removed _add_tabstop function and move it to TabStop __init__
- replace initital text is now a function of snippet instance
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
2bddcdb76c
Even smarter about comparision
2012-01-28 17:07:34 +01:00
Holger Rapp
a483218f70
Become a little smarter about the area that actually changed in an edit
2012-01-28 17:07:34 +01:00
Holger Rapp
7e05d49bce
Refactored TextObjects.py into a package
2012-01-28 17:07:33 +01:00
Holger Rapp
59dd11690a
Lots of code cleanups and smaller bug fixes
...
- Removed some dead code
- Added some unittests, mainly for debugging
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
Holger Rapp
9044a955ce
TabStops and Mirror Tests now all pass again
2012-01-28 17:07:33 +01:00
Holger Rapp
f1f6e9abff
7 failures. Now weeding out abs_start and abs_end
2012-01-28 17:07:33 +01:00
Holger Rapp
b057d6332e
More mirror tests
2012-01-28 17:07:32 +01:00
Holger Rapp
994074d920
More mirror tests passing
2012-01-28 17:07:32 +01:00
Holger Rapp
f203e59147
More tricky Multiline Mirrors
2012-01-28 17:07:32 +01:00
Holger Rapp
9cc97cd7cb
All enabled tests pass again
2012-01-28 17:07:18 +01:00
Holger Rapp
a47f6ab98a
Need a new metrik for editing distance
2012-01-28 17:07:18 +01:00
Holger Rapp
5c476983d7
All enabled tests pass for the moment
2012-01-28 17:07:18 +01:00
Holger Rapp
b49d5482fa
Mor fixes and refactorings
2012-01-28 17:07:18 +01:00
Holger Rapp
544af97bff
Reenabled SimpleExpands
2012-01-28 17:07:18 +01:00
Holger Rapp
042c382b46
Worked a little further
2012-01-28 17:07:18 +01:00
Holger Rapp
3568275158
Intermediate Commit TabStop_Escaping tests pass
2012-01-28 17:06:23 +01:00
Holger Rapp
ac31677eff
Simple Expands are working again
2012-01-28 17:06:23 +01:00
Holger Rapp
3a7674bca0
First hooks into vim. Very slow atm
2012-01-28 17:06:23 +01:00
Holger Rapp
f3d396b84e
Reverting to using .vim and vimfiles.
...
_vim is not supported by vims documentation.
This reverts commit cd34039b02
.
2012-01-25 15:19:37 +01:00
Holger Rapp
da49b4b7c4
Work around an awkward py3 <-> py bug on vim on ubuntu
2012-01-24 15:30:05 +01:00
Alejandro Exojo
97bad15c98
Also unset the 'a' flag in formatoptions.
2012-01-14 22:54:43 +01:00
Holger Rapp
3c8661d4bd
Code cleanups and refactorings
2012-01-14 20:14:51 +01:00
Holger Rapp
9a7e7603f1
Reworked adding of Zero Tabstop if not explicitly defined. All test pass
2012-01-14 20:02:52 +01:00
Holger Rapp
0a554c57ca
Intermediate commit: All but one test pass
2012-01-14 15:51:36 +01:00
Holger Rapp
cd34039b02
.dot is _vim under windows. Fixes bug 915048
2012-01-12 12:57:35 +01:00
Holger Rapp
32754e9d2e
Fixed py3 problems with sunmap
2012-01-11 20:59:21 +01:00
Holger Rapp
0c63f205aa
Added basic support for the token. No documentation yet, but 16 new tests
2012-01-11 19:17:13 +01:00
Holger Rapp
88f2c863aa
More Umlaut fixes
2012-01-11 15:47:11 +01:00
Holger Rapp
fc4e427774
Bug 908139: Fix sunmap problems with unprintable chars in lhs. This is only a workaround really
2012-01-11 14:23:13 +01:00
Holger Rapp
324681d8cc
Support for unicode in Langmap. This fixes bug 871357
2012-01-10 20:11:52 +01:00
Holger Rapp
bc7bf73cf5
Fixed plenty of bugs in handling of unicode snippets
2012-01-10 19:56:09 +01:00
Holger Rapp
c1b60dc367
All tests pass now for python 2 and python 3
2012-01-10 18:11:34 +01:00
Holger Rapp
cad74ab10c
All tests pass in py3
2012-01-10 18:11:31 +01:00
Holger Rapp
f191cefb1f
Fixed transformations. Only one test fails
2012-01-10 18:11:30 +01:00
Holger Rapp
1095c07e13
Only 2 tests are failing
2012-01-10 18:11:26 +01:00
Holger Rapp
d72eb587f6
22/339 tests are failing
2012-01-10 18:11:02 +01:00
Holger Rapp
1653eb89ea
UltiSnips loads in python3 now, but does not work so far
2012-01-10 14:16:25 +01:00
Holger Rapp
a08cd7bfbd
Didn't handle ~ as homedir in search paths correctly
2012-01-05 17:00:25 +01:00
Holger Rapp
f378d3dbc7
Fixed slugginess with lots of recursive snippets
2011-12-29 21:35:10 +01:00
Holger Rapp
3237960a75
Move python online commands into vim functions for better profiling
2011-12-29 21:05:19 +01:00
Holger Rapp
cebf11eda0
Better handling of unicode in snippet definitions and names
2011-12-26 08:44:13 +01:00
Holger Rapp
499ac4f4bc
Fixed bug with mirrors of tabstops-in-tabstops
2011-09-12 09:08:25 +02:00
Holger Rapp
4c6a614dd3
Fix a off-by-one error in selecting 0-length tabstop. Only surfaces with recent vim versions
2011-09-01 18:03:06 +02:00
Rico Sta. Cruz
dcc286b856
Add the g:UltiSnipsDontReverseSearchPath option
2011-08-29 03:47:31 +08:00
Holger Rapp
72ed530746
Anonymous triggers with empty trigger string where not expanded after whitespaces.
2011-07-26 16:21:39 +02:00
Holger Rapp
f7c12f9d55
Fixed all remaining TODOs
2011-07-24 19:16:49 +02:00
Holger Rapp
7f12de5cd9
More cleanup
2011-07-24 18:46:35 +02:00
Holger Rapp
9608346e77
TextObjects now accept a single token as initializer
2011-07-24 18:29:31 +02:00
Holger Rapp
ad0059bc2d
Some refactoring
2011-07-24 17:30:29 +02:00
Holger Rapp
ac619f0bd2
All tests pass again. Only beautifying still to do
2011-07-24 17:01:03 +02:00
Holger Rapp
c5245ae69a
Implemted ShellCode again
2011-07-24 13:19:11 +02:00
Holger Rapp
6c1a82c04d
Implemented Transformation parsing
2011-07-24 13:10:57 +02:00
Holger Rapp
ef10362469
Fixed escaped chars handling
2011-07-24 11:42:29 +02:00
Holger Rapp
b91e97fa5d
Homing in on a design
2011-07-24 09:31:25 +02:00
Holger Rapp
4307612aa8
New stateful parser. Still flawed design and not flexible enough, but a beginning
2011-07-23 23:40:01 +02:00
Holger Rapp
cdb4558f79
First tryouts.. Nothing working so far and all is horrible ugly
2011-04-01 21:03:25 +02:00
Holger Rapp
2ac5fd419b
New conversion script for snipmate snippet files. Work by Phillip Berndt, only whitespace corrections by me
2011-07-17 12:17:23 +02:00
Holger Rapp
b46461bc07
Sort snippets alphabetically before showing them in the list. Patch by Allait
2011-07-17 12:09:29 +02:00
Phillip Berndt
8276ec9b94
Use argparse in the snipmate conversion script, renamed that script to convert_snipmate_snippets, removed the snipmate compatibility code from UltiSnips.vim and placed it into it's own file, fixed a bug where the user's value of g:snips_author was overwritten
2011-07-14 12:24:14 +02:00
Phillip Berndt
d08b58cf39
Some of snipmates snippets also require one to have g:snips_author defined
2011-07-13 14:23:21 +02:00
Phillip Berndt
281781fcee
Added snipmate's Filename() helper to UltiSnips.vim
2011-07-13 14:19:17 +02:00
Holger Rapp
83de7a3e66
Fixed the problem that you could not switch windows/tabs while inside a snippet
2011-06-28 22:48:05 +02:00
Holger Rapp
402df7605c
Fixed a bug which compared a vim.eval to an integer instead of a string. Patch by Sung Pae
2011-06-28 22:24:54 +02:00
Holger Rapp
c6af0d0c72
Regression fix for listing snippets by Charles Gunawan
2011-06-28 22:22:41 +02:00
rygwdn@gmail.com
4e145d7f79
Added tests and a fix for bug #774923 .
2011-05-02 16:20:36 -03:00
rygwdn@gmail.com
cd375f976c
Added fix for bug #774917 .
2011-05-02 14:56:27 -03:00
rygwdn@gmail.com
5d208cb7be
return snippets in original order
2011-05-02 14:28:10 -03:00
rygwdn@gmail.com
a2ee197c1f
added proper quoting taken from rope-omni plugin
2011-05-02 14:27:41 -03:00
rygwdn@gmail.com
5facee70f8
applied patch from allait. fixes bug #774911 .
...
only overwrites snippets with the same trigger when overwrite_previous is set.
2011-05-02 13:33:50 -03:00
Holger Rapp
9e712a9a39
Removed UltiSnipsReset. It is no longer needed
2011-04-28 08:27:09 +02:00
Holger Rapp
8c249b79c8
Merged ryans implementation of automatic reloading of changed snippet files. Replaced crc32 through hashlib.sha1 because it is always available since python 2.5, more reliable and has the same runtime up to an order of magnitude
2011-04-28 08:23:01 +02:00
rygwdn@gmail.com
6b86dcae2b
added fallback for crc and ability to disable hashing on entry.
...
also disabled hashing in parsing tests to avoid having the test files
overwritten in the process.
2011-04-27 23:41:30 -03:00
rygwdn@gmail.com
7d5e92743a
track manually added snippets differently
2011-04-27 23:13:26 -03:00
rygwdn@gmail.com
db9e0b20a7
implemented idea from bug #720326 .
...
uses an MD5 hash to determine if any .snippets files have been updated
2011-04-27 22:22:34 -03:00
rygwdn@gmail.com
424b817338
look through filetypes in the right order
2011-04-27 16:09:33 -03:00
rygwdn@gmail.com
fe896cffb3
fixed return for method - tests all pass now
2011-04-27 15:58:42 -03:00
rygwdn@gmail.com
b54300a82e
added documentation for new search
2011-04-27 15:51:04 -03:00
rygwdn@gmail.com
ce6efdd95c
added in-code documentation
2011-04-27 15:37:12 -03:00
rygwdn@gmail.com
ad84c346d0
- extracted and cleaned up searching for snippets files
...
- cleaned up UltiSnipsEdit by rewriting in python reusing existing code
2011-04-27 15:26:12 -03:00
rygwdn@gmail.com
dbeecdbe24
use consistent spacing in vim file
2011-04-27 12:37:07 -03:00
Holger Rapp
a63c3f9a18
Improvements to UltiSnipsEdit command by jmcantrell which partially fixes bug 748433
2011-04-09 17:58:30 +02:00
Holger Rapp
eeb8dc4831
Disable vims auto-wrapping inside snippets
...
- Disable autowrapping inside of snippets
- renable it when the snippet has been completely handled
- added snippet option 'f' to avoid disabling text wrapping
- added docs and tests
2011-04-09 17:48:14 +02:00
Holger Rapp
2def1b4ce1
Escaping of \ didn't work
2011-04-01 16:50:49 +02:00
Holger Rapp
8513aa48d8
Added a new variable for snippet directory names. UltiSnips directories can be excluded to not make the shipped plugins available
2011-03-31 07:40:56 +02:00
Holger Rapp
1b782e1218
Compatibility changes for python 2.6, mainly for windows
2011-03-30 08:23:59 +02:00
Holger Rapp
0f50245882
Leave initial indent of line alone, only reindent snippet definition
2011-03-29 07:02:14 +02:00
Holger Rapp
a0a2b54f52
Catch errors and show them in a scratch buffer instead of posting useless lines in the statusbar
2011-03-28 23:02:58 +02:00
rygwdn@gmail.com
6c210e26fe
fixes bug #720611 by keeping track of which filetypes have been tried.
2011-02-28 23:31:32 -04:00
Holger Rapp
57cf2790cb
Refactored fix for better understandability
2011-02-20 21:16:56 +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
Holger Rapp
be07baf2a8
Handle the case when vim was not compiled with the langmap option
2011-02-16 13:38:51 +01:00
Holger Rapp
a4242d65f7
Fixed a map with select mode unmapping
2011-02-13 19:34:21 +01:00
rygwdn@gmail.com
386e0a6a9b
Return true from expand_anon if the snippet was actually expanded.
2011-02-04 20:09:28 -04:00
rygwdn@gmail.com
30738b2176
Use faster, cleaner method for modifying the path.
2011-02-04 20:02:30 -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
9464f0c99c
better name for 'tab' attribute, and expand to tabstops, rather inserting 'ts' spaces
2010-11-18 14:00:36 -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
rygwdn@gmail.com
d74c3f697b
fixes bug with trailing whitespace
2010-11-16 15:32:28 -04:00
Holger Rapp
b9c48763c5
Removed unneeded import statement
2010-09-23 10:50:51 +02: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
c095147fa1
Added commands UltiSnipsReset and UltiSnipsEdit by JCEB
2010-09-22 13:01:04 +02:00
Holger Rapp
05c09d746a
Merged my fixes for the bug Ryan brought up
2010-08-21 13:10:47 +02:00
Holger Rapp
09939c2921
Fixed the bug again
2010-08-21 13:07:54 +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