Before today I was using /etc/vim/vimrc
to configure my vim setup. Today I thought of creating .vimrc
file. So, I used
touch .vimrc
cat /etc/vim/vimrc > .vimrc
So, now when I open any file with vim I get the following errors:
Error detected while processing /home/ronnie/.vimrc:
line 68:
E122: Function SplitColors already exists, add ! to replace it
line 77:
E122: Function ChangeColors already exists, add ! to replace it
line 171:
E174: Command already exists: add ! to replace it
line 174:
E174: Command already exists: add ! to replace it
Press ENTER or type command to continue
I have both /etc/vim/vimrc
and .vimrc
file located in my system. So, is this the reason I am getting this error because from now on I would like to use only .vimrc
to configure my vim setup.
This is the solution by example since most of the answers are correct above but they don't directly help you solve the problem. Areas of interest in bold.
" code with redefinition issues
function CloseDuplicateTabs() endfunction
command CloseDupTabs :call CloseDuplicateTabs()
" fixed code with overrides
function! CloseDuplicateTabs() endfunction
command! CloseDupTabs :call CloseDuplicateTabs()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With