Skip to content

Commit

Permalink
(chore) put cursor commands inside au group
Browse files Browse the repository at this point in the history
(Issue) cursor does not reset on exiting from vim
    - microsoft/terminal#4335

(Issue : #5)
  • Loading branch information
PrashanthaTP committed Aug 21, 2021
1 parent 51fb026 commit 05a9218
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions nvim/init.vim
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
let mapleader = "\<Space>"

source $LOCALAPPDATA/nvim/general/augroups.vim
source $LOCALAPPDATA/nvim/plugs/plugins.vim
source $LOCALAPPDATA/nvim/plugs/coc.vim
Expand Down Expand Up @@ -27,12 +28,19 @@ hi htmlArg gui=italic cterm=italic
if &term =~ '^xterm'
" normal mode
let &t_EI .= "\<Esc>[1 q"

let &t_SR.="\e[4 q"
" insert mode
let &t_SI .= "\<Esc>[6 q"
endif
"
autocmd VimEnter * silent! echo -ne "\e[1 q"
autocmd VimLeave * silent! echo -ne "\e[6 q"
augroup CURSOR_MANAGEMENT
autocmd!
autocmd VimEnter * silent !echo -ne "\e[2 q"
autocmd VimLeave * silent !echo -ne "\e[6 q"
" autocmd VimLeave * let &t_me="\<Esc>]50;CursorShape=1\x7"
" autocmd VimLeave * let &t_SI.="\<Esc>[6 q"
augroup END
" }}}


0 comments on commit 05a9218

Please sign in to comment.