135 Commits

Author SHA1 Message Date
Ingo Karkat 733339b699 ingo#subs#BraceCreation#FromList(): ENH: Add a:options.singleCharacterElementsInSquareBraces 2022-08-03 15:49:09 +02:00
Ingo Karkat 2056591ee8 ingo#option#listchars#Render(): ENH: Add a:options.isTextAtStart and render lead listchars option value 2022-03-06 22:50:09 +01:00
Ingo Karkat cc259ae2e9 FIX: space rendering eclipses trail 2022-03-06 22:48:41 +01:00
Ingo Karkat b96d7c4fcd ingo#option#listchars#Render(): CHG: Deprecate a:isTextAtEnd argument, use a:options.isTextAtEnd now 2022-03-06 22:29:18 +01:00
Ingo Karkat 1cfb1c18b0 ingo#option#listchars#Render(): ENH: Add a:options.tabWidth 2022-03-06 22:12:34 +01:00
Ingo Karkat 57cf657637 file creation 2022-03-06 21:33:53 +01:00
Ingo Karkat cf685fbef6 Tests: Add coverage for ingo/range/merge module 2022-02-16 13:16:19 +01:00
Ingo Karkat ff1336b830 Add ingo#str#remove#{Lead,Trail}ing() 2022-02-12 21:44:56 +01:00
Ingo Karkat 4930b6ef71 Add ingo#regexp#EscapeLiteralReplacement() 2022-02-01 08:50:35 +01:00
Ingo Karkat bdeaefc64b Add ingo#subst#Recurringly() 2022-01-18 19:47:48 +01:00
Ingo Karkat 550cb1837a ingo#subs#BraceCreation#FromList(): Allow override of short option defaults 2021-02-21 21:59:10 +01:00
Ingo Karkat 9f804488d1 ingo#subs#BraceCreation#FromList(): Include isIgnoreCase in short option 2021-02-21 21:54:33 +01:00
Ingo Karkat 9f2a177257 ingo#subs#BraceCreation#FromList(): FIX: Wrong variable scope 2021-02-21 21:43:20 +01:00
Ingo Karkat c1170e7d9a Add optional a:isIgnoreCase argument to ignore case differences when searching for common substrings 2021-02-21 21:38:32 +01:00
Ingo Karkat ae5443aa73 - Deprecated: ingo#subst#expr#emulation#Substitute() is now available as a compat function ingo#compat#substitution#RecursiveSubstitutionExpression()
Since Vim 8.0.20, the regexp engine is reentrant, and the built-in substitute() handles recursive invocations.
2020-10-20 21:34:11 +02:00
Ingo Karkat 3980e83c1b FIX: ingo#cmdargs#file#FileOptionsAndCommandsToEscapedExCommandLine(): Unescape cmdline-special symbols and backslashes first
cmdline-special symbols (%, #, <) and backslashes may have been escaped already. These escapings must not be doubled, so unescape them first, so that cmdline-special symbols stand on their own, and a double backslash remains as it was passed.
2020-09-18 20:24:34 +02:00
Ingo Karkat 55e7dedb2a Add ingo#escape#file#CmdlineSpecialEscape() 2020-09-18 19:26:52 +02:00
Ingo Karkat 787ec5c062 Add ingo#change#processed#NetChange() 2020-07-02 21:07:08 +02:00
Ingo Karkat 6d0cf1cf32 Tests: Add coverage for ingo#smartcase#IsSmartCasePattern() and ingo#smartcase#Undo() 2020-03-10 16:07:15 +01:00
Ingo Karkat b26c35353b Add ingo#list#merge#Distinct() 2020-03-06 11:49:43 +01:00
Ingo Karkat d9644ec9de Add ingo#regexp#deconstruct#{TranslateSingleCharacter,RemoveOther}Atoms() and also use those in ingo#regexp#deconstruct#ToQuasiLiteral()
These regexp atoms so far had been left out of the conversion to quasi-literal text.
2020-03-06 09:10:18 +01:00
Ingo Karkat 41f6bedb1d Refactoring: Extract ingo#regexp#parse#EscapedCharacterExpr() out of ingo#regexp#parse#OtherAtomExpr()
Clients may want to remove other atoms, but translate escaped characters instead.
2020-03-06 09:05:24 +01:00
Ingo Karkat 6d42695d9c Tests: Add coverage for regexp parsing 2020-03-05 18:10:42 +01:00
Ingo Karkat af1f9d3d11 Add ingo#fs#path#IsPath() 2020-03-03 20:17:03 +01:00
Ingo Karkat a4c8649ee3 ingo#fs#path#split#PathAndName(): Handle special cases and add tests
There are unexpected results with "." and "..", based on how fnamemodify() works. Add a conditional to handle these, and document this through unit tests.
2020-03-03 20:03:39 +01:00
Ingo Karkat 0d33532f43 ingo#cmdargs#register#Parse{Ap,Pre}pendedWritableRegister(): ENH Allow using the a:directSeparator default while supplying a:isPreferText by passing an empty List 2020-01-31 20:55:06 +01:00
Ingo Karkat bc2eb45661 Add ingo#str#TrimTrailing() variant of ingo#str#Trim() 2019-09-20 11:25:19 +02:00
Ingo Karkat 43ab5b2fa9 ingo#option#listchars#Render(): ENH: Support passing fallback 2019-09-09 16:34:39 +02:00
Ingo Karkat 8af33bbf12 ingo#option#listchars#Render(): CHG: Pass override Dict as option
Allows for further extension.
2019-09-09 16:28:46 +02:00
Ingo Karkat f0bf0f1995 ingo#option#listchars#Render(): ENH: Support passing custom listcharsDict 2019-09-09 15:49:12 +02:00
Ingo Karkat b51d402811 Add ingo#option#listchars#Render() 2019-09-09 15:33:24 +02:00
Ingo Karkat f0b0452ef2 Add ingo#option#listchars#GetValues() 2019-09-09 14:59:19 +02:00
Ingo Karkat b303f21217 Add ingo#option#listchars#GetValue() 2019-09-09 14:55:22 +02:00
Ingo Karkat d72f5c3173 Tests: Add coverage for ingo#range#sort#AscendingByStartLnum() 2019-07-09 15:17:23 +02:00
Ingo Karkat 76b1f50dc4 ingo#join#Lines(): Return join success. Also do proper counting in ingo#join#Ranges() 2019-06-04 14:23:50 +02:00
Ingo Karkat 5a23caba31 ingo#join#Lines(): Add tests and fix problems
I've discovered an alternative implementation in AdvancedJoiners#QueryJoin#JoinLines() that considered some corner cases that this one would not handle, but the overall implementation is cleaner (and newer) in here. Therefore, add test coverage and port the fixes over to here, and make it correct.
2019-06-04 13:48:57 +02:00
Ingo Karkat 69a0c41ac4 ENH: ingo#dict#FromKeys() can also take a ValueExtractor Funcref in addition to the static defaultValue 2019-05-13 11:45:54 +02:00
Ingo Karkat 36dfd65f6c Tests: Add coverage for existing ingo#dict#FromKeys() 2019-05-13 11:36:12 +02:00
Ingo Karkat cfd10538a2 Tests: Add coverage for new ingo#dict#FromValues() 2019-05-13 11:36:05 +02:00
Ingo Karkat 185222208b ingo#compat#maparg() escaping didn't consider <; in fact, it needs to escape stand-alone < and escaped \<, but not proper key notations like <C-CR>
ingo#escape#command#mapescape() does this right (and continues to escape _any_ < character, as it handles with non-mapping input).
2019-04-11 16:05:12 +02:00
Ingo Karkat f3022a0c8b BUG: ingo#regexp#deconstruct#ToQuasiLiteral(): Escaping of character classes ignored
\[abc\] is rendered as a character class, because the (recently added) translation happens after the unescaping. *#UnescapeSpecialCharacters() needs to be invoked last. Add a comment and test.
2019-03-13 08:49:45 +01:00
Ingo Karkat e4e203ad4f Add ingo#regexp#deconstruct#TranslateBranches() and include in ingo#regexp#deconstruct#ToQuasiLiteral() 2019-03-11 08:41:56 +01:00
Ingo Karkat 663a40087c ENH: Translate single-class [inverted] collection classes like character classes 2019-03-11 07:17:36 +01:00
Ingo Karkat 092ddc43c9 Add ingo#regexp#deconstruct#TranslateCharacterClasses() variant that translates instead of removing 2019-03-10 21:59:50 +01:00
Ingo Karkat 0c4fca5c9d ENH: Keep single literal character in collection, else replace with … 2019-03-10 21:36:27 +01:00
Ingo Karkat 1f675f04af Add ingo#regexp#deconstruct#TranslateNumberEscapes() and include it in ingo#regexp#deconstruct#ToQuasiLiteral() 2019-03-10 20:27:24 +01:00
Ingo Karkat 698f1320f7 Add ingo#regexp#deconstruct#RemoveCharacterClasses() and include it in ingo#regexp#deconstruct#ToQuasiLiteral() 2019-03-10 20:06:25 +01:00
Ingo Karkat 9ce73d5a4b Tests: Test gettings lines from a file that is updated 2019-02-22 16:13:43 +01:00
Ingo Karkat 8e01dafba6 Tests: Add more tests for ingo#file#GetLines() 2019-02-22 14:23:01 +01:00
Ingo Karkat 30720f1d84 Add ingo/file.vim module 2019-02-22 11:20:48 +01:00