forked from x/ContextOS
add vimrc C-M
This commit is contained in:
parent
c2be0a0321
commit
24220fd9dc
@ -42,12 +42,12 @@ bind i display-panes
|
|||||||
bind x confirm-before -p "kill-pane #P? (y/n)" kill-pane
|
bind x confirm-before -p "kill-pane #P? (y/n)" kill-pane
|
||||||
|
|
||||||
bind b break-pane
|
bind b break-pane
|
||||||
# bind u split-window
|
bind u split-window
|
||||||
# bind v split-window -h
|
bind v split-window -h
|
||||||
bind u split-window -c "#{pane_current_path}"
|
|
||||||
bind v split-window -h -c "#{pane_current_path}"
|
|
||||||
bind C-u split-window -f
|
bind C-u split-window -f
|
||||||
bind C-v split-window -f -h
|
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-u split-window -f -c "#{pane_current_path}"
|
||||||
# bind C-v split-window -f -h -c "#{pane_current_path}"
|
# bind C-v split-window -f -h -c "#{pane_current_path}"
|
||||||
|
|
||||||
|
@ -135,6 +135,8 @@ nnoremap <Space> :
|
|||||||
nnoremap j gj
|
nnoremap j gj
|
||||||
nnoremap k gk
|
nnoremap k gk
|
||||||
|
|
||||||
|
nnoremap <C-M> :make<CR>
|
||||||
|
|
||||||
nnoremap df :FZF<CR>
|
nnoremap df :FZF<CR>
|
||||||
inoremap df _
|
inoremap df _
|
||||||
inoremap jk <Esc>
|
inoremap jk <Esc>
|
||||||
@ -145,12 +147,32 @@ set keywordprg=man\ -a
|
|||||||
set splitbelow
|
set splitbelow
|
||||||
set splitright
|
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 BufReadPost * normal `"
|
||||||
autocmd BufNewFile,BufReadPost *.shy set filetype=shy
|
|
||||||
autocmd BufNewFile,BufReadPost *.shy set commentstring=#%s
|
autocmd BufNewFile,BufReadPost *.go call Config("go")
|
||||||
autocmd BufNewFile,BufReadPost *.conf set filetype=nginx
|
autocmd BufNewFile,BufReadPost *.shy call Config("shy")
|
||||||
autocmd BufNewFile,BufReadPost *.go set foldmethod=syntax
|
autocmd BufNewFile,BufReadPost *.conf call Config("conf")
|
||||||
autocmd BufNewFile,BufReadPost *.json set foldmethod=syntax
|
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! RR wa | source ~/.vimrc |e
|
||||||
command! SS mksession! etc/session.vim
|
command! SS mksession! etc/session.vim
|
||||||
|
@ -4,8 +4,6 @@ syntax match shyCommand "\(^\|\t\| \|$(\)[a-zA-Z0-9_\.]\+\>"
|
|||||||
syntax match shyConfig "\(^\|\t\| \|$(\)config\>"
|
syntax match shyConfig "\(^\|\t\| \|$(\)config\>"
|
||||||
syntax match shyCache "\(^\|\t\| \|$(\)cache\>"
|
syntax match shyCache "\(^\|\t\| \|$(\)cache\>"
|
||||||
|
|
||||||
syntax match shyStmt "return"
|
|
||||||
|
|
||||||
syntax match shyString "'[^']*'"
|
syntax match shyString "'[^']*'"
|
||||||
syntax match shyString "\"[^\"]*\""
|
syntax match shyString "\"[^\"]*\""
|
||||||
syntax match shyNumber "-\=\<\d\+\>#\="
|
syntax match shyNumber "-\=\<\d\+\>#\="
|
||||||
@ -29,8 +27,6 @@ highlight shyCommand ctermfg=green
|
|||||||
highlight shyConfig ctermfg=yellow
|
highlight shyConfig ctermfg=yellow
|
||||||
highlight shyCache ctermfg=yellow
|
highlight shyCache ctermfg=yellow
|
||||||
|
|
||||||
highlight shyStmt ctermfg=yellow
|
|
||||||
|
|
||||||
highlight shyString ctermfg=magenta
|
highlight shyString ctermfg=magenta
|
||||||
highlight shyNumber ctermfg=magenta
|
highlight shyNumber ctermfg=magenta
|
||||||
highlight shyVariable ctermfg=magenta
|
highlight shyVariable ctermfg=magenta
|
||||||
|
@ -7,7 +7,7 @@ App({
|
|||||||
data = data || {}
|
data = data || {}
|
||||||
data.sessid = app.sessid || ""
|
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) {
|
success: function(res) {
|
||||||
typeof done == "function" && done(res.data)
|
typeof done == "function" && done(res.data)
|
||||||
},
|
},
|
||||||
@ -35,6 +35,10 @@ App({
|
|||||||
},
|
},
|
||||||
|
|
||||||
onLaunch: function () {
|
onLaunch: function () {
|
||||||
this.login()
|
var app = this
|
||||||
|
this.login(function() {
|
||||||
|
app.request({"cmd": ["note", "model"]})
|
||||||
|
|
||||||
|
})
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user