diff --git a/Makefile b/Makefile index b607f549..e1e823a6 100644 --- a/Makefile +++ b/Makefile @@ -38,17 +38,20 @@ linux_arm: mv bench bench_1.0_linux_arm -DOCS=etc/dotsfile +DOTS=etc/dotsfile back_dotsfile: - cp ~/.zshrc $(DOCS) - cp ~/.tmux.conf $(DOCS) - cp ~/.vimrc $(DOCS) + cp ~/.zshrc $(DOTS) + cp ~/.tmux.conf $(DOTS) + cp ~/.vimrc $(DOTS) + cp ~/.vim/syntax/shy.vim etc/ load_dotsfile: ~/.zshrc ~/.tmux.conf ~/.vimrc -~/.zshrc: $(DOCS)/.zshrc - cp $(DOCS)/.zshrc ~/ -~/.tmux.conf: $(DOCS)/.tmux.conf - cp $(DOCS)/.tmux.conf ~/ -~/.vimrc: $(DOCS)/.vimrc - cp $(DOCS)/.vimrc ~/ +~/.zshrc: $(DOTS)/.zshrc + cp $(DOTS)/.zshrc ~/ +~/.tmux.conf: $(DOTS)/.tmux.conf + cp $(DOTS)/.tmux.conf ~/ +~/.vimrc: $(DOTS)/.vimrc + cp $(DOTS)/.vimrc ~/ +~/.vim/syntax/shy.vim: etc/shy.vim + cp etc/shy.vim ~/.vim/syntax/ diff --git a/etc/dotsfile/.tmux.conf b/etc/dotsfile/.tmux.conf index 0c476a4b..21b8856e 100644 --- a/etc/dotsfile/.tmux.conf +++ b/etc/dotsfile/.tmux.conf @@ -20,28 +20,17 @@ set -g renumber-windows on bind Space command-prompt # }}} # 窗口管理{{{ +bind c new-window 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 m command-prompt -p "move window from:,move window to:" "swap-window -s %% -t %%" bind o last-window bind n next-window bind p previous-window - -bind f command-prompt -p "find: " "find-window '%%'" -bind e command-prompt -p "name: " "rename-window '%%'" -bind m command-prompt -p "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 @@ -60,7 +49,7 @@ 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-m command-prompt -p "move pane from:,move pane to:" "swap-pane -s %% -t %%" # }}} # 缓存管理{{{ bind C-s copy-mode @@ -70,14 +59,13 @@ bind a choose-buffer bind z paste-buffer # }}} -# tmux 1.x{{{ +# tmux 1.x or other {{{ 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# {{{ -if-shell "[ `tmux -V |cut -d' ' -f2|cut -d'.' -f1` -gt '1' ]" "\ + set -g mode-mouse on; \ + " "\ set -g mouse on; \ " # }}} diff --git a/etc/dotsfile/cVim b/etc/dotsfile/cVim new file mode 100644 index 00000000..a22693e8 --- /dev/null +++ b/etc/dotsfile/cVim @@ -0,0 +1,22 @@ +set showtabindices +imap deleteChar +imap deleteForwardChar +imap deleteWord +imap beginningOfLine +imap deleteToEnd +map w :tabnew +map m :tabnew +map t goToTab +map q goToTab +map p goToTab +map v nextTab +map c previousTab +map nextTab +map previousTab +map goBack +map goForward +map createTabbedHint +map s scrollPageUp +map a :history +map e :tabnew +let blacklists = ["https://shylinux.com/*"] diff --git a/etc/shy.vim b/etc/shy.vim index ef96204c..ad037e11 100644 --- a/etc/shy.vim +++ b/etc/shy.vim @@ -19,6 +19,7 @@ syn keyword shStatement let var " ctx command syn match shStatement "\(^\|\t\|$(\)cache" syn match shStatement "\(^\|\t\|$(\)config" +syn match shStatement "\(^\|\t\|$(\)command" syn match shStatement "\(^\|\t\|$(\)detail" syn match shStatement "\(^\|\t\|$(\)option" syn match shStatement "\(^\|\t\|$(\)append"