1

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.

1 Answer 1

3

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?

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .