Commit Graph

353 Commits

Author SHA1 Message Date
Holger Rapp
8622753d3b Pulled from saikobee's branch. 2014-01-04 07:30:01 +01:00
Sergey Alexandrov
dc313f8c7b Fix for bug 1251994
See: https://bugs.launchpad.net/ultisnips/+bug/1251994
2013-12-29 01:56:09 +04:00
Brian Mock
bc391a330d Fixed contributors list; saner plugin dir checking. 2013-12-27 10:21:51 -08:00
Brian Mock
e9c00a746b More style cleanup; added docstrings 2013-12-25 10:47:48 -08:00
Brian Mock
9695633b21 Cleaned up code; updated docs. 2013-12-24 11:34:06 -08:00
guns
7cd4434a99 Evaluate word boundaries with Vim, not r'\b'
Certain non ALGOL-derived languages (notably LISP derivatives) do not
share the alphanumeric + underscore definition of a word character.

Fortunately, each language FileType has its own definition of a word
character, which Vim's regex engine uses when matching against the
boundary classes \< and \>.

We change the word matching routine of 'w' snippets to use Vim's regex
engine instead of a static pattern.
2013-12-23 16:34:45 -06:00
Brian Mock
0d17585bf8 Launchpad bug-1179630 Autodetect path search order 2013-12-12 23:55:28 -08:00
marshall-lee
cf51610c3a fixed KeyboardInterrupt bug when listing snippets 2013-10-30 03:50:30 +03:00
mohd-akram
49e633b4ec Fix for Python 3 2013-10-23 09:55:24 -07:00
Holger Rapp
ce28c27285 Fixed a small bug. 2013-10-23 08:10:58 +02:00
Holger Rapp
ef2c657721 Merge branch 'master' of git://github.com/rgiot/ultisnips into rgiot-master 2013-10-21 06:30:38 +02:00
Holger Rapp
b8e0a6167d Fixed a bug in displaying error messages. 2013-10-15 11:02:12 +02:00
Romain Giot
449255a060 Add an error message when unidecode is not installed. The message is displayed only one time 2013-10-03 09:11:36 +02:00
Romain Giot
a150220cf2 Allow to use the flag 'a' in the transformation commands.
This way, in a Latex file written with accentueted letters, the label use non accentueted letters instead of _.
2013-10-02 13:48:12 +02:00
John Szakmeister
31f318cb7e Teach list_snippets_dict to escape apostrophes in the description.
This was discovered while trying to use
UltiSnips_SnippetsInCurrentScope() with some snippets that have
apostrophes in the description (such as printf('...', ...)).
2013-08-05 16:43:58 -04:00
Holger Rapp
cd83608df3 Pass <s-tab> through to supertab. 2013-07-16 07:05:42 +02:00
Holger Rapp
5a3190e65c Fixed b1191617. 2013-06-29 15:44:02 +02:00
Holger Rapp
3b2eb436b7 Buffer local overwrite for snippet directory. Patch by jszakmeister. 2013-06-19 08:00:52 +02:00
Holger Rapp
5d6f72949d Added UltiSnips_SnippetsInCurrentScope(). Patch by Jorge (skeept) 2013-06-10 18:27:48 +02:00
Holger Rapp
61291ecd83 Completion for UltiSnipsEdit. Patch by Zhao Cai. 2013-04-21 17:18:14 +02:00
Holger Rapp
e10285b382 Fix for bug 1073816 and some improvements to debug utilities. 2013-04-14 13:09:33 +02:00
Holger Rapp
9333a5112b Enhancements to shell code intepolation: Try hard to find a directory where we actually can execute something. Patch by Keith Welch. 2013-04-12 06:55:37 +02:00
Holger Rapp
971778b93a Fix problems with replaying tab keys in macros. US now needs a very recent version of supertab or no supertab at all. 2013-02-25 10:18:19 +01:00
Holger Rapp
831b3460ca Easy access to UltiSnips python modules. Patch by Stanislav Golovanov. 2013-02-18 20:41:54 +01:00
Holger Rapp
2398bd1c82 Use normal! 2013-02-18 20:23:43 +01:00
Stanislav Golovanov
1269fd26e4 add python module path to global variable 2013-02-08 21:57:29 +04:00
Holger Rapp
bf375682b3 Fixed a problem with supertab, sparkup and ultisnips. Patch by Eric Van Dewoestine. 2013-01-02 18:49:21 +01:00
Pedro Algarvio
bbb98007de Remove un-used imports. PEP8 fixes. 2012-12-11 12:42:11 +00:00
Holger Rapp
4c068bd008 New snippet option to strip whitespaces in front of cursor. Patch by aschrab 2012-11-27 09:54:24 +01:00
Aaron Schrab
3a4991fb32 Add option for stripping of trailing whitespace
Add "s" snippet option which, if set, will cause trailing whitespace to
be stripped from lines before jumping to the next tab stop.

When used with a snippet like the following this will allow the text
from the $1 tabstop to be removed and have the space in front of that
automatically deleted when the user jumps to $2. This will work even if
using the same key for snippet expansion and jumping to the next
tabstop, whereas if the space was manually removed the key would cause
the snippet to be expanded again.

    snippet do "do block" s
    do `!p snip.rv = "|" if t[1] else""`${1:args}`!p snip.rv = "|" if t[1] else""`
    	$2
    end
    $0
    endsnippet
2012-11-24 13:25:29 -05:00
Aaron Schrab
d4d1e86962 Make Snippet object available to SnippetInstance
When a Snippet object creates a SnippetInstance it should pass itself as
an argument, so that the instance can later get additional information
about the snippet.
2012-11-24 13:05:55 -05:00
Aaron Schrab
18b081b7fe Add has_option method to Snippet class
Encapsulate the fact that options are stored as the original string that
was pulled from the definition.  This will simplify things if that ever
needs to be changed.
2012-11-24 13:05:55 -05:00
Aaron Schrab
a6171d022b Avoid repetition in creating SnippetInstance
There's no need to use different code to create a SnippetInstance based
on whether or not there's a parent. The arguments passed either way are
the same.
2012-11-24 13:05:55 -05:00
Holger Rapp
27cae38529 DEL and c-h now behave as BS in select mode. Patch partly by buztard 2012-10-14 11:41:22 +02:00
Holger Rapp
1690986d23 Indicate success or failure of expansions and jumps
Patch by Jorge Rodrigues.
2012-09-06 19:38:41 +02:00
Holger Rapp
3fc86a36a8 Fix for folding problem by Aaron 2012-08-22 11:55:31 +02:00
Holger Rapp
e283500a24 Patch by Aaron: optionally disable warning for no Python 2012-08-21 12:51:16 +02:00
Holger Rapp
b319569b7b Fixed bug 1034805: Langmap with escaped characters where a problem 2012-08-15 14:13:50 +02:00
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