diff --git a/autoload/SpaceVim.vim b/autoload/SpaceVim.vim index 3820e56bf..6e1f2b1aa 100644 --- a/autoload/SpaceVim.vim +++ b/autoload/SpaceVim.vim @@ -128,6 +128,18 @@ let g:spacevim_error_symbol = '✖' " let g:spacevim_warning_symbol = '!' " < let g:spacevim_warning_symbol = '⚠' +"" +" Set the SpaceVim cursor shape in the terminal. Set to 0 to prevent Nvim from +" changing the cursor shape. Set to 1 to enable non-blinking mode-sensitive +" cursor (this is the default). Set to 2 to enable blinking mode-sensitive +" cursor. Host terminal must support the DECSCUSR CSI escape sequence. +" +" Depending on the terminal emulator, using this option with nvim under +" tmux might require adding the following to ~/.tmux.conf: +" > +" set -ga terminal-overrides ',*:Ss=\E[%p1%d q:Se=\E[2 q' +" < +let g:spacevim_terminal_cursor_shape = 2 let g:spacevim_use_colorscheme = 1 "" " Set the help language of vim. Default is 'en'. diff --git a/config/neovim.vim b/config/neovim.vim index a1253467f..6dadeec42 100644 --- a/config/neovim.vim +++ b/config/neovim.vim @@ -16,8 +16,7 @@ endfunction command! -range=% REPLSendSelection call REPLSend(s:GetVisual()) command! REPLSendLine call REPLSend([getline('.')]) " }}} -"let $NVIM_TUI_ENABLE_TRUE_COLOR=1 -let $NVIM_TUI_ENABLE_CURSOR_SHAPE=2 +let $NVIM_TUI_ENABLE_CURSOR_SHAPE = g:spacevim_terminal_cursor_shape "silent! let &t_SI = "\]50;CursorShape=1\x7" "silent! let &t_SR = "\]50;CursorShape=2\x7" "silent! let &t_EI = "\]50;CursorShape=0\x7" diff --git a/doc/SpaceVim.txt b/doc/SpaceVim.txt index 6374f5a5d..f3f9fab72 100644 --- a/doc/SpaceVim.txt +++ b/doc/SpaceVim.txt @@ -155,6 +155,18 @@ Set the warning symbol for SpaceVim's syntax maker. Default is '⚠'. let g:spacevim_warning_symbol = '!' < + *g:spacevim_terminal_cursor_shape* +Set the SpaceVim cursor shape in the terminal. Set to 0 to prevent Nvim from +changing the cursor shape. Set to 1 to enable non-blinking mode-sensitive +cursor (this is the default). Set to 2 to enable blinking mode-sensitive +cursor. Host terminal must support the DECSCUSR CSI escape sequence. + +Depending on the terminal emulator, using this option with nvim under tmux +might require adding the following to ~/.tmux.conf: +> + set -ga terminal-overrides ',*:Ss=\E[%p1%d q:Se=\E[2 q' +< + *g:spacevim_vim_help_language* Set the help language of vim. Default is 'en'. You can change it to Chinese. >