code_junkie

How can I set up an editor to work with Git on Windows?

Nov 10th, 2011
240
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.64 KB | None | 0 0
  1. git config --global core.editor ""c:Program FilesNotepad++notepad++.exe""
  2. or
  3. git config --global core.editor ""c:Program FilesNotepad++notepad++.exe" %*"
  4.  
  5. C:proggit>git config --global --edit
  6. "c:Program FilesNotepad++notepad++.exe" %*: c:Program FilesNotepad++notepad++.exe: command not found
  7. error: There was a problem with the editor '"c:Program FilesNotepad++notepad++.exe" %*'.
  8.  
  9. "c:Program FilesNotepad++notepad++.exe" %*
  10.  
  11. C:proggit>git config --global core.editor C:proggitnpp.bat
  12.  
  13. git config --global core.editor "'C:/Program Files/Notepad++/notepad++.exe' -multiInst -notabbar -nosession -noPlugin"
  14.  
  15. C:proggit>git config --global core.editor C:/prog/git/npp.bat
  16.  
  17. #!/bin/sh
  18. "c:/Program Files/Notepad++/notepad++.exe" -multiInst "$*"
  19.  
  20. #!/bin/sh
  21. "c:/Program Files/Notepad++/notepad++.exe" -multiInst -notabbar -nosession -noPlugin "$*"
  22.  
  23. git config --global core.editor "'C:/Program Files/Notepad++/notepad++.exe' -multiInst -notabbar -nosession -noPlugin"
  24.  
  25. git config --global core.editor "'C:/Program Files/TextPad 5/TextPad.exe' -m"
  26.  
  27. start /WAIT "E:PortableAppsNotepad++PortableNotepad++Portable.exe" %*
  28.  
  29. c:src>echo %EDITOR%
  30. c:toolsruneditor.bat
  31.  
  32. git config --global core.editor "'C:/Program Files/Vim/vim72/gvim.exe' --nofork '%*'"
  33.  
  34. >echo %EDITOR%
  35.  
  36. c:VimVim71vim.exe
  37.  
  38. #!/bin/sh
  39. #open a new instance
  40.  
  41. function doUnix() {
  42. "c:program filesnotepad++notepad++.exe" -multiInst -nosession -notabbar $*
  43. exit
  44. }
  45.  
  46. doUnix $*
  47.  
  48. :WINCALL
  49. "c:program filesnotepad++notepad++.exe" -multiInst -nosession -notabbar %*
  50.  
  51. git config --global core.editor "git-editor.bat"
  52.  
  53. error: There was a problem with the editor 'ec'
  54.  
  55. c:emacsemacs-23.1binemacsclient.exe %*
  56.  
  57. git config --global core.editor C:/path/to/geany.bat
  58.  
  59. #!/bin/sh
  60. "C:Program FilesGeanybinGeany.exe" --new-instance "$*"
  61.  
  62. export TERM=msys
  63.  
  64. echo "export TERM=msys" >> ~/.bashrc
  65.  
  66. git config --global core.editor c:/msysgit/cmd/epp.sh
  67.  
  68. #!/bin/sh
  69. "C:/Program Files/JGsoft/EditPadPro6/EditPadPro.exe" //newinstance "$*"
  70.  
  71. git config core.editor '"C:Program FilesWindows NTAccessorieswordpad.exe"'
  72.  
  73. #!/usr/bin/perl
  74. # Detect which system I'm on and choose the right editor
  75. $unamea = `uname -a`;
  76. if($unamea =~ /mingw/i){
  77. if($unamea =~ /devsystem/i){#Check hostname
  78. exec('C:Program Files (x86)Notepad++notepad++.exe', '-multiInst', '-nosession', @ARGV);
  79. }
  80. if($unamea =~ /testsystem/i){
  81. exec('C:Program FilesNotepad++notepad++.exe', '-multiInst', '-nosession', @ARGV);
  82. }
  83. }
  84. $MCEDIT=`which mcedit`;
  85. if($MCEDIT =~ /mcedit/){
  86. exec($MCEDIT, @ARGV);
  87. }
  88. $NANO=`which nano`;
  89. if($NANO =~ /nano/){
  90. exec($NANO, @ARGV);
  91. }
  92. die "You don't have a suitable editor!n";
Add Comment
Please, Sign In to add comment