forked from x/ContextOS
tce add .vimrc
This commit is contained in:
parent
ab58f8e608
commit
59692a5976
7
Makefile
7
Makefile
@ -6,7 +6,6 @@ install:
|
|||||||
@go get github.com/nsf/termbox-go
|
@go get github.com/nsf/termbox-go
|
||||||
@go get github.com/skip2/go-qrcode
|
@go get github.com/skip2/go-qrcode
|
||||||
@go get github.com/gomarkdown/markdown
|
@go get github.com/gomarkdown/markdown
|
||||||
@cp etc/go.snippets ~/.vim/snippets/
|
|
||||||
@cp etc/shy.vim ~/.vim/syntax/
|
@cp etc/shy.vim ~/.vim/syntax/
|
||||||
@touch etc/local.shy
|
@touch etc/local.shy
|
||||||
@touch etc/local_exit.shy
|
@touch etc/local_exit.shy
|
||||||
@ -37,3 +36,9 @@ linux32:
|
|||||||
linux_arm:
|
linux_arm:
|
||||||
GOARCH=arm GOOS=linux go build $(BENCH)
|
GOARCH=arm GOOS=linux go build $(BENCH)
|
||||||
mv bench bench_1.0_linux_arm
|
mv bench bench_1.0_linux_arm
|
||||||
|
|
||||||
|
back_dotsfile:
|
||||||
|
cp ~/.zsh_local etc/dotsfile
|
||||||
|
cp ~/.tmux.conf etc/dotsfile
|
||||||
|
cp ~/.vimrc etc/dotsfile
|
||||||
|
|
||||||
|
90
etc/dotsfile/.tmux.conf
Normal file
90
etc/dotsfile/.tmux.conf
Normal file
@ -0,0 +1,90 @@
|
|||||||
|
# 配置管理
|
||||||
|
set -g prefix C-s
|
||||||
|
|
||||||
|
set -g base-index 1
|
||||||
|
set -g display-panes-time 5000
|
||||||
|
set -g display-time 5000
|
||||||
|
setw -g pane-base-index 1
|
||||||
|
|
||||||
|
set -g mode-keys vi
|
||||||
|
set -g history-limit 50000
|
||||||
|
|
||||||
|
bind Space command-prompt
|
||||||
|
|
||||||
|
# 窗口管理
|
||||||
|
bind w choose-window
|
||||||
|
bind q confirm-before kill-window
|
||||||
|
|
||||||
|
bind c new-window
|
||||||
|
|
||||||
|
bind o last-window
|
||||||
|
bind n next-window
|
||||||
|
bind p previous-window
|
||||||
|
|
||||||
|
bind m command-prompt -p "move window from:,to:" "swap-window -s %% -t %%"
|
||||||
|
|
||||||
|
bind 1 select-window -t :1
|
||||||
|
bind 2 select-window -t :2
|
||||||
|
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
|
||||||
|
|
||||||
|
bind u split-window
|
||||||
|
bind v split-window -h
|
||||||
|
|
||||||
|
bind C-o last-pane
|
||||||
|
bind h select-pane -L
|
||||||
|
bind l select-pane -R
|
||||||
|
bind j select-pane -D
|
||||||
|
bind k select-pane -U
|
||||||
|
|
||||||
|
bind C-h command-prompt -p "size:" "resize-pane -L %%"
|
||||||
|
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
|
||||||
|
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; \
|
||||||
|
bind -t vi-copy d halfpage-down; \
|
||||||
|
bind -t vi-copy u halfpage-up; \
|
||||||
|
bind -t vi-copy f page-down; \
|
||||||
|
bind -t vi-copy b page-up; \
|
||||||
|
bind -t vi-copy v begin-selection; \
|
||||||
|
bind -t vi-copy c copy-selection; \
|
||||||
|
bind -t vi-edit C-n history-down; \
|
||||||
|
bind -t vi-edit C-p history-up; \
|
||||||
|
bind -t vi-copy Space page-down; \
|
||||||
|
set -g mouse-select-window on; \
|
||||||
|
set -g mouse-select-pane on; \
|
||||||
|
set -g mouse-resize-pane on; \
|
||||||
|
"
|
||||||
|
|
||||||
|
# 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; \
|
||||||
|
bind -T copy-mode-vi d send-keys -X halfpage-down; \
|
||||||
|
bind -T copy-mode-vi u send-keys -X halfpage-up; \
|
||||||
|
bind -T copy-mode-vi f send-keys -X page-down; \
|
||||||
|
bind -T copy-mode-vi b send-keys -X page-up; \
|
||||||
|
bind -T copy-mode-vi v send-keys -X begin-selection; \
|
||||||
|
bind -T copy-mode-vi c send-keys -X copy-selection; \
|
||||||
|
set -g mouse on; \
|
||||||
|
"
|
||||||
|
|
@ -1,12 +1,17 @@
|
|||||||
"加载插件"{{{
|
"加载插件"{{{
|
||||||
call plug#begin()
|
call plug#begin()
|
||||||
Plug 'vim-scripts/tComment'
|
Plug 'vim-scripts/tComment'
|
||||||
Plug 'airblade/vim-gitgutter'
|
Plug 'tpope/vim-fugitive'
|
||||||
Plug 'vim-airline/vim-airline'
|
Plug 'vim-airline/vim-airline'
|
||||||
Plug 'vim-airline/vim-airline-themes'
|
Plug 'vim-airline/vim-airline-themes'
|
||||||
Plug 'ntpeters/vim-better-whitespace'
|
Plug 'ntpeters/vim-better-whitespace'
|
||||||
|
Plug 'easymotion/vim-easymotion'
|
||||||
|
nmap f ;;f
|
||||||
|
nmap F ;;F
|
||||||
|
|
||||||
Plug 'vim-scripts/taglist.vim'
|
Plug 'vim-scripts/taglist.vim'
|
||||||
|
let g:Tlist_WinWidth=45
|
||||||
|
let g:Tlist_Exit_OnlyWindow=1
|
||||||
let g:Tlist_Enable_Fold_Column=0
|
let g:Tlist_Enable_Fold_Column=0
|
||||||
nnoremap <F2> :TlistToggle<CR>
|
nnoremap <F2> :TlistToggle<CR>
|
||||||
|
|
||||||
@ -71,6 +76,7 @@ set hlsearch
|
|||||||
set incsearch
|
set incsearch
|
||||||
set nowrapscan
|
set nowrapscan
|
||||||
set smartcase
|
set smartcase
|
||||||
|
set ignorecase
|
||||||
|
|
||||||
set hidden
|
set hidden
|
||||||
set autowrite
|
set autowrite
|
||||||
@ -96,6 +102,7 @@ cnoremap jk <CR>
|
|||||||
"}}}
|
"}}}
|
||||||
" 编程配置{{{
|
" 编程配置{{{
|
||||||
set keywordprg=man\ -a
|
set keywordprg=man\ -a
|
||||||
|
command! RR wa | source ~/.vimrc |e
|
||||||
|
|
||||||
autocmd BufNewFile,BufReadPost *.shy set filetype=shy
|
autocmd BufNewFile,BufReadPost *.shy set filetype=shy
|
||||||
autocmd BufNewFile,BufReadPost *.shy set commentstring=#%s
|
autocmd BufNewFile,BufReadPost *.shy set commentstring=#%s
|
||||||
|
16
etc/dotsfile/.zsh_local
Normal file
16
etc/dotsfile/.zsh_local
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
export PROMPT=$LOCAL_PROMPT'%![%*]%c$ '
|
||||||
|
export EDITOR=vim
|
||||||
|
|
||||||
|
alias t='tmux'
|
||||||
|
alias v='vim'
|
||||||
|
alias g='git'
|
||||||
|
|
||||||
|
bindkey -e
|
||||||
|
bindkey jk accept-line
|
||||||
|
bindkey "^N" down-line-or-beginning-search
|
||||||
|
bindkey "^P" up-line-or-beginning-search
|
||||||
|
|
||||||
|
bindkey -M vicmd j down-line-or-beginning-search
|
||||||
|
bindkey -M vicmd k up-line-or-beginning-search
|
||||||
|
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user