def find(self): if vim.current.buffer.options[ 'buftype' ] != '': return -1 if vim.current.buffer.name == '': return -1 """显示当前的 buffer 对应的文件在 win list 中的位置 如果, buffer 不属于任何一个 project, 返回 `NROOT' 之后生成当前 buffer 在 win list 中的 url, 由 win list 进行查询. """ path = utils.bufferpath() if not path: return for p in Project.All: if path.startswith(p.root): break else: return names = utils.getnames(p.root, path) self.listwin.find(names)
def CInc(inc): path = utils.bufferpath() for p in Project.All: if path.startswith(p.root): break else: return p.add_c_include(inc)
def cur_project(self): "返回当前 bufferf 所有在 project 对象" path = utils.bufferpath() for p in Project.All: if path.startswith(p.root): return p
def add_cur_path(self): path = utils.bufferpath() self.add(path, '')