Commit Graph

1080 Commits

Author SHA1 Message Date
Kevin Ballard
672117c478 Add hierarchy to syntax file
Redo comments with fold markers to provide an appropriate hierarchy to
the syntax file itself.
2014-06-29 23:04:37 -07:00
Kevin Ballard
739e3d94ad Fix coloring of shell/VimL/Python command substitutions
Include the sh syntax for shell commands.
Make the matching on !v/!p work more accurately.
Highlight the !v/!p separately from the embedded Python/VimL.

AFAIK the only issue now is that "\`" escapes inside shell/VimL/Python
are not treated as bare "`" characters by the embedded syntax, but I
don't believe there's any way to fix that.
2014-06-29 20:47:22 -07:00
Kevin Ballard
5b80ef187d Properly handle \` escapes in commands 2014-06-29 20:09:13 -07:00
Kevin Ballard
636546bebc Fix syntax name
b:current_syntax should be set to "snippets", as that's the filetype,
not "snippet".
2014-06-29 19:42:57 -07:00
Kevin Ballard
cab1509952 Fix embedded VimL highlighting
The b:current_syntax variable is set by syntax-include, so it needs to
be unset again or the second syntax-include does nothing.
2014-06-29 19:42:11 -07:00
Kevin Ballard
1ad7d54d75 Fix highlighting of Python/VimL commands
Also mark all the highlighting as default, so it can be overridden more
easily by the user.
2014-06-29 19:36:07 -07:00
Holger Rapp
7b8641e1fd Back out fix for #323. Fixes #324. 2014-06-21 15:31:26 +02:00
Holger Rapp
7d65e21415 Merge pull request #323 from opennota/master
Check for existing of FT function before calling it.
2014-06-21 11:47:48 +02:00
opennota
93be385d38 Don't complain about undefined function
When lazy loading UltiSnips on specific filetypes ([vim-plug](https://github.com/junegunn/vim-plug) and [NeoBundle](https://github.com/Shougo/neobundle.vim) can do that), UltiSnips#FileTypeChanged() function can be undefined while ftdetect/UltiSnips.vim is loading.
2014-06-21 12:35:25 +07:00
Holger Rapp
e59a60cbea Fixed docu for clearsnippets. 2014-05-31 12:16:03 +02:00
Holger Rapp
ee1a2bb2b8 Escape '\\' in UltiSnipsEdit.
Fixes #308.
2014-05-27 04:15:19 +02:00
Holger Rapp
f2d9e8b608 Support for selection=old. 2014-05-03 10:42:23 +02:00
Mathias Fussenegger
da5b124af5 add support for selection=old 2014-05-02 20:00:42 +02:00
Holger Rapp
e4f2e34fc6 Remove tool that converts snipMate snippets. As support is now build into ultisnips, this is no longer needed. 2014-04-30 07:10:39 +02:00
Holger Rapp
bca51cb403 Brought back snipMate compatibility file. We cannot rely on people tracking vim-snippets to have the renmamed version of this available there. 2014-04-30 07:09:08 +02:00
Holger Rapp
5c8e3ca488 Merge pull request #275 from skeept/patch-2
fix minor typo in documentation
2014-04-18 06:13:56 +02:00
skeept
fb58034b1a Re-add > before code. 2014-04-17 21:13:29 +00:00
Holger Rapp
1e6928d0a1 Merge pull request #276 from meonkeys/patch-1
README: adapt to Vundle interface change
2014-04-16 08:54:46 +02:00
Adam Monsen
2042ad476d README: adapt to Vundle interface change
"Bundle" is now "Plugin"

https://github.com/gmarik/Vundle.vim/blob/master/doc/vundle.txt#L345-L369
2014-04-15 08:47:51 -07: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
Holger Rapp
2f84899445 Remove snipMate compatibility file. If at all, this should now live in vim-snippets. 2014-04-13 10:04:12 +02:00
Holger Rapp
c21016573b All mappings should be 'silent'. 2014-04-13 10:03:41 +02:00
Helder Jorge Rodrigues Inacio
77a9d8941f simple test for unite interface 2014-04-12 21:02:11 -04:00
Holger Rapp
eff62c336a Be more correct about encoding/decoding strings under py3. Patch by aeruder. 2014-04-11 19:51:36 +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
15f39c0801 Do not barf more than once when python is not found. Patch by blueyed. 2014-04-10 07:44:48 +02:00
Daniel Hahler
210304884a Define all/other dummy functions used in autocommands 2014-04-09 19:32:26 +02:00
Daniel Hahler
7da9dbe2af Add UltiSnipsFileType augroup and unset it if UltiSnips is disabled 2014-04-09 19:31:00 +02:00
Daniel Hahler
3208654c4e Do not map keys if 'g:_uspy' could not be set 2014-04-09 19:30:00 +02:00
Daniel Hahler
c57c717e33 Delete autocommands when Bootstrap failed
When bootstrapping fails to setup `g:_uspy` (e.g. without Python),
the functions used in the autocommands are not being defined.

Since it makes no sense to have autocommands defined for UltiSnips in this
case, this patch deletes them (via a new augroup 'UltiSnips').
2014-04-09 19:04:30 +02:00
Daniel Hahler
2ad6ad4493 Fix E168: :finish used outside of a sourced file 2014-04-09 19:04:08 +02: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
b6d545ecdf Properly escape locations on windows. 2014-03-30 11:13:34 +02:00
skeept
ae70ec8956 Escape correctly file names in windows.
In windows when expanding snippets the names of the snippet files look weird because \ is not escaped properly.

Also I think there should be an option to show only part of the file name, say the path relative to ~/.vim, because this way most of the screen is taken with the paths of the file.

Going even further I think it would it look nicer if you had some kind of alignment for the string. Say "%2i: %-15s (%s)".
Of course this last suggestion might not be consensual, but maybe a option might be offered to the user.
2014-03-30 05:57:44 +00:00
Holger Rapp
4b4ee48858 Overwrite all snippets with lower priority on expansion.
Fixes #233.
2014-03-23 17:30:44 +01: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
360f58dbf6 Show where snippets are defined in selection.
Fixes #184.
2014-03-22 20:20:56 +01:00
Holger Rapp
7c34a3400b Escape \ when asking for snippets.
Fixes #176.
2014-03-22 19:53:01 +01:00
Holger Rapp
cd99bdd3b3 selection=old cannot work with UltiSnips.
Kind of fixes #173.
2014-03-22 19:47:59 +01:00
Holger Rapp
69e0acd58a Change the way placeholders are selected.
Fixes #157.
2014-03-22 16:43:57 +01:00
Holger Rapp
5aaeae5e85 Do not delete child that is already gone.
Fixes #154
2014-03-22 11:28:44 +01:00
Holger Rapp
1b21741a2d Update ChangeLog. 2014-03-22 11:06:24 +01:00
Holger Rapp
f40c3ac5e0 Made UltiSnipsEdit! more consistent with multiple filetypes. 2014-03-15 15:55:03 +01:00
Holger Rapp
5ac0436694 Retry unmapping when we switched buffers.
Fixes #229.
2014-03-14 20:35:14 +01:00
Holger Rapp
b0a3266a61 More tweaking. 2014-03-12 08:23:22 +01:00
Holger Rapp
940f4d9f27 tweaked readme 2014-03-12 08:22:58 +01:00