Last active
December 4, 2024 21:36
Revisions
-
phelipetls revised this gist
Sep 22, 2022 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,4 @@ " ~/.vim/after/syntax/python.vim or ~/.config/nvim/after/syntax/python.vim syn match pythonEscape +{{+ contained containedin=pythonfString,pythonfDocstring syn match pythonEscape +}}+ contained containedin=pythonfString,pythonfDocstring -
phelipetls revised this gist
Mar 25, 2022 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -15,6 +15,7 @@ syn region pythonInterpolation contained syn match pythonStringModifier /:\(.[<^=>]\)\?[-+ ]\?#\?0\?[0-9]*[_,]\?\(\.[0-9]*\)\?[bcdeEfFgGnosxX%]\?/ contained containedin=pythonInterpolation syn match pythonStringModifier /![sra]/ contained containedin=pythonInterpolation syn match pythonStringModifier /\zs *= *\ze[}:!]/ contained containedin=pythonInterpolation hi link pythonfString String hi link pythonfDocstring String -
phelipetls revised this gist
Oct 30, 2020 . 1 changed file with 8 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,6 @@ syn match pythonEscape +{{+ contained containedin=pythonfString,pythonfDocstring syn match pythonEscape +}}+ contained containedin=pythonfString,pythonfDocstring syn region pythonfString matchgroup=pythonQuotes \ start=+[fF]\@1<=\z(['"]\)+ end="\z1" \ contains=@Spell,pythonEscape,pythonInterpolation @@ -7,8 +10,12 @@ syn region pythonfDocstring matchgroup=pythonQuotes syn region pythonInterpolation contained \ matchgroup=SpecialChar \ start=+{{\@!+ end=+}}\@!+ skip=+{{+ keepend \ contains=ALLBUT,pythonDecoratorName,pythonDecorator,pythonFunction,pythonDoctestValue,pythonDoctest syn match pythonStringModifier /:\(.[<^=>]\)\?[-+ ]\?#\?0\?[0-9]*[_,]\?\(\.[0-9]*\)\?[bcdeEfFgGnosxX%]\?/ contained containedin=pythonInterpolation syn match pythonStringModifier /![sra]/ contained containedin=pythonInterpolation hi link pythonfString String hi link pythonfDocstring String hi link pythonStringModifier PreProc -
phelipetls created this gist
Oct 30, 2020 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,14 @@ syn region pythonfString matchgroup=pythonQuotes \ start=+[fF]\@1<=\z(['"]\)+ end="\z1" \ contains=@Spell,pythonEscape,pythonInterpolation syn region pythonfDocstring matchgroup=pythonQuotes \ start=+[fF]\@1<=\z('''\|"""\)+ end="\z1" keepend \ contains=@Spell,pythonEscape,pythonSpaceError,pythonInterpolation,pythonDoctest syn region pythonInterpolation contained \ matchgroup=SpecialChar \ start=/{/ end=/}/ \ contains=ALLBUT,pythonDecoratorName,pythonDecorator,pythonFunction,pythonDoctestValue,pythonDoctest hi link pythonfString String hi link pythonfDocstring String