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('.')
在 bash 中,标准 (1) 和错误 (2) 输出可以通过以下方式重新路由和丢弃:
>/dev/null 2>&1
但是下面的例子做了一些不同的事情:
nohup myscript.sh >myscript.log 2>&1 </dev/null &
<