bash - 将 vimrc 中的标题字符串设置为正在编辑的文件名

标签 bash shell vim

目前我在我的 vimrc 中使用简单的 set title 设置了标题,它给了我类似 program.py ~/path/to/program.py - VIM

这……好吧……但有点烦人。有没有办法将它设置为简单的 program.py 简单明了的东西?也许使用 titlestring

最佳答案

如果你只想要标题中的文件名:

:set titlestring=%t

其他可能性,请看:

:help titlestring

这将引导您:

:help statusline

% 代码列表。

关于bash - 将 vimrc 中的标题字符串设置为正在编辑的文件名,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20106659/

相关文章:

linux - 使用 shell 脚本的文件中的总值,其中值以 gb、mb、kb、b 为单位

linux - 我可以在 Linux 中用所有文件中的新内容更新文件的一部分吗

vim - 在 Tmux 复制模式下滚动 vim 窗口?

python - Kite 没有找到 pythonpath 库,尽管 python 找到了

linux - Bash 脚本问题检查命令输出

bash - docker 同步 : command not found

linux - 多个for循环中的sed命令用法

linux - 比较两个远程服务器之间的文件校验和

bash - 在 bash 脚本的循环中使用 nohup

go - Windows 上的 VIM-Go Debugger 结果为 "Goroutine not found"