You are not logged in.
Context:
I have been trying to set up Latex, with nvim. Doing so i came across "Plug" for nvim and have been trying to set it up, (i didn't default have .vimrc, i so i made it my self)
Things i have created my self.
"Autoload" in vimrc
".vimrc", ".vimrc.plug"
i have placed the code seen beblow in the file:
###Call the .vimrc.plug file
if filereadable(expand("~/.vimrc.plug"))
source ~/.vimrc.plug
endif
let data_dir = has('nvim') ? stdpath('data') . '/site' : '~/.vim'
if empty(glob(data_dir . '/autoload/plug.vim'))
silent execute '!curl -fLo '.data_dir.'/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
endifI get the following error code from nvim, when i try to source it. can't source it from terminal since it thinks it is a bash script (might be the root of the problem)
Error detected while processing /home/$NAME/.vimrc:
line 1:
E488: Trailing characters: Call the .vimrc.plug file: ###Call the .vimrc.plug file
Error detected while processing /home/$NAME/.vimrc[3]../home/$NAME/.vimrc.plug:
line 1:
E488: Trailing characters: Fugitive Vim Github Wrapper: ###Fugitive Vim Github Wrapper
line 4:
E488: Trailing characters: Vim Latex Plug: ###Vim Latex Plug
line 7:
E488: Trailing characters: Nvim Latex Plug: ### Nvim Latex Plug
line 9:
E488: Trailing characters: Plugin for vim plugins: ### Plugin for vim plugins
line 52:
E488: Trailing characters: Fugitive Vim Github Wrapper: ###Fugitive Vim Github Wrapper
line 55:
E488: Trailing characters: Vim Latex Plug: ###Vim Latex Plug
line 58:
E488: Trailing characters: Nvim Latex Plug: ### Nvim Latex PlugOffline
Vim configuration files use " to comment, and if I have enough coffe in my system, I see you used #.
Last edited by Adriik (2023-02-24 12:37:09)
I'm just someone. Please use [code] [/code] tags.
Offline
You can see the errors are all on lines where you used # for comments. .vimrc does not use # for comments. Use " at the beginning of a commented line instead.
" Call the .vimrc.plug file(edit) snaked again.
Last edited by 2ManyDogs (2023-02-24 12:42:24)
Offline
Arhhh thanks alot,
another question, it says when i try to add the automated installation of missing plugins, that the *, in the 3. last line of code, that it is an error. using the * (is it outdated or do i need some dependencise to make it recognize the * ) im not to familiere with vim, so i hope its okay i ask ![]()
" Install vim-plug if not found
if empty(glob('~/.vim/autoload/plug.vim'))
silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
endif
" Run PlugInstall if there are missing plugins
autocmd VimEnter * if len(filter(values(g:plugs), '!isdirectory(v:val.dir)'))
\| PlugInstall --sync | source $MYVIMRC
\| endifLast edited by ELODollZ (2023-02-25 13:58:02)
Offline