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

learn more… | top users | synonyms

4
votes
2answers
4k views

Cygwin - how to edit a read only file?

I'm trying to edit /etc/hosts using Vi in Cygwin but it's read only. Is there a command similar to sudo? How do I edit a read-only file? Thanks
4
votes
1answer
987 views

Remove Byte Order Mark (BOM)

Background Run SQL files using pgsql that were edited with gVim on Windows. Problem The BOM character causes syntax errors with pgsql. I would like to edit files using gVim and, when saved, no ...
4
votes
4answers
5k views

How do I convert a column of text to upper case in Excel 2007 without creating a new column?

I know that you can use formulas and convert the data that way, but how can I convert to Upper (or Lower or proper) in place? Is there an easy way built into excel to instruct a non-superuser with?
4
votes
2answers
582 views

Text files on linux have “<97>” characters

When viewing a particular text file in vim or less on Linux or OS X, all the en dashes show up as highlighted "<97>" characters. What control-sequence do I need to type in order to substitute the ...
4
votes
2answers
968 views

Split a large text file

I have a large text file grouped with separate headers that I need to split into separate files. For instance the file has headers like this: --Heading 1-- some text text --Heading 2-- more text ...
4
votes
4answers
2k views

Is there any Firefox addon to convert text to UPPERCASE or lowercase [closed]

Is there any Firefox addon to convert a bit of selected text (in text fields), to "UPPER CASE", "lower case", "Proper Case", and "Sentence case"? This is useful when writing email.
4
votes
2answers
121 views

Getting vi/vim syntax highlighting used by certain user

At work most web-development we do, is done in vi/vim, on a debian-server. Sometimes we have to alter some files as root, and the syntax-highlighting-model of that user (root) is absolutely awesome. ...
4
votes
1answer
320 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 ...
4
votes
4answers
84 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 ...
4
votes
4answers
1k views

VERY large text files and Snow Leopard

Sometimes I need to work on EXTREMELY large text files. 200-300 megs or more. My favorite text editor on my MacBook Pro is TextMate. However, TM chokes on very large text files. Even ones around ...
4
votes
1answer
547 views

How to do a search-and-replace in Opera for textarea context?

How do I do a search-and-replace in Opera for a textarea's context? I have a web page with html form and I need to input and edit large text in this form. Easy example: Stay on this page, scroll ...
3
votes
5answers
6k views

How to split a text file into multiple text files

I have a text file called entry.txt that contains the following: [ entry1 ] 1239 1240 1242 1391 1392 1394 1486 1487 1489 1600 1601 1603 1657 1658 1660 2075 2076 2078 2322 2323 2325 2740 2741 2743 ...
3
votes
3answers
330 views

Write a bashscript to double every newline character in a text file?

I need a bash script that will take a file and add a second \n character for every \n character already in the file: that is: abcd\nbcda becomes abcd\n\nbcda how do I start. OR, should I ...
3
votes
2answers
1k views

How can I edit file permissions (e.g. make script files executable) from within Sublime Text 2?

When writing e.g. shell scripts, I want to change their permissions (primarily the executable permission) from within Sublime Text 2. How can I accomplish that?
3
votes
3answers
117 views

Typing a column of numbers (1,2,3…)

I am writing a C# program containing these lines: Console.Writeline("1"); Console.Writeline("2"); [...] Console.Writeline("26"); Is there a quick way to type the 26 numbers? I'm using Visual ...
3
votes
3answers
315 views

“Drag” selected text using the keyboard?

If I select some text in a text input field/area/window, I can drag that text to another position somewhere within the text area using the mouse. Is it possible to do this dragging using the keyboard? ...
3
votes
4answers
1k 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 ...
3
votes
1answer
4k 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 ...
3
votes
1answer
1k views

DokuWiki - How to show the edit buttons on section headers

In DokuWiki, is there any plugin compatible with the latest stable release (2009-02-14), that can show the edit buttons on section headers (like Wikipedia or MediaWiki) instead of showing them at the ...
3
votes
1answer
1k 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 ...
3
votes
1answer
1k views

Is there a tool for automatically checking English grammar?

I need to run through a document and check that it contains proper English grammar. My toolset for spell-checking for words include ispell and OpenOffice, but they seem only to do spell-checking. ...
3
votes
1answer
197 views

How do I convert a plaintext file to OpenOffice document, so that tabs become indents?

How do I convert (or paste) a plaintext file to OpenOffice document, so that tabs become indents? Currently, dynamically wrapped long lines which start with a tab are only indented (by that tab) ...
3
votes
0answers
357 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 ...
3
votes
2answers
26 views

Breaking the line in between the code in Notepad++

I have a file with line(s) that look like this: <url><loc>URL</loc><lastmod>Date</lastmod><changefreq>Time</changefreq> I'm editing the file in Notepad++, ...
2
votes
7answers
29k views

Application to open / edit a very large CSV file (500 MB, 4 million records)? [duplicate]

Possible Duplicates: Text Editor for very big file - Windows What editor/viewer to use to inspect large text based files? I have a CSV file which has about 4 million rows and is about 500 ...
2
votes
7answers
9k views

How to delete all lines which contain a word with TextWrangler?

I have a giant file with thousands of lines, I want to delete only the lines which have the word "Foo" in them. How would I go about doing this? I'm on a Mac, so I could use some command line ...
2
votes
3answers
544 views

Unicode text lost when saved as ANSI

When I saved a text file using a notepad with ANSI, I lost all of the information since it became all question marks. Is there a way to convert it back to Unicode to retrieve the text?
2
votes
2answers
10k views

How to search and replace a string in multiple text files (within a directory) with Windows CMD?

I have multiple text files within a directory, each of which I want to replace every occurrence of the string 1 setlinewidth to 10 setlinewidth. How do I do this via Windows cmd? Please help.
2
votes
2answers
442 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
3answers
439 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
93 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
2answers
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
479 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
571 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
9k views

Split a string in ksh

I am looking for a quick/easy way to split a string in ksh. It has varied number delimiters (spaces) between each item. Example: value1 value2 value3 Any suggestions/advice?
2
votes
3answers
2k 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.
2
votes
3answers
523 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
370 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
3answers
42 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
832 views

Viewing Binary Files

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
3answers
429 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
454 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
180 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
686 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
1k 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 ...
2
votes
2answers
291 views

Transpose emacs rectangles

Suppose I have this text: RUN_ RUN_ RUN_ RUN_ RUN_ and want this one: RUN_A RUN_B RUN_C RUN_D RUN_E I would like to be able to write ABCDE and somehow `transpose' it and kill-yank it as a ...
2
votes
2answers
183 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
65 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
217 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
468 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 ...