切换Python环境
conda info -e // 查看有什么环境
source activate env //切换环境
linux终端分屏 terminator
https://www.jianshu.com/p/5d1999d05d36
安装 : sudo apt-get install terminator
[ ctrl+alt+E垂直分屏, ctrl + alt+O水平分屏, ctrl + alt + D : close [右键也可以] ,Ctrl+Shift+X 当前分割的窗口最大化]
Ctrl+Shift+N 或者 Ctrl+Tab
在分割的不同窗口之间切换(向后)
Ctrl+Shift+P
在分割的不同窗口之间切换(向前)
Alt+A
将所有分割terminator同步
Alt+O
关闭分割terminator同步
美化配置:
修改或者创建.config/terminator/config文件,添加如下配置
[global_config]
title_font= Ubuntu Mono 11[keybindings]
[layouts]
[[default]]
[[[child1]]]
parent=window0
type=Terminal
[[[window0]]]
parent= ""type=Window
[plugins]
[profiles]
[[default]]
background_color= "#002b36"background_darkness= 1background_image=None
background_type=transparent
font= Ubuntu Mono 11foreground_color= "#e0f0f1"use_system_font=False
show_titlebar= False
linux 自动补全插件
zsh是一个类似余linux上原生bash shell的一个shell,是原生的bash shell的拓展,我们在敲击命令的时候,历史命令都会经常的被用到,如果terminal能够提示,就大大减少了我们的敲击历史命令的时间了,这样能够提高效率,但是原生的shell并没有提供这种功能,我这里用zsh解决。
1. oh-my-zsh安装
这种自动安装方式可能不能成功
sudo apt-get updatesudo apt-get installzshsh -c "$(wget https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"
然后termianl关闭,然后重新登陆就可以启用zsh啦
手动安装oh-my-zsh
sudo apt-get update
sudo apt-get install zsh
为root用户修改默认shell为zsh,安装完成后设置当前用户使用 zsh:chsh -s /bin/zsh,根据提示输入当前用户的密码就可以了。
安装oh-my-zsh
git clone git://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh
cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc
2.zsh-autosuggestions安装 [自动补全历史命令」
git clone https://github.com/zsh-users/zsh-autosuggestions ~/.zsh/zsh-autosuggestions
source ~/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh
然后你会惊奇的发现,你在敲击一些命令的时候,会自动提示你的历史命令,是不是很好用。zsh的更多功能,请参考我的参考文献哈。
但是这样重新打开terminal的时候,你会发现没有提示了,这个时候我们需要在zshrc中加入source操作
vim ~/.zshrc
找个空地方把下面的配置添加上去
# Load zsh-autosuggestions.
source~/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh
:wq保存退出,然后重新打开的时候就可以自动提示了
3、安装高亮:
下载:
cd ~/.oh-my-zsh/custom/plugins
配置:
sudo vim .zshrc
添加 zsh-autosuggestions
plugins=(
git
zsh-syntax-highlighting
)
保存退出!
然后source ~/.zshrc
卸载:uninstall_oh_my_zsh
我的zshrc文件配置为:
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH="/home/wu/.oh-my-zsh"# Set name of the theme to load--- if set to "random", it will
# load a random theme eachtime oh-my-zsh is loaded, in which case,
# to knowwhich specific one was loaded, run: echo$RANDOM_THEME
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
ZSH_THEME="robbyrussell"plugins=(
git
)
# Load zsh-autosuggestions.
source~/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh
source $ZSH/oh-my-zsh.sh# User configuration
# export MANPATH="/usr/local/man:$MANPATH"# You may need to manually set your language environment
# export LANG=en_US.UTF-8# Preferred editorforlocal and remote sessions
#if [[ -n $SSH_CONNECTION ]]; then# export EDITOR='vim'#else# export EDITOR='mvim'#fi# Compilation flags
# export ARCHFLAGS="-arch x86_64"#ssh# export SSH_KEY_PATH="~/.ssh/rsa_id"# Set personal aliases, overriding those provided by oh-my-zsh libs,
# plugins, and themes. Aliases can be placed here, though oh-my-zsh
# users are encouraged to define aliases within the ZSH_CUSTOM folder.
# For a full list of active aliases, run `alias`.
#
# Example aliases
# alias zshconfig="mate ~/.zshrc"# alias ohmyzsh="mate ~/.oh-my-zsh"
Ctrl+Shift+N
在分割的不同窗口之间切换(向后)
Ctrl+Shift+P
在分割的不同窗口之间切换(向前)