Commit Graph

255 Commits

Author SHA1 Message Date
Holger Rapp
992e094638 Add a warning about changing the buffer in autocommands. 2015-07-13 07:14:54 +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
33db8b4ab0 Update pathogen installation instructions.
Fixes #501.
2015-07-11 18:48:44 +02:00
Holger Rapp
3806a69874 Fix improper use of augroup in ftdetect. 2015-06-01 21:12:19 +02:00
Holger Rapp
ab1cc1afac Remove documentation for using the same trigger for jump and expand. 2015-05-01 14:36:41 +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
2f355c233f another little fix in documentation 2015-04-29 22:25:21 +06:00
Stanislav Seletskiy
1b3ecf4a85 priority test, docs & fmt fixes 2015-04-27 15:42:21 +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
9861a6e6c3 typo fix in docs 2015-04-19 11:08:14 +06:00
Stanislav Seletskiy
66bc2e8f6e documentation, pull-requests fixes 2015-04-19 11:08:14 +06:00
Holger Rapp
00848d7d64 Merge pull request #483 from cwahbong/master
Update document for zero tabstop.
2015-04-18 22:45:04 +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
cwahbong
bf20bc6f66 Update document for zero tabstop. 2015-04-15 20:58:26 +08:00
kawing.chiu
71a8fdec58 Add contributor to doc. 2015-04-12 22:34:06 +08:00
Holger Rapp
09876e0084 Support for m (trim) snippet option. 2015-02-14 14:20:03 +01:00
Holger Rapp
e041187669 Do not try to remap the keymaps if langnoremap is available and set. 2015-02-14 10:44:48 +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
e1436a8aeb Accept numbers and text for disabling snipMate. 2015-01-15 08:17:37 +01:00
Holger Rapp
d240aa24df Added Pyrohh to the list of contributors. 2015-01-04 22:23:24 +01:00
Holger Rapp
7df82bbe53 Merge pull request #415 from seletskiy/toggle-snipmate
add g:UltiSnipsEnableSnipMate
2014-12-20 18:39:50 +01:00
Stanislav Seletskiy
fc080b4fd5 add g:UltiSnipsEnableSnipMate 2014-12-18 12:05:52 +06:00
Joe Lencioni
bbb07646a3 Fix typo "endglobals" in documentation
I was working on some snippets and looking at the documentation and
noticed a typo. "endglobals" should be "endglobal".
2014-12-02 09:39:50 -08:00
Tim Hofmann
185f96c4db Fix list of trigger functions in documentation 2014-11-30 16:20:18 -05:00
ibabarovic
d9691a9125 Added a terminal emulator warning line for using c-tab combo with usnips 2014-11-24 17:32:10 +01:00
Holger Rapp
1ad970379e Support for sw=0 in newer Vim versions. 2014-10-11 15:23:34 +02:00
Glenn Griffin
e3abd6678f Added test case for shiftwidth=0 and added myself to contributors list. 2014-10-08 10:30:40 -07:00
Daniel Hahler
14e5b4638b doc: add tags for trigger vars 2014-10-08 15:08:33 +02:00
petobens
2c3c4a7776 Add 'context' value to g:UltiSnipsEditSplit 2014-08-28 09:34:33 -03:00
Holger Rapp
279d6e63c9 Updates the doc for the new clearsnippets behavior. Slight rewording by me. 2014-08-02 14:59:42 +02:00
cwahbong
a9aa8c76a7 Update document for priority based clearsnippets. 2014-08-01 11:33:04 +08:00
Holger Rapp
9521b942b0 Merge pull request #340 from cwahbong/test-fix
Never rely on waiting for Vim to finish something, instead make it write a file.
2014-07-23 06:55:17 +02:00
cwahbong
0872600b9e Ahbong is contributer now. 2014-07-22 15:28:02 +08:00
Charles Ross
2d8ae2fcd9 Correct misspelling 2014-07-20 09:05:30 -07:00
Holger Rapp
d1f6f7ed81 Better syntax file. 2014-07-02 07:27:29 +02:00
Holger Rapp
e59a60cbea Fixed docu for clearsnippets. 2014-05-31 12:16:03 +02:00
Holger Rapp
f2d9e8b608 Support for selection=old. 2014-05-03 10:42:23 +02:00
skeept
fb58034b1a Re-add > before code. 2014-04-17 21:13:29 +00:00
skeept
98289510ca Update UltiSnips.txt 2014-04-15 14:20:31 +00:00
Holger Rapp
04ef0f8f5c Merged unite source by Skeept. 2014-04-15 08:19:23 +02:00
Andrew Ruder
cae27fba5c Ensure that _vim_{dec,enc} always succeeds on py3
In py2 we could get by with attempting to encode/decode a string and if
it failed just ignore and return.  Unfortunately on py3 a string decodes
to a bytearray and a bytearray encodes to a string.  We can't simply
return the original object when we fail.  We choose replace for handling
bytes we don't understand.

Test case (using python3 for UltiSnips):
open a new file
:set encoding=utf-8
qa<Backspace>q
"ap

Warning: this test case makes it very difficult to exit vim cleanly and
save files!

Signed-off-by: Andrew Ruder <andrew.ruder@elecsyscorp.com>
2014-04-10 08:06:56 -05:00
Holger Rapp
a3e654fc54 _vimfiles -> vimfiles. Patch b Oberon. 2014-04-06 16:33:02 +02:00
Helder Jorge Rodrigues Inacio
7bee824db2 use function to invoqe unite 2014-04-03 00:00:34 -04:00
Helder Jorge Rodrigues Inacio
cc15145429 add unite source 2014-03-31 21:44:31 -04:00
Holger Rapp
5116001246 Documentation fixes. 2014-03-23 09:54:41 +01:00
Ches Martin
fee999a71f Docs: remove a reference to defunct ! snippet option
Removed in c1b41d0fbf for priority system.
2014-03-23 15:36:14 +07:00
Holger Rapp
764fd65a78 Added a nice interactive demo. 2014-03-12 08:12:47 +01:00
Holger Rapp
001c2a9673 Added realname of petobens. 2014-03-08 09:09:21 +01:00