Saturday, May 25, 2013

What is the `editor` command in bash?

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, and I found editor. For me, it started vim in the terminal, which is close to what I wanted; I use vim-gtk. I started searching for a way to make editor use vim-gtk and found this question that explains an $EDITOR environment variable, but I am not sure if that is even related to the editor command. I tried man editor, but that just pulled up the vim manpage.
How can I make editor use a text editor of my choice, or should I be using a different command?

No comments:

Post a Comment