我可以从命令行设置vim colorscheme吗?

时间:2016-05-23 20:42:07

标签: bash vim ssh colors terminal

我有一个热键设置为每当我SSH到服务器(为我的工作)时自动创建一些别名并安装脚本。有没有人知道从命令行设置vim colo的方法,所以我可以在我的热键中使用它?谢谢!

1 个答案:

答案 0 :(得分:3)

启动vim时可以运行命令:

vim +'colorscheme blue' my_file

请参阅man vim

   -c {command}
       {command}  will  be  executed after the first file has been read.
       {command} is interpreted as an Ex command.  If the {command} contains 
       spaces it must be enclosed in double quotes (this depends on the shell 
       that is used). Example: Vim "+set si" main.c
       Note: You can use up to 10 "+" or "-c" commands.