^V doesn't work anymore

classic Classic list List threaded Threaded
19 messages Options
Reply | Threaded
Open this post in threaded view
|

^V doesn't work anymore

Walter Cazzola
Dear VIM Experts,
since few days I'm experimenting a strange behavior of (g)vim.

I'm using Vim 6.3 on a linux box (mandriva) but I didn't change anything
in my configuration (at least awarely) since a long time.

However, now ^V (the vertical selection command) doesn't select
anything.

Do you have any idea about what is the problem and how can I solve it?

thank you in advance for your help

Walter

--
Walter Cazzola, PhD - Assistant Professor, DICo, University of Milano
E-mail [hidden email] Ph.: +39 010 353 6637  Fax: +39 010 353 6699
· · · --------------------------- · · · --------------------------- · · ·
                ... recursive: adjective, see recursive ...
· · · --------------------------- · · · --------------------------- · · ·
Reply | Threaded
Open this post in threaded view
|

Re: ^V doesn't work anymore

Dominic Evans
Try ^Q as an alternative. Not sure why your config would have changed
without you changing it.

On 11/10/05, Walter Cazzola <[hidden email]> wrote:

> Dear VIM Experts,
> since few days I'm experimenting a strange behavior of (g)vim.
>
> I'm using Vim 6.3 on a linux box (mandriva) but I didn't change anything
> in my configuration (at least awarely) since a long time.
>
> However, now ^V (the vertical selection command) doesn't select
> anything.
>
> Do you have any idea about what is the problem and how can I solve it?
>
> thank you in advance for your help
>
> Walter
>
> --
> Walter Cazzola, PhD - Assistant Professor, DICo, University of Milano
> E-mail [hidden email] Ph.: +39 010 353 6637  Fax: +39 010 353 6699
> · · · --------------------------- · · · --------------------------- · · ·
>                 ... recursive: adjective, see recursive ...
> · · · --------------------------- · · · --------------------------- · · ·
>
Reply | Threaded
Open this post in threaded view
|

Re: Re: ^V doesn't work anymore

Walter Cazzola
On Tue, 11 Oct 2005, Dominic Evans wrote:

> Try ^Q as an alternative. Not sure why your config would have changed
> without you changing it.

thank you for your prompt reply, I have tried the ^Q but it doesn't work too.

Any other idea? Maybe there is some flags to check/uncheck.

Walter

--
Walter Cazzola, PhD - Assistant Professor, DICo, University of Milano
E-mail [hidden email] Ph.: +39 010 353 6637  Fax: +39 010 353 6699
· · · --------------------------- · · · --------------------------- · · ·
                ... recursive: adjective, see recursive ...
· · · --------------------------- · · · --------------------------- · · ·
Reply | Threaded
Open this post in threaded view
|

RE: Re: ^V doesn't work anymore

Walter Cazzola
In reply to this post by Walter Cazzola
On Tue, 11 Oct 2005, Goli, Rajesh (Rajesh) wrote:

>  Is ^V mapped to anything?
>  Try :map <c-v> and :map <c-V>
>  Can some script you are sourcing have done this?

There is no map for both the sequences, BTW, since the last time
(yesterday) it has worked I don't have installed nothing related to vim.

Maybe I could have pressed some keystroke (unintentionally) that has
inhibited that behavior but I don't know when, what and (most important)
how to recover from that.

Walter

--
Walter Cazzola, PhD - Assistant Professor, DICo, University of Milano
E-mail [hidden email] Ph.: +39 010 353 6637  Fax: +39 010 353 6699
· · · --------------------------- · · · --------------------------- · · ·
                ... recursive: adjective, see recursive ...
· · · --------------------------- · · · --------------------------- · · ·
Reply | Threaded
Open this post in threaded view
|

Re: Re: ^V doesn't work anymore

Charles E Campbell Jr
Walter Cazzola wrote:

> On Tue, 11 Oct 2005, Goli, Rajesh (Rajesh) wrote:
>
>>  Is ^V mapped to anything?
>>  Try :map <c-v> and :map <c-V>
>>  Can some script you are sourcing have done this?
>
>
> There is no map for both the sequences, BTW, since the last time
> (yesterday) it has worked I don't have installed nothing related to vim.
>
> Maybe I could have pressed some keystroke (unintentionally) that has
> inhibited that behavior but I don't know when, what and (most important)
> how to recover from that.


Here's some ideas...

1) cd ; /bin/rm .viminfo   (assuming unix)
  see if that somehow clears up the problem.

