vimrc: disable "tmux cursor"

This commit is contained in:
surtur 2022-10-30 03:11:26 +01:00
parent f47b665d61
commit 07a2dae198
Signed by: wanderer
SSH Key Fingerprint: SHA256:MdCZyJ2sHLltrLBp0xQO0O1qTW9BT/xl5nXkDvhlMCI

@ -508,20 +508,23 @@ map gn :bn<cr>
map gp :bp<cr>
" change cursor shape for different editing modes, neovim does this by default
if !has('nvim')
if exists('$TMUX')
let &t_SI = "\<Esc>Ptmux;\<Esc>\e[12 q\<Esc>\\"
let &t_SI = "\<Esc>Ptmux;\<Esc>\e[4 q\<Esc>\\"
let &t_SI = "\<Esc>Ptmux;\<Esc>\e[2 q\<Esc>\\"
else
let &t_SI = "\<Esc>]12;purple\x7"
let &t_SR = "\e[4 q"
let &t_EI = "\e[2 q"
endif
endif
" reset cursor when vim exits
autocmd VimLeave * silent !echo -ne "\033]112\007"
""" tmux cursor
""" change cursor shape for different editing modes, neovim does this by default
"if !has('nvim')
" if exists('$TMUX')
" let &t_SI = "\<Esc>Ptmux;\<Esc>\e[12 q\<Esc>\\"
" let &t_SR = "\<Esc>Ptmux;\<Esc>\e[4 q\<Esc>\\"
" let &t_EI = "\<Esc>Ptmux;\<Esc>\e[2 q\<Esc>\\"
" else
" let &t_SI = "\e[12 q"
" let &t_SI = "\<Esc>]12;purple\x7"
" let &t_SR = "\e[4 q"
" let &t_EI = "\e[2 q"
" endif
"endif
""" reset cursor when vim exits -> messes up cursor, don't do this
"""autocmd VimLeave * silent !echo -ne "\033]112\007"
command! W execute 'silent w !sudo tee % >/dev/null' | edit!
command! -nargs=* Make write | make! <args> | cwindow