Questions tagged [text-editing]

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

Filter by
Sorted by
Tagged with
216 votes
5 answers
44k views

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 ...
labyrinth's user avatar
  • 2,616
147 votes
6 answers
42k views

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 ...
Jichao's user avatar
  • 7,490
133 votes
4 answers
256k views

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's user avatar
  • 6,344
130 votes
18 answers
54k views

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 ...
Andrea's user avatar
  • 1,505
119 votes
5 answers
937k views

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's user avatar
  • 1,905
100 votes
10 answers
499k views

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 ...
stefanB's user avatar
  • 1,143
86 votes
4 answers
82k views

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 ...
Daniel Beck's user avatar
  • 110k
66 votes
8 answers
44k views

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'...
Ian Mackinnon's user avatar
66 votes
10 answers
155k views

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?
Eduard Florinescu's user avatar
65 votes
4 answers
66k views

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 ...
pcapademic's user avatar
  • 3,761
63 votes
5 answers
66k views

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. ...
user avatar
61 votes
3 answers
18k views

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?
user734178's user avatar
59 votes
6 answers
250k views

What is the closest thing to Windows notepad on the Mac? [closed]

What is the closest thing to Windows notepad on the Mac? I'm using Leopard.
Brian R. Bondy's user avatar
53 votes
5 answers
195k views

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 ...
Bob Stein's user avatar
  • 1,421
48 votes
3 answers
19k views

Turn Off Parenthesis Matching in Sublime Text 2

I have questions about turn off parenthesis matching. Does anyone know how to turn off parenthesis matching? example: When I type a (, it will automatically add ), becomes (). It's pretty nice for ...
Juanito Fatas's user avatar
46 votes
14 answers
102k views

Convert Unix line endings to Windows

I recently moved back to Windows from Linux. I have some files with CRLFs, some with LFs and some that are mixed. Is there a utility that will help me find all my Unix-touched files and convert them ...
Matthew Scouten's user avatar
41 votes
4 answers
69k views

Converting CSV to fixed-width in Notepad++?

Is there a way in Notepad++ to convert a comma-separated file to fixed width columns? This feature exists in UltraEdit and explained in Working with CSV files, but I am happy with my Notepad++, and I ...
ercan's user avatar
  • 833
36 votes
3 answers
17k views

In Sublime Text 2, how can I indent out to a straight column with multiple cursors on a ragged edge?

Suppose I've got multiple cursors along several lines, like this: foo| barr| foobar| baz| How can I automatically push the whitespace at the end of each line out to a flat edge, like this?: foo |...
GladstoneKeep's user avatar
35 votes
3 answers
8k views

Edit one file in two different buffers in emacs

I would like to open the file foo.bar twice (or more) in emacs, so I can edit two different parts of it simultaneously. Is it possible? Probably the better question is, how to do it? Is there a way to ...
Dror's user avatar
  • 1,908
33 votes
7 answers
181k views

How can I edit Unicode text in Notepad++?

Sometimes I edit English text that includes Unicode characters. For some reason, on my PC, Notepad++ converts Unicode characters to ???'s thereby corrupting the text and losing all that data. I'm ...
Robin Rodricks's user avatar
32 votes
2 answers
103k views

How to change the text direction on Windows?

Sometimes when I'm typing, text orientation changes from LTR to RTL, but I am not able to find any shortcut to change the text direction on Windows. How can I change the text direction inside a text ...
Imran Qadir Baksh - Baloch's user avatar
29 votes
10 answers
92k views

Can you edit the contents of an Excel cell without having to double click it?

I have a list of about 10,000 name/addresses that I have to manually cleanse in Excel (fun!). As you can imagine, having to double click to enter almost every cell to edit it is a drag. And it's ...
David Gard's user avatar
  • 1,495
27 votes
1 answer
50k views

What does `-n` option in sed do?

