因为这些都是常用的可以敲命令行的工具,合在一起。
一、vim
1、设置tab = 4 spaces
打开 ~/.vimrc
粘贴以下内容进去
filetype plugin indent on
" show existing tab with 4 spaces width
set tabstop=4
" when indenting with '>', use 4 spaces width
set shiftwidth=4
" On pressing tab, insert 4 spaces
set expandtab
不需要source,再打开vim时会自动生效。
参考文档
whitespace - Tab key == 4 spaces and auto-indent after curly braces in Vim - Stack Overflow
2、多行插入
ctrl + v 进入visual block模式,选中多行,shift + I(即大写 i )编辑第一行,esc后多行生效。
参考文档
缩进不用这么麻烦,选中后用 > < 分别是右缩进、左缩进。
二、git
1、rebase
提MR之前,拉master的正确的方法
git rebase origin/master
git在工作中正确的使用方式----git rebase篇_nrsc-CSDN博客_git rebase
我之前都直接 git pull origin master 的,据说不太好,咱也不知道哪里不好。
合并commit的方法
git rebase -i
设置pull时的rebase策略,默认false,即merge
git config pull.rebase true
2、存密码
git config --global credential.helper store
之后再输入就会本地保存
三、anaconda
命令速查:Command reference — conda 4.10.3.post34+dc415df3 documentation
查询conda环境
conda info --envs
切换conda环境
conda activate $your_env
切换完直接用pip就行了,不用pip3。可以pip --version查一下。