Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add gvim support in edit #21873

Merged
merged 1 commit into from
May 18, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion base/interactiveutil.jl
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ function edit(path::AbstractString, line::Integer=0)
end
background = true
line_unsupported = false
if startswith(name, "emacs") || name == "gedit"
if startswith(name, "emacs") || name == "gedit" || startswith(name, "gvim")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like this belongs in the next conditional along with the other Vim variants?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have put it in line above because gvim is GUI based. Other vim variants run in console.
Therefore gvim should have background = true (as a separate window is opened when it is invoked) and other vims have background = false.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Though when there's no display, gvim will run in the terminal...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not a Linux expert, but as far as I understand emacs also can be run in the terminal. And secondly when one sets editor to gvim probably one wants to run it in GUI.

cmd = line != 0 ? `$command +$line $path` : `$command $path`
elseif startswith(name, "vim.") || name == "vi" || name == "vim" || name == "nvim" || name == "mvim" || name == "nano"
cmd = line != 0 ? `$command +$line $path` : `$command $path`
Expand Down