Created
          January 2, 2012 16:37 
        
      - 
      
 - 
        
Save heavenshell/1551321 to your computer and use it in GitHub Desktop.  
  
    
      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 characters
    
  
  
    
  | # -*- coding: utf-8 -*- | |
| def bar(): | |
| pass | 
  
    
      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 characters
    
  
  
    
  | # -*- coding: utf-8 -*- | |
| class Foo(object): | |
| pass | 
  
    
      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 characters
    
  
  
    
  | autocmd FileType python setlocal includeexpr=FormatPyImport(v:fname) | setlocal path+=;/ | |
| function! FormatPyImport(str) | |
| return substitute(substitute(substitute(a:str, '^from \|^import ', '', ''), 'import \a\+', '', ''), '\.', '\/', 'g') | |
| endfunction | 
  
    
      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 characters
    
  
  
    
  | #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| import bar | |
| from foo import Foo | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment