diff --git a/Action.sublime-menu b/Action.sublime-menu index f96481e..09b6fa6 100644 --- a/Action.sublime-menu +++ b/Action.sublime-menu @@ -18,5 +18,11 @@ { "caption": "-" }, { "command": "git_undo", "mnemonic": "U" }, { "command": "git_redo", "mnemonic": "R" }, + { "caption": "-" }, + { + "caption": "Open Repository in Sublime Text…", + "command": "open_dir_in_sublime_text", + "args": { "dir": "$working_dir" } + }, { "caption": "-", "id": "end" } ] diff --git a/Branch.sublime-menu b/Branch.sublime-menu index 4cb32c1..d747048 100644 --- a/Branch.sublime-menu +++ b/Branch.sublime-menu @@ -1,8 +1,11 @@ [ - { "command": "checkout_branch", "args": {"branch": "$branch"} }, - { "command": "merge_branch", "args": {"branch": "$branch"} }, + { "command": "checkout_branch", "args": { "branch": "$branch" } }, + { + "command": "merge_branch", + "args": { "branch": "$branch" }, + }, { "command": "rebase_branch", "args": { "branch": "$branch" } }, - { "command": "delete_branch", "args": {"ref": "$ref"} }, + { "command": "delete_branch", "args": { "ref": "$ref" } }, { "command": "show_command_palette", "args": @@ -15,7 +18,20 @@ { "caption": "Copy '$branch'", "command": "copy_to_clipboard", - "args": {"text": "$branch"} + "args": { "text": "$branch" } + }, + { "command": "hide_ref", "args": { "ref": "$ref" } }, + { "command": "show_ref", "args": { "ref": "$ref" } }, + { "command": "hide_all_refs_except", "args": { "ref": "$ref" } }, + { "command": "show_all_refs", "args": { "ref": "$ref" } }, + { + "command": "show_command_palette", + "args": + { + "command": "set_upstream", + "args": { "branch": "$branch" }, + "description": "Set Upstream…" + } }, { "caption": "-" }, { diff --git a/Commit.sublime-menu b/Commit.sublime-menu index c0b9110..274fe4b 100644 --- a/Commit.sublime-menu +++ b/Commit.sublime-menu @@ -1,6 +1,6 @@ [ { - "caption": "Copy Commit Hash", + "caption": "Copy '$short_commit…'", "command": "copy_to_clipboard", "args": {"text": "$commit"} }, @@ -40,10 +40,37 @@ "caption": "Edit Commit Message", "command": "edit_commit", }, + { + "caption": "Edit Commit Contents", + "command": "edit_commit_contents", + "args": { "commit": "$commit" }, + }, { "caption": "Squash with Parent", "command": "squash_commit", }, + { + "caption": "Squash Selected Commits", + "command": "squash_commits", + }, + { + "caption": "Squash Selected Commits, ignoring new messages (fixup)", + "command": "fixup_commits", + }, + { + "caption": "Move Commit Up", + "command": "move_commit", + "args": { "commit": "$commit", "down": false }, + }, + { + "caption": "Move Commit Down", + "command": "move_commit", + "args": { "commit": "$commit", "down": true }, + }, + { + "caption": "Drop Selected Commits", + "command": "drop_commits", + }, ] }, { diff --git a/Context.sublime-menu b/Context.sublime-menu index 921ab51..ef05825 100644 --- a/Context.sublime-menu +++ b/Context.sublime-menu @@ -7,6 +7,11 @@ { "command": "paste" }, { "caption": "-", "id": "selection" }, { "command": "select_all" }, + { "caption": "-", "id": "repo_commands" }, + { "caption": "Open Git Repository…", "command": "sublime_merge_open_repo" }, + { "caption": "File History…", "command": "sublime_merge_file_history" }, + { "caption": "Line History…", "command": "sublime_merge_line_history" }, + { "caption": "Blame File…", "command": "sublime_merge_blame_file" }, { "caption": "-", "id": "file" }, { "command": "open_in_browser", "caption": "Open in Browser" }, { "command": "open_dir", "args": {"dir": "$file_path", "file": "$file_name"}, "caption": "Open Containing Folder…" }, diff --git a/Diff Context.sublime-menu b/Diff Context.sublime-menu index a35ccf6..ba7d78d 100644 --- a/Diff Context.sublime-menu +++ b/Diff Context.sublime-menu @@ -6,5 +6,16 @@ }, { "caption": "-" }, { "command": "copy" }, - { "command": "select_all" } + { "command": "select_all" }, + { "caption": "-" }, + { "command": "toggle_ignore_diff_whitespace" }, + { + "caption": "Word Wrap", + "children": + [ + { "command": "set_word_wrap", "caption": "Auto", "args": {"word_wrap": "auto" }, "checkbox": true }, + { "command": "set_word_wrap", "caption": "Enabled", "args": {"word_wrap": true }, "checkbox": true }, + { "command": "set_word_wrap", "caption": "Disabled", "args": {"word_wrap": false }, "checkbox": true }, + ], + }, ] diff --git a/File Mode Context.sublime-menu b/File Mode Context.sublime-menu new file mode 100644 index 0000000..059b44e --- /dev/null +++ b/File Mode Context.sublime-menu @@ -0,0 +1,6 @@ +[ + { "command": "copy" }, + { "command": "select_all" }, + { "caption": "-" }, + { "command": "toggle_ignore_diff_whitespace" }, +] diff --git a/Index File.sublime-menu b/Index File.sublime-menu new file mode 100644 index 0000000..c4ef539 --- /dev/null +++ b/Index File.sublime-menu @@ -0,0 +1,6 @@ +[ + { + "caption": "Unstage", + "command": "unstage_file", "args": { "path": "$path" } + }, +] diff --git a/Main.sublime-menu b/Main.sublime-menu index f98f430..74214dc 100644 --- a/Main.sublime-menu +++ b/Main.sublime-menu @@ -58,6 +58,8 @@ { "command": "paste", "mnemonic": "P" }, { "caption": "-" }, { "command": "select_all" }, + { "caption": "-" }, + { "command": "wrap_lines", "caption": "Wrap Paragraph" }, { "caption": "-", "id": "end" }, ] }, @@ -71,6 +73,7 @@ { "command": "git_redo", "mnemonic": "R" }, { "caption": "-" }, { "command": "stash", "caption": "Stash" }, + { "command": "show_command_palette", "args": { "command": "stash" }, "caption": "Stash with…" }, { "command": "pop_stash", "caption": "Pop Stash" }, { "caption": "-" }, { "command": "show_command_palette", "args": { "command": "pull" }, "caption": "Pull…" }, @@ -85,6 +88,15 @@ "command": "show_command_palette", "args": { "command": "checkout_branch" }, }, + { + "caption": "Checkout Remote Branch…", + "command": "show_command_palette", + "args": + { + "command": "checkout_branch", + "args": { "local_refs": false, "remote_refs": true } + }, + }, { "caption": "创建分支…", "command": "show_command_palette", @@ -97,6 +109,14 @@ "caption": "重命名分支…", "command": "show_command_palette", "args": + { + "command": "create_branch_from_remote_branch" + } + }, + { + "caption": "Rename Branch…", + "command": "show_command_palette", + "args": { "command": "rename_branch" } @@ -129,6 +149,7 @@ }, { "caption": "-" }, { "command": "open_dir", "args": {"dir": "$working_dir"}, "caption": "打开所在目录…" }, + { "command": "open_dir_in_sublime_text", "args": {"dir": "$working_dir"}, "caption": "Open in Sublime Text…" }, { "caption": "-", "id": "end" } ] }, @@ -142,11 +163,24 @@ { "command": "navigate_forward", "caption": "前进" }, { "command": "navigate_to_commit_message", "caption": "跳转到提交信息" }, { "command": "navigate_to_head", "caption": "跳转到HEAD" }, + { "command": "navigate_to_parent", "caption": "Go to Parent" }, { "caption": "跳转到Commit…", "command": "show_command_palette", "args": {"command": "navigate_to_commit"}, }, + { + "caption": "Navigate to Branch…", + "command": "show_command_palette", + "args": {"command": "navigate_to_branch"}, + }, + { + "caption": "Navigate to Tag…", + "command": "show_command_palette", + "args": {"command": "navigate_to_tag"}, + }, + { "caption": "-" }, + { "command": "toggle_select_file", "caption": "Show Contents" }, { "caption": "-" }, { "command": "toggle_search", "caption": "查找" }, { "command": "show_command_palette", "args": {"command": "blame"}, "caption": "Blame…" }, @@ -242,23 +276,28 @@ { "command": "edit_gitflow_config", "caption": "配置 Git Flow" }, { "caption": "Start Git Flow Feature Branch", - "command": "gitflow_start_feature", + "command": "show_command_palette", + "args": { "command": "gitflow_start_feature" }, }, { "caption": "Start Git Flow Bugfix Branch", - "command": "gitflow_start_bugfix", + "command": "show_command_palette", + "args": { "command": "gitflow_start_bugfix" }, }, { "caption": "Start Git Flow Release Branch", - "command": "gitflow_start_release", + "command": "show_command_palette", + "args": { "command": "gitflow_start_release" }, }, { "caption": "Start Git Flow Hotfix Branch", - "command": "gitflow_start_hotfix", + "command": "show_command_palette", + "args": { "command": "gitflow_start_hotfix" }, }, { "caption": "Start Git Flow Support Branch", - "command": "gitflow_start_support", + "command": "show_command_palette", + "args": { "command": "gitflow_start_support" }, }, { "caption": "-", "id": "full_screen" }, { "command": "toggle_full_screen" }, @@ -270,7 +309,7 @@ "id": "preferences", "children": [ - { "command": "show_command_palette", "args": {"command": "preferences"}, "caption": "偏好…" }, + { "command": "open_preferences", "caption": "偏好…" }, { "caption": "-" }, { "caption": "编辑设置…", diff --git a/Modified File.sublime-menu b/Modified File.sublime-menu new file mode 100644 index 0000000..1b1b850 --- /dev/null +++ b/Modified File.sublime-menu @@ -0,0 +1,10 @@ +[ + { + "caption": "Stage", + "command": "stage_file", "args": { "path": "$path" }, + }, + { + "caption": "Discard", + "command": "discard_file", "args": { "path": "$path" }, + }, +] diff --git a/Remote Branch.sublime-menu b/Remote Branch.sublime-menu index a02bfaf..c181364 100644 --- a/Remote Branch.sublime-menu +++ b/Remote Branch.sublime-menu @@ -1,13 +1,20 @@ [ + { "command": "create_branch", "args": {"from": "$branch"} }, { "command": "checkout_branch", "args": {"branch": "$branch"} }, - { "command": "merge_branch", "args": {"branch": "$branch"} }, + { + "command": "merge_branch", + "args": { "branch": "$branch" }, + }, { "command": "rebase_branch", "args": {"branch": "$branch"} }, - { "command": "create_branch", "args": {"from": "$branch"} }, { "command": "delete_branch", "args": {"ref": "$ref"} }, { "caption": "Copy '$branch'", "command": "copy_to_clipboard", "args": {"text": "$branch"} }, + { "command": "hide_ref", "args": { "ref": "$ref" } }, + { "command": "show_ref", "args": { "ref": "$ref" } }, + { "command": "hide_all_refs_except", "args": { "ref": "$ref" } }, + { "command": "show_all_refs", "args": { "ref": "$ref" } }, { "caption": "-", "id": "end" } ] diff --git a/Remote Section.sublime-menu b/Remote Section.sublime-menu new file mode 100644 index 0000000..293d8bb --- /dev/null +++ b/Remote Section.sublime-menu @@ -0,0 +1,9 @@ +[ + { + "caption": "Add Remote…", + "command": "show_command_palette", "args": + { + "command": "add_remote", + } + }, +] diff --git a/Side Bar.sublime-menu b/Side Bar.sublime-menu index 7b4362c..830d263 100644 --- a/Side Bar.sublime-menu +++ b/Side Bar.sublime-menu @@ -4,6 +4,11 @@ { "caption": "Delete File", "command": "delete_file", "args": {"files": []} }, { "caption": "Open Containing Folder…", "command": "open_containing_folder", "args": {"files": []} }, { "caption": "Reveal Link Source", "command": "reveal_link_source", "args": {"dirs": []} }, + { "caption": "-", "id": "repo_commands" }, + { "caption": "Open Git Repository…", "command": "sublime_merge_open_repo", "args": {"paths": []}}, + { "caption": "File History…", "command": "sublime_merge_file_history", "args": {"files": []}}, + { "caption": "Folder History…", "command": "sublime_merge_folder_history", "args": {"paths": []}}, + { "caption": "Blame File…", "command": "sublime_merge_blame_file", "args": {"files": []}}, { "caption": "-", "id": "folder_commands" }, { "caption": "New Folder…", "command": "new_folder", "args": {"dirs": []} }, { "caption": "Delete Folder", "command": "delete_folder", "args": {"dirs": []} }, diff --git a/Submodule Section.sublime-menu b/Submodule Section.sublime-menu index 38aa45d..e4bf13c 100644 --- a/Submodule Section.sublime-menu +++ b/Submodule Section.sublime-menu @@ -1,6 +1,6 @@ [ { - "caption": "Add Submodule", + "caption": "Add Submodule…", "command": "show_command_palette", "args": { "command": "add_submodule", diff --git a/Tag Section.sublime-menu b/Tag Section.sublime-menu new file mode 100644 index 0000000..3411ccf --- /dev/null +++ b/Tag Section.sublime-menu @@ -0,0 +1,9 @@ +[ + { + "caption": "Create Tag…", + "command": "show_command_palette", "args": + { + "command": "create_tag", + } + }, +] diff --git a/Unmerged File.sublime-menu b/Unmerged File.sublime-menu new file mode 100644 index 0000000..5b31d96 --- /dev/null +++ b/Unmerged File.sublime-menu @@ -0,0 +1,10 @@ +[ + { + "caption": "Resolve Conflict", + "command": "resolve_merge_conflict", "args": { "path": "$path" }, + }, + { + "caption": "Stage", + "command": "stage_file", "args": { "path": "$path" }, + }, +] diff --git a/Untracked File.sublime-menu b/Untracked File.sublime-menu new file mode 100644 index 0000000..fcdbadc --- /dev/null +++ b/Untracked File.sublime-menu @@ -0,0 +1,10 @@ +[ + { + "caption": "Stage", + "command": "stage_file", "args": { "path": "$path" }, + }, + { + "caption": "Delete", + "command": "delete_file", "args": { "path": "$path" }, + }, +]