打开文件并跳到第 10 行:vim +10 filename.txt 。

打开文件跳到第一个匹配的行:vim +/search-term filename.txt 。

以只读模式打开文件:vim -R /etc/passwd 。