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

Adds configuration for commonly used text editors #56

Merged
merged 8 commits into from
Mar 5, 2015

Conversation

iglpdc
Copy link
Contributor

@iglpdc iglpdc commented Feb 22, 2015

Adds a table in 01-backup.md with proper git config for the following editors: nano, Sublime Text 2 (Win & Mac), Kate, Text Wrangler, and Notepad++. Not the prettiest thing, but I don't find any other way to have them all. Fixes issue #39.

(I found the list in some notes I snatched long ago from one @karthik 's repos :-) )

I don't have access to a Windows machine: can someone else check the two Windows beauties? Do they need to modify the Windows path to get it working?

| nano | `$ git config --global core.editor "nano"` |
| Sublime Text (Mac) | `$ git config --global core.editor "subl -n -w"` |
| Text Wrangler | `$ git config --global core.editor "edit -w"` |
| Sublime Text (Win) | `$ git config --global core.editor "'c:/program files/sublime text 2/sublime_text.exe' -w"` |
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not put the two Sublime Text lines together?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I thought that maybe some people will enter the wrong line for the OS or even both, but probably is OK to put them together.

Copy link
Contributor

Choose a reason for hiding this comment

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

On Sun, Feb 22, 2015 at 07:26:29AM -0800, Greg Wilson wrote:

+| nano | $ git config --global core.editor "nano" |

nano -w is probably a better idea, especially when we're likely to
be handling a whitespace-sensitive languages like Python.

@gvwilson
Copy link
Contributor

A couple of minor suggestions, but this is a great addition.

@iglpdc
Copy link
Contributor Author

iglpdc commented Feb 22, 2015

I'll merge as soon as someone with Windows confirms the line for Notepad++ is correct.

@wking
Copy link
Contributor

wking commented Feb 22, 2015

On Sun, Feb 22, 2015 at 08:08:07AM -0800, Ivan Gonzalez wrote:

I'll merge as soon as someone with Windows confirms the line for
Notepad++ is correct.

I don't have access to a Windows box either, but in general "program
files" vs. "program files (x86)" depends on the architecture that the
program was compiled for (x86 or amd64). For some more details see
swcarpentry/windows-installer@23d9af6e (swc-windows-installer.py:
Search ProgramW6432 and ProgramFiles(x86), 2014-07-09). Do we know
that there are only 64-bit builds of Sublime and only 32-bit builds of
Notepad++?

@iglpdc
Copy link
Contributor Author

iglpdc commented Feb 22, 2015

Thanks, @wking. It seems that Sublime has both 64- and 32-bit [1], although in our current setup instructions we offer Sublime as an option only for Mac. (Maybe we should add the Windows version?)

Regarding notepad++, I have no idea: it's not clear to me from their website [2].

[1] http://www.sublimetext.com/2
[2] http://notepad-plus-plus.org/

| Text Wrangler | `$ git config --global core.editor "edit -w"` |
| Sublime Text (Mac) | `$ git config --global core.editor "subl -n -w"` |
| Sublime Text (Win) | `$ git config --global core.editor "'c:/program files/sublime text 2/sublime_text.exe' -w"` |
| Notepad++ | `$ git config --global core.editor "'c:/program files (x86)/Notepad++/notepad++.exe' -multiInst -notabbar -nosession -noPlugin"`|
Copy link
Contributor

Choose a reason for hiding this comment

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

I would like to add "(Win)".

@iglpdc
Copy link
Contributor Author

iglpdc commented Feb 23, 2015

I've added again the OS for kate and notepad++. I think it's a bit redundant though, because it's very unlikely that someone uses them outside Linux and Win.

| Sublime Text (Win) | `$ git config --global core.editor "'c:/program files/sublime text 2/sublime_text.exe' -w"` |
| Notepad++ (Win) | `$ git config --global core.editor "'c:/program files (x86)/Notepad++/notepad++.exe' -multiInst -notabbar -nosession -noPlugin"`|
| Kate (Linux) | `$ git config --global core.editor "kate"` |
| Gedit | `$ git config --global core.editor "gedit -s"` |
Copy link
Contributor

Choose a reason for hiding this comment

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

Also add "(Linux)"?

@rgaiacs
Copy link
Contributor

rgaiacs commented Feb 24, 2015

I've added again the OS for kate and notepad++.

Thanks.

I think it's a bit redundant though, because it's very unlikely that someone uses them outside Linux and Win.

In this case I prefer make it very clear to avoid problems.

jonc125 added a commit to jonc125/git-novice that referenced this pull request Mar 4, 2015
iglpdc added a commit that referenced this pull request Mar 5, 2015
Adds configuration for commonly used text editors.
@iglpdc iglpdc merged commit cfbbcb3 into swcarpentry:gh-pages Mar 5, 2015
daisieh added a commit that referenced this pull request Mar 17, 2015
iglpdc added a commit that referenced this pull request Mar 22, 2015
Re-merge changes from 01-backup.md into 01-setup.md lost when we merged #58.

When #58 was merged, we lost some commits that were merged by #56. This fixes the problem.
zkamvar pushed a commit that referenced this pull request May 8, 2023
Adds configuration for commonly used text editors.
zkamvar pushed a commit that referenced this pull request May 8, 2023
Re-merge changes from 01-backup.md into 01-setup.md lost when we merged #58.

When #58 was merged, we lost some commits that were merged by #56. This fixes the problem.
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.

4 participants