diff --git a/etc/dotsfile/.tmux.conf b/etc/dotsfile/.tmux.conf index 0222230b..c890bddc 100644 --- a/etc/dotsfile/.tmux.conf +++ b/etc/dotsfile/.tmux.conf @@ -42,12 +42,12 @@ bind i display-panes bind x confirm-before -p "kill-pane #P? (y/n)" kill-pane bind b break-pane -# bind u split-window -# bind v split-window -h -bind u split-window -c "#{pane_current_path}" -bind v split-window -h -c "#{pane_current_path}" +bind u split-window +bind v split-window -h bind C-u split-window -f bind C-v split-window -f -h +# bind u split-window -c "#{pane_current_path}" +# bind v split-window -h -c "#{pane_current_path}" # bind C-u split-window -f -c "#{pane_current_path}" # bind C-v split-window -f -h -c "#{pane_current_path}" diff --git a/etc/dotsfile/.vimrc b/etc/dotsfile/.vimrc index 2a2f34e6..369c2f58 100644 --- a/etc/dotsfile/.vimrc +++ b/etc/dotsfile/.vimrc @@ -135,6 +135,8 @@ nnoremap : nnoremap j gj nnoremap k gk +nnoremap :make + nnoremap df :FZF inoremap df _ inoremap jk @@ -145,12 +147,32 @@ set keywordprg=man\ -a set splitbelow set splitright +function! Config(type) + if a:type == "go" + set foldmethod=syntax + elseif a:type == "shy" + set filetype=shy + set commentstring=#%s + elseif a:type == "json" + set foldmethod=syntax + elseif a:type == "conf" + set filetype=nginx + elseif a:type == "xml" + set filetype=xml + elseif a:type == "css" + set filetype=css + endif +endfunction + 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 set foldmethod=syntax -autocmd BufNewFile,BufReadPost *.json set foldmethod=syntax + +autocmd BufNewFile,BufReadPost *.go call Config("go") +autocmd BufNewFile,BufReadPost *.shy call Config("shy") +autocmd BufNewFile,BufReadPost *.conf call Config("conf") +autocmd BufNewFile,BufReadPost *.json call Config("json") + +autocmd BufNewFile,BufReadPost *.wxml call Config("xml") +autocmd BufNewFile,BufReadPost *.wxss call Config("css") command! RR wa | source ~/.vimrc |e command! SS mksession! etc/session.vim diff --git a/etc/dotsfile/shy.vim b/etc/dotsfile/shy.vim index 017e4c0a..ae769fbe 100644 --- a/etc/dotsfile/shy.vim +++ b/etc/dotsfile/shy.vim @@ -4,8 +4,6 @@ syntax match shyCommand "\(^\|\t\| \|$(\)[a-zA-Z0-9_\.]\+\>" syntax match shyConfig "\(^\|\t\| \|$(\)config\>" syntax match shyCache "\(^\|\t\| \|$(\)cache\>" -syntax match shyStmt "return" - syntax match shyString "'[^']*'" syntax match shyString "\"[^\"]*\"" syntax match shyNumber "-\=\<\d\+\>#\=" @@ -29,8 +27,6 @@ highlight shyCommand ctermfg=green highlight shyConfig ctermfg=yellow highlight shyCache ctermfg=yellow -highlight shyStmt ctermfg=yellow - highlight shyString ctermfg=magenta highlight shyNumber ctermfg=magenta highlight shyVariable ctermfg=magenta diff --git a/usr/client/mp/app.js b/usr/client/mp/app.js index 6a8c2c70..ec3e23ae 100644 --- a/usr/client/mp/app.js +++ b/usr/client/mp/app.js @@ -7,7 +7,7 @@ App({ data = data || {} data.sessid = app.sessid || "" - wx.request({url: "https://shylinux.com/chat/mp", data: data, + wx.request({method: "POST", url: "https://shylinux.com/chat/mp", data: data, success: function(res) { typeof done == "function" && done(res.data) }, @@ -35,6 +35,10 @@ App({ }, onLaunch: function () { - this.login() + var app = this + this.login(function() { + app.request({"cmd": ["note", "model"]}) + + }) }, })