

def source_plugin():
	import os
	import vim

	vim.command('source ' + vim.eval('fnameescape("' + os.path.join(os.path.abspath(os.path.dirname(__file__)), 'powerline.vim') + '")'))



def source_plugin():
	import os
	import vim
	from bindings import vim_get_func

	fnameescape = vim_get_func('fnameescape')

	vim.command('source ' + fnameescape(os.path.join(os.path.abspath(os.path.dirname(__file__)), 'powerline.vim')))

Change code to use vim_get_func('fnameescape')
Change code to use vim_get_func('fnameescape')

Previous version had problems with paths containing backslashes and/or
double quotes.

  
  
  def source_plugin():
  	import os
  	import vim
+ 	from bindings import vim_get_func
  
- 	vim.command('source ' + vim.eval('fnameescape("' + os.path.join(os.path.abspath(os.path.dirname(__file__)), 'powerline.vim') + '")'))
+ 	fnameescape = vim_get_func('fnameescape')
  
+ 	vim.command('source ' + fnameescape(os.path.join(os.path.abspath(os.path.dirname(__file__)), 'powerline.vim')))
+ 
Change code to use vim_get_func('fnameescape')
## Code Before:


def source_plugin():
	import os
	import vim

	vim.command('source ' + vim.eval('fnameescape("' + os.path.join(os.path.abspath(os.path.dirname(__file__)), 'powerline.vim') + '")'))

## Instruction:
Change code to use vim_get_func('fnameescape')
## Code After:


def source_plugin():
	import os
	import vim
	from bindings import vim_get_func

	fnameescape = vim_get_func('fnameescape')

	vim.command('source ' + fnameescape(os.path.join(os.path.abspath(os.path.dirname(__file__)), 'powerline.vim')))
