More clean-ups
Better Cross-platform stuff https://vimways.org/2018/from-vimrc-to-vim/
This commit is contained in:
30
plugin/ui.vim
Normal file
30
plugin/ui.vim
Normal file
@@ -0,0 +1,30 @@
|
||||
if $TERM_PROGRAM ==? 'iTerm.app'
|
||||
" different cursors for insert vs normal mode
|
||||
if exists('$TMUX')
|
||||
let &t_SI = "\<Esc>Ptmux;\<Esc>\<Esc>]50;CursorShape=1\x7\<Esc>\\"
|
||||
let &t_EI = "\<Esc>Ptmux;\<Esc>\<Esc>]50;CursorShape=0\x7\<Esc>\\"
|
||||
else
|
||||
let &t_SI = "\<Esc>]50;CursorShape=1\x7"
|
||||
let &t_EI = "\<Esc>]50;CursorShape=0\x7"
|
||||
endif
|
||||
endif
|
||||
|
||||
" Windows-specific setting allowing for 256-colors etc
|
||||
if($ConEmuANSI ==? 'ON')
|
||||
set term=xterm
|
||||
set t_Co=256
|
||||
let &t_AB='\e[48;5;%dm' " background color
|
||||
let &t_AF='\e[38;5;%dm' " foreground color
|
||||
inoremap <Esc>[62~ <C-X><C-E>
|
||||
inoremap <Esc>[63~ <C-X><C-Y>
|
||||
nnoremap <Esc>[62~ <C-E>
|
||||
nnoremap <Esc>[63~ <C-Y>
|
||||
endif
|
||||
|
||||
if(exists('$WT_SESSION'))
|
||||
set t_Co=256
|
||||
inoremap <Esc>[62~ <C-X><C-E>
|
||||
inoremap <Esc>[63~ <C-X><C-Y>
|
||||
nnoremap <Esc>[62~ <C-E>
|
||||
nnoremap <Esc>[63~ <C-Y>
|
||||
endif
|
||||
Reference in New Issue
Block a user