126 Commits

Author SHA1 Message Date
Stanislav Seletskiy
878f79ffda review fixes 2015-08-12 17:22:15 +06:00
Stanislav Seletskiy
6c4fb6f3f2 fix b->b2<BS> case, fix merge 2015-08-03 14:41:25 +06:00
Stanislav Seletskiy
5af229abc0 add error handling 2015-08-03 14:41:25 +06:00
Stanislav Seletskiy
f80414fac5 prototype of autotrigger 2015-08-03 14:41:25 +06:00
Stanislav Seletskiy
5638cdf4a2 review fix for == 2015-07-29 20:08:49 +06:00
Stanislav Seletskiy
c3add0bef4 fix neovim tests 2015-07-29 20:08:49 +06:00
Stanislav Seletskiy
58a2094d49 review fixes 2015-07-29 20:08:49 +06:00
Stanislav Seletskiy
a39f3c241a revert access to UltiSnips_Manager 2015-07-29 20:08:49 +06:00
Stanislav Seletskiy
bdecd9a8b5 fix not cleared context 2015-07-29 20:08:49 +06:00
Stanislav Seletskiy
3c4ac11af3 fix python3, finally 2015-07-29 20:08:49 +06:00
Stanislav Seletskiy
b50c5c86c3 pass all args to snip.expand_anon 2015-07-29 20:08:49 +06:00
Stanislav Seletskiy
9649f15a9e fix buffer edits from jump action 2015-07-29 20:08:49 +06:00
Stanislav Seletskiy
5a663116f5 edge case: anon snip in pre-action 2015-07-29 20:08:49 +06:00
Stanislav Seletskiy
1e771de603 fix tests 2015-07-29 20:08:49 +06:00
Stanislav Seletskiy
ba774c39ca review fixes 2015-07-29 20:08:49 +06:00
Stanislav Seletskiy
8958b71341 add docs to the buffer proxy object 2015-07-29 20:08:49 +06:00
Stanislav Seletskiy
bc29e23226 VimBufferHelper -> VimBufferProxy 2015-07-29 20:08:49 +06:00
Stanislav Seletskiy
972305725f fix expan_anon in pre-action, snip object, fixes 2015-07-29 20:08:49 +06:00
Stanislav Seletskiy
191ebd8e8b migrate to snip.* namespace 2015-07-29 20:08:34 +06:00
Stanislav Seletskiy
7ead6fa178 detect buffer changes via changedtick 2015-07-29 20:08:34 +06:00
Stanislav Seletskiy
760fd25e47 fix python3 compatibility 2015-07-29 20:08:34 +06:00
Stanislav Seletskiy
1ca82f76f7 pre/post-expand and post-jump actions 2015-07-29 20:08:34 +06:00
Holger Rapp
67fbdb2ad8 Handle $0 in a default text like any other tabstop.
Also change timing for testing again.

Fixes #356.
2015-07-27 17:11:35 +02:00
Holger Rapp
300156642c Support $n tabstops for snipMate snippets.
Before, only ${n} tabstops were supported. Apparently snipMate changed
this behavior though, so now we support that too.

Fixes #533.
2015-07-20 15:01:49 +02:00
Holger Rapp
cd0e60bc0f Remove no longer needed langmap translation.
Vim now has the 'langnoremap' option that handles issues with mapping
much more canonical.
2015-07-18 17:33:27 +02:00
Greg Hurrell
c4ee3ecf10 Fire autocommands when setting up and tearing down inner state
It can be useful to set up mappings that apply only during expansion of
a snippet. UltiSnips does this internally with the `_setup_inner_state`
and `_teardown_inner_state` methods.

This commit adds some `User` autocommands so that users of UltiSnips can
set up their own mappings and tear them down at the same time as
`_setup_inner_state` and `_teardown_inner_state`.

This is particularly useful for people who are writing their own
expansion and jump functions using `UltiSnips#JumpForwards` and
`UltiSnips#ExpandSnippet()` and friends. Here's an example from my own
dotfiles:

- 0664b627e7
- 3740c248ee

