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