Set syntax in stack trace too
This commit is contained in:
parent
db95fe0c1d
commit
19cc58f09e
4 changed files with 52 additions and 34 deletions
|
|
@ -501,3 +501,17 @@ def memoize( func ):
|
|||
@memoize
|
||||
def Exists( expr ):
|
||||
return int( vim.eval( f'exists( "{ expr }" )' ) )
|
||||
|
||||
|
||||
def SetSyntax( current_syntax, syntax, *args ):
|
||||
if not syntax:
|
||||
syntax = ''
|
||||
|
||||
if current_syntax == syntax:
|
||||
return
|
||||
|
||||
for win in args:
|
||||
with LetCurrentWindow( win ):
|
||||
vim.command( 'set syntax={}'.format( Escape( syntax ) ) )
|
||||
|
||||
return syntax
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue