Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I remember vaguely, that we could highlight chunks in vi. Is there anyway to do that in a console? eg: In the image, I wanted to select the numbers only, but highlighting only captures complete lines, not discontinuous chunks. I hope I am clear what I mean.

Let me know if its possible and theres a way.


alt text

share|improve this question
up vote 1 down vote accepted

Works for me with gnome-terminal. Open the gconf-editor:

Alt+F2 > gconf-editor

and go to


The key word_chars should have the value -A-Za-z0-9,./?%&#:_=+@~

share|improve this answer

I'm not 100% sure if you're asking about doing this in vi or from some other terminal input. If you're talking about some terminal input, well I'd say just pipe it to vi or write to a file you open in vi.

As for highlighting a column in vi I have a screencast episode that covers it. It's called visual select mode and you can do column visual select:

You basically want to use ctrl-v to start the mode and then move as you normally would to get your selection.

share|improve this answer

If you are using Gnome Terminal, you can make a square selection by holding down Ctrl before making the selection with your mouse.

Not sure if that is what you mean though... (Your question isn't very clear!)

share|improve this answer
yes, your answer is correct too. – theTuxRacer Oct 28 '10 at 13:42

use ctrl to select a block. use shift to change that block size.

share|improve this answer

If you want to use the full power of vim then you can pipe output into vim.

$ ./ | vim -

The output will appear in vim and you can use the full power of vim to do what you will. To select a block as you say above, you can move to a corner of your block of numbers and do Ctrl+V to start "visual block mode". Select the block, and then to copy it to the X clipboard you can do

  • "*p to copy to the X11 clipboard - use the middle mouse button to paste elsewhere
  • "+p to copy to the standard clipboard - use Ctrl+V to paste elsewhere

Of course if it is a one time command that is already on the terminal then this isn't an option, but I've found these techniques useful along the way, so hopefully other readers of this question also will.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.