1
0
forked from x/ContextOS

tce add vim

This commit is contained in:
shaoying 2018-09-19 22:56:36 +08:00
parent 9d869edb01
commit 4b9e5cd03c
2 changed files with 46 additions and 18 deletions

View File

@ -1,4 +1,4 @@
# 配置管理
# 配置管理{{{
set -g prefix C-s
set -g base-index 1
@ -9,12 +9,18 @@ setw -g pane-base-index 1
set -g mode-keys vi
set -g history-limit 50000
bind Space command-prompt
set -g allow-rename off
set -g renumber-windows on
# 窗口管理
bind Space command-prompt
# }}}
# 窗口管理{{{
bind w choose-window
bind q confirm-before kill-window
bind f command-prompt -p "find window:" "find-window -N '%%'"
bind e command-prompt -p "window new name:" "rename-window '%%'"
bind c new-window
bind o last-window
@ -29,8 +35,8 @@ bind 3 select-window -t :3
bind 4 select-window -t :4
bind 5 select-window -t :5
bind 6 select-window -t :6
# 面板管理
# }}}
# 面板管理{{{
bind i display-panes
bind x confirm-before -p "kill-pane #P? (y/n)" kill-pane
@ -48,16 +54,16 @@ bind C-l command-prompt -p "size:" "resize-pane -R %%"
bind C-j command-prompt -p "size:" "resize-pane -D %%"
bind C-k command-prompt -p "size:" "resize-pane -U %%"
bind C-m command-prompt -p "move pane from:,to:" "swap-pane -s %% -t %%"
# 缓存管理
# }}}
# 缓存管理{{{
bind C-s copy-mode
bind C-d clear-history
bind a choose-buffer
bind z paste-buffer
# }}}
# tmux 1.x
# tmux 1.x{{{
if-shell "[ `tmux -V |cut -d' ' -f2|cut -d'.' -f1` -lt '2' ]" "\
bind -t vi-copy e scroll-down; \
bind -t vi-copy y scroll-up; \
@ -73,9 +79,8 @@ if-shell "[ `tmux -V |cut -d' ' -f2|cut -d'.' -f1` -lt '2' ]" "\
set -g mouse-select-window on; \
set -g mouse-select-pane on; \
set -g mouse-resize-pane on; \
"
# tmux 2.x
"# }}}
# tmux 2.x{{{
if-shell "[ `tmux -V |cut -d' ' -f2|cut -d'.' -f1` -gt '1' ]" "\
bind -T copy-mode-vi y send-keys -X scroll-down; \
bind -T copy-mode-vi e send-keys -X scroll-up; \
@ -87,4 +92,4 @@ if-shell "[ `tmux -V |cut -d' ' -f2|cut -d'.' -f1` -gt '1' ]" "\
bind -T copy-mode-vi c send-keys -X copy-selection; \
set -g mouse on; \
"
# }}}

View File

@ -1,7 +1,15 @@
"安装plug-vim {{{
"$ curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
"
"安装vim各种插件
":PlugInstall
"
"}}}
"加载插件"{{{
call plug#begin()
Plug 'vim-scripts/tComment'
Plug 'tpope/vim-fugitive'
Plug 'airblade/vim-gitgutter'
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
Plug 'ntpeters/vim-better-whitespace'
@ -35,17 +43,28 @@ Plug 'godlygeek/tabular'
Plug 'plasticboy/vim-markdown'
Plug 'vim-scripts/python.vim'
Plug 'mbbill/echofunc'
Plug 'vim-syntastic/syntastic'
let g:syntastic_quiet_messages = { "regex": [
\ "Missing module docstring",
\ "Missing class docstring",
\ "Missing function docstring",
\ "Wrong continued indentation",
\ "Line Too Long",
\ "defined outside __init__",
\ ] }
Plug 'Valloric/YouCompleteMe'
let g:syntastic_enable_signs = 1
let g:ycm_confirm_extra_conf=0
nnoremap gd :YcmCompleter GoToDeclaration<CR>
Plug 'benmills/vimux'
let mapleader=";"
nnoremap <Leader>vp :VimuxPromptCommand<CR>
nnoremap <Leader>vl :VimuxRunLastCommand<CR>
nnoremap <Leader>vx :VimuxInterruptRunner<CR>
nnoremap <Leader>vz :VimuxZoomRunner<CR>
nnoremap <Leader>; :VimuxPromptCommand<CR>
" nnoremap <Leader>j :VimuxZoomRunner<CR>
" nnoremap <Leader>l :VimuxRunLastCommand<CR>
" nnoremap <Leader>vx :VimuxInterruptRunner<CR>
Plug 'vim-scripts/matrix.vim--Yang'
call plug#end()
@ -66,6 +85,7 @@ set tabstop=4
set shiftwidth=4
set cindent
set expandtab
set backspace=indent,eol,start
set showmatch
set matchtime=2
@ -103,9 +123,12 @@ cnoremap jk <CR>
"}}}
" 编程配置{{{
set keywordprg=man\ -a
command! RR wa | source ~/.vimrc |e
autocmd BufNewFile,BufReadPost *.shy set filetype=shy
autocmd BufNewFile,BufReadPost *.shy set commentstring=#%s
autocmd BufNewFile,BufReadPost *.conf set filetype=nginx
command! RR wa | source ~/.vimrc |e
source ~/.vim_local
"}}}