Reputation: 431
I had meant to use VIM editor for developing within venv that I setup using a University machine with command to load python36 from the server I believe. (as I were to use scl
) Outside of this particular venv, I have no problem invoking vi
command to edit files, but I do inside the venv.
(venv) [----]UUN: vi ~/.vimrc
Error detected while processing /afs/inf.ed.ac.uk/user/s18/sUUN/.vimrc:
line 11:
E492: Not an editor command: Plugin 'gmarik/Vundle.vim'
line 13:
E492: Not an editor command: Plugin 'https://github.com/nvie/vim-flake8'
line 14:
E492: Not an editor command: Plugin 'scrooloose/nerdtree'
line 15:
E492: Not an editor command: Plugin 'Royal-Colorschemes'
line 16:
E492: Not an editor command: Plugin 'powerline/powerline'
line 22:
E492: Not an editor command: Bundle 'godlygeek/tabular'
I do not understand why. Can someone enlighten.. Following is my ~/.vimrc
not on the venv.
1 set nocompatible
2 filetype off
3
4 " set the runtime path to include Vundle and initialize
5 set rtp+=~/.vim/bundle/Vundle.vim
6 call vundle#begin()
7 " alternatively, pass a path where Vundle should install plugins
8 "call vundle#begin('~/some/path/here')
9
10 " let Vundle manage Vundle, required
11 Plugin 'gmarik/Vundle.vim'
12 "place plugin here
13 Plugin 'https://github.com/nvie/vim-flake8'
14 Plugin 'scrooloose/nerdtree'
15 Plugin 'Royal-Colorschemes'
16 Plugin 'powerline/powerline'
17 " All of your Plugins must be added before the following line
18 call vundle#end() " required
19
20 filetype plugin indent on
21
22 Bundle 'godlygeek/tabular'
23 set fileencodings=utf-8
24 set encoding=utf-8
25
26 syntax on
27
28 set tabstop=8
29 set expandtab
30 set shiftwidth=4
31 set softtabstop=4
32
33 set nu
34 set paste
35
36 set autoindent
37 set cindent
38
39 set laststatus=2
40 set modeline
41 set background=dark
42
43 " Key Map "
44 nmap nerd :NERDTreeToggle<CR>
Using VIM worked!
Thank you. (but why does it not work for vi
?)
Upvotes: 0
Views: 235
Reputation: 12895
It doesn't work in vi, because you've haven't set compatible
. Instead, you've explicitly set in your .vimrc the non compatible mode: set nocompatible
. You can try setting the compatible mode on, but I doubt if any of these plugins will work -- but I haven't personally tested this point. Rather, I keep to the rule of thumb: use vim when using plugins written for vim.
Upvotes: 2