Questions tagged [text-editing]

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

Filter by
Sorted by
Tagged with
7 votes
3 answers
16k views

How to extract text from a large file, starting at the first occurrence of a string?

I have a large log file I want to review. All the bad stuff starts at the certain occurrence of an error string. I want to then look at the last X lines from that point and see what might have caused ...
deed02392's user avatar
  • 3,062
-1 votes
2 answers
1k views

Align columns in text file

I have a file in Unix like below (test.txt): 20130912-02:29:03 BT_TBL CISCUST BT_TBL_CISCUST_003015.dat 20130912-05:00:04 BT_TBL TMVLP BT_TBL_TMVLP_001026.dat 20130912-08:26:20 D_SNODE CPR8S ...
user253516's user avatar
2 votes
2 answers
23k views

Removing Trailing Whitespace in .txt file

How do I remove a trailing whitespace on each line in a .txt file in following command? I created script below to remove 1st character in each line but this creates a whitespace at the end of each ...
Someone in VA's user avatar
2 votes
1 answer
17k views

How to automatically detect text file charset and convert it to UTF-8

Is there any way to auto-detect character encoding of a text file and convert it to UTF-8? I'm using Windows 7.
Annie's user avatar
  • 23
2 votes
3 answers
192 views

Single column completion?

TL;DR: Is it possible to make emacs use single-column completion? When using emacs' completion mechanisms and there are multiple possibilities, then completions are displayed in a separate window, e....
kdb's user avatar
  • 2,252
1 vote
1 answer
436 views

Vim, highlight repeated words

When writing a technical document (papers, blueprints...) it's very likely to repeat a keyword, and a lot of time is wasted in trying to replace repetitions with synonyms. A very helpful tool in this ...
Dacav's user avatar
  • 195
4 votes
1 answer
5k views

Is there a way to prevent notepad from inserting new lines when using word wrap?

I remember it wasn't doing this before but now when I am writing a few paragraphs and paste it into a forum post, I notice my lines were broken into new lines where I have to merge them manually. Is ...
Joan Venge's user avatar
  • 1,494
1 vote
2 answers
457 views

How to append a CR to end of all .txt files in a directory

Is there an easy way to do this? I'm actually combining about 500 files using copy *.txt myoutputFile.txt. The problem is, that command inserts the new/next file at the current/end position of the ...
MisterIsaak's user avatar
0 votes
4 answers
85 views

What is a quick way to find the number of lines in a piece of copied text?

I'm not sure if this is the right forum for asking this question. But here it is. Suppose I copy some text from a webpage - Arsenal F.C. London Aston Villa F.C. Birmingham Chelsea F.C. ...
CodeBlue's user avatar
  • 243
2 votes
0 answers
415 views

How can I edit unusual clipboard content?

I'd like to edit application specific clipboard content, with an application specific format. There are clipboard managers that let me edit the plain text content, but I'd like to access clipboard ...
Peter Jaric's user avatar
  • 2,126
3 votes
0 answers
1k views

Select multiple non-consecutive lines of text

In Eclipse 4.2 Workbench, I'd like to select multiple lines of non-consecutive text at the same time. For example, I want to highlight and copy line 1, 4, and 10 without having to highlight, copy and ...
CodyBugstein's user avatar
  • 1,575
4 votes
1 answer
1k views

Edit a file through an on-the-fly encryption stream in Unix

Okay this is a weird sort of question. I might get down-voted for being stupid here. I'd like to be able to edit an encrypted file, but without having to manually decrypt it to a location on the disk....
Robin Winslow's user avatar
0 votes
2 answers
1k views

Simplest way to erase and replace content of multiples text files

I'm trying to do quite a simple thing. I have 40 text files in which in need to delete everything and replace with the content of a template text-file. What is the easiest/fastest way? NB: I don't ...
Chipsgoumerde'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
4 votes
1 answer
2k views

How do I get Dash Doc App to respect indentation?

When I expand an abbreviation with Dash Doc App it starts at the cursor location in my text editor (Sublime Text), but then ignores the original placement of the cursor and the next lines begin on the ...
Cory's user avatar
  • 143
4 votes
1 answer
1k views

Is there a paste-replace shortcut?

