diff --git a/Makefile b/Makefile index c1e53fa5..a280f4ca 100644 --- a/Makefile +++ b/Makefile @@ -70,7 +70,7 @@ DOTS=etc/dotsfile back_dotsfile: cp ~/.zshrc $(DOTS) cp ~/.tmux.conf $(DOTS) - cp ~/context/.git/hooks/post-commit $(DOTS)/git_hooks + # cp ~/context/.git/hooks/post-commit $(DOTS)/git_hooks cp ~/.vimrc $(DOTS) cp ~/.vim/syntax/shy.vim $(DOTS) diff --git a/etc/dotsfile/.tmux.conf b/etc/dotsfile/.tmux.conf index bb666604..bd02183d 100644 --- a/etc/dotsfile/.tmux.conf +++ b/etc/dotsfile/.tmux.conf @@ -7,7 +7,7 @@ set -g display-time 5000 setw -g pane-base-index 1 set -g mode-keys vi -set -g history-limit 50000 +set -g history-limit 1000 set -g base-index 1 set -g display-panes-time 5000 diff --git a/etc/dotsfile/.vimrc b/etc/dotsfile/.vimrc index d5953723..b8346181 100644 --- a/etc/dotsfile/.vimrc +++ b/etc/dotsfile/.vimrc @@ -71,6 +71,7 @@ let g:syntastic_quiet_messages = { "regex": [ \ "Too many local variables", \ "Too many branches", \ "Too many statements", + \ "Too many return statements", \ "Line Too Long", \ "defined outside __init__", \ "Catching too general exception Exception", @@ -145,31 +146,14 @@ set splitbelow set splitright autocmd BufReadPost * normal `" +autocmd BufNewFile,BufReadPost *.shy set filetype=shy +autocmd BufNewFile,BufReadPost *.shy set commentstring=#%s autocmd BufNewFile,BufReadPost *.conf set filetype=nginx - -autocmd BufNewFile,BufReadPost *.go call Config("go") -autocmd BufNewFile,BufReadPost *.sh call Config("sh") -autocmd BufNewFile,BufReadPost *.shy call Config("shy") -autocmd BufNewFile,BufReadPost *.py call Config("py") -autocmd BufNewFile,BufReadPost *.js call Config("js") - -fun! Config(language) - if a:language == "go" - set foldmethod=syntax - set foldnestmax=3 - elseif a:language == "sh" - elseif a:language == "shy" - set filetype=shy - set commentstring=#%s - elseif a:language == "py" - elseif a:language == "js" - let g:javaScript_fold=1 - set syntax=javaScript - set foldmethod=syntax - endif -endfun +autocmd BufNewFile,BufReadPost *.go set foldmethod=syntax +autocmd BufNewFile,BufReadPost *.json set foldmethod=syntax command! RR wa | source ~/.vimrc |e +command! SS mksession! etc/session.vim source ~/.vim_local let g:colorscheme=1 diff --git a/etc/dotsfile/shy.vim b/etc/dotsfile/shy.vim index 8510623a..3a42e845 100644 --- a/etc/dotsfile/shy.vim +++ b/etc/dotsfile/shy.vim @@ -10,9 +10,9 @@ syn match shOperator "\~[-_a-zA-Z0-9\.]\+\>" syn match shShellVariables "\$[-_a-zA-Z0-9]\+\>" syn match shShellVariables "@[-_a-zA-Z0-9]\+\>" -syn keyword shStatement break cd chdir continue eval exec exit kill newgrp pwd read readonly shift trap ulimit umask wait +" syn keyword shStatement break cd chdir continue eval exec exit kill newgrp pwd read readonly shift trap ulimit umask wait -syn keyword shStatement if else elif end for +" syn keyword shStatement if else elif end for " ctx command syn match shStatement "\(^\|\t\| \|$(\)cache" @@ -28,8 +28,10 @@ syn match shStatement "\(^\|\t\| \|$(\)source" syn match shCommand "\(^\|\t\| \|$(\)alias" " aaa command -syn match shCommand "\(^\|\t\| \|$(\)login" -syn match shCommand "\(^\|\t\| \|$(\)right" +syn match shCommand "\(^\|\t\| \|$(\)hash" +syn match shCommand "\(^\|\t\| \|$(\)auth" +syn match shOperator "\<\(data\|ship\|role\)\>" +syn match shSubCommand "\<\(username\|userrole\|componet\|command\)\>" " web command syn match shCommand "\(^\|\t\| \|$(\)serve" @@ -49,6 +51,7 @@ hi def link shOperator Operator hi def link shShellVariables PreProc hi def link shStatement Statement hi def link shCommand Identifier +hi def link shSubCommand String hi def link shArithmetic Special hi def link shCharClass Identifier