Ingo Karkat
aff2fce2b8
BUG: ingo#comments#SplitIndentAndText() and ingo#comments#RemoveCommentPrefix() fail with nestable comment prefixes with "E688: More targets than List items"
...
Implementation in s:SplitIndentAndText() was based on unnestable prefixes. Instead of adding 1 to the actual nesting level to obtain the pattern multiplier, ensure it is at least 1.
2017-06-27 12:48:17 +02:00
Ingo Karkat
903b2adb97
Add special ingo#compat#synstack to work around missing patch 7.2.014
...
synstack() didn't work in an empty line and just returned "" instead of [], which confuses clients like my ingo#syntaxitem#IsOnSyntax().
Add a function that works around this.
2017-06-02 16:46:43 +02:00
Ingo Karkat
ae84ddda96
FIX: Potentially invalid indexing of l:otherResult[l:i] in s:GetUnjoinedResult()
...
Use get() for inner List access, too.
2017-05-31 14:18:05 +02:00
Ingo Karkat
b18bc4d748
Minor: Add forgotten ! to function definition of ingo#compat#DictKey()
2017-05-31 14:17:17 +02:00
Ingo Karkat
ed53ce9b33
Cosmetics: Fix typo in revision history dates
2017-05-26 22:14:22 +02:00
Ingo Karkat
28667ee6ca
Add ingo#buffer#VisibleList()
2017-05-26 17:56:53 +02:00
Ingo Karkat
671e645225
2017-05-26 17:56:52 +02:00
Ingo Karkat
950a12a0f9
2017-05-26 17:56:52 +02:00
Ingo Karkat
0fa573e5ac
file creation
2017-05-26 17:56:52 +02:00
Ingo Karkat
b2c113f16a
Add ingo#buffer#ExistOtherLoadedBuffers()
2017-05-26 17:56:50 +02:00
Ingo Karkat
4837a62644
2017-05-26 17:56:50 +02:00
Ingo Karkat
3480c48a99
file creation
2017-05-26 17:56:46 +02:00
Ingo Karkat
9da2c0b8a8
file creation
2017-05-26 17:56:46 +02:00
Ingo Karkat
924840d508
ENH: ingo#syntaxitem#IsOnSyntax(): Allow optional a:stopItemPattern to avoid considering syntax items at the bottom of the stack
2017-05-26 17:56:44 +02:00
Ingo Karkat
3980b4c847
Add ingo#compat#synstack()
2017-05-26 17:56:41 +02:00
Ingo Karkat
8c372b48f8
2017-05-26 17:56:41 +02:00
Ingo Karkat
4ab1a3f6d8
2017-05-26 17:56:41 +02:00
Ingo Karkat
5438b84708
ingo#syntaxitem#IsOnSyntax(): Factor out synstack() emulation into ingo#compat#synstack() and unify similar function variants
2017-05-26 17:56:38 +02:00
Ingo Karkat
c96f2fa5b1
Add ingo#compat#DictKey(), as Vim 7.4.1707 now allows using an empty dictionary key
2017-05-26 17:56:35 +02:00
Ingo Karkat
8ecfe25f05
file creation
2017-05-26 17:56:35 +02:00
Ingo Karkat
ab26f6191d
ENH: Also allow passing an items List to ingo#dict#Mirror() and ingo#dict#AddMirrored() (useful to influence which key from equal values is used)
...
ENH: Also support optional a:isEnsureUniqueness flag for ingo#dict#FromItems().
2017-05-26 17:56:32 +02:00
Ingo Karkat
9969c4e8e3
2017-05-26 17:56:32 +02:00
Ingo Karkat
2c428956a0
Add ingo#text#ReplaceChar(), a combination of ingo#text#GetChar(), ingo#text#Remove(), and ingo#text#Insert()
2017-05-26 17:56:28 +02:00
Ingo Karkat
ae2fd1d150
Add ingo#err#Command() for an alternative way of passing back [error] commands to be executed
2017-05-26 17:56:26 +02:00
Ingo Karkat
f264eedeff
Generalize functions into ingo/nary.vim and delegate ingo#binary#...() functions to those
2017-05-26 17:56:24 +02:00
Ingo Karkat
fb6dc38f16
Add ingo#err#SetAndBeep()
2017-05-26 17:56:22 +02:00
Ingo Karkat
6c2f4b5c18
Add ingo#fs#path#split#PathAndName()
2017-05-26 17:56:19 +02:00
Ingo Karkat
bd70c51e87
Add ingo#str#EndsWith() variant of ingo#fs#path#split#Contains()
2017-05-26 17:56:17 +02:00
Ingo Karkat
e71c7e5b5d
Add ingo#text#GetCharBefore() variant of ingo#text#GetChar()
2017-05-26 17:56:14 +02:00
Ingo Karkat
743a14ac71
CHG: Rename ill-named ingo#strdisplaywidth#pad#Middle() to ingo#strdisplaywidth#pad#Center() Add "real" ingo#strdisplaywidth#pad#Middle() that inserts the padding in the middle of the string / between the two passed string parts
2017-05-26 17:56:12 +02:00
Ingo Karkat
54e9c71172
ENH: ingo#regexp#collection#LiteralToRegexp(): Support inverted collection via optional a:isInvert flag
2017-05-26 17:56:10 +02:00
Ingo Karkat
9b59d26d42
Add ingo#strdisplaywidth#CutLeft() variant of ingo#strdisplaywidth#strleft() that returns both parts
...
Same for ingo#strdisplaywidth#strright().
2017-05-26 17:56:07 +02:00
Ingo Karkat
052225dd19
Add ingo#strdisplaywidth#pad#Middle()
2017-05-26 17:56:05 +02:00
Ingo Karkat
42f194e9cd
Add ingo#regexp#collection#Expr()
2017-05-26 17:56:03 +02:00
Ingo Karkat
73955099e9
ENH: ingo#strdisplaywidth#TruncateTo() has a configurable ellipsis string g:IngoLibrary_TruncateEllipsis, now defaulting to a single-char UTF-8 variant if we're in such encoding
...
It also handles pathologically small lengths that only show / cut into the ellipsis.
2017-05-26 17:55:59 +02:00
Ingo Karkat
ef39d5ea04
file creation
2017-05-26 17:55:59 +02:00
Ingo Karkat
f00e088464
file creation
2017-05-26 17:55:59 +02:00
Ingo Karkat
d58de3bfa5
2017-05-26 17:55:59 +02:00
Ingo Karkat
f947c623f7
Add ingo#os#IsWindowsShell()
2017-05-26 17:55:56 +02:00
Ingo Karkat
3b6c7d8385
Add ingo#os#IsCygwin()
2017-05-26 17:55:50 +02:00
Ingo Karkat
07219e4d53
2017-05-26 17:55:50 +02:00
Ingo Karkat
3d827698a8
Add ingo#compat#systemlist()
2017-05-26 17:55:47 +02:00
Ingo Karkat
1ccee52de0
Add ingo#collections#SeparateItemsAndSeparators(), a variant of ingo#collections#SplitKeepSeparators()
2017-05-26 17:55:45 +02:00
Ingo Karkat
db55f1c88b
2017-05-26 17:55:45 +02:00
Ingo Karkat
a8346bdb14
Add ingo#format#Dict() variant of ingo#format#Format() that only handles identifier placeholders and a Dict containing them
...
ENH: ingo#format#Format(): Also handle a:fmt without any "%" items without error.
2017-05-26 17:55:42 +02:00
Ingo Karkat
474bedc8d7
FIX: ingo#format#Format(): An invalid %0$ references the last passed argument instead of yielding the empty string (as [argument-index$] is 1-based)
...
Add bounds check to avoid that get() references index of -1.
FIX: ingo#format#Format(): Also support escaping via "%%", as in printf().
2017-05-26 17:55:39 +02:00
Ingo Karkat
077d3cf16d
BUG: ingo#mbyte#virtcol#GetVirtColOfCurrentCharacter() yields wrong values with single-width multibyte characters, and at the beginning of the line (column 1)
...
Need to start with offset 1 (not 0), and account for that (subtract 1) in the final return. Need to check that the virtcol argument will be larger than 0.
2017-05-26 17:55:36 +02:00
Ingo Karkat
2a7f3c3c56
2017-05-26 17:55:02 +02:00
Ingo Karkat
24668aa871
2017-05-26 17:55:02 +02:00
Ingo Karkat
0381aae7c0
FIX: Correct delegation in ingo#buffer#temp#Execute(); wrong recursive call was used (after 1.027)
...
ENH: Add optional a:isSilent argument to ingo#buffer#temp#Execute().
2017-05-26 17:54:58 +02:00