Problem Origin: Git under Mac can't complete command, color scheme is imperfect
Mac OS Yosemite 10.10.3
git version 2.3.2 (Apple Git-55)
Processing results: Git commands can be complete, the color scheme is still not perfect, but the vim color can be
Steps to enter:
1. Vim Syntax highlighting
Enter the. vimrc file in the user's home directory, and if not, create a
$ VI ~/.VIMRC
Add a row
Syntax on
Save exit, OK syntax highlighting get√
(Before using Vi/vim to open a similar. py file, there is no syntax highlighting, and the Linux vim is there, maybe OS X vim by default highlighting off)
2.git [Tab] Completion
2.1 First Install Bash-completion
$ Brew Install Bash-completion
After the installation is complete there will be a
If [-F $ (brew--prefix)/etc/bash_completion]; Then . $ (Brew--prefix)/ETC/BASH_COMPLETIONFI
Add this segment to ~/.bash_profile (if not, create a new one)
2.2 Found Git-completion
$ git clone https://github.com/git/git.git
CD to the "contrib/completion/" directory, the Git-completion.bash Copy to the user home directory and rename the. Git-completioin.bash (hidden)
CP Git-compeltion.bash ~/.git-completion.bash
2.3 Open ~/.bash_profile Again, add a row
$ source ~/.git-completion.bash
Note: The reference and many of the tips are in the file ~/.BASHRC (if not a new one) added in this line, tried invalid, Linux inside is. BASHRC and Mac is. Bash_profile
Save exit, OK Git[tab] Complete get√
ref1:http://elf8848.iteye.com/blog/1582137
ref2:http://www.xiaomeiti.com/note/3613
Vim in Mac OS X turns on color matching and git completion