Using this approach I've been able to get rid of Supertab and have a
more nuanced autocompletion experience that works exactly as I'd like
with YouCompleteMe.
2015-07-13 07:11:39 +02:00
Holger Rapp
29d7080d64 Do not set up inner state if it is already setup.
This makes _(setup|teardown)_inner_state symmetric.
2015-07-12 20:05:33 +02:00
Holger Rapp
324a4f8ffc Support regexp trigger ending in whitespace.
Fixes #178.
2015-07-11 18:11:19 +02:00
Holger Rapp
6b12b11411 Only set autocommands when there are snippets.
This speeds up cursor movement when there is no snippet activated.

Fixes #518.
2015-07-11 17:11:04 +02:00
Holger Rapp
becab789a8 Remove bootstrap.vim. Simplify startup.
The python module is now pulled in autoload/UltiSnips.vim. This means
that parsing of the .vimrc will only map the keys and set some options -
very cheap.

Unfortunately, the autocommands set up in plugin/UltiSnips.vim pulls in
the python code basically immediately still.
2015-07-11 16:17:50 +02:00
Daniel Hahler
8c257e24e0 VimBuffer: use vim.current.buffer.number instead of vim.eval
This should be more performant.
2015-06-27 18:23:46 +02:00
Holger Rapp
d6098193ef Merge pull request #446 from seletskiy/context-snippets
New feature: Context-aware snippets
2015-05-01 14:35:19 +02:00
Stanislav Seletskiy
463e68a611 fix for correct error reporting 2015-05-01 18:03:21 +06:00
Stanislav Seletskiy
099d3bcfbc Add more precise undo levels (expanding, jumping)
Breaking undo achieved through re-setting &undolevel:

    Setting the value of 'undolevels' also breaks undo. Even when the new
    value is equal to the old value.

    [:h :undoj]
2015-04-27 19:30:17 +06:00
Stanislav Seletskiy
904fbdecf5 review fixes 2015-04-25 21:38:22 +06:00
Stanislav Seletskiy
709f8dc93f minor doc fix and new cursor variable 2015-04-19 11:08:14 +06:00
Stanislav Seletskiy
66bc2e8f6e documentation, pull-requests fixes 2015-04-19 11:08:14 +06:00
Stanislav Seletskiy
0beefd4a19 fix context match on False value 2015-04-19 11:06:03 +06:00
Stanislav Seletskiy
ed8cf49115 fix tests 2015-04-19 11:06:03 +06:00
Stanislav Seletskiy
b3aec07053 proof of concept for context snips 2015-04-19 11:04:57 +06:00
Holger Rapp
4b39bf6558 Priority must always be an integer. 2015-04-18 17:32:36 +02:00
Holger Rapp
99eede1bf6 Started to test py2 and py3 on travis now.
I also learned that Vim 7.3 does not seem to be working at all anymore.
Fixes a bug that only happens with python3.
2015-04-18 17:15:05 +02:00
kawing.chiu
f9a22111f0 Fix adjacent tabstop input issue.
Previously, adjacent tabstops like $1$2 were not handled properly.
$2 could be jumped to but no text could be added. See issue #457.
2015-03-13 23:49:45 +08:00
Holger Rapp
09876e0084 Support for m (trim) snippet option. 2015-02-14 14:20:03 +01:00
Dettorer
c1bde18cdf Add support vim's langnoremap new option
This fixes the following issue:
https://github.com/SirVer/ultisnips/issues/431
2015-02-12 16:27:25 +01:00
Stanislav Seletskiy
81a628c6ea Add option 'm' for trimming whitespaces in snippet
Fix #391
2015-02-04 11:55:28 +06:00
Stanislav Seletskiy
b47e686521 do not walk &rtp if abs path to snips specified 2015-01-21 17:57:33 +06:00
Holger Rapp
6a787cdc7b Applied pyformat on entire codebase. 2015-01-20 21:26:03 +01:00
Holger Rapp
e1436a8aeb Accept numbers and text for disabling snipMate. 2015-01-15 08:17:37 +01:00
Holger Rapp
7df82bbe53 Merge pull request #415 from seletskiy/toggle-snipmate
add g:UltiSnipsEnableSnipMate
2014-12-20 18:39:50 +01:00