[新增] 新增zsh配置,vim配置,ssh公钥; 发行版-arch 使用脚本
This commit is contained in:
parent
3aef9007f5
commit
9be3d3d9e9
2
发行版/Arch/定期运行-Arch版
Executable file
2
发行版/Arch/定期运行-Arch版
Executable file
|
@ -0,0 +1,2 @@
|
||||||
|
pacman -Syu
|
||||||
|
pkgfile --update
|
5
发行版/Arch/清理缓存-Arch版
Executable file
5
发行版/Arch/清理缓存-Arch版
Executable file
|
@ -0,0 +1,5 @@
|
||||||
|
# 清理pacman的下载缓存
|
||||||
|
## 清理时保留最近一个版本的包
|
||||||
|
paccache -rk1
|
||||||
|
## 清理所有以及卸载的包
|
||||||
|
paccache -ruk0
|
1
配置/authorized_keys
Normal file
1
配置/authorized_keys
Normal file
|
@ -0,0 +1 @@
|
||||||
|
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCTLiA/lthLkG3C1dGKF7Ls32M5iTEViYUHcA8rIldL7YlZFFxd/G0lrzvYKLh4rNpDIuSPfUOCWK0owKZDzaoz1MqXxqezzNDwZ8vZ33LbR5bFnGUst55tjEJNg/Zx9XdXmCcpSU2TE5FE7IGHjqOf+hi7k0tY6DCYiuJjK6Bo99O1ZsrASDjga8ksYChZpCDNpV8ZHP7urgO1Ztf/ukrknm6EcKWCu2fO+UbwRSHTz73lTMAuaSPdNI7x37jIoLHmUt0LUjIrzRRCLnYXeGkBvlU+fi6JDdLiA3DKQTS/QSrzdvLpP1e+qPaFIY0KMtnRaXXk+G/FdK/Z4hyZK/ZLgVhe+m1d3CovSQz5S2XwXFqlpnbE8srT3xG5pfdhdsuZ6LW9BAj/3QLlzLsd2lYBhmxYo287MSPnNERZ4qZ1iwWt5283tfHseD9WESSJrW0tTZPEFViI+UmDAR7lYYptBFT03lY/VJzB8/yBddcqnjn0lcKMyQcmT7noj+rxNF8= xunmi@archlinux
|
31
配置/vimrc
Normal file
31
配置/vimrc
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
set nocompatible " 去除 vi 一致性
|
||||||
|
set number " 打开行数查看
|
||||||
|
set cursorline " 光标所在的当前行高亮。
|
||||||
|
set linebreak " 只有遇到指定的符号(比如空格、连词号和其他标点符号),才发生折行。
|
||||||
|
|
||||||
|
set laststatus=2 " 是否显示状态栏。0 表示不显示,1 表示只在多窗口时显示,2 表示显示。
|
||||||
|
set ruler " 在状态栏显示光标的当前位置(位于哪一行哪一列)。
|
||||||
|
set undofile " 保留撤销历史。
|
||||||
|
set undodir=~/.vim/.undo " 设置操作历史文件的保存位置。
|
||||||
|
set encoding=utf-8 " 使用 utf-8 编码
|
||||||
|
set autoindent " 按下回车键后,下一行的缩进会自动跟上一行的缩进保持一致。
|
||||||
|
set smartindent " 智能缩进
|
||||||
|
set tabstop=4 " 按下 Tab 键时,Vim 显示的空格数。
|
||||||
|
filetype indent on " 开启文件类型检查,并且载入与该类型对应的缩进规则。
|
||||||
|
filetype on " 开启文件类型检测
|
||||||
|
filetype plugin indent on " 开启文件类型插件检测
|
||||||
|
syntax on " 开启语法高亮
|
||||||
|
|
||||||
|
set showmode " 在底部显示,当前处于命令模式还是插入模式。
|
||||||
|
set showcmd " 命令模式下,在底部显示,当前键入的指令。比如,键入的指令是 2y3d,那么底部就会显示 2y3,当键入 d 的时候,操作完成,显示消失。
|
||||||
|
set mouse= " 支持使用鼠标(但这样会导致无法复制!)
|
||||||
|
|
||||||
|
let g:airline#extensions#tabline#enabled = 1 " 设置开启 tab 样式
|
||||||
|
let g:airline#extensions#tabline#formatter = 'jsformatter' " 设置默认 tab 栏样式
|
||||||
|
let g:airline_theme='angr' " 选择配色
|
||||||
|
|
||||||
|
" 使用目录启动时自动启动侧栏
|
||||||
|
autocmd StdinReadPre * let s:std_in=1
|
||||||
|
autocmd VimEnter * if argc() == 1 && isdirectory(argv()[0]) && !exists('s:std_in') |
|
||||||
|
\ execute 'NERDTree' argv()[0] | wincmd p | enew | execute 'cd '.argv()[0] | endif
|
||||||
|
|
94
配置/zshrc
Normal file
94
配置/zshrc
Normal file
|
@ -0,0 +1,94 @@
|
||||||
|
export ZSH=/etc/oh-my-zsh
|
||||||
|
# 添加环境变量
|
||||||
|
export PATH=/home/xunmi/.go_env/bin:/home/xunmi/.cargo/bin:$HOME/bin:/usr/local/bin:/home/xunmi/.local/bin:$PATH
|
||||||
|
# GO默认缓存路径
|
||||||
|
export GOPATH=/home/xunmi/.go_env
|
||||||
|
|
||||||
|
|
||||||
|
# zsh 主题,在线预览 https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
|
||||||
|
# 推荐主题: gnzh、jispwoso[双行: 1 用户名-目录-Git]
|
||||||
|
# af-magic [目录-Git, 用户名后置]; fishy [仿照 fish,类似原生 shell,但是路径会缩写]
|
||||||
|
# alanpeabody [用户名-目录, Git 后置]; dst [双行: 1 用户名-目录-Git, 2 后置时间]
|
||||||
|
# rkj-repos [双行: 1 用户名-目录-时间, 2 返回值-Git]; bira [双行: 1 用户名-目录-Git]
|
||||||
|
ZSH_THEME="rkj-repos"
|
||||||
|
|
||||||
|
# 启动大小写区分
|
||||||
|
# CASE_SENSITIVE="true"
|
||||||
|
|
||||||
|
# 使用不敏感连字符的补全。 _ 和 - 将是可互换的。
|
||||||
|
HYPHEN_INSENSITIVE="true"
|
||||||
|
|
||||||
|
# 取消下列行之一的注释,以更改自动更新行为
|
||||||
|
# zstyle ':omz:update' mode disabled # 禁用自动更新
|
||||||
|
zstyle ':omz:update' mode auto # update 会自动更新而不需要询问
|
||||||
|
# zstyle ':omz:update' mode reminder # 提醒我要及時更新
|
||||||
|
|
||||||
|
# 取消下面一行的注释,以更改自动更新的频率(以天为单位)。
|
||||||
|
# zstyle ':omz:update' frequency 13
|
||||||
|
|
||||||
|
# 修复链接 URL 错误的问题
|
||||||
|
# DISABLE_MAGIC_FUNCTIONS="true"
|
||||||
|
|
||||||
|
# 禁用 ls 的颜色
|
||||||
|
# DISABLE_LS_COLORS="true"
|
||||||
|
|
||||||
|
# 禁止自动设置命令行标题
|
||||||
|
# DISABLE_AUTO_TITLE="true"
|
||||||
|
|
||||||
|
# 取消注释以下行,以启用命令自动更正。
|
||||||
|
# ENABLE_CORRECTION="true"
|
||||||
|
|
||||||
|
# 取消注释以下行,以便在等待完成时显示红点。
|
||||||
|
# 您也可以将其设置为另一个字符串,以显示该字符串,而不是默认的红点。
|
||||||
|
# 例如 COMPLETION_WAITING_DOTS="%F{yellow}waiting...%f"
|
||||||
|
COMPLETION_WAITING_DOTS="true"
|
||||||
|
|
||||||
|
# 如果要禁用标记未跟踪的文件,请取消注释以下行
|
||||||
|
# 这使得对大型存储库的存储库状态检查快得多。
|
||||||
|
# DISABLE_UNTRACKED_FILES_DIRTY="true"
|
||||||
|
|
||||||
|
# 如果要更改历史命令输出中显示的命令执行时间戳,请取消注释以下行。
|
||||||
|
# 可以设置可选的三种格式之一: “ mm/dd/yyyy”| “ dd.mm.yyyy”| “ yyyy-mm-dd”
|
||||||
|
# 或使用 strftime 函数格式规范设置自定义格式,详见‘ man strftime’。
|
||||||
|
HIST_STAMPS="yyyy-mm-dd"
|
||||||
|
|
||||||
|
# 你想加载哪些插件?
|
||||||
|
# 标准插件可以在 `$ZSH/plugins/` 中找到
|
||||||
|
# 自定义插件可以添加到 `$ZSH_CUSTOM/plugins/`
|
||||||
|
# 注意: 太多的插件会降低 shell 启动的速度。
|
||||||
|
# command-not-found当前仅支持debian系
|
||||||
|
# 支持fzf可以尝试使用zsh-interactive-cd,cd目录时可以模糊查找
|
||||||
|
# znt zsh官方出的导航工具:https://github.com/z-shell/zsh-navigation-tools
|
||||||
|
# 官方插件及其功能说明可以查看:https://github.com/ohmyzsh/ohmyzsh/wiki/Plugins
|
||||||
|
plugins=(
|
||||||
|
git
|
||||||
|
sudo
|
||||||
|
#zsh-interactive-cd
|
||||||
|
zsh-navigation-tools
|
||||||
|
zsh-autosuggestions
|
||||||
|
zsh-syntax-highlighting
|
||||||
|
)
|
||||||
|
|
||||||
|
source /usr/share/doc/pkgfile/command-not-found.zsh
|
||||||
|
|
||||||
|
source $ZSH/oh-my-zsh.sh
|
||||||
|
|
||||||
|
# 用户配置
|
||||||
|
# export MANPATH="/usr/local/man:$MANPATH"
|
||||||
|
|
||||||
|
# 编译标志
|
||||||
|
# export ARCHFLAGS="-arch loongarch64"
|
||||||
|
# export ARCH=$(uname -m)
|
||||||
|
|
||||||
|
# 配置中文环境
|
||||||
|
export LC_ALL="zh_CN.UTF-8"
|
||||||
|
|
||||||
|
# 别名
|
||||||
|
alias ls='lsd'
|
||||||
|
alias zshconfig="vim ~/.zshrc"
|
||||||
|
alias 安装="sudo pacman -Sy --needed"
|
||||||
|
alias 更新="sudo pacman -Syu"
|
||||||
|
alias 搜索_包仓库="sudo pkgfile"
|
||||||
|
|
||||||
|
JAVA_HOME="/usr/lib/jvm/java-20-openjdk"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user