Is it in the works to be able to set the editor that "brew edit" uses? Robert
Unless I'm completely mistaken. EDITOR will be used in all cases except `brew edit` with no further parameters. If you can figure out how to make vanilla `brew edit` work with something that isn't TextMate, please fork and pull request. On Tuesday, 18 January 2011 at 00:07, sigzero wrote: > Is it in the works to be able to set the editor that "brew edit" uses? > > > Robert > > >
On 18/gen/2011, at 10.12, Max Howell wrote: > Unless I'm completely mistaken. EDITOR will be used in all cases except `brew edit` with no further parameters. > > If you can figure out how to make vanilla `brew edit` work with something that isn't TextMate, please fork and pull request. I'm not sure how it works with TextMate, but with TextWrangler you could do one of two things: - open a list of files in a single window; all the files are collected in a flat list in the sidebar; - open the homebrew folder, which displays a directory browser with a hierarchical list (I think this is a better choice). At any rate, people who have and use TextMate are probably going to have it set as their EDITOR anyway; but for people who don't have TextMate, running "mate" unconditionally is useless. Perhaps, though, you're concerned that some editors might open 1000 windows, and that would be even worse than not opening anything. How about this: check the EDITOR variable, and if it's a known editor, follow the known best strategy for that editor (for TextMate do what you're currently doing, for TextWrangler open the homebrew folder, etc.); if it's unknown, ask the user before proceeding ("are you sure you want to open a hojillion files in <editorname>?"), allowing him to choose to open the folder as a whole, the individual files, or to cancel. CL
HOMEBREW_EDITOR will affect which brew gets picked for "brew edit foo" The problem with "brew edit" is that it opens a discontiguous range of files at once, and the only editor we've found that properly puts this into a "project" off of the command-line is TextMate. I've tried it with bbedit (text wrangler) and MacVim, and they both open the Homebrew files in a very non-friendly way. Improvements and suggestions are welcome, though. Basically, we don't "just open the whole folder" because we want/need to filter out the Cellar from being opened. On Mon, Jan 17, 2011 at 4:07 PM, sigzero <sigzero@gmail.com> wrote: > Is it in the works to be able to set the editor that "brew edit" uses? > Robert
Can you describe more of the non-friendly way? I open brew formulas in MacVim fine or maybe I am missing something (or my config of MacVim hides the issue). On Mon, Jan 17, 2011 at 7:14 PM, Adam Vandenberg <flangy@gmail.com> wrote: > HOMEBREW_EDITOR will affect which brew gets picked for "brew edit foo" > The problem with "brew edit" is that it opens a discontiguous range of > files at once, and the only editor we've found that properly puts this > into a "project" off of the command-line is TextMate. > > I've tried it with bbedit (text wrangler) and MacVim, and they both > open the Homebrew files in a very non-friendly way. > > Improvements and suggestions are welcome, though. > > Basically, we don't "just open the whole folder" because we want/need > to filter out the Cellar from being opened. > > On Mon, Jan 17, 2011 at 4:07 PM, sigzero <sigzero@gmail.com> wrote: > > Is it in the works to be able to set the editor that "brew edit" uses? > > Robert >
I think MacVim opened brew code + formulas in many, many separate top-level windows. On Mon, Jan 17, 2011 at 4:17 PM, sigzero <sigzero@gmail.com> wrote: > Can you describe more of the non-friendly way? I open brew formulas in > MacVim fine or maybe I am missing something (or my config of MacVim hides > the issue). > > On Mon, Jan 17, 2011 at 7:14 PM, Adam Vandenberg <flangy@gmail.com> wrote: >> >> HOMEBREW_EDITOR will affect which brew gets picked for "brew edit foo" >> The problem with "brew edit" is that it opens a discontiguous range of >> files at once, and the only editor we've found that properly puts this >> into a "project" off of the command-line is TextMate. >> >> I've tried it with bbedit (text wrangler) and MacVim, and they both >> open the Homebrew files in a very non-friendly way. >> >> Improvements and suggestions are welcome, though. >> >> Basically, we don't "just open the whole folder" because we want/need >> to filter out the Cellar from being opened. >> >> On Mon, Jan 17, 2011 at 4:07 PM, sigzero <sigzero@gmail.com> wrote: >> > Is it in the works to be able to set the editor that "brew edit" uses? >> > Robert > >
HOMEBREW_EDITOR will affect which brew gets picked for "brew edit foo" The problem with "brew edit" is that it opens a discontiguous range of files at once, and the only editor we've found that properly puts this into a "project" off of the command-line is TextMate. I've tried it with bbedit (text wrangler) and MacVim, and they both open the Homebrew files in a very non-friendly way. Improvements and suggestions are welcome, though. Basically, we don't "just open the whole folder" because we want/need to filter out the Cellar from being opened. On Mon, Jan 17, 2011 at 4:07 PM, sigzero <sigzero@gmail.com> wrote: > Is it in the works to be able to set the editor that "brew edit" uses? > Robert