0

I'm trying to move my development environment into a Docker container to better manage my dependencies. Hence, I need Vim inside that container as well:

git clone https://github.com/vim/vim.git && cd vim && ./configure --enable-python3interp=yes && make && make install

Afterwards:

VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Nov 17 2021 13:53:30)
Included patches: 1-3607
Compiled by root@be03dd7862c1
Huge version without GUI.  Features included (+) or not (-):
+acl               +file_in_path      +mouse_urxvt       -tag_any_white
+arabic            +find_in_path      +mouse_xterm       -tcl
+autocmd           +float             +multi_byte        +termguicolors
+autochdir         +folding           +multi_lang        +terminal
-autoservername    -footer            -mzscheme          +terminfo
-balloon_eval      +fork()            +netbeans_intg     +termresponse
+balloon_eval_term +gettext           +num64             +textobjects
-browse            -hangul_input      +packages          +textprop
++builtin_terms    +iconv             +path_extra        +timers
+byte_offset       +insert_expand     -perl              +title
+channel           +ipv6              +persistent_undo   -toolbar
+cindent           +job               +popupwin          +user_commands
-clientserver      +jumplist          +postscript        +vartabs
-clipboard         +keymap            +printer           +vertsplit
+cmdline_compl     +lambda            +profile           +virtualedit
+cmdline_hist      +langmap           -python            +visual
+cmdline_info      +libcall           -python3           +visualextra
+comments          +linebreak         +quickfix          +viminfo
+conceal           +lispindent        +reltime           +vreplace
+cryptv            +listcmds          +rightleft         +wildignore
+cscope            +localmap          -ruby              +wildmenu
+cursorbind        -lua               +scrollbind        +windows
+cursorshape       +menu              +signs             +writebackup
+dialog_con        +mksession         +smartindent       -X11
+diff              +modify_fname      -sodium            -xfontset
+digraphs          +mouse             -sound             -xim
-dnd               -mouseshape        +spell             -xpm
-ebcdic            +mouse_dec         +startuptime       -xsmp
+emacs_tags        -mouse_gpm         +statusline        -xterm_clipboard
+eval              -mouse_jsbterm     -sun_workshop      -xterm_save
+ex_extra          +mouse_netterm     +syntax            
+extra_search      +mouse_sgr         +tag_binary        
-farsi             -mouse_sysmouse    -tag_old_static    
   system vimrc file: "$VIM/vimrc"
     user vimrc file: "$HOME/.vimrc"
 2nd user vimrc file: "~/.vim/vimrc"
      user exrc file: "$HOME/.exrc"
       defaults file: "$VIMRUNTIME/defaults.vim"
  fall-back for $VIM: "/usr/local/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -g -O2 -D_REENTRANT -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 
Linking: gcc -L/usr/local/lib -Wl,--as-needed -o vim -lm -ltinfo -ldl 

In my Dockerfile, I clone my .vim directory which also makes use of Vim 8's native plugin management. After building and getting into that container, my Vim environment functions as expected but none of the plugins are recognised.

Upon typing :set rtp?, I can see that all the plugin sources are recognised but when I try to use a plugin, I end up with the exact error E492: Not an editor command: ALEInfo.

I read that it could be about Git's handling of line endings. So I tried git config --global core.autocrlf input but that also didn't help.

Another aspect of the issue is that if I remove a plugin submodule and re-add it, it starts working.

This is a weird issue for me because my Vim config works right out-of-the-box with all the plugins included outside a Docker container when I clone it to my Mac or another Linux box as a VPS.

What am I missing?

1 Answer 1

1

Ok, I figured it out. It's a bit embarassing but basically, I had to recursively clone my own Vim config repo.

Therefore, either at cloning time, use git clone with the --recursive flag or afterwards execute git submodule update --init.

Upon all this configuration mess, I didn't think about looking into the submodules and seeing them as empty. Silly me.

1
  • 1
    Ah, classic. That's bitten me before, too. If you have a lot of submodules (I do), you might want to know about the --jobs argument or the submodule.fetchJobs configuration option.
    – D. Ben Knoble
    Nov 19, 2021 at 17:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.