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

learn more… | top users | synonyms

2
votes
2answers
78 views

Is there a way to print 2 lines (if any) before and after a target or print a placeholder if not?

I'm not native english speaker so I hope to be clear. I know about grep -C 2 "TARGET" inputfile to select 2 rows before and after the row of the TARGET, but I'm not able to use it to manage my ...
2
votes
4answers
4k 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?
2
votes
2answers
559 views

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

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 ...
2
votes
4answers
2k 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 ...
2
votes
3answers
504 views

How to substitute multiple lines between delimiters

Given the text example: .... text ,.. {{{python string1 = 'abcde' string2 = '12345' print(string1[[1:3]]) print(string2[[:-1]]) }}} .... text ,.. The [[ and ]] also appear outside of {{{ too. ...
2
votes
1answer
220 views

Windows equivalent of Mac OSX Cmd + Left/Cmd + Right shortcuts

When in text editors on a Mac, you can do ⌘+← or ⌘+→ to skip to the beginning or end of lines, respectively. You can also add shift, such as ⌘+shift+←, to highlight an entire line. Are there Windows ...
2
votes
3answers
2k views

What's is the easiest way to append ';' to the end of lines which contain the char ':'?

I have a text file, whose content is like: body font-size: 12px color: blue td font-size: 14px ... I want to append ; to the lines which contain :, so the content will be: body ...
2
votes
3answers
510 views

How to rollback the edit version in VIM?

I realized I had deleted something for mistake when I typed :wq,then how can I rollback to the pre-version?Thank you!
2
votes
3answers
718 views

Where did the text of my .html file go in TextEdit on Mac OS X?

I recently created a .html file in TextEdit on my Mac (Mac OS X 10.5.8). I then opened that .html file in my browser and it showed the page I created just fine. I closed the .html file and TextEdit ...
2
votes
2answers
44k views

Automatic forward-deleting

First and foremost... please forgive my somewhat approximate English. (I'm French.) Oh and my loooooong sentences too (I need lots of words for little meaning when speaking foreign languages... plus I'...
2
votes
3answers
658 views

How to reverse the order of multiline text sections separated by blank newlines/line breaks?

How to reverse the order of multiline text sections separated by blank newlines/line breaks... ..., with a simple command or application, preferably without programming? I don't want a sort, but a ...
2
votes
1answer
692 views

Importing textfile with leading 0's to excel

Have a number of text files which have numbers next to names, tab delimited: 000454 Name1 005005 Name2 000643 Name3 4043 Name4 33643 Name5 I ...
2
votes
1answer
161 views

Vim: changing tabs to spaces

I know this question has been asked many times, but I'm not finding a solution to my problem in particular, mostly because I can't even really identify the problem. Here's the timeline of events: ...
2
votes
3answers
46 views

Is there a way to do concatenated copying of text in os-x or linux?

Say you are copying snippets of a word document into textedit. It is a waste of time to go back and forth for each snippet when you can do it once using concatenation into a copy-queue. Is there a ...
2
votes
1answer
1k 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?
2
votes
1answer
10k 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.
2
votes
1answer
86 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 ...
2
votes
3answers
545 views

Adding text to the beginning and end of a number of files?

I have a number of files in a directory hierarchy. For each file, I'd like to add "abcdef" to the beginning, on its own line, and "ghijkl" to the end, on its own line. For example, if the files ...
2
votes
2answers
555 views

trimming an XML file the dumb way

(see solution below) I have XML files which I parse with a Python script (I did not write it but it does the job perfectly). The problem is that the XML file is large (~ 1GB) and the parsing take ...
2
votes
1answer
225 views

Is it possible to define a custom movement in vim?

Is it even possible? What I mean is, many vim commands can take a movement to operate on, can I define a custom movement so that I can tailor my edits to an environment? The specific command I'm ...
2
votes
1answer
33 views

Is it possible to start a text selection, jump to another page without moving the caret, and then end the selection range with shift-click?

Is it possible to start a text selection, jump to another page without moving the caret, and then end the selection range with shift-click? If I use the navigation pane, or the "Go to" command, the ...
2
votes
3answers
231 views

How to copy text side by side in Npp or Sublime text?

I have to 2 text files . First is A B C D Second is 1 2 3 4 How do I copy both file contents side by side like this in Notepad++ or Sublime Text . If these both don't support this then please ...
2
votes
1answer
782 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 ...
2
votes
2answers
189 views

Delete until character is found

In my text editor, I would like to define a keyboard shortcut (say, CTRL-D) with "delete until character is found" functionality. For example, if the cursor is placed before the "H" of this text: ...
2
votes
1answer
741 views

How can I avoid using the cursor keys in Notepad++?

I've started programming after an 8 year break. I'm using Notepad++ and I like it, but taking my hand away from the main keyboard to the cursor keys to get around the file is really slowing me down. ...
2
votes
2answers
92 views

How do I bulk change indentation sizes

I have a large number of files that are indented in a certain way and want to convert them to a different style of indentation (they are indented with 4 spaces and I want them to use 2 spaces). How ...
2
votes
1answer
70 views

Can I hack Ctrl-arrow key stop points?

When I hit Ctrl-← or Ctrl-→ in a text field, the cursor jumps to the beginning or end of a word. It stops at dashes, but not periods. It stops at white space, but not brackets, colons, or ...
2
votes
1answer
266 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 ...
2
votes
1answer
509 views

looking for an alternative to refile in orgmode for emacs

In emacs/orgmode there is something called refile. you select text, hit refile and you get a list of your outline headlines, select one and your text goes there. Can I achieve something like this in ...
2
votes
1answer
2k views

Toggle between column selection and regular selection in Sublime Text 2

In Textmate, I can make a regular multiline selection using the keyboard and switch to column selection mode by pressing the alt (⌥) key. I have not found a similar way of doing this in Sublime Text ...
2
votes
0answers
84 views

Yank plain text in Emacs?

Using Windows 7 / 8, GNU Emacs 24.3.1 I often yank text copied from browser or incoming email. Is there a way to yank/paste as plain text, leaving out special characters? I tried Ditto and Puretext ...
2
votes
2answers
6k views

Looking to create a batch file capable of editing a line (or word) in a text file

I have a text file (...\config.txt) containing 2 lines which looks like: Preamp: -4 dB Include: surround.txt I need to change "surround" to "headphones" in that config file. I really need to make 2 ...
2
votes
0answers
69 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 ...
2
votes
5answers
496 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 ...
2
votes
0answers
73 views

Swapping two values without using an intermediate one

In a given text file, generally speaking, if I want to swap two things, say the word apple with the word orange, and both exist in the document, then I first have to change one of them to something ...
2
votes
2answers
3k views

How to add a new section to a numbered list in MS Word?

In Word how can I add a section into a numbered list? I have a large software requirements document that is organized using a numbered list, so I have a few paragraphs as 1, then maybe some sub-...
1
vote
4answers
908 views

Why has no-one made a predictive keyboard driver/library? [closed]

On mobile devices we're used to our devices anticipating what we are typing and completing or correcting at least some of our mistakes, increasing text entry speed and, it is hoped, accuracy. From T9,...
1
vote
2answers
3k 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 ...
1
vote
6answers
11k 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&...
1
vote
4answers
2k views

When I open text documents, they immediately print?

Every time I open a text (.txt) document on my PC (Windows 7 Ultimate x64), it immediately begins printing on my default printer. What is happening and how do I turn it off?
1
vote
2answers
4k views

Exclude some matches with sed

I have a series of files with entries(namespaces in source code) like FW.WGS.Web.HHH.Controls, FW.WGS.Web.HHH.Email, FW.WGS.Web.HHH.Account, etc and some with entries FW.WGS.Web.Controls, ...
1
vote
2answers
6k views

Splitting a large txt file every 100 lines and including the original header (on a Mac)

I am looking for a tool or script (Textwrangler or Terminal) that can split a larger text file every 100 lines counting from line 5 (the first 4 are header lines) and output individual .txt files ...
1
vote
5answers
2k views

Disk Based Text Editor to Edit File Larger than Memory

I am using Ubuntu and looking for a good editor to edit a file that is > 4GB. I just need to put content at the end and beginning of the file. I suppose I could use something like cat "text to add" &...
1
vote
2answers
1k views

How to remove blank lines in .txt files

I want to change a text file's format, removing all blank lines. How can I do that? (2) 5. The function of the condenser is to: a) vapourise the liquid refrigerant b) change ...
1
vote
3answers
831 views

Does anyone have tips for using the linux text-editor joe? is it available on ssh?

I found a few great features in the joe text editor for the command window: You can: Keep the command help menu visible all the time. Split the current view into two panes (top, bottom) so that ...
1
vote
2answers
694 views

replace file's content between specific line numbers with another file using BASH

What is the most efficient way to replace file's content between specific line numbers with another file? Here is a sample: main.txt: a b c d e f g h i j k l new.part.txt x y z p q r s t u The ...
1
vote
1answer
2k views

Is it possible to type a floating “c” letter?

I have a close friend that has a Scottish surname "McGregor". However the "c" in the name needs to be aligned to the top of the "M". I have searched through alt codes but cannot spot it anywhere. Does ...
1
vote
2answers
106 views

How can I use the vim editor to format the text like this?

I have a data.txt file, the data format is something like this: a|Êó• a|Êõ∞ a|Ôõ∏ a|Ôùã aa|Êòå aa|Êòç aaa|Êô∂ aamh|Êöò all I would like to do is convert the following text into this result: 'a' =&...
1
vote
6answers
319 views

Software to store frequently used text in PC

I am a looking for a free software that can run on the task bar (near the system time) where I can store frequently used text like my full street address, paths of specific deep folders & files in ...
1
vote
1answer
1k 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 ...