Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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 have a text file with over 184 thousand lines. This is the output from a particular application and is basically the dump of the database in JSON format. I need to select the lines which are between curly braces. For example, my file would have some text like this like this:


  30,000 lines later

I need to select these 30,000 odd lines and paste it somewhere else. Is there any Text editor which lets you do a selection based on edge characters?

I work with both Linux & Windows.

share|improve this question
up vote 3 down vote accepted

Vim will all you to select everything between matched brackets when the cursor is over one of the brackets with:

shift + v (start a line selection)

shift + 5 ("bounce" to other bracket)

Then hit y to copy or d to cut, and p to paste.

Gvim, the graphical version of Vim is available on both Windows and Linux.

To install on Ubuntu or Debian:

sudo apt-get update && sudo apt-get install vim-gnome;

Then run with the icon or:

gvim &

But what are you actually wanting to do with this text? It sounds like a simple program might be a better bet?

share|improve this answer
Thank you.It worked like a charm! – Devdatta Tengshe Jul 9 '11 at 12:36

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.