LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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, 09: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, 09:10 AM   #2
grail
LQ Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 10,008

Rep: Reputation: 3193Reputation: 3193Reputation: 3193Reputation: 3193Reputation: 3193Reputation: 3193Reputation: 3193Reputation: 3193Reputation: 3193Reputation: 3193Reputation: 3193
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, 09: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, 10: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, 11:18 AM   #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-28-2010, 11:13 PM   #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, 08: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, 09:33 AM   #8
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
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, 10: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, 10:37 AM   #10
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
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 10:38 AM.
 
Old 11-29-2010, 10:40 AM   #11
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
Which terminal or terminal emulator are you using?
 
Old 11-29-2010, 11:02 AM   #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, 11:20 AM   #13
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
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, 02: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, 07: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



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 09:23 AM
KDE 3.5.9 - Konqueror - keyboard shortcuts ctrl+, and ctrl+. sometimes stop working bhy Linux - Desktop 1 07-26-2008 11:48 AM
Ctrl+F2 & Ctrl+F7 won't work alkos333 Slackware 15 12-07-2007 03: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 03:02 AM
no ctrl-a or ctrl-z in emacs or on command line? ashlock Fedora 5 12-30-2003 08:00 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:51 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
Open Source Consulting | Domain Registration