« first day (971 days earlier)      last day (2701 days later) » 

08:49
@LeoSimon You should accept @DJMcMayhem's answer, then!
(I'm not sure whether it's worth adding the info about containedin to the answer, as the requirement that it works alongside an existing Tex syntax file wasn't in the original question, but maybe either or both of you could comment to clarify that the solution works?)
 
5 hours later…
13:20
I accepted the answer added the containedin=All condition, feel free to remove it if you think it's inappropriate
 
4 hours later…
17:41
I'm implementing a series of substitutions, where I needed to neutralize some cases -- e.g. while I want to s/{/{\r/g, I wanted to leave {foo} alone. Of course the patterns and substitutions are highly dynamic.
I've finally had a revelation: I can memorise matches and put them aside with: :let txt = substitute(txt, '{\w\+}', '\="¤".(len(add(s:cache_of_ignored_matches, submatch(0)))-1)."¤"', 'g'). Loops on other substitutions, and eventually concluded with let txt= substitute(txt, '\v¤(\d+)¤', '\=s:cache_of_ignored_matches[submatch(1)]', 'g').
This one has been bothering me for quite some time now.
 
1 hour later…
19:10
@LucHermitte Wouldn't that just be :s/{\(foo\)\@!/{\r/g?
 
3 hours later…
21:53
Yeah, but "foo" can be multiple things so you have to start putting a lot of exceptions in the regex. Seems like he found a way to log what he wants to ignore during the search using "\=". Only thing I'm confused about is how it knows what to ignore... It seems to add all "{\w\+}" to the list.
Oh wait that was just to generate the cache, he then uses it in the next substitution.
The thing is I cannot know beforehand what pattern need to be ignored. The list can be enriched. Also I have a lot of contextual pattern already. Depending on an option I may add a space before (, a space or a newline before a {. And so on. IOW, I'm implementing a way to apply (generic) stylistic options on snippets/abbreviations.
Right now, I'm trying to support EditorConfig "idea for domain-specific properties" (github.com/editorconfig/editorconfig/wiki/…) and clang-format possible options without running clang-format (as if should work in any braced language)
@Tumbler41 Indeed {\w\+} is the regex I use to fill the cache of matching string I want to ignore. I could be anything else.
The typical type of regex will be the ones you can find here: github.com/LucHermitte/lh-dev/tree/styles_and_editorconfig/… and at the end of the lh/dev/style.vim.
Regarding stuff to ignore, I'll be able to migrate Doxygen groups to my new/underway/instable API . i.e. @{, \{ and so on.
(Sorry for all the missing s and my terrible English tonight)
22:17
Haha, that's the second time I've seen you apologize for your English, but I wouldn't have known English wasn't your first language if you didn't apologize. I'm serious, your English is fine, don't worry about it. :)
Thanks :)

« first day (971 days earlier)      last day (2701 days later) »