Questions tagged [text-editing]

Text editing is the process of selecting and preparing text [files].

Text editing is the process of selecting and preparing text [files]. The editing process can involve correction, condensation, organization, and other modifications performed with an intention of producing a correct, consistent, accurate and complete work.

519 questions
222
votes
5 answers

How do you reuse a visual mode selection?

Often when editing code, I'll select a block in visual mode and do a search and replace over the block. After I make the changes, however, it leaves visual mode. How do you do a new find and replace over the same selection?
labyrinth
  • 2,686
169
votes
6 answers

How do I reverse selected lines order in Vim?

For example, if I have four lines as follows: the first line the second line the third line the fourth line I want to reverse them to the fourth line the third line the second line the first line How could I do this in Vim?
Jichao
  • 7,940
153
votes
4 answers

Replace \r\n with newline in Notepad++

How do I replace the string "\r\n" with the same characters? Example: Hello World.\r\nHello World. replaced with: Hello World. Hello World.
C. Ross
  • 6,734
136
votes
20 answers

Substitution in text file **without** regular expressions

I need to substitute some text inside a text file with a replacement. Usually I would do something like sed -i 's/text/replacement/g' path/to/the/file The problem is that both text and replacement are complex strings containing dashes, slashes,…
Andrea
  • 1,555
119
votes
5 answers

How to write multi lines in one Excel cell?

I want to write multi-lines in one MS Excel cell. But whenever I press the Enter key, the cell editing ends and the cursor moves to next cell. How can I avoid this?
Wahid Bitar
  • 1,915
103
votes
11 answers

How can I split a large file on Windows?

Is there a tool to split large text file (9 GB) into smaller files, so that I can open it and look through? Is there anything usable from the command line that comes with Windows (XP)? Or what's the best way to split it? Can I use 7-Zip to create…
stefanB
  • 1,173
90
votes
24 answers

Is there a text editor for very big files?

I have a very big text file (10 GB). Both Notepad and Notepad++ tell me that the file is too big for them to open. What editor can handle such a large file? It's a log file.
Lea Cohen
  • 944
86
votes
4 answers

How can I filter a file for lines containing a string in Sublime Text 2?

I want to filter a file I'm editing in Sublime Text 2 for lines contain a certain string, if possible including regular expressions. Consider the following file: foo bar baz qux quuux baz When filtered for ba, the result should be: foo…
Daniel Beck
  • 111,893
73
votes
10 answers

How can I edit a file if there is no vi, vim, joe, etc?

Is there a way to edit a file if there are no vi, vim, joe, mcedit? In another words is there a way to edit a file using just the shell commands?
71
votes
8 answers

emacs: how to indent/unindent region of python code by 4 spaces?

I have a region of python code selected in emacs. What are the most efficient ways to indent and unindent every line in it by 4 spaces? Ideally I'd like something that's not context sensitive (eg. it'll allow me to indent passages within docstrings…
68
votes
4 answers

How to make cut/copy/paste in GVim on Ubuntu work with Ctrl+X,Ctrl+C,Ctrl+V?

By default, the cut/copy/paste short-cuts in GVim on Ubuntu are: Cut "+x Copy "+y Paste "+gP I would like to use control key combos in GVim, like I use in Firefox and othe gnome applications. How do I configure GVim to work like other…
pcapademic
  • 3,821
66
votes
5 answers

Ctrl+Backspace inserts a small box instead of erasing

When I press Ctrl+Backspace, sometimes a small square is inserted, instead of the entire word being erased. The problem only happens in some text boxes; in others the shortcut works like it should. Start menu search box: works Notepad: doesn’t…
ugh
62
votes
3 answers

Why does the same data take more space in a text file than in an Excel file?

I have around 100000 rows of data. If I store this data in a text file format, it takes more space than if I store it in an Excel file format. Why is that?
61
votes
6 answers

What is the closest thing to Windows notepad on the Mac?

What is the closest thing to Windows notepad on the Mac? I'm using Leopard.
55
votes
5 answers

Notepad++ inserting special Unicode characters in UTF-8

What's the best ways to enter special Unicode characters into a Notepad++ document? Do I have to rely on the operating system (Windows)? Looking for a see-and-click solution. I can bring up the ASCII Insertion Panel with Edit | Character Panel —…
1
2 3
34 35