2)  vim -u NONE -N somefile
   See if ctrl-v works as expected.

3) In Rajesh's test, type
   :map <c-v>
  as shown (ie. *don't* use the control key, but use each character < c
- v > )
  Does that show anything?

4) What does...
   vim -u NONE -N
  :map <c-v> :echo "it worked!"<cr>
  (then hit a ctrl-v)
  show?  It should show:   "it worked!"
  (again, type the characters as shown in the map command - no control
characters!)

Regards,
Chip Campbell



Reply | Threaded
Open this post in threaded view
|

Re: Re: [VIM] Re: ^V doesn't work anymore

Walter Cazzola
On Tue, 11 Oct 2005, Charles E. Campbell, Jr. wrote:

> 1) cd ; /bin/rm .viminfo   (assuming unix)
>   see if that somehow clears up the problem.

yes, I'm using a linux box, and nothing changed in removing the .viminfo
files.

> 2)  vim -u NONE -N somefile
>    See if ctrl-v works as expected.

no, it doesn't

> 3) In Rajesh's test, type
>   :map <c-v>
> as shown (ie. *don't* use the control key, but use each character < c - v >
> )
>   Does that show anything?

it shows the string "no mapping found" in the bottom line.

> 4) What does...
>   vim -u NONE -N
>   :map <c-v> :echo "it worked!"<cr>
>   (then hit a ctrl-v)
>   show?  It should show:   "it worked!"
>   (again, type the characters as shown in the map command - no control
> characters!)

yes it does.

Maybe my .vimrc, could help, if necessary I can post it.

Thank you for the attempt.

Regards
Walter

--
Walter Cazzola, PhD - Assistant Professor, DICo, University of Milano
E-mail [hidden email] Ph.: +39 010 353 6637  Fax: +39 010 353 6699
· · · --------------------------- · · · --------------------------- · · ·
                ... recursive: adjective, see recursive ...
· · · --------------------------- · · · --------------------------- · · ·
Reply | Threaded
Open this post in threaded view
|

Re: Re: [VIM] Re: ^V doesn't work anymore

Charles E Campbell Jr
Walter Cazzola wrote:

> On Tue, 11 Oct 2005, Charles E. Campbell, Jr. wrote:
>
>> 1) cd ; /bin/rm .viminfo   (assuming unix)
>>   see if that somehow clears up the problem.
>
>
> yes, I'm using a linux box, and nothing changed in removing the .viminfo
> files.
>
>> 2)  vim -u NONE -N somefile
>>    See if ctrl-v works as expected.
>
>
> no, it doesn't
>
>> 3) In Rajesh's test, type
>>   :map <c-v>
>> as shown (ie. *don't* use the control key, but use each character < c
>> - v > )
>>   Does that show anything?
>
>
> it shows the string "no mapping found" in the bottom line.
>
>> 4) What does...
>>   vim -u NONE -N
>>   :map <c-v> :echo "it worked!"<cr>
>>   (then hit a ctrl-v)
>>   show?  It should show:   "it worked!"
>>   (again, type the characters as shown in the map command - no
>> control characters!)
>
>
> yes it does.
>
> Maybe my .vimrc, could help, if necessary I can post it.


