Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何读取当前行(光标所在的位置)并将其保存到 VimScript 中的变量中?
let lineText = getline('.')
见:h getline()……</p>
:h getline()
如果您只想要号码:
let lineNumber = line('.')