This is the man page entry for -n: -n suppress automatic printing of pattern space I notice that when not using -n for certain operations, each line is printed to stdout (and the requested ...
dotancohen's user avatar
  • 11.5k
25 votes
8 answers
117k views

Find and Replace several several different values all at once

I have a file with multiple instances of Text_1 and Text1 and I need to replace both those strings with Text_A and TextB respectively. Currently I'm doing two Find and Replace functions on each ...
matt's user avatar
  • 1,509
24 votes
13 answers
13k views

Best LaTeX Editor [closed]

What's the best LaTeX editor you've used, and what would you recommend someone read to understand and become proficient with authoring papers/books in LaTeX?
ninegrid's user avatar
  • 351
23 votes
8 answers
13k views

How can I justify plain text in Linux?

I'm composing a plain text (.txt) document that has left-and-right justified paragraphs. I manually add spaces, breaking words with hyphens if necessary, until the lines are uniform length. To use an ...
Exp HP's user avatar
  • 376
20 votes
4 answers
33k views

How to paste Excel data as fixed-width text?

If I copy data in Excel and paste it in a text file, I get tabs between cells. That's not good, I want spaces - and I want the columns to be aligned. How can I achieve this without a lot of effort (...
einpoklum's user avatar
  • 9,513
18 votes
6 answers
165k views

How Can I Type A Checkmark (✓) Via Alt Code?

Presently, every time I want to check something off I have to Google "checkmark", copy the symbol from a 3rd party website, paste it into a text editor to remove formatting, and then copy ...
azoundria's user avatar
  • 709
18 votes
4 answers
12k views

Show/Hide function folding margin on Notepad++

Is it possible to get rid of the function folding margin on Notepad++? It seems like the sort of thing that should be in the prefs but I'm not seeing it anywhere.
izb's user avatar
  • 1,214
17 votes
5 answers
90k views

Is there any useful style of MS Word for code?

I need to use MS Word to make some documentation for Python code. Line number, or boxing around the code, or anything would be better than just use normal format. Is there any good/useful style/method ...
prosseek's user avatar
  • 5,914
16 votes
5 answers
6k views

Match and delete in Notepad++

I have the following text in Notepad++. 192.168.0.1 37 ms N/A 192.168.0.2 Dead N/S 192.168.0.3 ...
user avatar
15 votes
8 answers
25k views

Notepad++ - Removing the first column in a comma separated file

I have a large CSV file that I need to remove the first column of data. I cannot open it in Excel because Excel converts some of the values in the columns to scientific numbers. I am using Notepad++, ...
MikeD's user avatar
  • 151
15 votes
4 answers
4k views

What is a CUA editor?

A term I hear now and then is a "CUA" text editor. What is a CUA editor?
Paul Nathan's user avatar
  • 1,816
15 votes
2 answers
16k views

Is it possible to view two files simultaneously in Geany?

I tend to be a simple text editor user, but when I want IDE-like features, I've been using Geany. One thing I find bothersome about it, though, is I can see only one file at a time. Sometimes I want ...
DarenW's user avatar
  • 2,071
14 votes
10 answers
7k views

Are there shortcuts for text editors/processors to delete the rest of a line?

The cursor may stay in the middle of the line and there may be necessity to delete whatever stands from the right side of the cursor, but only till the end of current line. I don't know how this ...
R St's user avatar
  • 189
14 votes
4 answers
37k views

Selecting range of lines in Notepad ++

How do I select specific range of lines in Notepad++ quickly? I have a text file that has over 1M of lines and I need to delete some fragments from it, but selecting lines manually just takes too much ...
Mcyg's user avatar
  • 143
13 votes
13 answers
2k views

What Vim features do you use? [closed]

I spend almost all day programming in Vim and I am sure that a lot of you do too. What features do you use that make your day to day coding that much better? One that I use is gv, which will let ...
13 votes
5 answers
11k views

Ubuntu vi Acting Strange

I just installed Ubuntu Server 8 and found vi to be acting strangely (compared to vi on Fedora, CentOS and OSX). When I use the 'a' command to enter text, pressing the arrow keys results in "C", "D", ...
Ian's user avatar
  • 285
13 votes
6 answers
22k views

Randomly shuffle rows in a large text file

I have a text file of ~1GB with about 6k rows (each row is very long) and I need to randomly shuffle its rows. Is it possible? Possibly with awk?
ddmichael's user avatar
  • 367
13 votes
5 answers
24k views

Text / log editor with auto-refresh support [closed]

I'm looking for a text editor / log manager of some kind that will automatically refresh a file's contents when it changes. I have a single target log file (e.g. current.log) that is overwritten ...
Mark McDonald's user avatar
13 votes
2 answers
14k views

How to select non contiguous lines of code in Notepad++?

What key enables the selection of non-consecutive lines in Notepad++? I have some Matlab code I have edited with Notepad++. I would like to select distinct (non consecutive) blocks of code in order to ...
Lucy's user avatar
  • 153
12 votes
5 answers
8k views

How do I delete the next line in vim?

In emacs, whenever I want to delete a few lines of text, I just use C-k until all the text is gone. However, in vim it seems a bit more complex. I know I can do d$ to delete until the end of the ...
Jason Baker's user avatar
  • 8,612
12 votes
5 answers
11k views

Where's my Open-With gVim context menu option in Windows 7?

I have gVim installed. Under Vista and XP, this offered me an addition to either the object context menu of "Edit with gVim", or an addtion to the "Open With" context menu of "gVim". This would let ...
David Mackintosh's user avatar
12 votes
4 answers
3k views

Delete the word in which the text cursor is

When typing/editing text, how do I delete the word at which the text cursor currently is? I mean a "system-wide" solution that works in most programs (and is maybe offered by the OS), rather ...
root's user avatar
  • 1,408
12 votes
3 answers
7k views

Beyond-compare wont ignore line-breaks?

I have this comparison : I want those line to be treated equal. but it showes me they are different. I already applied those settings : What am I doing wrong ?
Royi Namir's user avatar
  • 5,758
11 votes
6 answers
11k views

Converting tabs to spaces in many files

I have a lot of files with tabs littered throughout, and I'd like to convert them all into spaces. I know about the expand command, but unfortunately I would have to type out every single file using ...
person's user avatar
  • 213
11 votes
2 answers
19k views

Replace text when in visual-block mode

Maybe I'm searching the wrong way, but I've failed to find out how to do this. Here's the scenario: I have a list in a text file where I want to insert the same word on multiple lines, here's an ...
Thor's user avatar
  • 6,573
10 votes
6 answers
25k views

What is a good, simple and free HTML editor for Windows? [closed]

Are there any good, simple and free HTML editors for Windows out there? Something that a user with no experience can build a simple page with. I'm looking for something like the old FrontPage ...
jvanderh's user avatar
  • 592
9 votes
6 answers
10k views

Free tool for graphical representations of XML files [closed]

I need a tool which displays an XML file in a nice way. With "nice way" I mean a way on which I can fold and unfold all the nodes. Is there any free tool that runs on Windows Vista that does this ...
user avatar
9 votes
1 answer
7k views

MobaXterm is there a way to disable copy on select?

I am using SSH in MobaXterm, is there a way to prevent automatic "copy" when you select some text (e.g. in gedit), or with the mouse ?
CodeKiller's user avatar

1
2 3 4 5
11