-
zsh
2020-12-30 23:06:22这篇文章主要记录一下安装zsh 首先是安装zsh yay -S zsh 或 sudo pacman -S zsh (Manjaro 或 archlinux 下) 然后是安装oh-my-zsh 先是 安装omz wget ...这篇文章主要记录一下安装zsh
首先是安装zsh
yay -S zsh 或 sudo pacman -S zsh (Manjaro 或 archlinux 下)
然后是安装oh-my-zsh
先是 安装omz
wget https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh
遇到的第一个问题
GnuTLS: 在 pull 函数中出错。无法建立 SSL 连接。
解决方案:
修改 /etc/hosts , 添加
199.232.96.133 raw.githubusercontent.com
然后就可以安装了,安装完成后,不要忘了
sh install.h
修改zsh为默认的指令
cat /etc/shell //查看所有shell sudo chsh -s /usr/bin/zsh //修改zsh为默认
-
ZSH
2020-05-02 23:08:12oh my zsh 随笔 推荐手动安装oh my zsh (较快) git clone https://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh #下载 cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc #应用 卸载 uninstall_oh_...oh my zsh 随笔
推荐手动安装oh my zsh (较快)
git clone https://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh #下载 cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc #应用
卸载
uninstall_oh_my_zsh
插件
git 默认开启的插件,提供了大量 git 的alias. z 强大的目录自动跳转命令,会记忆你曾经进入过的目录,用模糊匹配快速进入你想要的目录. 安装zsh-syntax-highlighting语法高亮插件 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 ~/.zshrc
记录一下zsh源文件内容,方便自定义
# 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="/root/.oh-my-zsh" 1.zsh主题 # Set name of the theme to load --- if set to "random", it will # load a random theme each time oh-my-zsh is loaded, in which case, # to know which specific one was loaded, run: echo $RANDOM_THEME # See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes ZSH_THEME="robbyrussell" # Set list of themes to pick from when loading at random # Setting this variable when ZSH_THEME=random will cause zsh to load # a theme from this variable instead of looking in ~/.oh-my-zsh/themes/ # If set to an empty array, this variable will have no effect. # ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" ) # Uncomment the following line to use case-sensitive completion. # CASE_SENSITIVE="true" # Uncomment the following line to use hyphen-insensitive completion. # Case-sensitive completion must be off. _ and - will be interchangeable. # HYPHEN_INSENSITIVE="true" 2.是否自动更新 # Uncomment the following line to disable bi-weekly auto-update checks. # DISABLE_AUTO_UPDATE="true" 3.更新周期 # Uncomment the following line to change how often to auto-update (in days). # export UPDATE_ZSH_DAYS=13 # Uncomment the following line to disable colors in ls. # DISABLE_LS_COLORS="true" # Uncomment the following line to disable auto-setting terminal title. # DISABLE_AUTO_TITLE="true" # Uncomment the following line to enable command auto-correction. # ENABLE_CORRECTION="true" # Uncomment the following line to display red dots whilst waiting for completion. # COMPLETION_WAITING_DOTS="true" # Uncomment the following line if you want to disable marking untracked files # under VCS as dirty. This makes repository status check for large repositories # much, much faster. # DISABLE_UNTRACKED_FILES_DIRTY="true" # Uncomment the following line if you want to change the command execution time # stamp shown in the history command output. # You can set one of the optional three formats: # "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd" # or set a custom format using the strftime function format specifications, # see 'man strftime' for details. # HIST_STAMPS="mm/dd/yyyy" # Would you like to use another custom folder than $ZSH/custom? # ZSH_CUSTOM=/path/to/new-custom-folder 4.zsh插件 # Which plugins would you like to load? # Standard plugins can be found in ~/.oh-my-zsh/plugins/* # Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/ # Example format: plugins=(rails git textmate ruby lighthouse) # Add wisely, as too many plugins slow down shell startup. plugins=(git) 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 editor for local 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"
再记录一个没用过的插件,据说很强大但是好像有冲突
安装incr自动补全插件 cd ~/.oh-my-zsh/plugins/ mkdir incr && cd incr wget http://mimosa-pudica.net/src/incr-0.2.zsh vi ~/.zshrc source ~/.oh-my-zsh/plugins/incr/incr*.zsh source ~/.zshrc
END
-
Mac OSX终端安装主题(oh my zsh)
2017-03-17 01:49:33阿里云服务器优惠券 优惠券 ...而使用zsh shell+Oh My Zsh主题,就能让我们的终端瞬间高大上. bash shell默认读取的是当前用户下的.bash_profile文件,而zsh shell默认读取的是当前用户下的.zshrc文件 1.Oh My Zsh...乐趣阿里云网
一.安装Oh My Zsh
写在前面
Mac OSX默认使用bash shell,在耍命令的时候,文件的显示没有带颜色.而使用zsh shell+Oh My Zsh主题,就能让我们的终端瞬间高大上.
bash shell默认读取的是当前用户下的.bash_profile文件,而zsh shell默认读取的是当前用户下的.zshrc文件
1.Oh My Zsh官网地址:http://ohmyz.sh/
2.Mac OSX默认使用的是bash shell,我们需要切换到zsh ,使用右侧命令来进行切换 chsh -s /bin/zsh
3.按照官网的安装方法总是提示连接超时,可以在终端中使用如下命令来安装 curl -L https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh | sh
4.安装成功以后,如上图所示.
二.配置Oh My Zsh
1.使用右侧命令来打开Oh My Zsh的配置文件 vi ~/.zshrc
2.搜索ZSH_THEME找到主题配置,如下图所示
3.可打开Oh My Zsh主题展示网站https://github.com/robbyrussell/oh-my-zsh/wiki/Themes ,选择喜欢的注意进行更改.这里使用的是vim来打开的配置文件,所以需要按字母i进行插入,然后把光标移动到ZSH_THEME这行,更改主题键值对,例如: ZSH_THEME="agnoster" ,按ESC键后, 键入:wq
保存退出.
4.关闭终端,重新打开,键入ls,效果如下
三.终端主题的安装
1.solarized主题下载地址:https://github.com/altercation/solarized
2.找到对应的主题,比如我们用的是Terminal终端(Mac OSX自带),就找到osx-terminal.app-colors-solarized下的三个文件,双击安装即可.
四.配色方案的切换
1.打开终端-->偏好设置-->描述文件-->选择喜欢的配色方案-->点击默认
五,效果展示
六.Oh My Zsh的升级
1.输入右侧命令,回车即可 upgrade_oh_my_zsh
七.Oh My Zsh的卸载
1.输入右侧命令,回车即可 uninstall_oh_my_zsh
八.默认终端的替代方案
1.如果觉得Mac OSX的终端不够强大,可以考虑安装iTerm2
2.iTerm2官方下载地址 http://www.iterm2.com/downloads.html
3.主题的安装及Oh My Zsh的安装,与上面都是一样的,只是主题的选择有点区别,但都是在Preference里进行设置
4. 配置背景颜色
九.Powerline字体下载安装
效果展示
1.powerline字体的安装
# clone 先克隆 git clone https://github.com/powerline/fonts.git # install 后安装 cd fonts ./install.sh
2.安装完powerline的字体,设置Items2的字体,打开Items2-->Preferences-->Profiles-->Text-->Font
说明:实现上面的效果,还需要更改Items2的字体为powerline的字体(因为有些图标,比如上面的箭头图标,是要用powerline字体来实现的)
3.为Oh My Zsh安装命令高亮 地址: https://github.com/zsh-users/zsh-syntax-highlighting/blob/master/INSTALL.md,找到Oh My Zsh的说明,并按说明操作(无论当前处于什么目录下都可,因为该命令是将命令高亮插件安装到当前用户的.oh-my-zsh/custom/plugins目录下)
1.Clone this repository in oh-my-zsh's plugins directory:
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
2.Activate the plugin in
~/.zshrc
:plugins=( [plugins...] zsh-syntax-highlighting)
3.Source
~/.zshrc
to take changes into account:source ~/.zshrc
注意:步骤2中,配置插件的时候打开.zshrc文件,找到plugins,按如下配置
vi ~/.zshrc
效果图
十,给vim安装solarized配色方案
Note: I recommend using Tim Pope's pathogen plugin to install this
colorscheme. See https://github.com/tpope/vim-pathogen . If you've installed
pathogen properly you can install Solarized with the following commands,
followed by the .vimrc configuration below.
1.打开中端,执行下面的命令,如果~/.vim下没有bundle文件夹,则cd ~./vim 然后mkdir bundle文件夹
$ cd ~/.vim/bundle
$ git clone https://github.com/altercation/vim-colors-solarized.git2.执行下面的拷贝命令
cp ~/.vim/bundle/vim-colors-solarized/colors/solarized.vim ~/.vim/colors/
3.执行如下命令
vi ~/.vimrc 按i键,然后拷贝下面的配置到这个文件
set nu
syntax enable
set background=dark
colorscheme solarized参考文档:https://github.com/altercation/solarized
vim的效果最后是这样的
Info.plist
十一.vim插件管理
其实现在在github上已经出现了很多vim的插件管理项目,比如vundle和vim-plug,基于这种开源项目,可以基于它来安装我们项目要的vim插件,从此不用手动去安装插件.好处就是可以避免繁琐和出错.
关于vim的包管理器可以参考这篇博文
https://ssarcandy.tw/2016/08/17/vim-plugin-manager/
目前我在用的就是vim-plug,官网地址
https://github.com/junegunn/vim-plug
IDEA(Intellij)修改字体为powerline
乐趣阿里云网
-
quickz-sh:使用功率级别为9k的zsh,oh-my-zsh快速安装zsh,zsh完成,zsh-autosuggestions,zsh语法,突出...
2021-02-05 18:49:05quickz-sh:使用功率级别为9k的zsh,oh-my-zsh快速安装zsh,zsh完成,zsh-autosuggestions,zsh语法,突出显示历史记录,子字符串搜索 -
zsh-kitty:zsh kitty插件-源码
2021-02-16 22:24:27zsh-kitty 描述 版本: 0.0.0 网页: 下载: 来源: 关键字: zsh-kitty 目录: 任务 https://github.com/mafredri/zsh-async https://github.com/luismayta/zsh-core ... -
igeek-zsh-theme:ZSH主题-源码
2021-02-06 05:05:06igeek-zsh-theme:ZSH主题 -
zsh:我的Arch系统的zsh config-源码
2021-03-06 20:43:56zsh:我的Arch系统的zsh config -
zsh-completions:Zsh的其他完成定义-源码
2021-02-05 21:58:19zsh-completions:Zsh的其他完成定义 -
zsh-theme:另一个zsh主题-源码
2021-02-05 15:04:33zsh-theme:另一个zsh主题 -
zsh切换bash bash切换zsh
2020-12-24 10:23:46 -
zsh shell
2020-08-23 17:19:14zsh shell 安装zsh shell 安装安装Oh-my-zshzsh主题插件安装方法常见错误我的 `.zshrc` 文件配置 zsh shell 安装 首先,查看linux系统自带哪些shell cat /etc/shells 1.安装zsh: sudo apt-get install zsh 2.... -
linux-使用zsh和zgen的简单zsh快速启动
2019-08-13 18:38:41使用zsh和zgen的简单zsh快速启动 -
.oh-my-zsh:我的zsh配置-源码
2021-02-12 07:26:19.oh-my-zsh 我的zsh配置 -
zsh配置
2021-03-05 19:46:51记录一下终端的配置过程,由于系统是Catalina,所以只记录安装oh-my-zsh及之后优化过程 写在前面 今天更新了一下oh-my-zsh,然后补全gg了,咋用咋难受,就索性重新装一下oh-my-zsh 环境准备 zsh 5.7.1 (Macos ... -
zsh安装
2020-12-04 12:42:33apt install -y zsh apt install -y git 2. 下载码云安装包 wget https://gitee.com/mirrors/oh-my-zsh/raw/master/tools/install.sh chmod 777 install.sh 3. 编辑install.sh 找到以下部分 ZSH=ZSH:− /.oh−...