Questions tagged [editors]

Questions about text editors in general (i.e. programs used for editing plain text files).

Filter by
Sorted by
Tagged with
236
votes
11answers
252k views

Better colors so comments aren't dark blue in Vim?

Mostly I edit Ruby files, although shell script file comments are also # Currently my comments show as dark blue on black which is really hard to read. See screenshot. How can I change their color? ...
90
votes
6answers
56k views

How do I remotely edit files via ssh?

I have to edit some files placed on some server I could reach via ssh. I would prefer to edit these files in customized vim on my workstation (I have not rights to change vim settings on remote ...
86
votes
6answers
260k views

How do I quit from Vi?

I started Vi on my Ubuntu machine. However I'm new to Vi, and now I can not quit. I see the editor and I can write text, at the bottom line there is a label "recording". How do I quit Vi?
66
votes
4answers
84k views

How do I change the default text editor in the Debian (squeeze) distro

"Joe's own editor" does not come naturally to me. How do I change to using nano or vim? I've tried export EDITOR=nano but it doesn't seem to be respected. I'd like visudo to respect this as well.
58
votes
4answers
19k views

How to edit command line in full screen editor in ZSH?

In bash, using vi mode, if I hit Esc,v, my current command line is opened in the editor specified by $EDITOR and I am able to edit it in full screen before 'saving' the command to be returned to the ...
37
votes
3answers
19k views

Modeless vs modal editors

I just started learning Linux and all my previous experience of programming has been using the Windows platform. I came across Vim editor and read that it is modal editor unlike notepad which is ...
34
votes
9answers
7k views

Text editor for printing C++ code

I'm looking for an editor to print (on paper) C++ code. I'm currently in engineering school and the instructor has asked us to submit the code on paper. He wants name + surname, the class number (on ...
33
votes
1answer
18k views

Vim: Making XML text “pretty”

Is there an easy way within vi to make your XML text "pretty"? For example: I want this.. <person> <name>Nick</name> <age>26</age> <gender&...
31
votes
5answers
44k views

vi/vim, how can I write out a number of lines to a new file

I have a bunch of lines that I want to write out to a different file. How can I do that?
30
votes
16answers
15k views

Console Text Editor with Windows-like keyboard shortcuts (ctrl-z, x, c, v)

Ok, I realise that I risk a religious war asking a question about text editors, but here goes. Requirements Mostly used for config file edits Text based not GUI Available for Raspian flavour of ...
26
votes
12answers
10k views

Text editor with split screen option

Is there an editor which has the option to "split the screen" into two or more parts, accessing more than one file (possibly with a file tree) without opening more editor windows at once, and how ...
23
votes
3answers
16k views

How to automatically strip trailing spaces on save in Vi and Vim?

Is there a .vimrc setting to automatically remove trailing whitespace when saving a file? Ideally (to be safe) I would like to only have this functionality for certain files, e.g. *.rb
21
votes
4answers
10k views

Change default editor to vim for _ sudo systemctl edit [unit-file] _

[4.13.12-1-ARCH with gnome3 and gdm on Xorg] I already have set my VISUAL and EDITOR env-vars to vim. Similarly I did try SYSTEMD_EDITOR="vim"; export SYSTEMD_EDITOR in my ~/.bashrc, to no avail. ...
19
votes
3answers
9k views

Buffers or tabs in vim? What are advantages/disadvantages of each approach?

I'm used to modeless editors. Only the past year I've been using vim/gvim, which has a modal approach. I'm used to tabs in all editors, since before vim all of them are used to it. In gvim, you don't ...
18
votes
5answers
8k views

How can I edit a large file in place?

I have a few files sized > 1 GB each. I need to remove last few bytes from the files. How can I do it? I prefer to edit file in place to save disk space. I am on HP-UX.
17
votes
4answers
9k views

Why would someone use joe? [closed]

I've seen some skilled unix/linux users use joe instead of vi(m) or nano. Why would they prefer using it over the provided alternatives?
16
votes
5answers
26k views

Modifying PDF files

I would like to do some basic editing on existing PDF file. More specifically: Add chapters/bookmarks Change page numbering However, I cannot find any tool, GUI or command line, which would offer ...
12
votes
2answers
7k views

Align columns in ASCII file

I have a text file that looks like his: #c1 c2 c3 c4 c5 c6 c7 c8 c9 c10 c11 c12 c13 4599 995,274 2523,658 ...
12
votes
4answers
9k views

vim shortcut to open a file under cursor in an already opened window

In vim you can open a file under the cursor by using the gf command. One can also easily open that file in a new split window by hitting <c-w> f. This is a really nice and time saving feature. ...
12
votes
3answers
47k views

Locate and delete all temporary files in user directory

I use vim a lot, and my area has power failure a lot. So the resultant is I get many *.swp files scattered over my PC. I want an alias of rm command that removes all files with either .swp, ~, ....
11
votes
8answers
33k views

What is your favourite shell script GUI/CLI editor and why? [closed]

I'm using vim for editing bash scripts currently, but I really need to set it up and/or install plugins. Plugin suggestions welcome. Either way, I'd like to see which editors/IDEs there are for this ...
11
votes
5answers
20k views

Advantages (or downsides) of GVim over Vim to edit code [closed]

Should I install vim or GVim ? I develop mainly Ruby on Rails (I also use IDE's, but different topic). Are there any differences or advantage of using Gvim vs vim ?
11
votes
1answer
1k views

What text editor was used by Thompson and Ritchie in the writing of Unix?

I think that it's probably qed, but I can't find any sources to confirm or deny this. Also, ed has existed for the entire duration of Unix, and sam was written in the early 1980s. Is it known what ...
10
votes
10answers
5k views

Development environment for C

Looking for ideas on setting up a convenient and productive development environment for C development. I found C editing with Vim very helpful but I would like to get a wider sampling of suggestions.
10
votes
6answers
297 views

What's a good app for blogging?

A friend of mine recently converted from Windows to Linux and has been looking for a good app to replace Windows Livewriter. From talking to him it sounds like handling images is the main feature he ...
10
votes
2answers
1k views

How to set on executable bit for a particular file automatically

I want that when i make create a particular file, suppose i create it in vim editor, the created file should get executable permission as well when it gets created . I want this as i am creating some ...
9
votes
4answers
2k views

Block editing *live* in Emacs or Vim

jEdit supports block editing, but Emacs and Vim seem to have some serious usability issues on the same subject. If someone could fill in the unknowns here it would be much more bearable to use either ...
9
votes
1answer
2k views

Save HTML from clipboard as markdown text

I want to be able to highlight a section of a web page and copy it to the clipboard then save it to my local disk as markdown. I need an efficient way to do that. My current cumbersome method is: ...
9
votes
1answer
6k views

How to 'UnJustify!' text in GNU nano

I enjoy using nano as a respite from my usual GTK-based text editor. I like the simplicity of the interface, and using CTRL-K is the fastest way I know of to edit down long textfiles. However, I have ...
9
votes
4answers
781 views

Is the `ed` editor useful for any purpose besides emergencies and batch editing?

I'm wondering if the ed editor is useful any longer for interactive editing. I know that the diff command can produce patches as ed scripts and that ed is a last resort when the baud rate is super ...
8
votes
3answers
483 views

Linux editor with VMS EDT like direction mode

VMS editor EDT allows one to use the keypad to control most of ones editing commands. One of the rather nice features is that the direction of operation can be set to "up" or "down". This then effects ...
8
votes
3answers
787 views

Vim: pasting lines line by line

Let's suppose I have a file containing: xxx yyy zzz and another file: kkk qqq ppp I want to obtain: xxxkkk yyyqqq zzzppp Is that possible in Vim with some command? (I've tried using VISUAL BLOCK ...
8
votes
2answers
33k views

Bash/Korn shell script edited on Windows throws error '…^M: not found'

I wrote a Bash script in Windows using Notepad++. cxStopAllServicesOnSERVER.sh #!/usr/bin/bash cd "/some/path" echo "Hi. Logs can be found at "`pwd`"/cxStartStopLogger.log" echo "["`date`"]*** ...
8
votes
1answer
4k views

How do I make Kate indent with spaces on Python files but use tabs for text files and other files?

My goal is to set Kate up to work properly on Python files but to use different settings (tabs not spaces) on other documents. I'm sure others are doing this, but I can't figure out a convenient ...
8
votes
2answers
532 views

How to write a literal dot in ed?

What would be the right way to write a line containing only . to a file in ed? The only way I came up with is something like this: a . s/^$/./
7
votes
5answers
25k views

What is the `editor` command in bash?

I was looking for a command that would hopefully open the current user's favourite text editor, because I am writing out some instructions with commands in a blog. I was expecting a command like edit, ...
7
votes
6answers
8k views

Seeking alternative GUI File editor with large file support

Can anyone recommend a file editor, preferably free, that handles large files as well as EmEditor on Windows? I'm on Ubuntu, but other people reading this might not be, so suggestions for other Unix ...
7
votes
1answer
8k views

How does one find and replace text in all open files with geany?

How does one find and replace text in all open files with geany?
7
votes
1answer
4k views

Why are mtime and ctime changing for a directory when a file is modified?

I am learning about atime, ctime, mtime with regard to files and directories. It seems to me that if I modify a file within a directory, I haven't changed the "directory file" itself in its inode or ...
7
votes
2answers
191 views

How does one find and replace text in all open files with jed?

How does one find and replace text in all open files with jed?
6
votes
2answers
5k views

Non-root user getting root access after running “sudo vi /etc/hosts”

On a linux machine, a non-root user open a file, $ sudo vi /etc/hosts and quit saying :sh to get root access. 1) With above, How a non-root user becomes a root user? 2) Why Linux allow such ...
6
votes
2answers
5k views

Command line editing and text editor on AIX

Recently my company is moving an application system from mainframe z/OS to AIX. I have some experience on Ubuntu, but am completely new to AIX 6.1. Just wondering a few question: We use putty to ...
6
votes
2answers
3k views

How to re-run vim auto-indentation on a tex file?

I have a LaTeX source file with its indentation messed up. I am looking for a way to force vim (may be through one of vim-latex-suite commands) to re-run the automatic indentation commands over the ...
6
votes
4answers
16k views

How to edit/delete a .dot_file on mac without using Terminal

When I start Terminal I can not control it. It starts executing an endless loop repeating that some alias does not exist. Because of this I am not able to edit this file using a program such as vim. ...
6
votes
5answers
6k views

How to align fstab entries easily

Editing /etc/fstab with my text editor makes all the spacing go out of alignment. I could go through the file and insert/delete spaces to line everything up, but I'm looking for a more automated ...
6
votes
3answers
769 views

Gedit or an other non-commandline editor with the ability to spell-check two languages at the same time

I'm searching for an editor with the ability to spell-check two languages at the same time (German and English). Gedit can't do it out of the box. But I want to use Gedit. It should be possible by ...
6
votes
2answers
171 views

What is the connection between a gedit bug and a Unix-&-Linux Q/A href?

While answering a Unix-&-Linux question, I observed that Gedit and two other editors, Leafpad and Medit (I tested 12 editors altogether) exhibit the a certain bug. As it turns out, the bug is ...
6
votes
1answer
168 views

Can I specify the layout of a vsplit command?

When I do the :vsplit command, it always opens the new file on the left side of the screen. Is there a way I can specify I want the new file to open to the right?
6
votes
6answers
2k views

Editor for markdown tables

Is there any tool for linux which makes it easier to generate and edit tables for markdown?
6
votes
6answers
424 views

Is it possible to have more than just one backup when editing text files?

Gedit and medit are two text editors that I know of that allow me to save a backup. So, if I create a file called temp.txt the next time I edit it and then save it, I'll have a backup called temp.txt~....

1
2 3 4 5 6