我的 vimrc 和 .tmux.conf 及其他環境設置

Posted by blueskyson on November 20, 2020

vimrc 備份

set clipboard+=unnamed
set nu
inoremap {<CR> {<CR>}<Esc>ko
inoremap [ []<Esc>i
inoremap ' ''<Esc>i
inoremap " ""<Esc>i
inoremap ( ()<Esc>i
syntax on
autocmd FileType make setlocal noexpandtab
set smarttab
set confirm
filetype indent on
set ai
set backspace=2
set encoding=utf-8
set hls
set nocompatible
set expandtab
set shiftwidth=4
set softtabstop=4
set tabstop=4

在 ubuntu 出錯的的話,可以嘗試把 set clipboard+=unnamed+ 號刪掉

.tmux.conf 備份

# set <F1> <F2> as pane nevigation
bind-key -n F1 select-pane -L
bind-key -n F2 select-pane -U

# set <F3> <F4> split window
bind-key -n F3 split-window -h
bind-key -n F4 split-window -v

# set F12 to kill pane
bind-key -n F12 kill-pane

# set <F5> to enable sending command to all panes
bind-key -n F5 setw synchronize-panes on

# set <F6> to disable sending command to all panes
bind-key -n F6 setw synchronize-panes off

# re-map prefix from C-b to C-a
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix

autojump 設定

$ sudo apt install autojump
$ echo ". /usr/share/autojump/autojump.sh" > ~/.bashrc

pyenv

$ curl https://pyenv.run | bash
$ export PATH="/home/lin/.pyenv/bin:$PATH"
$ eval "$(pyenv init -)"
$ eval "$(pyenv virtualenv-init -)"
$ sudo apt update
$ sudo apt install build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev