个人电脑配置

要有合适自己的兵器

Posted by Doni Daniel on August 8, 2019

##Github 配置

1
2
git config --global user.name <name>
git config --global user.email <email>
1
2
ssh-keygen
cat ~/.ssh/id_rsa.pub

##Chrome Download Chrome

iTerm2(https://www.iterm2.com/downloads.html)

Download iTerm2

##brew

1
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
1
brew install wget

##oh-my-zsh + agnoster 安装zsh,并切换zsh

1
2
3
brew install zsh
chsh -s /bin/zsh
echo $SHELL

mac 出现 chsh: no changes made问题 请使用

1
2
dscl . -read /Users/$USER/ UserShell
exec su - $USER

下载oh-my-zsh

1
2
wget https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | sh
cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc

###font + color

1
2
3
git clone https://github.com/powerline/fonts.git
cd fonts
./install.sh

把iTerm 2的设置里的Profile中的Text 选项卡中里的Regular Font和Non-ASCII Font的字体都设置是12pt Meslo LG S DZ Regular for Powerline

1
git clone https://github.com/altercation/solarized.git

通过profile->color->load presets选择刚刚安装的配色主题即可

###change Theme

1
2
3
4
git clone https://github.com/fcamblor/oh-my-zsh-agnoster-fcamblor.git
cd oh-my-zsh-agnoster-fcamblor
./install
cd
1
2
git clone git://github.com/zsh-users/zsh-syntax-highlighting.git
vim ~/.zshrc
1
2
3
4
5
# 在~/.zshrc中进行修改
ZSH_ZHEME="agnoster"
# 根据本机路径进行添加修改
source ~/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
plugins=(zsh-syntax-highlighting)
1
source ~/.zshrc

至此,最终效果出现

##vim 配置

添加.vimrc(vim配置文件)

1
2
3
4
5
6
7
wget  http://files.cnblogs.com/ma6174/vimrc.zip
unzip -o vimrc.zip -d ~/
# rm vimrc.zip
#解决E117: Unknown function: pathogen#infect
#安装pathogen插件
mkdir -p ~/.vim/autoload ~/.vim/bundle
curl -LSso ~/.vim/autoload/pathogen.vim https://tpo.pe/pathogen.vim

###Vundle安装

1
2
3
brew install ctags
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
vim ~/.vimrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#在~/.vimrc最后添加
" ************** 插件管理与设置 ************ "
 
" vundle 环境设置
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
" vundle 管理的插件列表必须位于 vundle#begin() 和 vundle#end() 之间
call vundle#begin()
Plugin 'VundleVim/Vundle.vim'
Plugin 'Lokaltog/vim-powerline' "status 美化
Plugin 'octol/vim-cpp-enhanced-highlight' "对c++语法高亮增强
Plugin 'kshenoy/vim-signature' "书签可视化的插件
Plugin 'vim-scripts/BOOKMARKS--Mark-and-Highlight-Full-Lines' "书签行高亮
Plugin 'majutsushi/tagbar' "taglist的增强版,查看标签,依赖于ctags
Plugin 'scrooloose/nerdcommenter' "多行注释,leader键+cc生成, leader+cu删除注释
Plugin 'scrooloose/nerdtree' "文件浏览
Plugin 'Valloric/YouCompleteMe' "自动补全
Plugin 'kien/ctrlp.vim' "搜索历史打开文件,在命令行模式下按ctrl+p触发
Plugin 'vim-scripts/grep.vim' "在命令行模式使用grep命令,:Grep
Plugin 'Lokaltog/vim-easymotion' "快速跳转,按两下leader键和f组合
Plugin 'vim-scripts/ShowTrailingWhitespace.git' "高亮显示行尾的多余空白字符
Plugin 'vim-scripts/indentpython.vim.git'
Plugin 'vim-scripts/Solarized.git' "主题方案
Plugin 'nathanaelkane/vim-indent-guides.git' "缩进对齐显示
"Plugin 'vim-scripts/indexer.tar.gz' "自动生成标签
"Plugin 'vim-scripts/DfrankUtil' "indexer 依赖
"Plugin 'vim-scripts/vimprj' "indexer 依赖
Plugin 'davidhalter/jedi-vim' "python 补全,不依赖于tags,但比较慢,可以使用indexer替换,但不能跳转项目外
Plugin 'vim-scripts/Markdown'
Plugin 'tpope/vim-surround'
Plugin 'ekalinin/Dockerfile.vim'
" 插件列表结束
call vundle#end()
filetype on
 
" Powerline 设置
" 设置状态栏主题风格
let g:Powerline_colorscheme='solarized256'

随便一个文件下尾行模式下输入

1
:PluginInstall

##百度网盘 点击下载