Add do#cursor_escape_sequences()
Control the cursor shape based on the current mode.
This commit is contained in:
parent
603ed76994
commit
4c2d9b8089
@ -1,3 +1,23 @@
|
|||||||
|
" Setup changing cursor dependant on mode
|
||||||
|
function! do#cursor_escape_sequences()
|
||||||
|
if has('unix')
|
||||||
|
if $ITERM_SESSION_ID !=# ''
|
||||||
|
let &t_SI = "\<Esc>]50;CursorShape=1\x7"
|
||||||
|
let &t_SR = "\<Esc>]50;CursorShape=2\x7"
|
||||||
|
let &t_EI = "\<Esc>]50;CursorShape=0\x7"
|
||||||
|
else
|
||||||
|
let &t_SI = "\<Esc>[6 q"
|
||||||
|
let &t_SR = "\<Esc>[4 q"
|
||||||
|
let &t_EI = "\<Esc>[2 q"
|
||||||
|
endif
|
||||||
|
if $TMUX !=# ''
|
||||||
|
let &t_SI = "\<Esc>Ptmux;\<Esc>".&t_SI."\<Esc>\\"
|
||||||
|
let &t_SR = "\<Esc>Ptmux;\<Esc>".&t_SR."\<Esc>\\"
|
||||||
|
let &t_EI = "\<Esc>Ptmux;\<Esc>".&t_EI."\<Esc>\\"
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
endfunction
|
||||||
|
|
||||||
" Save, call isort on, then reload a python file.
|
" Save, call isort on, then reload a python file.
|
||||||
function! do#isort()
|
function! do#isort()
|
||||||
if &filetype !=# 'python'
|
if &filetype !=# 'python'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user