Ejemplo n.º 1
0
    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)
Ejemplo n.º 2
0
 def addToCdHistory(self, dirPath):
     history = StoreManager.load(self.storeKey)
     if dirPath not in history:
         history.append(dirPath)
     StoreManager.save(self.storeKey, history)