2025-5-31 zshrc
#上传下载到 linux
#1.) sftp username@ip
#2.) get linux_dir_fiile Mac_dir_fiiile 下载文件夹 get -r
#3.) put mac_dir_fiile linuix_dir_fiile 上传文件 put -r 文件夹
#4.) 安装自动补全命令 git clone github.com/zsh-users/z… ~/.oh-my-zsh/custom/plugins/zsh-autosuggestions
#拷贝搜索到的1mb 以上 文件
#cp$(find / -type f -size +1M -name ".")/youwant_save_dir
#PS1="%F{green}%n#%T% %F{blue}%~% " 备用
PS1="%{%F{033}%}%n%{%f%}#%{%F{green}%}%T:%{%F{yellow}%}% "
#--------------------------------------------------
export CLICOLOR=1
终端ls 显示文件颜色配置 1
export LSCOLORS=ExFxBxDxCxegedabagacad
终端ls 显示文件颜色配置 2
#export LSCOLORS=exfxcxdxbxexexabagacad
alias ipwifi="ipconfig getifaddr en0" alias ipwired="ipconfig getifaddr en1"
#--------------------------------------------------
cd /users/xmx/desktop
alias cl='clear' alias zrc='vim ~/.zshrc' alias vrc='vim ~/.vimrc' alias szrc='source ~/.zshrc;echo "............................ ok "'
source /Users/xmx/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh
====================================================================================
":1,10y 复制1-10行 ":1,10d 删除1-10行
"色彩主题 colo habamax
imap ( () imap [ [] imap { { } imap
map . i
map <Leader><CR> i
map <Del> <Del>i
map <C-h> :%s///g<Left><Left><Left><Left>
map <Leader>d :g/^\s*$/d<CR>
"保存并退出"
map <F3> :wq<CR>
"保存"
map <F4> <Esc>:w<CR>
"编译同名文件"
map <F5> :w<CR>:!g++ -std=c++14 % -fno-elide-constructors -o %:r<CR><F3>
" map <F5> :w<CR>:!g++ -std=c++14 % -o %:r<CR><F3>
"排版"
map <F6> gg=G
"选主题"
map <F10> :colorscheme
filetype on
syntax enable
syntax on
set nu
"共享系统剪切板,复制粘贴到vim"
set clipboard+=unnamed
"不创建swap文件"
set noswapfile
"保存不在提示只读"
set noro
set nocompatible
set noautochdir
set showcmd
set showmode
set showtabline=4
set laststatus=4
set mouse=a
set tags=./tags;,tags
set hlsearch
set incsearch
set noignorecase
set selection=inclusive
set virtualedit=onemore
set whichwrap+=h,l,<,>,[,]
set wildmenu
set wildmode=longest,list
set completeopt=preview,menu,longest
set expandtab
set smarttab
set autoindent
set cindent
set tabstop=4
set softtabstop=4
set shiftwidth=4
set scrolloff=8
set ruler
set cursorline
hi CursorLine cterm=bold ctermbg=darkred ctermfg=white guibg=darkred guifg=white
" highlight LineNr cterm=none ctermfg=darkgray
" highlight CursorLineNr cterm=bold ctermfg=gray ctermbg=darkgray
" autocmd InsertEnter * highlight CursorLineNr cterm=bold ctermbg=darkblue
" autocmd InsertLeave * highlight CursorLineNr cterm=bold ctermbg=darkgray
" highlight CursorLine cterm=none ctermbg=darkgray
" autocmd InsertEnter * highlight CursorLine cterm=bold ctermbg=darkblue
" autocmd InsertLeave * highlight CursorLine cterm=none ctermbg=darkgray
highlight TablineSel ctermfg=black ctermbg=white
highlight Tabline ctermbg=gray
highlight TablineFill ctermfg=black
highlight StatusLine ctermfg=gray
highlight StatusLineNC ctermfg=gray
highlight VertSplit ctermfg=gray
"打开文件夹查看"
function! ExpToggle()
if exists(':WMToggle')
if exists(':Tlist')
let g:winManagerWindowLayout='FileExplorer|TagList'
else
let g:winManagerWindowLayout='FileExplorer'
endif
WMToggle
else
let g:netrw_banner=0
let g:netrw_winsize=12
let g:netrw_liststyle=3
Lex
endif
endfunction
let g:ConqueTerm_ToggleKey='<F12>'
noremap <silent><F8> <Esc>:call ExpToggle()<CR>
noremap! <silent><F8> <Esc>:call ExpToggle()<CR>
"----------------------------------------------------------------------