Aaron Schrab
c04b6aa7bb
Leave new scratch buffers in command mode
...
Modify new_scratch_buffer method to leave the created buffer in command
rather than insert mode. Currently the only use of this method is for
showing stack traces for errors, when that happens it's much more likely
that the user will want to use command mode to move around than to use
insert mode to add text to the beginning of the buffer.
2012-08-13 12:13:03 -04:00
Aaron Schrab
0f08e2e553
Allow suppressing warning about python support
...
Don't warn about missing python support if the UltiSnipsNoPythonWarning
variable is defined. This allows users to use a common set of vim
configuration files across a range of systems, even if some of them do
not have python support compiled into vim.
2012-07-31 15:42:35 -04:00
Aaron Schrab
c9bb2921dc
Dummy version of UltiSnips_FileTypeChanged()
...
Define a dummy version of the UltiSnips_FileTypeChanged function before
checking for python support. If that function isn't defined, the
autocommand defined in ftdetect/UltiSnips.vim will cause an error any
time a new file is opened. That autocommand is setup before the
function is defined, so we can't setup the autocommand only when the
function exists.
2012-07-31 15:25:36 -04:00
Aaron Schrab
73352257e4
Fix opening folds inserted by snippets
...
Commit 13331a8
added code to show the current line after insertions, but
later changes caused that to be called too soon. This left folds
created by a snippet closed, and the cursor at the end of the insertion.
2012-07-31 15:01:15 -04:00
Holger Rapp
72715d3143
Made an error message more sensible
2012-06-26 11:22:24 +02:00
Holger Rapp
50254a3a77
Ignore unicode/decode errors. This is so that UltiSnips tries harder to stay out of your way
2012-06-26 10:10:42 +02:00
Holger Rapp
c7e78522fd
Fix a bug with localisation
2012-06-01 14:33:55 +02:00
Laurent Peuch
af2f762e07
avoid crashing if trig list is empty
2012-05-22 11:29:03 +02:00
Holger Rapp
d28259d8b8
added pavel to the lists of contributors
2012-05-06 18:15:06 +02:00
Holger Rapp
2ddb5b7263
Small bug fix for last commit
2012-04-01 16:50:50 +02:00
Holger Rapp
bfce5af642
Implemented UltiSnipsAddFiletypes
...
It makes it possible to add filetypes in ftplugin/ft.vim or manually while editing.
2012-04-01 16:42:34 +02:00
Holger Rapp
5640013a9a
Fixed critical bug in last commit. Sorry
2012-03-28 09:21:37 +02:00
Holger Rapp
c5bf7dc6cc
Also leave snippets when exiting the buffer, not only when exiting the window
2012-03-28 07:42:05 +02:00
Holger Rapp
d49db703e5
Fixed bug with mkline and noexpandtab
2012-03-24 20:15:43 +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
8a7af50154
Load snippets as soon as filetype is set. This avoids a delay in the first expansion in a file
2012-02-21 21:47:12 +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
30875494e4
Made python version configurable
2012-02-08 16:28:39 +01:00
Holger Rapp
1b71a872b2
Disable Deprecation warnings for fetching strings.
2012-02-07 21:54:03 +01:00
Holger Rapp
fd03a1c7d9
Fixed a bug in snippet listing and silenced tests
2012-02-01 23:37:37 +01:00
Holger Rapp
aedd4851d5
Don't <esc> out of normal mode
2012-02-01 23:13:23 +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
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