This problem is beginning to sound like a terminal type problem; the vim
-u NONE -N somefile
(Attempt#2) prevents using your .vimrc, plugins, and colorschemes, so
they can't be involved.

On the other hand, Attempt#4 shows that your vim is receiving ctrl-vs.  
Hmmm, try this:

Bring up vim, and
:version

Does your version show +visual  or -visual?  If you have -visual, then
your vim wasn't compiled
to support visual mode and you'll need to compile one with it.

Regards,
Chip Campbell

Reply | Threaded
Open this post in threaded view
|

Re: Re: [VIM] Re: [VIM] Re: ^V doesn't work anymore

Walter Cazzola
On Tue, 11 Oct 2005, Charles E. Campbell, Jr. wrote:

>>  Maybe my .vimrc, could help, if necessary I can post it.

> This problem is beginning to sound like a terminal type problem; the vim -u
> NONE -N somefile
> (Attempt#2) prevents using your .vimrc, plugins, and colorschemes, so they
> can't be involved.

in effect, but I don't have the experience to be sure, my .vimrc looks
sound.

> On the other hand, Attempt#4 shows that your vim is receiving ctrl-vs.  Hmmm,
> try this:

> Bring up vim, and
> :version

> Does your version show +visual  or -visual?  If you have -visual, then your
> vim wasn't compiled to support visual mode and you'll need to compile
> one with it.

among several tens of option there are:

  +visual +visualextra

so the problem should be something different.

Regards

Walter

--
Walter Cazzola, PhD - Assistant Professor, DICo, University of Milano
E-mail [hidden email] Ph.: +39 010 353 6637  Fax: +39 010 353 6699
· · · --------------------------- · · · --------------------------- · · ·
                ... recursive: adjective, see recursive ...
· · · --------------------------- · · · --------------------------- · · ·
Reply | Threaded
Open this post in threaded view
|

Re: Re: [VIM] Re: [VIM] Re: ^V doesn't work anymore

A.J.Mechelynck
Walter Cazzola wrote:

> On Tue, 11 Oct 2005, Charles E. Campbell, Jr. wrote:
>
>>>  Maybe my .vimrc, could help, if necessary I can post it.
>
>> This problem is beginning to sound like a terminal type problem; the
>> vim -u NONE -N somefile
>> (Attempt#2) prevents using your .vimrc, plugins, and colorschemes, so
>> they can't be involved.
>
> in effect, but I don't have the experience to be sure, my .vimrc looks
> sound.
>
>> On the other hand, Attempt#4 shows that your vim is receiving
>> ctrl-vs.  Hmmm, try this:
>
>> Bring up vim, and
>> :version
>
>> Does your version show +visual  or -visual?  If you have -visual, then
>> your vim wasn't compiled to support visual mode and you'll need to
>> compile
>> one with it.
>
> among several tens of option there are:
>
>  +visual +visualextra
>
> so the problem should be something different.
>
> Regards
>
> Walter
>

When all else fails, try something that looks stupid: either

        :unmap <C-V>
or
        :noremap <C-V> <C-V>

and see if it changes anything. (I expect not, but who knows?) Type them
from the keyboard, as shown (i.e., <C-V> is less-than, C-for-Charlie,
dash, V-for-Victor, greater-than), or paste them to the command-line
with Ctrl-R * (control-R, star).

Best regards,
Tony.

Reply | Threaded
Open this post in threaded view
|

Re: Re: [VIM] Re: [VIM] Re: [VIM] Re: ^V doesn't work anymore

Walter Cazzola
On Tue, 11 Oct 2005, A. J. Mechelynck wrote:

> When all else fails, try something that looks stupid: either

> :unmap <C-V>
> or
> :noremap <C-V> <C-V>

> and see if it changes anything. (I expect not, but who knows?) Type them
> from the keyboard, as shown (i.e., <C-V> is less-than, C-for-Charlie,
> dash, V-for-Victor, greater-than), or paste them to the command-line
> with Ctrl-R * (control-R, star).

tried and nothing changed, well in the first case I got the E31 error
whereas in the second I got the message "no mapping found".

BTW the ^V still doesn't work

Walter

--
Walter Cazzola, PhD - Assistant Professor, DICo, University of Milano
E-mail [hidden email] Ph.: +39 010 353 6637  Fax: +39 010 353 6699
· · · --------------------------- · · · --------------------------- · · ·
                ... recursive: adjective, see recursive ...
· · · --------------------------- · · · --------------------------- · · ·
Reply | Threaded
Open this post in threaded view
|

Re: ^V doesn't work anymore

James Vega-3
In reply to this post by Walter Cazzola
On Tue, Oct 11, 2005 at 01:29:25PM +0200, Walter Cazzola wrote:
> Dear VIM Experts,
> since few days I'm experimenting a strange behavior of (g)vim.
>
> I'm using Vim 6.3 on a linux box (mandriva) but I didn't change anything
> in my configuration (at least awarely) since a long time.
>
> However, now ^V (the vertical selection command) doesn't select
> anything.

What happens when you press ^V^V in Insert Mode?  If Vim recognizes that
as the proper keypress, you should see a ^V inserted.

James
--
GPG Key: 1024D/61326D40 2003-09-02 James Vega <[hidden email]>

attachment0 (204 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Re: ^V doesn't work anymore

Walter Cazzola
On Tue, 11 Oct 2005, James Vega wrote:

>> However, now ^V (the vertical selection command) doesn't select
>> anything.

> What happens when you press ^V^V in Insert Mode?  If Vim recognizes that
> as the proper keypress, you should see a ^V inserted.

in fact the result is exactly that.

Now it has come in my mind that the last time I have seen it working,
was trying the suggestion of David Fishburn in the thread "Most Valuable
Tricks". The following is his message:

     > One of the features I use the most is use Visual Block mode to
     > comment and uncomment code.

     >   one
     >   two
     >   three

     > To comment the above lines:
     > ------------------
     > Place your cursor on the "o" of one.
     > CTRL-v
     > Down arrow (j) until the "t" in three is visually selected.
     > I//  (capital I, followed by your comment character).
     > <Esc>

     > To uncomment the above lines:
     > ------------------
     > Place your cursor on the first "/" of the first line.
     > CTRL-v
     > Down arrow (j) until the "/" in three is visually selected.
     > Right arrow (l) until both "//"s are visually selected.
     > x

     > Voila.

     > I use this constantly.

     > Dave

Probably, I have pressed something wrong since it hasn't worked.

I hope this helps in finding a solution.

Walter

--
Walter Cazzola, PhD - Assistant Professor, DICo, University of Milano
E-mail [hidden email] Ph.: +39 010 353 6637  Fax: +39 010 353 6699
· · · --------------------------- · · · --------------------------- · · ·
                ... recursive: adjective, see recursive ...
· · · --------------------------- · · · --------------------------- · · ·
Reply | Threaded
Open this post in threaded view
|

Re: Re: ^V doesn't work anymore

Bob Davis
In reply to this post by Walter Cazzola
Walter Cazzola wrote:

> On Tue, 11 Oct 2005, Goli, Rajesh (Rajesh) wrote:
>
>
>> Is ^V mapped to anything?
>> Try :map <c-v> and :map <c-V>
>> Can some script you are sourcing have done this?
>
>
> There is no map for both the sequences, BTW, since the last time
> (yesterday) it has worked I don't have installed nothing related to vim.
>
> Maybe I could have pressed some keystroke (unintentionally) that has
> inhibited that behavior but I don't know when, what and (most important)
> how to recover from that.
>
> Walter
>

Do you press ^v and then use jk etc. keys to highlight.
I was making the mistake of ^v and then using up and down arrow which doesnt work because the arrow keys cause you to
leave visual mode.

--
Bob Davis | Senior Advisory Software Developer - Applications
[hidden email]
Work: 603-926-9696 x3456
Home: 603-778-0781
Aim: dad1732
Yim: rsdavis9
Reply | Threaded
Open this post in threaded view
|

Re: Re: ^V doesn't work anymore

Tim Chase-2
> Do you press ^v and then use jk etc. keys to highlight. I was
> making the mistake of ^v and then using up and down arrow
> which doesnt work because the arrow keys cause you to leave
> visual mode.

Excellent idea, Bob!  Some environments send an escape-sequence
for the arrow keys.  Depending on your settings for 'timeout',
'ttimeout', 'timeoutlen' and 'ttimeoutlen', Vim might be jumping
the gun prematurely if you're using the arrow keys.  This would
send the initial <ESC> which would terminate the visual block
mode, and then transmit something like "[A" or something like that.


However, if it works in line-wise and character-wise mode using
the arrow keys, then it's likely something tied to the behavior
of the ^V

-tim





Reply | Threaded
Open this post in threaded view
|

Re: Re: ^V doesn't work anymore

A.J.Mechelynck
Tim Chase wrote:

>> Do you press ^v and then use jk etc. keys to highlight. I was
>> making the mistake of ^v and then using up and down arrow
>> which doesnt work because the arrow keys cause you to leave
>> visual mode.
>
> Excellent idea, Bob!  Some environments send an escape-sequence
> for the arrow keys.  Depending on your settings for 'timeout',
> 'ttimeout', 'timeoutlen' and 'ttimeoutlen', Vim might be jumping
> the gun prematurely if you're using the arrow keys.  This would
> send the initial <ESC> which would terminate the visual block
> mode, and then transmit something like "[A" or something like that.
>
>
> However, if it works in line-wise and character-wise mode using the
> arrow keys, then it's likely something tied to the behavior of the ^V
>
> -tim


Also, IIUC arrow keys terminate visual mode regardless of timeout
settings if 'keymodel' includes "stopsel"


Best regards,
Tony.

Reply | Threaded
Open this post in threaded view
|

Re: Re: [VIM] Re: ^V doesn't work anymore

Walter Cazzola
In reply to this post by Bob Davis
On Tue, 11 Oct 2005, Bob Davis wrote:

> Do you press ^v and then use jk etc. keys to highlight.
> I was making the mistake of ^v and then using up and down arrow which doesnt
> work because the arrow keys cause you to leave visual mode.

Well, up to yesterday, I was using the ^V with the arrows and everything
worked well. Now I have tried both combinations and none happens.

regards
Walter
--
Walter Cazzola, PhD - Assistant Professor, DICo, University of Milano
E-mail [hidden email] Ph.: +39 010 353 6637  Fax: +39 010 353 6699
· · · --------------------------- · · · --------------------------- · · ·
                ... recursive: adjective, see recursive ...
· · · --------------------------- · · · --------------------------- · · ·
Reply | Threaded
Open this post in threaded view
|

Re: Re: [VIM] Re: ^V doesn't work anymore

Walter Cazzola
In reply to this post by Tim Chase-2
On Tue, 11 Oct 2005, Tim Chase wrote:

>>  Do you press ^v and then use jk etc. keys to highlight. I was
>>  making the mistake of ^v and then using up and down arrow
>>  which doesnt work because the arrow keys cause you to leave
>>  visual mode.

> Excellent idea, Bob!  Some environments send an escape-sequence
> for the arrow keys.  Depending on your settings for 'timeout',
> 'ttimeout', 'timeoutlen' and 'ttimeoutlen', Vim might be jumping
> the gun prematurely if you're using the arrow keys.  This would
> send the initial <ESC> which would terminate the visual block
> mode, and then transmit something like "[A" or something like that.

> However, if it works in line-wise and character-wise mode using the arrow
> keys, then it's likely something tied to the behavior of the ^V

as answered in a separate message, this one is not my case, arrows were
working well with the ^V and now either the arrows and the jk sequence
do not work.

Walter

--
Walter Cazzola, PhD - Assistant Professor, DICo, University of Milano
E-mail [hidden email] Ph.: +39 010 353 6637  Fax: +39 010 353 6699
· · · --------------------------- · · · --------------------------- · · ·
                ... recursive: adjective, see recursive ...
· · · --------------------------- · · · --------------------------- · · ·
Reply | Threaded
Open this post in threaded view
|

Re: ^V doesn't work anymore

Mathias Michaelis
In reply to this post by Walter Cazzola
Hello Walter

> Dear VIM Experts
>
I'm not an expert at all, so I do some blind trials upon your
problem ;-)

> However, now ^V (the vertical selection command) doesn't select
> anything.
>
What does that mean? Doesn't Vim enter in blockwise visual mode? Or
does it enter, but not show the selection? To answer this, start vim
with

(g)vim -u NONE

Then, within vim, type

:set nocompatible
:set ruler

Enter some text for your trials. If you now press Ctrl-V in normal
mode, the status line should show "-- VISUAL BLOCK --".

With j and l you can go at another place, then press y to leave
blockwise visual mode (selection may not be shown).

Back in normal mode, you can type:

1) :echo visualmode()
   => The string "^V" (w/o quotes) should appear in the status line.

2) p
   => Something should be inserted.

If nothing works, it is clear now that vim didn't enter the
blockwise visual mode at all.

You can try now to enter blockwise visual mode without using the key
combination Ctrl-V, e.g. by typing, in normal mode:

:exe "normal \<C-V>"

(Press all this literally, with all quotes, less- and
greater-than-signs etc.).

Use again the status line or the :echo visualmode() function to
decide if you have been in visual mode.

If this doesn't work either, vim has a real problem. Leave vim, go
into a terminal and type something like

ldd /usr/bin/vim

This lists all libraries on which vim depends on. Perhaps you have
installed some new programs and some libraries are incompatible with
vim now?

With

ldd /usr/bin/vim | sed "s/^.* => \([^ ]*\) .*$/ls -l \1/" | bash

you get the dates along with these libraries. Look at them also.

This is all that comes into my mind. I hope, some of the trials
brings light into the darkness ...

With kind regards

Mathias
Reply | Threaded
Open this post in threaded view
|

Re: Re: ^V doesn't work anymore

Walter Cazzola
On Wed, 12 Oct 2005, Mathias Michaelis wrote:

>> However, now ^V (the vertical selection command) doesn't select
>> anything.

thank you to everyone for the help, I don't know what has happened or
what it was wrong but today after rebooting my machine ^v works again.

I think that the problem and the solution will remain mystery

Thanks for the help
Walter

--
Walter Cazzola, PhD - Assistant Professor, DICo, University of Milano
E-mail [hidden email] Ph.: +39 010 353 6637  Fax: +39 010 353 6699
· · · --------------------------- · · · --------------------------- · · ·
                ... recursive: adjective, see recursive ...
· · · --------------------------- · · · --------------------------- · · ·