一个笨蛋前端

好好学习,天天向上

wsl上面vim-zsh-tmux的简单配置

安装zsh

sudo apt-get install zsh -y
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
chsh -s /bin/zsh

高亮和自动补全zhs

git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting

git clone https://github.com/zsh-users/zsh-autosuggestions${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions


oh-my-zsh的配置

export ZSH="/home/sven/.oh-my-zsh"
ZSH_THEME="robbyrussell"
plugins=(
  git
  z
  npm
  d
  zsh-syntax-highlighting
  zsh-autosuggestions

)

source $ZSH/oh-my-zsh.sh
# alias zshconfig="mate ~/.zshrc"
# alias ohmyzsh="mate ~/.oh-my-zsh"
alias apt="sudo apt-get"
alias n="npm run"

tmux的简单配置

unbind ^b
set -g prefix 'm-`'
set -g mouse on
setw -g mode-keys vi
bind '"' split-window -c '#{pane_current_path}'
bind '%' split-window -h -c '#{pane_current_path}'
set-option -g escape-time 50


vimrc的简单配置

set vb t_vb=
set nu
au GuiEnter * set t_vb=




call plug#begin('~/.vim/plugged')
Plug 'scrooloose/nerdtree', { 'on':  'NERDTreeToggle' }
call plug#end()


""将F2设置为开关NERDTree的快捷键
set vb t_vb=
set nu
au GuiEnter * set t_vb=
set clipboard+=unnamed



call plug#begin('~/.vim/plugged')
Plug 'scrooloose/nerdtree', { 'on':  'NERDTreeToggle' }
call plug#end()


""将F2设置为开关NERDTree的快捷键
map <F2> :NERDTreeToggle<cr>

""窗口位置
let g:NERDTreeWinPos='left'
""窗口是否显示行号
let g:NERDTreeShowLineNumbers=1
""不显示隐藏文件
let g:NERDTreeHidden=0
"设定 NERDTree 视窗大小
let g:NERDTreeWinSize = 30
"当NERDTree为剩下的唯一窗口时自动关闭
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif

"复制vimd内容到windows
map <F3> : call CopyToWindows()<CR>
map! <F3> <ESC> : call CopyToWindows()<CR>
func! CopyToWindows()
    exec "w"
    exec "!cat % |/mnt/c/Windows/System32/clip.exe"
endfunc

点赞

发表评论

电子邮件地址不会被公开。 必填项已用*标注