Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

terminal vim not loading .zshrc

Tags:

vim

zsh

zshrc

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
$ source ~/.zshrc
(many errors when opening vim)

like image 711
Matt Ryan Avatar asked Jul 10 '12 14:07

Matt Ryan


1 Answers

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.

like image 108
romainl Avatar answered Sep 22 '22 16:09

romainl