Something missing with Vim - error from vimrc

I'm new to Vim. When I run it from the terminal I get this error:

Error detected while processing /home/Rob/.vimrc:
line 28:
E492: Not an editor command: Plugin 'vim-pandoc/vim-rmarkdown'

It still seems to run, but I'm not really doing much with it, so I'm sure I'm just not running into the error yet. What should I fix and how should I solve it?

Rob@Rob:~ $ cat ~/.vimrc
" REQUIRED. This makes vim invoke Latex-Suite when you open a tex file.
filetype plugin on
" IMPORTANT: win32 users will need to have 'shellslash' set so that latex
" can be called correctly.
set shellslash
" OPTIONAL: This enables automatic indentation as you type.
filetype indent on
" OPTIONAL: Starting with Vim 7, the filetype of empty .tex files defaults to
" 'plaintex' instead of 'tex', which results in vim-latex not being loaded.
" The following changes the default filetype back to 'tex':
let g:tex_flavor='latex'
" this is mostly a matter of taste. but LaTeX looks good with just a bit
" of indentation.
set sw=2
" TIP: if you write your \label's as \label{fig:something}, then if you
" type in \ref{fig: and press <C-n> you will automatically cycle through
" all the figure labels. Very useful!
set iskeyword+=:
execute pathogen#infect()
syntax on
filetype plugin indent on
Plugin 'vim-pandoc/vim-rmarkdown'

This is the result of running apt search --names-only vim | grep install:

$ sudo apt search --names-only vim | grep installed
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
vim-common/oldstable,oldstable,oldstable,oldstable,now 2:8.0.0197-4+deb9u3 all [installed,automatic]
vim-gtk/oldstable,oldstable,now 2:8.0.0197-4+deb9u3 amd64 [installed]
vim-gui-common/oldstable,oldstable,oldstable,oldstable,now 2:8.0.0197-4+deb9u3 all [installed,automatic]
vim-runtime/oldstable,oldstable,oldstable,oldstable,now 2:8.0.0197-4+deb9u3 all [installed,automatic]
vim-tiny/oldstable,oldstable,now 2:8.0.0197-4+deb9u3 amd64 [installed]
8

1 Answer

Looks like the offending line is the last line in the file (line 28):

Plugin 'vim-pandoc/vim-rmarkdown'

I presume you used one of the vim plugin managers to get the plugin installed, and the plugin files are installed where they should be. If not, how did you install it? More importantly, the error message says python required. Do you have Python installed? Try:

apt search --names-only python

Which will show you packages that contain the word "python" in the package name (--names-only), and filter out those that say "installed" only (| grep installed). For example, if I do that on my computer, the output includes:

python2/eoan,now 2.7.17-1 amd64 [installed,automatic]
python3/eoan,now 3.7.5-1 amd64 [installed,automatic]

Usually Python comes pre-installed in most Ubuntu installations, so it's good to verify that it is. No need to copy the output here, but check that python 2 and/or python 3 are installed as on mine.

7

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like