[工具与库]vim & git & conda

因为这些都是常用的可以敲命令行的工具,合在一起。

一、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后多行生效。 

参考文档

Vim下多行同时编辑与删除技巧 - 简书​​​​​​

缩进不用这么麻烦,选中后用 > < 分别是右缩进、左缩进。

二、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查一下。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值