1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-02-09 09:40:04 +08:00

fix(indent): fix indent

This commit is contained in:
wsdjeg 2022-04-30 19:02:32 +08:00
parent 59770a07b8
commit 2fc1389cce

View File

@ -184,7 +184,7 @@ function! s:echon() abort
echohl None | echon s:c_end
endfunction
fu! s:windowsinit() abort
function! s:windowsinit() abort
" option
setl fileformat=unix
setl fileencoding=utf-8
@ -205,10 +205,10 @@ fu! s:windowsinit() abort
setl nofoldenable
setl cursorline
setl filetype=vimchat
endf
endfunction
let s:enter_history = []
function! s:enter() abort
let s:enter_history = []
function! s:enter() abort
if s:c_begin . s:c_char . s:c_end =~# '/quit\s*'
let s:quit_chating_win = 1
let s:c_end = ''
@ -250,10 +250,10 @@ fu! s:windowsinit() abort
let s:c_end = ''
let s:c_char = ''
let s:c_begin = ''
endfunction
endfunction
let s:complete_num = 0
function! s:complete(base,num) abort
let s:complete_num = 0
function! s:complete(base,num) abort
if a:base =~# '^/[a-z_A-Z]*$'
let rsl = filter(copy(s:chatting_commands), "v:val =~# a:base .'[^\ .]*'")
if len(rsl) > 0
@ -278,9 +278,9 @@ fu! s:windowsinit() abort
return a:base
endfunction
let s:complete_input_history_num = [0,0]
function! s:complete_input_history(base,num) abort
endfunction
let s:complete_input_history_num = [0,0]
function! s:complete_input_history(base,num) abort
let results = filter(copy(s:enter_history), "v:val =~# '^' . a:base")
if len(results) > 0
call add(results, a:base)
@ -289,9 +289,9 @@ fu! s:windowsinit() abort
else
return a:base
endif
endfunction
endfunction
function! s:init_hi() abort
function! s:init_hi() abort
if get(s:, 'init_hi_done', 0) == 0
" current channel
hi! ChattingHI1 ctermbg=003 ctermfg=Black guibg=#fabd2f guifg=#282828
@ -325,12 +325,12 @@ fu! s:windowsinit() abort
hi! ChattingHI15 guibg=#fabd2f guifg=#8ec07c
let s:init_hi_done = 1
endif
endfunction
function! s:update_statusline() abort
endfunction
function! s:update_statusline() abort
let &l:statusline = SpaceVim#layers#core#statusline#get(1)
endfunction
endfunction
function! s:previous_channel() abort
function! s:previous_channel() abort
if !empty(s:protocol) && has_key(s:opened_channels, s:protocol) && index(s:opened_channels[s:protocol], s:current_channel) !=# -1
let index = index(s:opened_channels[s:protocol], s:current_channel)
let index -=1
@ -339,9 +339,9 @@ fu! s:windowsinit() abort
call s:update_msg_screen()
call s:update_statusline()
endif
endfunction
endfunction
function! s:next_channel() abort
function! s:next_channel() abort
if !empty(s:protocol) && has_key(s:opened_channels, s:protocol)
let index = index(s:opened_channels[s:protocol], s:current_channel)
let index += 1
@ -353,19 +353,19 @@ fu! s:windowsinit() abort
call s:update_msg_screen()
call s:update_statusline()
endif
endfunction
endfunction
function! s:send(msg) abort
function! s:send(msg) abort
if !empty(s:protocol) && !empty(s:current_channel)
call chat#{s:protocol}#send(s:current_channel, a:msg)
endif
endfunction
endfunction
function! chat#windows#status() abort
function! chat#windows#status() abort
return {
\ 'channel' : s:current_channel,
\ 'protocol' : s:protocol,
\ }
endfunction
endfunction