My centos 7 has two vim binaries:
/usr/bin/vi
/usr/bin/vim
When launching either of them they bring up:
VIM - Vi IMproved
version 7.4.1099
From searching around online I believe that these two versions are vim and vim-minimal. The problem is that vi and vim-minimal interpert the ~/.vimrc differently. When opening vim its great. When opening vim-minimal I get lots of errors. Below is a representation of my ~/.vimrc file:
set number
set nowrap
set modeline
set clipboard=unnamedplus "Enables mouse center clip pasting, while holding shift, in insert mode.
"Below sets up the mouse in such a way that allows vi split screen resizing while in tmux and screen.
set mouse+=a
if &term =~ '^screen'
" tmux knows the extended mouse mode
set ttymouse=xterm2
endif
""""""""""""""""""""""""""""""""""""""""""""""""
""" User Defined Functions
""""""""""""""""""""""""""""""""""""""""""""""""
"Opens up sage specific work in new tabs
fu! Setup1()
:bd!|e /home/me/example1.h | vsplit /home/me/example1.cc
:tabnew /home/me/example2.h | vsplit /home/me/example2.cc
:tabnew /home/me/example3.h | vsplit /home/me/example3.cc
:tabnew /home/me/example4.h | vsplit /home/me/example4.cc
:tabnew /home/me/example5.h | vsplit /home/me/example5.cc
:tabnew /home/me/example6.h | vsplit /home/me/example6.cc
endfunction
"Opens up the most edited rc files in new tabs
fu! RCS()
:bd!|e ~/.cshrc
:tabnew ~/.vimrc
:tabnew ~/.tmux.conf
endfunction
The problem is my user defined functions. When /usr/bin/vi is opened it opens all of the documents in my two functions in new tabs. A resonable workaround would be to not use /usr/bin/vi but it is what git opens.
Ideally I would be able to have an if statement that checks what binary is running this rc file. Is that possible?