From 07a2dae198bffff80c996c41bb28f2e40a63da05 Mon Sep 17 00:00:00 2001 From: surtur Date: Sun, 30 Oct 2022 03:11:26 +0100 Subject: [PATCH] vimrc: disable "tmux cursor" --- .vim/vimrc | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/.vim/vimrc b/.vim/vimrc index 402af9a..5b5fe6e 100644 --- a/.vim/vimrc +++ b/.vim/vimrc @@ -508,20 +508,23 @@ map gn :bn map gp :bp -" change cursor shape for different editing modes, neovim does this by default -if !has('nvim') - if exists('$TMUX') - let &t_SI = "\Ptmux;\\e[12 q\\\" - let &t_SI = "\Ptmux;\\e[4 q\\\" - let &t_SI = "\Ptmux;\\e[2 q\\\" - else - let &t_SI = "\]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 = "\Ptmux;\\e[12 q\\\" +" let &t_SR = "\Ptmux;\\e[4 q\\\" +" let &t_EI = "\Ptmux;\\e[2 q\\\" +" else +" let &t_SI = "\e[12 q" +" let &t_SI = "\]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! | cwindow