如果退出VIM时打开了任何NERDTree实例,那么当您再次打开会话时,会得到一些错误:
Error detected while processing BufLeave Autocommands for "NERD_tree_*":
E121: Undefined variable: b:NERDTree
Error detected while processing WinLeave Autocommands for "NERD_tree_*":
Error detected while processing BufLeave Autocommands f
正常模式状态。
在正常模式下按下:,将模式转换为ex模式。前模式状态。
现在按下命令行窗口中显示的mant history命令。
带有命令行窗口的ex模式状态。
如何退出命令行窗口,但仍处于ex模式?
也就是说,从The ex mode status with a command line window转换为The ex mode status。
为了进入:q,它从The ex mode status with a command line window变成了The normal mode status。
我想编写一个Bash脚本,它执行以下操作:
使用Vim打开文件;在文件中写入某些内容;保存文件并退出。
echo 'About to open a file'
vim file.txt # I need to use vim application to open a file
# Now write something into file.txt
...
# Then close the file.
...
echo 'Done'
这有可能吗?我发现了一个叫做Vimscript的东西,但不知道如何使用它。或者像这里的文档可以用来做这个?
更新:我需要验证在我