my configurations with vim,vim plug-ins and tmux

夹谷志
2023-12-01
TO BE CONTINUED...
" ------------------------------ VIM CONF --------------------------------------


" 显示行号
set nu


" 设置自动缩进
set ai


" 设置tab宽度
set tabstop=4


" [Alt+n] 切换到下一个vim缓冲区
map <A-n> :bn<CR>
" [Alt+p] 切换到上一个vim缓冲区
map <A-p> :bp<CR>


" 设置终端颜色
set t_Co=256


" 使用molokai色调,需开启t_Co设置 [https://github.com/tomasr/molokai]
color molokai


" 自定义高亮当前行
set cursorline
" hi CursorLine cterm=NONE ctermbg=darkred ctermfg=NONE


" 启用pathogen插件管理器
call pathogen#infect()




" ------------------------------ AIRLINE CONF --------------------------------------


" 启用airline
set laststatus=2


" 启用tabline
let g:airline#extensions#tabline#enabled = 1


" 设置gvim箭头显示字体 [https://github.com/powerline/fonts]
set guifont=Droid\ Sans\ Mono\ Slashed\ for\ Powerline\ 10


" 使用powerline字体
let g:airline_powerline_fonts=1




" ------------------------------ NERDTREE CONF --------------------------------------


" [F3] NERDTree开关 [https://github.com/scrooloose/nerdtree]
map <F3> :NERDTreeToggle<CR>


TMUX-CONFIGURATION

#-- base --#

set -g display-time 3000
set -g history-limit 65535
set -g mouse-select-pane on


#-- bindkeys --#

set -g prefix ^a # 设置[Ctrl+a]为leader键
#unbind ^b
#bind a send-prefix

unbind '"'
bind - splitw -v # [Ctrl+a][-] 水平分割终端
unbind %
bind | splitw -h # [Ctrl+a][Shift+\] 垂直分割终端

bind k select-pane -t -U
bind j select-pane -t -D
bind h select-pane -t -L
bind l select-pane -t -R

bind ^k resize-pane -U 10
bind ^j resize-pane -D 10
bind ^h resize-pane -L 10
bind ^l resize-pane -R 10

bind ^u swap-pane -U
bind ^d swap-pane -D

bind ^e last
bind q killp

bind '~' splitw htop
bind ! splitw ncmpcpp
bind m command-prompt "splitw 'exec man %%'"
bind @ command-prompt "splitw 'exec perldoc -t -f %%'"
bind * command-prompt "splitw 'exec perldoc -t -v %%'"
bind % command-prompt "splitw 'exec perldoc -t %%'"
bind / command-prompt "splitw 'exec ri -T %% | less'"

# my customed
bind C-n next-window
bind C-p previous-window
bind C-c new-window
bind C-m set-option -g mouse-select-pane on # use MOUSE to select pane
bind C-k set-option -g mouse-select-pane off # use KEYBOARD to select pane

#-- statusbar --#

set -g status-right "#[fg=green]#(/usr/bin/uptime)#[default] • #[fg=green]#(cut -d ' ' -f 1-3 /proc/loadavg)#[default]"
set -g status-right-attr bright

set -g status-bg black
set -g status-fg yellow

set-option -g status-justify centre # 窗口列表居中

setw -g window-status-current-attr bright
#setw -g window-status-current-bg red
#setw -g window-status-current-fg white

set -g status-utf8 on
set -g status-interval 1

#set -g visual-activity on
#setw -g monitor-activity on

setw -g automatic-rename on

set -g status-keys vi
setw -g mode-keys vi

 类似资料:

相关阅读

相关文章

相关问答