Commit Graph

1113 Commits

Author SHA1 Message Date
cwahbong
a053433e48 Variable rename and illustration. 2014-07-31 21:03:10 +08:00
cwahbong
97bad9906a Add test case for #341 (github). 2014-07-31 20:58:43 +08:00
cwahbong
e05788cece Fix issue #341 (github). 2014-07-29 13:02:26 +08:00
Holger Rapp
4dcfca755b Test refactorings. 2014-07-24 08:18:12 +02:00
cwahbong
1cf3b928fe Refactor: split test.py into several smaller files. 2014-07-23 17:22:11 +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
cwahbong
0dc6a8e4a4 Now test.py check the version or tmux.
Version 1.8 also works.
2014-07-22 15:26:18 +08:00
cwahbong
b11d5496a7 Add docstrings for TempFileManager. 2014-07-22 15:22:07 +08:00
cwahbong
15a0a17af0 Fix tmux interface. 2014-07-21 15:13:47 +08:00
Holger Rapp
e97d52c68c Merge pull request #342 from chivalry/master
Correct spelling error.
2014-07-20 20:30:01 +02:00
Charles Ross
2d8ae2fcd9 Correct misspelling 2014-07-20 09:05:30 -07:00
cwahbong
3002b68521 Solves waiting problem in an elegant way.
1. The keys after launching vim will wait until the vim is full loaded.
2. The keys after leaving vim will wait until the vim process is dead.
3. A bunch of cleanups.
2014-07-18 10:30:43 +08:00
cwahbong
cc4dc37038 Code cleanup for test.py. 2014-07-18 02:14:03 +08:00
cwahbong
9a98039d2b Fix test.py.
It may detect the need-screen-escape incorrectly or not invoke the vim
subprocess in the first test case.  These could be fixed by adding a
short sleep.
2014-07-17 18:43:44 +08:00
Holger Rapp
ccf79ba823 Merge pull request #331 from kballard/tagbar_snippets
Support TagBar for snippets files
2014-07-06 10:37:56 +02:00
Kevin Ballard
dee8265206 Support TagBar for snippets files
Bundle an exuberant ctags definition for UltiSnips and tell TagBar how
to find it.
2014-07-05 19:36:38 -07:00
Holger Rapp
d1f6f7ed81 Better syntax file. 2014-07-02 07:27:29 +02:00
Kevin Ballard
b10b62ae6d Twiddle indentation settings
We just want autoindent, no need for smartindent/etc that may be set by
the user's vimrc.
2014-06-30 21:17:52 -07:00
Kevin Ballard
67c7422ae2 Set up basic highlighting for snipmate files
Try to detect a snipmate-formatted file by looking at the directory name
and searching for endsnippet. If we think it's a snipmate file, switch
over to an alternative syntax highlighting variant.
2014-06-30 21:14:55 -07:00
Kevin Ballard
40145103b6 Stop embedding python/viml/sh if the `` includes {
In order to handle brace balancing properly, we need our own region to
match the {/} pairs, which unfortunately means that if a { occurs in a
command substitution, we have to disable the embedded language
highlighting.
2014-06-30 20:10:42 -07:00
Kevin Ballard
010e2c4fac Remove the coloring for python commands
Python commands tend to be longer than normal commands, and they already
include embedded python syntax coloring, so coloring them red like shell
commands is a bit overwhelming.

Preferably there would be some subtle background color we could apply,
but I don't see any pre-existing group name for that, and defining our
own would not play well with colorschemes.
2014-06-30 19:29:00 -07:00
Kevin Ballard
ebd62751e7 Tweak snippet/global highlighting to always highlight the end
The snippet/global regions were always ending correctly, but an unclosed
contained region could cause the wrong highlighting to apply to the
endsnippet/endglobal. Tweak the definitions such that the snippet/global
regions actually end at the start of the line and the footer occurs
outside the region.
2014-06-30 19:26:28 -07:00
Kevin Ballard
30ecd1d1b0 Rewrite parsing for tab stops 2014-06-30 19:22:32 -07:00
Kevin Ballard
5fa39faa92 fixup! Clean up miscellaneous syntax items 2014-06-30 18:38:50 -07:00
Kevin Ballard
4b73864b74 Fix the docstring for ShellCodeToken
It's not vim-syntax-related, but it was bugging me.
2014-06-30 15:56:32 -07:00
Kevin Ballard
0dba6503e1 Clean up miscellaneous syntax items
Remove a few obsolete items.

Remove the snipTabsOnly item. A tab-only line is not necessarily an
error.

Color leading spaces with a red background, because the default Error
coloring doesn't affect the display of spaces.
2014-06-30 15:41:35 -07:00
Kevin Ballard
acc79747c9 Syntax highlight the snippet trigger properly
This supports multiword triggers, docstrings, options, and even
highlights invalid multiword triggers as errors.
2014-06-30 15:29:48 -07:00
Kevin Ballard
5760eb4033 Fix empty snippets/globals 2014-06-30 00:01:28 -07:00
Kevin Ballard
d239402b7f Rewrite syntax matching for global
The body of a global now only has Python syntax coloring if the trigger
is !p. This matches the actual behavior of UltiSnips. AFAIK right now
globals with other triggers are useless, but this opens the door to
proper syntax coloring for those if they ever gain a use.
2014-06-29 23:45:04 -07:00
Kevin Ballard
cb2905c178 Rewrite syntax matching for snippet 2014-06-29 23:33:36 -07:00
Kevin Ballard
5937cea081 Mark up syntax items with 'display' as appropriate 2014-06-29 23:22:53 -07:00
Kevin Ballard
b82759b250 Rewrite extends/priority/clearsnippets 2014-06-29 23:11:11 -07:00
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