-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cursor shape changes briefly when space bar pressed #45
Comments
Thank you for reporting. I want to try cursor shape behavior but I'm poor at the terminal. |
I'm really sorry for the delay. I use iTerm 2 on OS X. In my vimrc I have:
tmux has its own escape codes for these; it translates them into something the real terminal emulator understands (if it understands any such code). For that case, I have:
There are other terminals (I think probably at least Konsole and GNOME Terminal) that support it, but the exact escape sequence varies somewhat. The first of those is automatically sent by Vim when entering insert mode; the latter when leaving it. The quick shape changes I mention happen since your plugin leaves insert mode briefly when certain keys are pressed. I'm not sure there's much that can be done about it, honestly; even makes the shape change. |
In my own experiments, I discovered that adding Also, I only see this issue in vim 8.1-1790, not neovim 0.3.8, and not gvim. (tested on linux with the following settings): let &t_SI = "\e[6 q"
let &t_EI = "\e[2 q"
let &t_SR = "\e[3 q" |
One workaround I've discovered is to I don't know what demo code: inoremap <silent> <space> <c-r>=Space()<cr>
fun! Space()
call s:HideVimCursorSpasm()
return ' '
endfun
fun! s:HideVimCursorSpasm()
if !has('nvim') && !has('gui_running') | redraw | end "hide cursor spasm that only occurs in vim
endfun
|
I don't think the aforementioned workaround works on iTerm in macos. I think a better solution is to remove |
I use t_SI and t_EI to change the shape of my cursor when entering insert or normal modes. I notice that with lexima active, the cursor shape changes perceptibly whenever I hit the space bar in insert mode. I assume lexima is entering and exiting normal mode behind the scenes. I don't know if it's feasible, but it would be nice if this didn't happen perceptibly.
The text was updated successfully, but these errors were encountered: