Use YCM python style
This commit is contained in:
parent
a56bee7b0a
commit
8052484cc7
14 changed files with 82 additions and 49 deletions
|
|
@ -232,7 +232,7 @@ def Escape( msg ):
|
|||
return msg.replace( "'", "''" )
|
||||
|
||||
|
||||
def UserMessage( msg, persist=False, error=False):
|
||||
def UserMessage( msg, persist=False, error=False ):
|
||||
if persist:
|
||||
_logger.warning( 'User Msg: ' + msg )
|
||||
else:
|
||||
|
|
@ -242,11 +242,11 @@ def UserMessage( msg, persist=False, error=False):
|
|||
vim.command( 'redraw' )
|
||||
try:
|
||||
if error:
|
||||
vim.command("echohl WarningMsg")
|
||||
vim.command( "echohl WarningMsg" )
|
||||
for line in msg.split( '\n' ):
|
||||
vim.command( "{0} '{1}'".format( cmd, Escape( line ) ) )
|
||||
finally:
|
||||
vim.command('echohl None') if error else None
|
||||
vim.command( 'echohl None' ) if error else None
|
||||
vim.command( 'redraw' )
|
||||
|
||||
|
||||
|
|
@ -324,7 +324,7 @@ def SetBufferContents( buf, lines, modified=False ):
|
|||
if not isinstance( lines, list ):
|
||||
lines = lines.splitlines()
|
||||
|
||||
buf[:] = lines
|
||||
buf[ : ] = lines
|
||||
finally:
|
||||
buf.options[ 'modified' ] = modified
|
||||
|
||||
|
|
@ -347,7 +347,7 @@ def ExpandReferencesInObject( obj, mapping, user_choices ):
|
|||
return obj
|
||||
|
||||
|
||||
def ExpandReferencesInString( orig_s, mapping, user_choices):
|
||||
def ExpandReferencesInString( orig_s, mapping, user_choices ):
|
||||
s = os.path.expanduser( orig_s )
|
||||
s = os.path.expandvars( s )
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue