jdhao / jdhao.github.io

My personal blog: https://jdhao.github.io/
24 stars 6 forks source link

2021/07/11/from_vim_plug_to_packer/ #48

Open Ka-lip opened 2 years ago

Ka-lip commented 2 years ago

post: https://jdhao.github.io/2021/07/11/from_vim_plug_to_packer/

Hello jdhao,

I guess this is just a small typo. lua require('plugins.lua') should be lua require('plugins') since the former command asks to load a file in plugins/lua.lua.

Please correct me if I am wrong.

Thank you again for your posts and looking forward to learning more stuff from your blog.

Best regards, Kalip

jdhao commented 2 years ago

Hi, Kalip, this is indeed a typo. It should be lua require('plugins') if you put it inside vim script, or require 'plugins' if you put it inside a lua file.

Bintux commented 2 years ago

Hi jdhao,

I got an error using the plugins.lua example as you have posted it on the blog. When checking your file in git I noticed that you set the fn variable prior which is missing on your blog code snipet. I added the line "local fn = vim.fn" and then the error would got away and packer would actually be cloned. Thank you, Eike

jdhao commented 2 years ago

yeah, the snippet is used for reference, not meant to be used verbatim. You should refer to the complete script I linked in that post for a working script.

NostraDavid commented 2 years ago

I still had to run :UpdateRemotePlugins manually :(

Oh well...