Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gvimrc is not sourced from ~/.config/vim/#14567

Closed
habamax opened this issue Apr 16, 2024 · 2 comments
Closed

gvimrc is not sourced from ~/.config/vim/ #14567

habamax opened this issue Apr 16, 2024 · 2 comments
Labels

Comments

@habamax
Copy link
Contributor

habamax commented Apr 16, 2024

Steps to reproduce

  1. have ~/.config/vim/gvimrc with setting of guifont
  2. run gvim

Expected behaviour

Font settings should be applied.

Looks like gvimrc is not sourced at all.

image

Version of Vim

9.1.336

Environment

debian 12

Logs and stack traces

No response

@habamax habamax added the bug label Apr 16, 2024
@habamax
Copy link
Contributor Author

habamax commented Apr 16, 2024

if I copy cp -r ~/.config/vim ~/.vim then gvimrc is sourced:

image

otherwise, nope:

image

@chrisbra
Copy link
Member

Yes, it seems we need to define a USR_GVIMRC_FILE5 and then use it here:

vim/src/gui.c

Lines 571 to 588 in 2da68c8

if (process_env((char_u *)"GVIMINIT", FALSE) == FAIL
&& do_source((char_u *)USR_GVIMRC_FILE, TRUE,
DOSO_GVIMRC, NULL) == FAIL
#ifdef USR_GVIMRC_FILE2
&& do_source((char_u *)USR_GVIMRC_FILE2, TRUE,
DOSO_GVIMRC, NULL) == FAIL
#endif
#ifdef USR_GVIMRC_FILE3
&& do_source((char_u *)USR_GVIMRC_FILE3, TRUE,
DOSO_GVIMRC, NULL) == FAIL
#endif
)
{
#ifdef USR_GVIMRC_FILE4
(void)do_source((char_u *)USR_GVIMRC_FILE4, TRUE,
DOSO_GVIMRC, NULL);
#endif
}

chrisbra pushed a commit to chrisbra/vim that referenced this issue Apr 16, 2024
Problem:  gvimrc not sourced from XDG_CONFIG_HOME
Solution: Also try to source from ~/.config/vim/gvimrc and
          $XDG_CONFIG_HOME/vim/gvimrc

fixes: vim#14567

Signed-off-by: Christian Brabandt <cb@256bit.org>
chrisbra pushed a commit to chrisbra/vim that referenced this issue Apr 16, 2024
Problem:  gvimrc not sourced from XDG_CONFIG_HOME
Solution: Also try to source from ~/.config/vim/gvimrc and
          $XDG_CONFIG_HOME/vim/gvimrc

fixes: vim#14567

Signed-off-by: Christian Brabandt <cb@256bit.org>
chrisbra pushed a commit to chrisbra/vim that referenced this issue Apr 16, 2024
Problem:  gvimrc not sourced from XDG_CONFIG_HOME
Solution: Also try to source from ~/.config/vim/gvimrc and
          $XDG_CONFIG_HOME/vim/gvimrc

fixes: vim#14567

Signed-off-by: Christian Brabandt <cb@256bit.org>
chrisbra pushed a commit to chrisbra/vim that referenced this issue Apr 17, 2024
Problem:  gvimrc not sourced from XDG_CONFIG_HOME
Solution: Also try to source from ~/.config/vim/gvimrc and
          $XDG_CONFIG_HOME/vim/gvimrc

fixes: vim#14567

Signed-off-by: Christian Brabandt <cb@256bit.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants