Skip to content

Commit 23d248a

Browse files
authored
Use different insert cursor in iterm
1 parent 33cf43a commit 23d248a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

.vimrc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,12 @@ nnoremap <leader>mo :set mouse=<cr>
208208
209209
" Default to mouse mode on
210210
set mouse=a
211+
212+
" Change cursor shape between insert and normal mode in iTerm2.app
213+
if $TERM_PROGRAM =~ "iTerm"
214+
let &t_SI = "\<Esc>]50;CursorShape=1\x7" " Vertical bar in insert mode
215+
let &t_EI = "\<Esc>]50;CursorShape=0\x7" " Block in normal mode
216+
endif
211217
" }}}
212218

213219
" Colors and Fonts {{{

0 commit comments

Comments
 (0)