1
0
mirror of https://shylinux.com/x/ContextOS synced 2025-04-26 09:14:06 +08:00

add vimrc C-M

This commit is contained in:
shaoying 2019-03-02 13:59:49 +08:00
parent c2be0a0321
commit 24220fd9dc
4 changed files with 37 additions and 15 deletions

View File

@ -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}"

View File

@ -135,6 +135,8 @@ nnoremap <Space> :
nnoremap j gj
nnoremap k gk
nnoremap <C-M> :make<CR>
nnoremap df :FZF<CR>
inoremap df _
inoremap jk <Esc>
@ -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

View File

@ -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

View File

@ -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"]})
})
},
})