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

Installer editor improvements #304

Merged
merged 5 commits into from
Jan 9, 2021

Conversation

rimrul
Copy link
Member

@rimrul rimrul commented Sep 7, 2020

I've come up with some more miscellaneous editor related improvements to the installer, but I felt like it would be rude to just turn #303 into editor ratatouille without any prior warning.

Now might also be the ideal time to convice me to add Wordpad to the drop down of editor choices while I'm still irrationally annoyed about git-for-windows/git#2684, but we'd need to create a modified version of git-extra/notepad for wordpad that somehow avoids a name colision with git-extra/wordpad.

@dscho
Copy link
Member

dscho commented Sep 7, 2020

Now might also be the ideal time to convice me to add Wordpad to the drop down of editor choices while I'm still irrationally annoyed about git-for-windows/git#2684, but we'd need to create a modified version of git-extra/notepad for wordpad that somehow avoids a name colision with git-extra/wordpad.

Why would we need an extra wordpad?

@rimrul
Copy link
Member Author

rimrul commented Sep 8, 2020

you're right we can modify the existing git-extra/wordpad. I thought for some reason the use as a text editor for git would interfere with the previous use cases of that script.

@@ -1767,6 +1768,12 @@ begin
CreateItemDescription(EditorPage,'<RED>(NEW!)</RED> Notepad is a simple GUI editor that comes with windows.',Top,Left,LblEditor[GE_Notepad],False);
EditorAvailable[GE_Notepad]:=True;

// 9th choice
Copy link
Member Author

Choose a reason for hiding this comment

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

This should say 10th. Why are we counting them anyways?

Copy link
Member

Choose a reason for hiding this comment

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

Heh, hysterical raisins. I guess it would be a strict improvement to replace all those "n-th choice" comments by the actual editor's name...

rimrul added a commit to rimrul/build-extra that referenced this pull request Sep 8, 2020
Notepad and Wordpad are [now supported](git-for-windows#304)
as editors without manual configuration.

Signed-off-by: Matthias Aßhauer <[email protected]>
@rimrul rimrul force-pushed the installer-editor-improvements branch from 1f08cdc to 7e22552 Compare September 8, 2020 18:14
@dscho
Copy link
Member

dscho commented Oct 16, 2020

@rimrul I guess it would be cutting it a bit close to merge this betwee -rc2 and v2.29.0 final... but I am curious: what is blocking this PR from leaving Draft state?

@rimrul
Copy link
Member Author

rimrul commented Oct 17, 2020

Mainly cleanup that I haven't gotten around to. Explaining in the commit message why we want batch files in the file selector dialog preset, potentially rearranging the the patch series into a more logical order, rebasing to fix the merge conflicts, that kinda stuff.

@dscho
Copy link
Member

dscho commented Oct 17, 2020

Okay. Take your time, I don't think we need to rush this into v2.29.0 (which is due Monday night or Tuesday morning).

rimrul added 5 commits January 9, 2021 10:52
Git for Windows has supported notepad as it's editor since 69b301b
(git-extra: wrap 'notepad' so it can serve as Git's editor, 2015-09-14),
but always required the user to select 'VIM' in the installer and then
manually set core.editor. Let's make this easier on users (and
discourage them from setting up notepad.exe as an editor directly).

Signed-off-by: Matthias Aßhauer <[email protected]>
To propperly work as an editor for git we need to teach the existing
wrapper script some new tricks. Thankfully we don't need to reinvent the
wheel and can pick up the EOL handling from the notepad wrapper. We
don't need to convert files to CRLF before passing files to wordpad,
but when we get them back we need to convert them back to LF. While
we're at it let's also pick up the commit message formating.

Signed-off-by: Matthias Aßhauer <[email protected]>
Notepad and Wordpad are [now supported](git-for-windows#304)
as editors without manual configuration.

Signed-off-by: Matthias Aßhauer <[email protected]>
Most editor choices where added a couple of years ago.
They're not new anymore.

Signed-off-by: Matthias Aßhauer <[email protected]>
Some editors like Atom and VS Code are intended to be called through a batch
wrapper script. Let's make it easier to use one of those as a custom editor.

Signed-off-by: Matthias Aßhauer <[email protected]>
@rimrul rimrul force-pushed the installer-editor-improvements branch from 7e22552 to 9a9b30d Compare January 9, 2021 13:05
@rimrul rimrul marked this pull request as ready for review January 9, 2021 13:06
Copy link
Member

@dscho dscho left a comment

Choose a reason for hiding this comment

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

Awesome!

@dscho dscho merged commit 3a653e3 into git-for-windows:main Jan 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants