1

I have a very large text file, and I want to select part of the text (range of lines. Example: from line 10000 to line 40000 and the text has 100 thousand lines). But I do not see any option in these editors (gedit, pluma, nemo) that allows me to make this selection (only "select all or Ctrl+A" option).

I would like to know how to do it and in case they do not allow, what other similar text editor (GUI) exists that allows me to make this selection.

thanks

Clarification:

I already know the alternatives in the command line. The answer I ask is only in the text editors mentioned (or in other similar ones, native Linux applications. Exclude "vim" or "nano".)

I have installed the additional plugins of gedit and pluma, but I also do not see that they have this possibility of selection

This option can be found in notepad++. I installed a clone called notepadqq, but it does not have this option

acgbox
  • 2,150
  • 4
  • 12
  • 28

3 Answers3

0

vim can certainly do this: in command mode, enter 10000G hit V then 40000G. Voilà, requested selection.

However, what do you want to do with the selection?

glenn jackman
  • 17,625
  • 2
  • 37
  • 60
  • select from the line (example 1000) to another line (example 4000) and delete them, to insert in this place other lines of another text. I would prefer it not to be with vim – acgbox Jun 15 '18 at 16:12
  • Well, pick an editor and ask a question about how to do this specific action with this specific editor. Don't ask countless strangers to read your mind. – glenn jackman Jun 15 '18 at 16:14
  • Already did. It is in the question (nemo, gedit, pluma) – acgbox Jun 15 '18 at 16:15
0

From the command line (one of several methods):

head -number_of_lines < file.txt > file.new

YMOZ
  • 115
  • 8
-1

In sublime text:

Ctrl-G to go to the last line you want to select, by number.
Edit > Mark > Set Mark to set your selection-end marker.
Ctrl-G (or Ctrl-Home) to go to the first line you want to select.
Edit > Mark > Select to Mark

In vscode:

go to line should select text from the current cursor when holding down shift

acgbox
  • 2,150
  • 4
  • 12
  • 28
  • Links change all the time. Please provide the essential steps in your answer so that one can replicate the solution without clicking on the link. Keep the links as references. [Link only answers may be deleted.](https://askubuntu.com/help/deleted-answers) I am down voting this as a link only answer. – user68186 Mar 17 '22 at 22:20
  • answer update. if you are not satisfied, please notify me to expand it even more – acgbox Mar 17 '22 at 22:36
  • 1
    I have removed my down vote. Feel free to expand and improve the answer. – user68186 Mar 17 '22 at 23:44