LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   vim:ctrl+v command to select some data.But when I push ctrl+v.It doesn't work.. (https://www.linuxquestions.org/questions/linux-newbie-8/vim-ctrl-v-command-to-select-some-data-but-when-i-push-ctrl-v-it-doesnt-work-847034/)

e3399 11-28-2010 09:06 AM

vim:ctrl+v command to select some data.But when I push ctrl+v.It doesn't work..
 
" Mark the start of the text with "v", "V" or CTRL-V.
The character under the cursor will be used as the start."

"With CTRL-V (blockwise Visual mode) the highlighted text will be a rectangle
between start position and the cursor."

I can mark the start with "v" or "V".
But it doesn't work when I push ctrl+V.
Any suggestions will be appreciated!

grail 11-28-2010 09:10 AM

Not sure about that method but after you highlight with v try pressing y for yank or x for delete / cut

e3399 11-28-2010 09:13 AM

Quote:

Originally Posted by grail (Post 4173568)
Not sure about that method but after you highlight with v try pressing y for yank or x for delete / cut

Thank you.But I want the highlighted text to be a rectangle.

Vim user manual says:"With CTRL-V (blockwise Visual mode) the highlighted text will be a rectangle
between start position and the cursor."

e3399 11-28-2010 10:02 AM

Anyone can help me?
Than you.

martinbc 11-28-2010 11:18 AM

Hi

I just want to check that I'm not being stupid when reading your post but when you press CTRL-V are you using CTRL-V (pressing SHIFT) or CTRL-v (just two fingers)

I tried on my version of VIM (which is 7.2.330) and CTRL-v allowed me to select a rectangle, pressing y yanked the marked text into the buffer, p then allowed me to paste the rectangle into a different place.

Martin

e3399 11-28-2010 11:13 PM

Quote:

Originally Posted by martinbc (Post 4173668)
Hi

I just want to check that I'm not being stupid when reading your post but when you press CTRL-V are you using CTRL-V (pressing SHIFT) or CTRL-v (just two fingers)

I tried on my version of VIM (which is 7.2.330) and CTRL-v allowed me to select a rectangle, pressing y yanked the marked text into the buffer, p then allowed me to paste the rectangle into a different place.

Martin

Thank you!
But I just press CTRL-v (just two fingers)

e3399 11-29-2010 08:19 AM

anyone can help me!

catkin 11-29-2010 09:33 AM

Works for me (learned something new, thanks :)). Could be that your terminal or terminal emulator is intercepting Ctrl+V before it gets to vim (you are posting about vim, not Gvim?). Which terminal or terminal emulator are you using?

e3399 11-29-2010 10:04 AM

Quote:

Originally Posted by catkin (Post 4174755)
Works for me (learned something new, thanks :)). Could be that your terminal or terminal emulator is intercepting Ctrl+V before it gets to vim (you are posting about vim, not Gvim?). Which terminal or terminal emulator are you using?

I work on fedora12.
I tried vim and gvim.Neither of them worked!

Tinkster 11-29-2010 10:37 AM

To use visual BLOCK mode, press Ctrl+V, not Ctrl+v

If that doesn't work, maybe your Ctrl-key is "stuck" or
broken?

Cheers,
Tink

catkin 11-29-2010 10:40 AM

Which terminal or terminal emulator are you using?

fbsduser 11-29-2010 11:02 AM

In my Sabayon box vim 7.3 does the visual block copy using CTRL-v (without the need to use shift or caps lock first).

Tinkster 11-29-2010 11:20 AM

Quote:

Originally Posted by fbsduser (Post 4174852)
In my Sabayon box vim 7.3 does the visual block copy using CTRL-v (without the need to use shift or caps lock first).

version 7.2.245 w/o Shft puts me into visual line mode.

martinbc 11-30-2010 02:59 AM

Have you tried CTRL-ALT-v as suggested here http://vimdoc.sourceforge.net/htmldo...-V-alternative

Martin

e3399 11-30-2010 07:53 AM

Quote:

Originally Posted by catkin (Post 4174755)
Works for me (learned something new, thanks :)). Could be that your terminal or terminal emulator is intercepting Ctrl+V before it gets to vim (you are posting about vim, not Gvim?). Which terminal or terminal emulator are you using?

I am new to linux.
How can I know what terminal or terminal emulator am I using?


All times are GMT -5. The time now is 04:54 PM.