コード例 #1
0
ファイル: Locate.py プロジェクト: xieyu/vim-assist
 def showEditHistory(self):
     editHistory = StoreManager.load(self.editHistoryKey)
     editHistory.reverse()
     if editHistory:
         candidates = [FileCandidate(str(path)) for path in editHistory]
         SearchBackend.showSearchResult(candidates)
     else:
         print "empty history"
コード例 #2
0
ファイル: Locate.py プロジェクト: xieyu/vim-assist
    def addToEditHistory(self):
        filePath = vim.current.buffer.name
        if not os.path.exists(filePath):
            return

        history = StoreManager.load(self.editHistoryKey)
        for i, historyFileName in enumerate(history):
            if historyFileName == filePath:
                del history[i]
                break

        history.append(filePath)
        StoreManager.save(self.editHistoryKey , history)
コード例 #3
0
ファイル: Locate.py プロジェクト: xieyu/vim-assist
 def addToCdHistory(self, dirPath):
     history = StoreManager.load(self.storeKey)
     if dirPath not in history:
         history.append(dirPath)
     StoreManager.save(self.storeKey, history)
コード例 #4
0
ファイル: Locate.py プロジェクト: xieyu/vim-assist
 def showFilterCdHistory(self, symbol):
     history = StoreManager.load(self.storeKey)
     candidates = [LocateCdCandidate(str(path)) for path in history if symbol in path]
     SearchBackend.showSearchResult(candidates, filterCheck=locatefilterCheck)