When I start just vi which is alias to vim:
$ which vi
alias vi='vim'
/usr/bin/vim
my ~/.vimrc is used which is great, every configuration and all plugins are being properly loaded and etc.
However if I try to run:
vim -u ~/.vimrc
or
vi -u ~/.vimrc
I get the following error:
Eror detected while processing /home/dstoev/.vimrc:
line 10:
E117: Unknown function: pathogen#infect
line 19:
E15: Invalid expression: {
line 20:
E10: \ should be followed by /, ? or &
line 21:
E10: \ should be followed by /, ? or &
line 22:
E10: \ should be followed by /, ? or &
line 23:
E10: \ should be followed by /, ? or &
Press ENTER or type command to continue
My ~/.vimrc :
"filetype plugin indent on
" show existing tab with 4 spaces width
set tabstop=4
" when indenting with '>', use 4 spaces width
set shiftwidth=4
" On pressing tab, insert 4 spaces
set expandtab
set laststatus=2
syntax on
execute pathogen#infect()
" let g:indent_guides_start_level = 1
let g:indent_guides_enable_on_vim_startup = 1
" automatically start indent_guides plugin
let g:indent_guides_auto_colors = 0
"hi IndentGuidesOdd guibg=red ctermbg=4
"hi IndentGuidesEven guibg=green ctermbg=4
hi IndentGuidesOdd ctermbg=black
hi IndentGuidesEven ctermbg=darkgrey
let g:lightline = {
\ 'active': {
\ 'left': [ [ 'mode', 'paste' ], [ 'readonly', 'absolutepath', 'modified' ] ],
\ }
\ }
" show full path in the status bar,plugin lightline
Running VIM - Vi IMproved 8.1 (2018 May 18, compiled Mar 4 2019 16:22:18) on 4.20.13-200.fc29.x86_64 as a normal user (with sudo capabilities/wheel group).
vim -Nu ~/.vimrc
work?-N
enablesnocompatible
(see answer by D. Ben Knoble). – Hotschke Mar 10 '19 at 10:25