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
A Few Issues with the non-gui vim
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  9 messages - Collapse all  -  Translate all to Translated (View all originals)
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
 
ale  
View profile  
 More options Apr 2 2011, 8:30 pm
From: ale <33faceb...@gmail.com>
Date: Sat, 2 Apr 2011 17:30:25 -0700 (PDT)
Local: Sat, Apr 2 2011 8:30 pm
Subject: A Few Issues with the non-gui vim
Hi.
I was watching a speech on Youtube by Bram Moolenaar where he
recommended the use of vim over gvim for better switching between
editor/shell etc, much faster etc.
My only problem w/ a cterm-vim is that there is no pre-built clear
indicatorbetween insert and normal mode besides the "--INSERT--" text
on the status line.

Any suggestions?

I tried some ugly autocommand for the normal background highlighting
like tehse:
        au Insertleave *  highlight Normal ctermbg=gray
        au Insertenter *  highlight Normal ctermbg=white

well, what i discovered is that "white" is basically gray on my term
(xterm or ansi) for some reason (using the latest Ubuntu), but i don't
know how to fix it. the xterm-vim page was too abstract and didn't
have clear examples, not to mention the man pages.


 
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.
bill lam  
View profile  
 More options Apr 3 2011, 12:05 am
From: bill lam <cbill....@gmail.com>
Date: Sun, 3 Apr 2011 12:05:31 +0800
Local: Sun, Apr 3 2011 12:05 am
Subject: Re: A Few Issues with the non-gui vim
to change colors in xterm, you create or amend ~/.Xresource and add lines
such as,

! change darkblue brighter
XTerm*VT100*color4: #0088ff

you have to run xrdb or restart x to take effect.

BTW ubuntu does not use xterm as its default term emulator as far as I know.

--
regards,
====================================================
GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3


 
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.
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.
ale  
View profile  
 More options Apr 3 2011, 8:22 am
From: ale <33faceb...@gmail.com>
Date: Sun, 3 Apr 2011 05:22:16 -0700 (PDT)
Local: Sun, Apr 3 2011 8:22 am
Subject: Re: A Few Issues with the non-gui vim

On Apr 3, 12:12 pm, John Magolske <listm...@b79.net> wrote:

> * ale <33faceb...@gmail.com> [110402 17:47]:

> 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.

One problem i have is that the curosor is blinking so it still take
about a second to see the new color, how to stop it?

why all this branching? are all terminals quering the same db
(terminfo?)?
thanks>


 
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.
ale  
View profile  
 More options Apr 3 2011, 8:22 am
From: ale <33faceb...@gmail.com>
Date: Sun, 3 Apr 2011 05:22:40 -0700 (PDT)
Local: Sun, Apr 3 2011 8:22 am
Subject: Re: A Few Issues with the non-gui vim

On Apr 3, 12:12 pm, John Magolske <listm...@b79.net> wrote:

> * ale <33faceb...@gmail.com> [110402 17:47]:

> 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.

One problem i have is that the curosor is blinking so it still take
about a second to see the new color, how to stop it?

why all this branching? are all terminals quering the same db
(terminfo?)?
thanks>


 
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.
ale  
View profile  
 More options Apr 3 2011, 8:37 am
From: ale <33faceb...@gmail.com>
Date: Sun, 3 Apr 2011 05:37:05 -0700 (PDT)
Local: Sun, Apr 3 2011 8:37 am
Subject: Re: A Few Issues with the non-gui vim

On Apr 3, 12:05 pm, bill lam <cbill....@gmail.com> wrote:

> to change colors in xterm, you create or amend ~/.Xresource and add lines
> such as,

> ! change darkblue brighter
> XTerm*VT100*color4: #0088ff

is it suppose to change color 4? can i set highlighting ctermfg=4?
it still didn't work?
i wish i could just change the term settings, or modify one to work
for vim,sure it must be some script for that..
there is sure a "capability" to change to shape of the cursor, as it
ahppens many times on the shell, don't remember when, so i wish i
could just change the term definition and use it both for vim and zsh
to indicate mode changing.
im sure many have fixed it in their vimrc, and sure if you master
terminfo, it is a simple and easy command. So what is?

> you have to run xrdb or restart x to take effect.

> BTW ubuntu does not use xterm as its default term emulator as far as I know.

set term? gives me xterm.
i haven't change it manually.


 
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.
John Magolske  
View profile  
 More options Apr 3 2011, 12:27 pm
From: John Magolske <listm...@b79.net>
Date: Sun, 3 Apr 2011 09:27:16 -0700
Local: Sun, Apr 3 2011 12:27 pm
Subject: Re: A Few Issues with the non-gui vim
* ale <33faceb...@gmail.com> [110403 08:57]:

> On Apr 3, 12:12 pm, John Magolske <listm...@b79.net> wrote:
> > * ale <33faceb...@gmail.com> [110402 17:47]:

> > To remind myself what mode I'm in I have the text-cursor change color,

> One problem i have is that the curosor is blinking so it still take
> about a second to see the new color, how to stop it?

Probably a termcap setting. What console are you using?

[...]

> why all this branching? are all terminals quering the same db
> (terminfo?)?

I have three conditions set for the three terms I use, Xterm, linux
and screen.linux, which all require different control sequences.

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.
Gary Johnson  
View profile  
 More options Apr 3 2011, 2:17 pm
From: Gary Johnson <garyj...@spocom.com>
Date: Sun, 3 Apr 2011 11:17:01 -0700
Local: Sun, Apr 3 2011 2:17 pm
Subject: Re: A Few Issues with the non-gui vim

On 2011-04-03, ale wrote:
> On Apr 3, 12:05 pm, bill lam wrote:
> > to change colors in xterm, you create or amend ~/.Xresource and add lines
> > such as,

> > ! change darkblue brighter
> > XTerm*VT100*color4: #0088ff
> is it suppose to change color 4? can i set highlighting ctermfg=4?
> it still didn't work?

First off, that file name is spelled .Xresources, with an s at the
end.

Next, for changes to the ~/.Xresources or ~/.Xdefaults file to take
effect, the file has to be read by the X resource database manager.
This is done automatically when your window manager starts.  If you
want changes made to that file to take effect without restarting
your window manager, you'll have to run 'xrdb', like this:

    $ xrdb -merge ~/.Xresources

Regards,
Gary


 
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.
Erik Christiansen  
View profile  
 More options Apr 4 2011, 9:06 am
From: Erik Christiansen <dva...@internode.on.net>
Date: Mon, 4 Apr 2011 23:06:58 +1000
Local: Mon, Apr 4 2011 9:06 am
Subject: Re: A Few Issues with the non-gui vim

On Sun, Apr 03, 2011 at 05:37:05AM -0700, ale wrote:

> set term? gives me xterm.
> i haven't change it manually.

Given that, and some proposed solutions which might not be so easy for
everyone to maintain long term, due to complexity, I'll offer what is
working for me, in an xterm. (So far, anyway. :-) In .vimrc:

" Appearance:   (Insert_Mode == Green, Normal_Mode == Red)
if &term =~ "xterm"
   let &t_SI = "\<Esc>]12;green\x7"
   let &t_EI = "\<Esc>]12;red\x7"
endif

I've only had it in place for a month or so, but haven't yet had any
surprises. It does take a second to change to red on exit from insert
mode, but I can usually remember that long what I've done. YMMV.

Erik

--
Do not do unto others as you would they should do unto you.
Their tastes may not be the same.
                                      - George Bernard Shaw


 
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.
End of messages
« Back to Discussions « Newer topic     Older topic »