git clone https://github.com/powerline/fonts.git --depth=1
cd fonts
./install.sh
cd ..
rm -rf fonts
brew install zsh
安裝zshsh -c "$(wget https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"
mkdir -p $ZSH_CUSTOM/themes && curl https://raw.githubusercontent.com/jopcode/oh-my-zsh-bunnyruni-theme/master/bunnyruni.zsh-theme -L -o $ZSH_CUSTOM/themes/bunnyruni.zsh-theme
exec $SHELL
使配置生效git clone https://github.com/zsh-users/zsh-syntax-highlighting.git
echo "source ${(q-)PWD}/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" >> ${ZDOTDIR:-$HOME}/.zshrc
source ./zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
plugins=(git zsh-autosuggestions)
git clone https://github.com/paulirish/git-open.git $ZSH_CUSTOM/plugins/git-open
plugins=(git zsh-autosuggestions git-open)
brew install macvim --with-override-system
, 關於brew源的配置請看homebrew配置: https://www.cnblogs.com/megachen/p/9156811.htmlvim --version
是否爲8.*的, 若是是則表示安裝成功" ************************** Basic Settings ************************* set nocompatible " required, so don't remove it. filetype off " required, so don't remove it. syntax on set hlsearch set ts=4 " set tab space set expandtab set sw=4 set ic " ignore case set ai set ci set nu " show line number set ruler set wildmenu set showcmd hi Pmenu ctermbg=lightblue set nofoldenable set encoding=utf8 " set foldmethod=indent set clipboard=unnamed " let vim share the clipboard with system -> really useful. set completeopt-=preview set completeopt=longest,menu set relativenumber au BufWinLeave * silent mkview " au BufRead * silent loadview " " ******************* Customized Keyboard Mapping *********************** nnoremap <space> za " open/close code folding. let mapleader = "@" " ******************* Keyboard Mapping For CompleteParameter.vim Plugin *************** " ************* Github: https://github.com/tenfyzhong/CompleteParameter.vim ********** inoremap <silent><expr> ( complete_parameter#pre_complete("()") smap <c-j> <Plug>(complete_parameter#goto_next_parameter) imap <c-j> <Plug>(complete_parameter#goto_next_parameter) smap <c-k> <Plug>(complete_parameter#goto_previous_parameter) imap <c-k> <Plug>(complete_parameter#goto_previous_parameter) " *** Warning area(You'd better don't modify anything here) ** " It's necessary to set ycm_global_ycm_extra_conf variable here so that the YCM can work. let g:ycm_global_ycm_extra_conf='~/.vim/bundle/YouCompleteMe/third_party/ycmd/.ycm_extra_conf.py' let g:ycm_key_invoke_completion = '<c-k>' " code hint " auto complete when you input 2 characters let g:ycm_semantic_triggers = { \ 'c,cpp,python,java,go,erlang,perl': ['re!\w{2}'], \ 'cs,lua,javascript': ['re!\w{2}'], \ } " close code syntax checking let g:ycm_show_diagnostics_ui = 0 let g:ycm_min_num_of_chars_for_completion=1 let g:indentLine_char = "┆" let g:indentLine_enabled = 1 let g:autopep8_disable_show_diff=1 " ================ Setting for vim status line =============== set rtp+=~/.vim/bundle/powerline/powerline/bindings/vim set guifont=Sauce\ Code\ Powerline:h14.5 set laststatus=2 set encoding=utf-8 set t_Co=256 set number set fillchars+=stl:\ ,stlnc:\ set term=xterm-256color set termencoding=utf-8 set background=light " ============================================================ set rtp+=~/.vim/bundle/Vundle.vim set rtp+=~/.vim/bundle/CompleteParameter.vim call vundle#begin() " different from other Plugins, this `Plugin 'gmarik/Vundle.vim'` statement should " be written here. Plugin 'gmarik/Vundle.vim' call vundle#end() " required, so don't remove it. filetype plugin indent on " required, so don't remove it. " ********************** Plugin Area ************************ " Install Plugin " autocmd vimenter * NERDTree Plugin 'tmhedberg/SimpylFold' Plugin 'Valloric/YouCompleteMe' Plugin 'scrooloose/nerdtree' Plugin 'kien/ctrlp.vim' " use ctrl + p to search files Plugin 'scrooloose/nerdcommenter' " commenter: \cc \cu -> use `\cc` to comment code, use `\cu` to uncomment code Plugin 'Yggdroot/indentLine' Plugin 'powerline/powerline'
vim
PluginInstall
安裝插件, 注意在安裝YCM的時候很是地慢, 請耐心等待hi Pmenu ctermbg=lightblue
語句是這是VIM彈出菜單的背景顏色, 經過normal模式下:hi查看, 顏色的值爲0-255, 每個字符表示的顏色均可以添加前綴light和dark關於YCM的配置javascript
cd ~/.vim/bundle/YouCompleteMe ./install.py --clang-completer