Hello all :) This is be a petty request, but it is like an itch to me right now for a specific project: There are shorcuts for copy and paste, but I often find myself moving bits of text between each ...
BenoitParis's user avatar
0 votes
1 answer
1k views

Cleaning out Span tags from HTML files

I have a giant number of span tags to clean out of HTM files due to a conversion from RoboHelp to Flare. Here is an example: <span class="span_1">ANYWORD</span> A large number of the ...
Carrie Pocklington's user avatar
1 vote
0 answers
67 views

How do I disable the overselection of text in Windows 7?

Is there a way to disable the overselection of text in Windows 7? Specifically, when I double-click a word Windows will select the word, then any whitespace after it. word1 word2 word3 wordetc If I ...
CyberSkull's user avatar
  • 1,495
0 votes
3 answers
108 views

Mac-OSX Text Navigation

In the terminal I'm able to hit option+b to move back a word. In any GUI app I get an integral: ∫ I know most of the emacs motions so moving around would be a lot easier if I could use the alt/meta/...
Justin Thomas's user avatar
0 votes
2 answers
3k views

Split text file by whitespace

I have a very large text file with multiple columns of data. I.e. 1312.4123 asdkofADkofaO213 dakofasdjodas Fri Mar 2013 15:23:11 .. .. .. etc. I wish to split this text file into multiple subsets, ...
Peleus's user avatar
  • 599
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,411
-1 votes
1 answer
34 views

File increasing in size after deleting content

I recently cleaned up some .PHP files of mine with alot of code in them, there was alot of stuff that was not needed so I deleted those lines, in one case it was around 200 lines of code. The strange ...
Marius's user avatar
  • 169
-1 votes
1 answer
256 views

Split lines based on the position of a character

consider this as a sample of a text file: |60.05.33.14.61| |03.22.32.23.44.20.45| |25.17.03.20.24.05.61| |60.24.40.35.14.25.16.01.03.61| How can I delete all the initial "|"characters and not the ...
wiki's user avatar
  • 381
1 vote
2 answers
24k views

How can I insert a line break over 100 times for a given text string?

I got this very, very, very long text string that consists only of e-mail addresses. It's so long that it goes off my screen several pages to the right. It makes it impossible to read. It looks ...
Samir's user avatar
  • 20.9k
4 votes
4 answers
149 views

Apply regex to certain occurrences

I have a large file with plain text (no html tags, etc.). What I want to do is to apply regex to whole file on the one hand but on the other I want to choose which changes will be applied. For ...
piotr.gradzinski's user avatar
0 votes
2 answers
428 views

JSON formatted text file makes CPU jump to 100%

I'm editing a JSON formatted text file in Mac OS X Mountain Lion (10.8.2) on a 2.3 GHz Intel Core i7 with 8 GB of RAM. The file is approx. 3 MB large so it's not very big. Anyhow this is making both ...
Peter Warbo's user avatar
2 votes
2 answers
745 views

Is there any way to auto-save all my entered text in Firefox? [closed]

I love the idea that gmail and Stackoverflow record my message so when I come again to that tab or draft I can find all the text that I have typed earlier already filled in. On Internet not every ...
user1978003's user avatar
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
5 votes
4 answers
12k views

How to replace a list of strings by another list

I have a file which has (many) strings I'd like to replace, so I thought about using a simple command like: sed 's/string1/string2/g' file1 > out However, there are too many strings for that ...
Asasuser's user avatar
2 votes
5 answers
5k views

Editing the same file from multiple computers

