LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-28-2010, 10:06 AM   #1
e3399
Member
 
Registered: Nov 2010
Location: China
Distribution: Fedora12
Posts: 54

Rep: Reputation: 0
Question 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!
 
Old 11-28-2010, 10:10 AM   #2
grail
LQ Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 9,245

Rep: Reputation: 2684Reputation: 2684Reputation: 2684Reputation: 2684Reputation: 2684Reputation: 2684Reputation: 2684Reputation: 2684Reputation: 2684Reputation: 2684Reputation: 2684
Not sure about that method but after you highlight with v try pressing y for yank or x for delete / cut
 
Old 11-28-2010, 10:13 AM   #3
e3399
Member
 
Registered: Nov 2010
Location: China
Distribution: Fedora12
Posts: 54

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by grail View Post
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."
 
Old 11-28-2010, 11:02 AM   #4
e3399
Member
 
Registered: Nov 2010
Location: China
Distribution: Fedora12
Posts: 54

Original Poster
Rep: Reputation: 0
Anyone can help me?
Than you.
 
Old 11-28-2010, 12:18 PM   #5
martinbc
Member
 
Registered: Jun 2010
Distribution: Ubuntu, played with Puppy Slitaz & OpenSUSE
Posts: 40

Rep: Reputation: 4
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
 
Old 11-29-2010, 12:13 AM   #6
e3399
Member
 
Registered: Nov 2010
Location: China
Distribution: Fedora12
Posts: 54

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by martinbc View Post
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)
 
Old 11-29-2010, 09:19 AM   #7
e3399
Member
 
Registered: Nov 2010
Location: China
Distribution: Fedora12
Posts: 54

Original Poster
Rep: Reputation: 0
anyone can help me!
 
Old 11-29-2010, 10:33 AM   #8
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,576
Blog Entries: 31

Rep: Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195
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?
 
Old 11-29-2010, 11:04 AM   #9
e3399
Member
 
Registered: Nov 2010
Location: China
Distribution: Fedora12
Posts: 54

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by catkin View Post
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!
 
Old 11-29-2010, 11:37 AM   #10
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,066
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
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

Last edited by Tinkster; 11-29-2010 at 11:38 AM.
 
Old 11-29-2010, 11:40 AM   #11
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,576
Blog Entries: 31

Rep: Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195
Which terminal or terminal emulator are you using?
 
Old 11-29-2010, 12:02 PM   #12
fbsduser
Member
 
Registered: Oct 2009
Distribution: Hackintosh, SlackWare
Posts: 267

Rep: Reputation: 30
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).
 
Old 11-29-2010, 12:20 PM   #13
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,066
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Quote:
Originally Posted by fbsduser View Post
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.
 
Old 11-30-2010, 03:59 AM   #14
martinbc
Member
 
Registered: Jun 2010
Distribution: Ubuntu, played with Puppy Slitaz & OpenSUSE
Posts: 40

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

Martin
 
Old 11-30-2010, 08:53 AM   #15
e3399
Member
 
Registered: Nov 2010
Location: China
Distribution: Fedora12
Posts: 54

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by catkin View Post
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?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Recognizing ctrl+c,ctrl+l,ctrl+d in C programs leonardo6023 Programming 1 08-19-2009 10:23 AM
KDE 3.5.9 - Konqueror - keyboard shortcuts ctrl+, and ctrl+. sometimes stop working bhy Linux - Desktop 1 07-26-2008 12:48 PM
Ctrl+F2 & Ctrl+F7 won't work alkos333 Slackware 15 12-07-2007 04:44 AM
Any way to create bash short cuts (like CTRL+l for clear and Ctrl+D for exit) supersubu123 Linux - General 5 05-30-2007 04:02 AM
no ctrl-a or ctrl-z in emacs or on command line? ashlock Fedora 5 12-30-2003 09:00 PM


All times are GMT -5. The time now is 03:57 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration