终端 vim 未加载 .zshrc [英] terminal vim not loading .zshrc
本文介绍了终端 vim 未加载 .zshrc的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的终端 vim 配置没有加载 ~/.zshrc.zsh 是环境登录shell.这种情况的正确配置是什么?
以下是我已经采取并已删除的一些措施:
set shell=zsh
(使用 zsh 作为 shell 但不提供 rc)
set shellcmdflag=-ci
(所有输出暂停)
cat ~/.zshenv
(打开vim时出现很多错误)
$ source ~/.zshrc
解决方案
来自手册:
<块引用>命令首先从/etc/zshenv读取;这不能被覆盖.[...]然后从 $ZDOTDIR/.zshenv 读取命令.如果外壳是登录 shell,从/etc/zprofile 读取命令,然后$ZDOTDIR/.zprofile.然后,如果 shell 是交互式的,命令从/etc/zshrc 和 $ZDOTDIR/.zshrc 中读取.最后,如果 shell 是登录 shell,则/etc/zlogin 和 $ZDOTDIR/.zlogin 是读.
据我所知,
set shell=zsh\ -i
应该可以.
My terminal vim configuration is not loading the ~/.zshrc. Zsh is the environment login shell. What is the proper configuration for this situation?
Here are some measures I've already taken and since removed:
set shell=zsh
(uses zsh as shell but doesn't source the rc)
set shellcmdflag=-ci
(all output suspended)
cat ~/.zshenv
(many errors when opening vim)
$ source ~/.zshrc
解决方案
From the manual:
Commands are first read from /etc/zshenv; this cannot be overridden. [...] Commands are then read from $ZDOTDIR/.zshenv. If the shell is a login shell, commands are read from /etc/zprofile and then $ZDOTDIR/.zprofile. Then, if the shell is interactive, commands are read from /etc/zshrc and then $ZDOTDIR/.zshrc. Finally, if the shell is a login shell, /etc/zlogin and $ZDOTDIR/.zlogin are read.
From what I understand,
set shell=zsh\ -i
should work.
这篇关于终端 vim 未加载 .zshrc的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文