我知道如何在评论出来多行VIM,但如果我想加评论在每行结束? 例如:如何添加评论到VIM中的多行?
function dir.ls(path)
local i,files = 0,{}
local pfile = io.popen('ls "'..path..'"')
for fname in pfile:lines() do
i = i + 1
fpath = path..fname
files[i] = fpath
end
pfile:close()
return files
end
添加了评论
现在:
function dir.ls(path)
local i,files = 0,{}
local pfile = io.popen('ls "'..path..'"')
for fname in pfile:lines() do
i = i + 1
fpath = path..fname -- your comment goes here
files[i] = fpath -- your comment goes here
end
pfile:close() -- your comment goes here
return files
end
我发现了另一个类似于你的问题,你可能想检查一下:http://stackoverflow.com/questions/1676632/whats-a-quick-way-to-comment-uncomment-lines-in- vim – IdemDitto
这是**注释掉**行,我想**添加**注释。 – minerals