mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-03-23 17:49:57 +08:00
Fix #99
This commit is contained in:
parent
fb11f75b9c
commit
25dc0bc368
@ -48,7 +48,7 @@ function! SpaceVim#autocmds#init() abort
|
|||||||
" Instead of reverting the cursor to the last position in the buffer, we
|
" Instead of reverting the cursor to the last position in the buffer, we
|
||||||
" set it to the first line when editing a git commit message
|
" set it to the first line when editing a git commit message
|
||||||
au FileType gitcommit au! BufEnter COMMIT_EDITMSG call setpos('.', [0, 1, 1, 0])
|
au FileType gitcommit au! BufEnter COMMIT_EDITMSG call setpos('.', [0, 1, 1, 0])
|
||||||
autocmd InsertEnter * call s:tool()
|
autocmd InsertEnter * call s:fixindentline()
|
||||||
if executable('synclient')
|
if executable('synclient')
|
||||||
let s:touchpadoff = 0
|
let s:touchpadoff = 0
|
||||||
autocmd InsertEnter * call s:disable_touchpad()
|
autocmd InsertEnter * call s:disable_touchpad()
|
||||||
@ -78,10 +78,17 @@ function! s:enable_touchpad() abort
|
|||||||
let s:touchpadoff = 0
|
let s:touchpadoff = 0
|
||||||
call system('synclient touchpadoff=0')
|
call system('synclient touchpadoff=0')
|
||||||
endfunction
|
endfunction
|
||||||
function! s:tool() abort
|
function! s:fixindentline() abort
|
||||||
if !exists('s:done')
|
if !exists('s:done')
|
||||||
IndentLinesToggle
|
if exists(':IndentLinesToggle') == 2
|
||||||
IndentLinesToggle
|
IndentLinesToggle
|
||||||
|
IndentLinesToggle
|
||||||
|
else
|
||||||
|
echohl WarningMsg
|
||||||
|
echom 'plugin : indentLines has not been installed,
|
||||||
|
\ please use `:call dein#install(["indentLine"])` to install this plugin,'
|
||||||
|
echohl None
|
||||||
|
endif
|
||||||
let s:done = 1
|
let s:done = 1
|
||||||
endif
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
Loading…
x
Reference in New Issue
Block a user