(self)
return (os.path.expanduser('~'), '')
Return (path, fname) so goto=fname to set cursor
Return (path, fname) so goto=fname to set cursor
Return ( path fname ) so goto = fname to set cursor
def _determine_path(self):
        '''Return (path, fname) so goto=fname to set cursor'''
        # Use the current view's directory if it has one.
        view = self.window.active_view()
        path = view and view.file_name()
        folders = self.window.folders()
        if path:
            for f in folders:
                # e.g. ['/a', '/aa'], to open '/aa/f' we need '/aa/'
                if path.startswith(u''.join([f, os.sep])):
                    return (f, path)
            return os.path.split(path)

        # Use the first project folder if there is one.
        data = self.window.project_data() if ST3 else None
        if data and 'folders' in data:
            folders = data['folders']
            if folders:
                return (folders[0]['path'], '')

        # Use window folder if possible
        if len(folders) > 0:
            return (folders[0], '')

        # Use the user's home directory.
        return (os.path.expanduser('~'), '')
def _determine_path ( self ) : # Use the current view's directory if it has one. view = self . window . active_view ( ) path = view and view . file_name ( ) folders = self . window . folders ( ) if path : for f in folders : # e.g. ['/a', '/aa'], to open '/aa/f' we need '/aa/' if path . startswith ( u'' . join ( [ f , os . sep ] ) ) : return ( f , path ) return os . path . split ( path ) # Use the first project folder if there is one. data = self . window . project_data ( ) if ST3 else None if data and 'folders' in data : folders = data [ 'folders' ] if folders : return ( folders [ 0 ] [ 'path' ] , '' ) # Use window folder if possible if len ( folders ) > 0 : return ( folders [ 0 ] , '' ) # Use the user's home directory. return ( os . path . expanduser ( '~' ) , '' )