Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion A Few Issues with the non-gui vim
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
John Magolske  
View profile  
 More options Apr 3 2011, 12:12 am
From: John Magolske <listm...@b79.net>
Date: Sat, 2 Apr 2011 21:12:28 -0700
Local: Sun, Apr 3 2011 12:12 am
Subject: Re: A Few Issues with the non-gui vim
* ale <33faceb...@gmail.com> [110402 17:47]:

> My only problem w/ a cterm-vim is that there is no pre-built clear
> indicator between insert and normal mode besides the "--INSERT--"
> text on the status line.

> Any suggestions?

To remind myself what mode I'm in I have the text-cursor change color,
using the following in my vimrc. Note that the ^[ and ^G here are not
literal two-character combinations (ie, can't just cut & paste those
parts), but Escape and Ctrl-G formed by pressing Ctrl-V then escape,
and Ctrl-V then Ctrl-G respectively.

" text-cursor color by mode in xterm, linux console and screen.linux console:
" normal mode = golden, insert mode = green, return to green when leaving vim
if &term =~ "xterm"
    :silent !echo -ne "\033]12;GoldenRod\007"
    set t_SI+=^[]12;green^G
    set t_EI+=^[]12;GoldenRod^G
    autocmd VimLeave * :!echo -ne "\033]12;green\007"
    " show 'Vim, filename' in xterm title bar
    set titlestring=\%(\%M%)%t\ (Vim)
    " Set xterm to 16 colors (don't I want more?)
    set t_Co=16
endif
if &term == "linux" && !has("gui_running")
    set t_ve+=^[[?17;183;95c  " yellow
    au InsertEnter * set t_ve+=^[[?17;207;111c  " green
    au InsertLeave * set t_ve+=^[[?17;183;95c  " yellow
    autocmd VimLeave * set t_ve+=^[[?17;207;111c  " green
endif
if &term == "screen.linux"
  set t_ve+=^[[34l
  au InsertEnter * set t_ve+=^[[34h^[[?25h    " cnorm
  au InsertLeave * set t_ve+=^[[34l           " cvvis
  autocmd VimLeave * set t_ve+=^[[34h^[[?25h
  " show 'V:filename' as window name for screen (Tip 1126)
  set titlestring=\%(\%M%)V:%t
  set t_ts=^[k
  set t_fs=^[\
endif

Regards,

John

--
John Magolske
http://B79.net/contact


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.