git_editor 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore ADDED
@@ -0,0 +1,4 @@
1
+ pkg/*
2
+ *.gem
3
+ .bundle
4
+ test_build.rb
data/.project ADDED
@@ -0,0 +1,12 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <projectDescription>
3
+ <name>git_editor</name>
4
+ <comment></comment>
5
+ <projects>
6
+ </projects>
7
+ <buildSpec>
8
+ </buildSpec>
9
+ <natures>
10
+ <nature>com.aptana.ruby.core.rubynature</nature>
11
+ </natures>
12
+ </projectDescription>
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source "http://rubygems.org"
2
+
3
+ # Specify your gem's dependencies in git_editor.gemspec
4
+ gemspec
data/License.txt ADDED
@@ -0,0 +1,50 @@
1
+ GitEditor is an editor based on SciTE. It is customized so that it works
2
+ well as an editor for Git.
3
+
4
+ GitEditor is released under MIT License.
5
+
6
+ MIT license
7
+
8
+ Copyright (C) 2010 by Tom Lam
9
+
10
+ Permission is hereby granted, free of charge, to any person obtaining a copy
11
+ of this software and associated documentation files (the "Software"), to deal
12
+ in the Software without restriction, including without limitation the rights
13
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14
+ copies of the Software, and to permit persons to whom the Software is
15
+ furnished to do so, subject to the following conditions:
16
+
17
+ The above copyright notice and this permission notice shall be included in
18
+ all copies or substantial portions of the Software.
19
+
20
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
26
+ THE SOFTWARE.
27
+
28
+
29
+ ==============================================================
30
+
31
+ License for Scintilla and SciTE
32
+
33
+ Copyright 1998-2003 by Neil Hodgson <neilh@scintilla.org>
34
+
35
+ All Rights Reserved
36
+
37
+ Permission to use, copy, modify, and distribute this software and its
38
+ documentation for any purpose and without fee is hereby granted,
39
+ provided that the above copyright notice appear in all copies and that
40
+ both that copyright notice and this permission notice appear in
41
+ supporting documentation.
42
+
43
+ NEIL HODGSON DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
44
+ SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
45
+ AND FITNESS, IN NO EVENT SHALL NEIL HODGSON BE LIABLE FOR ANY
46
+ SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
47
+ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
48
+ WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
49
+ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE
50
+ OR PERFORMANCE OF THIS SOFTWARE.
data/README.rdoc ADDED
@@ -0,0 +1,99 @@
1
+ = Git Editor
2
+
3
+ An editor for Git in Windows
4
+
5
+ == Install
6
+
7
+ (If you are not using ruby, please refer to the standalone version)
8
+ To install the gem:
9
+
10
+ gem install git_editor
11
+
12
+ Make sure that you already have Git installed on your machine.
13
+ After the installation of the gem, run the following command in the command line
14
+
15
+ git_editor install
16
+
17
+ Git_editor is now the default editor of Git.
18
+
19
+ == Standalone version
20
+
21
+ If you are not using ruby, you can download the git_editor-0.1.0.zip from the repository. Unzip it to a location of your choice.
22
+ Make sure that you have Git installed on your machine. And run
23
+
24
+ git config --global core.editor "<path of your editor>\giteditor.exe"
25
+
26
+ for example:
27
+
28
+ git config --global core.editor "C:\Program files\git_editor\giteditor.exe"
29
+
30
+ Then Git will use this editor as its default editor.
31
+
32
+ == Usage
33
+
34
+ After installation, the editor will automatically show up during config editing, interactive rebasing and commiting.
35
+
36
+ The syntax is colored so that you can see clearly which lines are the comment lines and which are actual commit messages.
37
+
38
+ You can run
39
+ git config --global --edit
40
+ to ensure that the editor is working properly.
41
+
42
+ The editor supports multi-selection. just press alt+shift+up/down arrow. It will keep multiple lines selected so you can type on multiple lines simultaneously. This is particular useful when you are working on interactive rebasing and you want to replace a bunch of "pick" by "squash".
43
+
44
+ When you press Ctrl+S, the editor save and quit automatically.
45
+
46
+ Easy access to theme customization will be in future releases.
47
+
48
+
49
+ == License
50
+
51
+ GitEditor is an editor based on SciTE. It is customized so that it works
52
+ well as an editor for Git.
53
+
54
+ GitEditor is released under MIT License.
55
+
56
+ MIT license
57
+
58
+ Copyright (C) 2010 by Tom Lam
59
+
60
+ Permission is hereby granted, free of charge, to any person obtaining a copy
61
+ of this software and associated documentation files (the "Software"), to deal
62
+ in the Software without restriction, including without limitation the rights
63
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
64
+ copies of the Software, and to permit persons to whom the Software is
65
+ furnished to do so, subject to the following conditions:
66
+
67
+ The above copyright notice and this permission notice shall be included in
68
+ all copies or substantial portions of the Software.
69
+
70
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
71
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
72
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
73
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
74
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
75
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
76
+ THE SOFTWARE.
77
+
78
+ ==
79
+
80
+ License for Scintilla and SciTE
81
+
82
+ Copyright 1998-2003 by Neil Hodgson <neilh@scintilla.org>
83
+
84
+ All Rights Reserved
85
+
86
+ Permission to use, copy, modify, and distribute this software and its
87
+ documentation for any purpose and without fee is hereby granted,
88
+ provided that the above copyright notice appear in all copies and that
89
+ both that copyright notice and this permission notice appear in
90
+ supporting documentation.
91
+
92
+ NEIL HODGSON DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
93
+ SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
94
+ AND FITNESS, IN NO EVENT SHALL NEIL HODGSON BE LIABLE FOR ANY
95
+ SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
96
+ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
97
+ WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
98
+ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE
99
+ OR PERFORMANCE OF THIS SOFTWARE.
data/Rakefile ADDED
@@ -0,0 +1,2 @@
1
+ require 'bundler'
2
+ Bundler::GemHelper.install_tasks
data/bin/git_editor ADDED
@@ -0,0 +1,21 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ editor = File.join(File.dirname(File.dirname(__FILE__)),"git_editor","giteditor.exe")
4
+
5
+ case ARGV[0].to_s.downcase
6
+ when 'install'
7
+ system("git config --global core.editor '#{editor}'")
8
+ system("git config --system core.editor '#{editor}'")
9
+ system("git config --local core.editor '#{editor}'")
10
+
11
+ when 'uninstall'
12
+ system("git config --global --unset core.editor")
13
+ system("git config --system --unset core.editor")
14
+ system("git config --local --unset core.editor")
15
+
16
+ else
17
+ puts ""
18
+ print "git_editor install ----- Set git_editor as the editor for Git\ngit_editor uninstall ----- Configure Git to use the default editor instead\n"
19
+ end
20
+
21
+
data/changelog.txt ADDED
@@ -0,0 +1,13 @@
1
+ 0.0.4
2
+ Add install and uninstall command
3
+
4
+ 0.0.3
5
+ Adjust color of string
6
+
7
+ 0.0.2
8
+ Add support for system and local config editing
9
+
10
+ 0.0.1
11
+ Initialize project
12
+ customizing the editor's syntax highlighting behaviour
13
+ Add keyword list of git editor
Binary file
@@ -0,0 +1,21 @@
1
+ # -*- encoding: utf-8 -*-
2
+ $:.push File.expand_path("../lib", __FILE__)
3
+ require "git_editor/version"
4
+
5
+ Gem::Specification.new do |s|
6
+ s.name = "git_editor"
7
+ s.version = GitEditor::VERSION
8
+ s.platform = Gem::Platform::RUBY
9
+ s.authors = ["erinata"]
10
+ s.email = ["erinata@gmail.com"]
11
+ s.homepage = ""
12
+ s.summary = %q{An editor for using git on Windows}
13
+ s.description = %q{An editor for using git on Windows}
14
+
15
+ s.executables << 'git_editor'
16
+
17
+ s.files = `git ls-files`.split("\n")
18
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
19
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
20
+ s.require_paths = ["lib"]
21
+ end
Binary file
@@ -0,0 +1,166 @@
1
+ import customize
2
+
3
+ user.shortcuts=Ctrl+S|IDM_QUIT|
4
+
5
+ position.left=0
6
+ position.top=0
7
+ position.width=700
8
+ position.height=580
9
+ full.screen.hides.menu=1
10
+ output.initial.hide=1
11
+ menubar.detachable=1
12
+ tabbar.visible=0
13
+ toolbar.visible=0
14
+ statusbar.visible=0
15
+ line.margin.visible=0
16
+ fold.margin.width=0
17
+ blank.margin.visible=0
18
+ buffered.draw=1
19
+ use.palette=0
20
+ edge.column=200
21
+ edge.mode=0
22
+ edge.colour=#C0DCC0
23
+ braces.check=1
24
+ braces.sloppy=1
25
+ selection.alpha=100
26
+ selection.back=#FFFFFF
27
+ buffers=10
28
+ tabsize=2
29
+ indent.size=2
30
+ use.tabs=1
31
+ selection.multiple=1
32
+ selection.additional.typing=1
33
+ virtual.space=3
34
+ indent.automatic=1
35
+ indent.opening=0
36
+ indent.closing=0
37
+ wrap=1
38
+ fold=0
39
+ eol.auto=1
40
+ clear.before.execute=0
41
+ caret.period=500
42
+ caret.policy.xslop=1
43
+ caret.policy.width=20
44
+ caret.policy.xstrict=0
45
+ caret.policy.xeven=0
46
+ caret.policy.xjumps=0
47
+ caret.policy.yslop=1
48
+ caret.policy.lines=1
49
+ caret.policy.ystrict=1
50
+ caret.policy.yeven=1
51
+ caret.policy.yjumps=0
52
+ caret.fore=#FFFFFF
53
+ caret.width=4
54
+ code.page=0
55
+ chars.alpha=abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ
56
+ chars.numeric=0123456789
57
+ chars.accented=�������������������������������������������������������������������
58
+ source.files=*.*;*
59
+ open.filter=\
60
+ All Source|$(source.files)|\
61
+ $(all.files)\
62
+
63
+
64
+ default.file.ext=COMMIT_EDITMSG
65
+ file.patterns.rebase=git-rebase-todo
66
+ file.patterns.commit=COMMIT_EDITMSG
67
+ file.patterns.gitconfig=.gitconfig;gitconfig;config
68
+ lexer.$(file.patterns.rebase)=cmake
69
+ lexer.$(file.patterns.gitconfig)=cmake
70
+ lexer.$(file.patterns.commit)=cmake
71
+
72
+ cmake.ignorecase=0
73
+ comment.block.cmake=#
74
+
75
+ keywords.$(file.patterns.rebase)=pick edit reword
76
+ keywords2.$(file.patterns.rebase)=squash fixup
77
+ keywords3.$(file.patterns.rebase)=exec
78
+
79
+ keywords3.$(file.patterns.gitconfig)=\
80
+ advice pushNonFastForward statusHints commitBeforeMerge resolveConflict implicitIdentity detachedHead \
81
+ core fileMode ignoreCygwinFSTricks ignorecase trustctime quotepath eol safecrlf autocrlf symlinks gitProxy ignoreStat preferSymlinkRefs bare \
82
+ worktree logAllRefUpdates repositoryFormatVersion sharedRepository warnAmbiguousRefs abbrevguard compression loosecompression packedGitWindowSize \
83
+ packedGitLimit deltaBaseCacheLimit bigFileThreshold excludesfile askpass attributesfile editor pager whitespace fsyncobjectfiles preloadindex \
84
+ createObject notesRef sparseCheckout \
85
+ add ignore-errors ignoreErrors \
86
+ alias \
87
+ am keepcr \
88
+ apply ignorewhitespace whitespace \
89
+ branch autosetupmerge autosetuprebase remote merge mergeoptions rebase cmd path \
90
+ clean requireForce \
91
+ color branch diff decorate grep interactive pager showbranch status ui \
92
+ commit status template \
93
+ diff autorefreshindex external mnemonicprefix noprefix renameLimit renames ignoreSubmodules suppressBlankEmpty tool \
94
+ difftool path cmd prompt wordRegex \
95
+ fetch recurseSubmodules unpackLimit \
96
+ format attach numbered headers to cc subjectprefix signature suffix pretty thread signoff \
97
+ gc aggressiveWindow auto autopacklimit packrefs pruneexpire reflogexpire reflogexpireunreachable reflogexpireunreachable rerereresolved rerereunresolved \
98
+ gitcvs commitmsgannotation enabled logfile usecrlfattr allbinary dbname dbdriver dbuser dbpass dbTableNamePrefix \
99
+ gui commitmsgwidth diffcontext encoding matchtrackingbranch newbranchtemplate pruneduringfetch trustmtime spellingdictionary fastcopyblame copyblamethreshold blamehistoryctx \
100
+ guitool cmd needsfile noconsole norescan confirm argprompt revprompt revunmerged title prompt \
101
+ help browser format autocorrect \
102
+ http proxy sslVerify sslCert sslKey sslCertPasswordProtected sslCAInfo sslCAPath maxRequests minSessions postBuffer lowSpeedLimit lowSpeedTime noEPSV useragent \
103
+ i18n commitEncoding logOutputEncoding \
104
+ imap \
105
+ init templatedir \
106
+ instaweb browser httpd local modulepath port \
107
+ interactive singlekey \
108
+ log date decorate showroot \
109
+ mailmap file \
110
+ man viewer cmd path \
111
+ merge conflictstyle log renameLimit renormalize stat tool verbosity name driver recursive \
112
+ mergetool path cmd trustExitCode keepBackup keepTemporaries prompt \
113
+ notes displayRef rewrite rewriteMode rewriteRef \
114
+ pack window depth windowMemory compression deltaCacheSize deltaCacheLimit threads indexVersion packSizeLimit \
115
+ pager \
116
+ pretty \
117
+ pull octopus twohead\
118
+ push default \
119
+ rebase stat autosquash \
120
+ receive autogc fsckObjects unpackLimit denyDeletes denyDeleteCurrent denyCurrentBranch denyNonFastForwards updateserverinfo \
121
+ remote url pushurl proxy fetch push mirror skipDefaultUpdate skipFetchAll receivepack uploadpack tagopt vcs \
122
+ remotes \
123
+ repack usedeltabaseoffset \
124
+ rerere autoupdate enabled \
125
+ sendemail identity smtpencryption smtpssl aliasesfile aliasfiletype bcc cc cccmd chainreplyto confirm envelopesender from multiedit signedoffbycc smtppass suppresscc suppressfrom to smtpdomain smtpserver smtpserverport smtpserveroption smtpuser thread validate signedoffcc \
126
+ showbranch default \
127
+ status relativePaths showUntrackedFiles submodulesummary \
128
+ submodule path url update fetchRecurseSubmodules ignore \
129
+ tar umask \
130
+ transfer unpackLimit \
131
+ url insteadOf pushInsteadOf \
132
+ user email name signingkey \
133
+ web browser
134
+
135
+ # default
136
+ style.cmake.0=$(baseforecolor),$(basefont),$(basesize),$(basebackcolor)
137
+ # Comment
138
+ style.cmake.1=$(commentforecolor)
139
+ # String double quote
140
+ style.cmake.2=$(stringforecolor)
141
+ # String left quote
142
+ style.cmake.3=$(stringforecolor)
143
+ # String right quote
144
+ style.cmake.4=$(stringforecolor)
145
+ # pick edit reword
146
+ style.cmake.5=$(keywordcolor1)
147
+ # squash fixup exec
148
+ style.cmake.6=$(keywordcolor2)
149
+ # git config
150
+ style.cmake.8=$(keywordcolor3)
151
+ # number
152
+ style.cmake.14=$(baseforecolor)
153
+ # Others
154
+ style.cmake.7=$(baseforecolor)
155
+ style.cmake.9=$(baseforecolor)
156
+ style.cmake.10=$(baseforecolor)
157
+ style.cmake.11=$(baseforecolor)
158
+ style.cmake.12=$(baseforecolor)
159
+ style.cmake.13=$(baseforecolor)
160
+
161
+ style.cmake.32=$(basefont),$(basesize),$(basebackcolor)
162
+ # Matched parentheses
163
+ style.cmake.34=fore:#FFAAAA,bold
164
+ # Not matched parentheses
165
+ style.cmake.35=fore:#FF0000,bold
166
+ #style.*.37=fore:#939393
@@ -0,0 +1,18 @@
1
+ # base font, color and font size
2
+ basefont=font:Consolas
3
+ basesize=size:14
4
+ baseforecolor=fore:#FFFFFF
5
+ # background color
6
+ basebackcolor=back:#000000
7
+ # color for comment
8
+ commentforecolor=fore:#008800,italics
9
+ # color for string
10
+ stringforecolor=fore:#FFFF99
11
+
12
+ # color for keywords in rebase editor (pick edit reword)
13
+ keywordcolor1=fore:#FFFF00,bold
14
+ # color for keywords in rebase editor (squash fixup exec)
15
+ keywordcolor2=fore:#FF0000,bold
16
+ # color for keywords in git config editor
17
+ keywordcolor3=fore:#9999FF,bold
18
+
Binary file
data/lib/git_editor.rb ADDED
@@ -0,0 +1,4 @@
1
+ module GitEditor
2
+ puts ""
3
+ print "git_editor install ----- Set git_editor as the editor for Git\ngit_editor uninstall ----- Configure Git to use the default editor instead\n"
4
+ end
@@ -0,0 +1,3 @@
1
+ module GitEditor
2
+ VERSION = "0.1.0"
3
+ end
metadata ADDED
@@ -0,0 +1,80 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: git_editor
3
+ version: !ruby/object:Gem::Version
4
+ prerelease: false
5
+ segments:
6
+ - 0
7
+ - 1
8
+ - 0
9
+ version: 0.1.0
10
+ platform: ruby
11
+ authors:
12
+ - erinata
13
+ autorequire:
14
+ bindir: bin
15
+ cert_chain: []
16
+
17
+ date: 2011-01-04 00:00:00 -06:00
18
+ default_executable:
19
+ dependencies: []
20
+
21
+ description: An editor for using git on Windows
22
+ email:
23
+ - erinata@gmail.com
24
+ executables:
25
+ - git_editor
26
+ extensions: []
27
+
28
+ extra_rdoc_files: []
29
+
30
+ files:
31
+ - .gitignore
32
+ - .project
33
+ - Gemfile
34
+ - License.txt
35
+ - README.rdoc
36
+ - Rakefile
37
+ - bin/git_editor
38
+ - changelog.txt
39
+ - git_editor-0.1.0.zip
40
+ - git_editor.gemspec
41
+ - git_editor/SciLexer.dll
42
+ - git_editor/SciTEGlobal.properties
43
+ - git_editor/customize.properties
44
+ - git_editor/giteditor.exe
45
+ - lib/git_editor.rb
46
+ - lib/git_editor/version.rb
47
+ has_rdoc: true
48
+ homepage: ""
49
+ licenses: []
50
+
51
+ post_install_message:
52
+ rdoc_options: []
53
+
54
+ require_paths:
55
+ - lib
56
+ required_ruby_version: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ segments:
62
+ - 0
63
+ version: "0"
64
+ required_rubygems_version: !ruby/object:Gem::Requirement
65
+ none: false
66
+ requirements:
67
+ - - ">="
68
+ - !ruby/object:Gem::Version
69
+ segments:
70
+ - 0
71
+ version: "0"
72
+ requirements: []
73
+
74
+ rubyforge_project:
75
+ rubygems_version: 1.3.7
76
+ signing_key:
77
+ specification_version: 3
78
+ summary: An editor for using git on Windows
79
+ test_files: []
80
+