My friend and I need to view and edit the same file at the same time. We were using Google Docs, but the firewall is now blocking it. If we connected our computers with a network cable (no hub or ...
elyashiv's user avatar
  • 155
8 votes
3 answers
19k views

why does an Excel column formatted as number lose its leading zero when the column is formatted as text?

I have to export a spreadsheet to CSV. One of the columns is a zipcode with east coast zipcodes that have a leading zero. When I reformat that column as Text hoping to preserve the leading zero on ...
mrblint's user avatar
  • 81
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
3 votes
1 answer
148 views

Automate vim execution on a file

I would like to be able to specify on bash command line set of keys that will vim execute on given file, just the same as I am doing it when manually editing, for instance, hypothetically: vim myfile ...
majkinetor's user avatar
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
1 vote
2 answers
601 views

Parsing two input files and comparing line existence

I need to take two text files and check to see if a line that exists in File A doesn't exist anywhere in File B. Each line in File A that does not exist in File B should be copied to an output log. ...
Philos's user avatar
  • 11
2 votes
4 answers
5k views

Create a term-document matrix from files

I have a set of files from example001.txt to example100.txt. Each file contains a list of keywords from a superset (the superset is available if we want it). So example001.txt might contain apple ...
Joe's user avatar
  • 3,460
2 votes
1 answer
401 views

Delete first lines from a Unicode html file

I have an HTML file that is in UTF-8 format and I want to remove the first five lines from it. I've tried using sed but it doesn't work in this case: sed "1,5d" Result.html>small2 It actually ...
Arash's user avatar
  • 726
3 votes
1 answer
2k views

How can I edit huge RTF files produced by Windows in Linux?

I have tried LibreOffice, and Abiword on Linux Mint 13, and in both cases, on the sorts of RTF files I use (lots of font changes, language changes, color changes, underlining, etc.), the application ...
Bogatyr's user avatar
  • 169
5 votes
4 answers
16k views

Remove lines ending with a specific format in Notepad++

I've got a simple array in Notepad++: bla.vmt" bla.vtf" bla_exponent.vtf" I want to get rid of the lines ending with .vmt and _exponent.vtf.
user1685565's user avatar
4 votes
2 answers
2k views

Which command line text editor has the closest keybindings to Notepadd++, Gedit, or Kate (or any modern CUA style editor)?

I'm looking for a text editor that has an amazing common user access (CUA) mode (or can be configured to have it) that resembles closely modern editors like Notepad++, Gedit, Kate, Sublime, etc. I've ...
trusktr's user avatar
  • 1,644
1 vote
6 answers
18k views

Add text to the beginning of every other line in Notepad++

What I want to do is: Add <title> to the beginning of lines 1, 3, 5, etc...(hundreds of lines in a notepad++ file) Add </title> to the end of lines 1, 3, 5, etc... Then: Add <link>...
Paul M's user avatar
  • 41
0 votes
1 answer
2k views

Batch replace specific line #s in an xml with specific text (lines) from a 2nd xml file in Windows 7

First of, I'm not a Coder or Unix guy, I'm using notepad++ v6.18 on Win7, so I'd ask that you "dumb it down" for me please :) I've noticed that on the left side of each line within a notepad++ file ...
Paul M's user avatar
  • 41
2 votes
1 answer
3k views

Viewing binary files in vim displays gibberish

When I open up a binary file in Vim, it displays a bunch of gibberish. One would expect it to display a bunch of 1s and 0s. Why is this?
David Sawyer's user avatar
0 votes
1 answer
64 views

How to improve the hotkeys Ctrl+Left and Ctrl+Right?

I'm just wondering if anyone of you figured out a way to improve these bindings or use them together with other bindings to make go through lines of text faster/easier. namely the problem i'm facing ...
Toskan's user avatar
  • 347
0 votes
2 answers
4k views

Using sed, how to print all lines that match a certain date?

Using sed, how to print all lines where the birthdays are in November or December? Assuming input file name "datebook" as follows: Steve Blenheim:238-923-7366:95 Latham Lane, Easton, PA 83755:11/12/...
Steve's user avatar
  • 567
2 votes
1 answer
100 views

Substitute large numbers of files according to style guide

I'd like to do a wholesale reformatting of our tests, and I'm cleaning up some inconsistent capitalization. I'm thinking of using awk to do this, since sed falls a little short, and since I need ...
John Feminella's user avatar
3 votes
2 answers
3k views

How to egrep the first character in second column?

Using egrep, how can I print all lines where last names start with K or k? Jennifer Cowan:548-834-2348:583 Laurel Ave., Kingsville, TX 83745:10/1/35:58900 Lesley Kirstin:408-456-1234:4 Harvard Square,...
Steve's user avatar
  • 567
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
4 votes
1 answer
18k views

Reversed text in Chrome [duplicate]

Possible Duplicate: How to change the text direction on Windows? I was typing something in Chrome and all of a sudden, the text reversed. It was now typing Right-to-Left like Arabic instead of ...
Yatharth Agarwal's user avatar
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

1
5 6
7
8 9
11