想把 default的 keybinding轉成比較容易讀的字樣,用javascript跑。
Hash中的內容有些沒抓出來,往後再修,我猜Sublime應該也不會在更了
var keybinding = subelime原來的default keybinding
var html_content = ""
html_content +="<table style='margin: 5px; padding: 5px; '><tbody>";
for(var i =0; i <keybinding.length; i++){
if (i%10==0){
html_content+="<tr><th style='background-color: #b8b8b8; color: white; width: 25%;'>組合鍵</th><th style='background-color: #b8b8b8; color: white; width: 70%;'>功能</th></tr></br>";
} else {
html_content+="<tr>";
}
if(i%2==0){
html_content+="<td style='background-color: #f0f0f0;'>"+keybinding[i].keys+"</td>"+"<td style='background-color: #f0f0f0;'>"+keybinding[i].command+"</td><br>";
}else{
html_content+="<td id='double'>"+keybinding[i].keys+"</td>"+"<td id='double'>"+keybinding[i].command+"</td><br>";
}
html_content+="</tr><br>";
};
html_content+="</tbody></table>";
html_content = html_content.replace(/super/g, "⌘");
html_content = html_content.replace(/ctrl/g, "⌃");
html_content = html_content.replace(/alt/g, "⌥");
html_content = html_content.replace(/enter/g, "⏎");
html_content = html_content.replace(/shift/g, "⇧")
html_content = html_content.replace(/backspace/g, "⌫");
html_content = html_content.replace(/\+tab/g, "⇥");
html_content = html_content.replace(/tab\+/g, "⇥");
html_content = html_content.replace(/\+delete/g, "⌦");
html_content = html_content.replace(/delete\+/g, "⌦");
html_content = html_content.replace(/escape/g, "⎋");
html_content = html_content.replace(/\+/g, " + ");
組合鍵 | 功能 |
---|---|
⌘ + ⇧ + n | new_window |
⌘ + ⇧ + w | close_window |
⌘ + o | prompt_open |
⌘ + ⇧ + t | reopen_last_file |
⌘ + ⌥ + up | switch_file |
⌘ + n | new_file |
⌘ + s | save |
⌘ + ⇧ + s | prompt_save_as |
⌘ + ⌥ + s | save_all |
⌘ + w | close |
組合鍵 | 功能 |
⌘ + k,⌘ + b | toggle_side_bar |
⌘ + ⌃ + f | toggle_full_screen |
⌘ + ⌃ + ⇧ + f | toggle_distraction_free |
⌘ + z | undo |
⌘ + ⇧ + z | redo |
⌘ + y | redo_or_repeat |
⌘ + u | soft_undo |
⌘ + ⇧ + u | soft_redo |
⌘ + x | cut |
⌘ + c | copy |
組合鍵 | 功能 |
⌘ + v | paste |
⌘ + ⇧ + v | paste_and_indent |
⌃ + ⌥ + left | move |
⌃ + ⌥ + right | move |
⌃ + ⌥ + ⇧ + left | move |
⌃ + ⌥ + ⇧ + right | move |
⌃ + left | move |
⌃ + right | move |
⌃ + ⇧ + left | move |
⌃ + ⇧ + right | move |
組合鍵 | 功能 |
⌃ + ⌥ + up | scroll_lines |
⌃ + ⌥ + down | scroll_lines |
⌃ + ⇧ + up | select_lines |
⌃ + ⇧ + down | select_lines |
⌘ + ⇧ + [ | prev_view |
⌘ + ⇧ + ] | next_view |
⌘ + ⌥ + left | prev_view |
⌘ + ⌥ + right | next_view |
⌃⇥ | next_view_in_stack |
⌃ + ⇧⇥ | prev_view_in_stack |
組合鍵 | 功能 |
⌘ + a | select_all |
⌘ + ⇧ + l | split_selection_into_lines |
⎋ | single_selection |
⎋ | clear_fields |
⎋ | clear_fields |
⎋ | hide_panel |
⎋ | hide_overlay |
⎋ | hide_auto_complete |
⌘ + ] | indent |
⌘ + [ | unindent |
組合鍵 | 功能 |
tab | insert_best_completion |
tab | insert_best_completion |
tab | replace_completion_with_next_completion |
tab | reindent |
tab | indent |
tab | next_field |
tab | commit_completion |
⇧⇥ | insert |
⇧⇥ | unindent |
⇧⇥ | unindent |
組合鍵 | 功能 |
⇧⇥ | unindent |
⇧⇥ | prev_field |
⌘ + l | expand_selection |
⌘ + d | find_under_expand |
⌘ + k,⌘ + d | find_under_expand_skip |
⌘ + ⇧ + space | expand_selection |
⌃ + ⇧ + m | expand_selection |
⌃ + m | move_to |
⌘ + ⇧ + j | expand_selection |
⌘ + ⇧ + a | expand_selection |
組合鍵 | 功能 |
⌘ + ⌥ + . | close_tag |
⌃ + q | toggle_record_macro |
⌃ + ⇧ + q | run_macro |
⌘ + ⏎ | run_macro_file |
⌘ + ⇧ + ⏎ | run_macro_file |
⏎ | commit_completion |
⌘ + t | show_overlay |
⌘ + p | show_overlay |
⌘ + ⇧ + p | show_overlay |
⌘ + ⌃ + p | prompt_select_project |
組合鍵 | 功能 |
⌘ + r | show_overlay |
⌃ + g | show_overlay |
⌘ + i | show_panel |
⌘ + ⇧ + i | show_panel |
⌘ + f | show_panel |
⌘ + ⌥ + f | show_panel |
⌘ + ⌥ + e | replace_next |
⌘ + g | find_next |
⌘ + ⇧ + g | find_prev |
⌘ + e | slurp_find_string |
組合鍵 | 功能 |
⌘ + ⇧ + e | slurp_replace_string |
⌥ + ⌘ + g | find_under |
⇧ + ⌥ + ⌘ + g | find_under_prev |
⌃ + ⌘ + g | find_all_under |
⌘ + ⇧ + f | show_panel |
f4 | next_result |
⇧ + f4 | prev_result |
f6 | toggle_setting |
⌃ + f6 | next_misspelling |
⌃ + ⇧ + f6 | prev_misspelling |
組合鍵 | 功能 |
⌃ + ⌘ + up | swap_line_up |
⌃ + ⌘ + down | swap_line_down |
⌃ + ⌫ | delete_word |
⌃⌦ | delete_word |
⌘ + forward_slash | toggle_comment |
⌘ + ⌥ + forward_slash | toggle_comment |
⌘ + j | join_lines |
⌘ + ⇧ + d | duplicate_line |
⌃ + backquote | show_panel |
⌃ + space | auto_complete |
組合鍵 | 功能 |
⌃ + space | replace_completion_with_auto_complete |
⌘ + ⌥ + p | show_scope_name |
⌃ + ⇧ + p | show_scope_name |
f7 | build |
⌘ + b | build |
⌘ + ⇧ + b | build |
⌃ + t | transpose |
f5 | sort_lines |
⌃ + f5 | sort_lines |
" | insert_snippet |
組合鍵 | 功能 |
" | insert_snippet |
" | move |
⌫ | run_macro_file |
' | insert_snippet |
' | insert_snippet |
' | move |
⌫ | run_macro_file |
( | insert_snippet |
( | insert_snippet |
) | move |
組合鍵 | 功能 |
⌫ | run_macro_file |
[ | insert_snippet |
[ | insert_snippet |
] | move |
⌫ | run_macro_file |
{ | insert_snippet |
{ | insert_snippet |
} | move |
⌫ | run_macro_file |
⏎ | run_macro_file |
組合鍵 | 功能 |
⇧ + ⏎ | run_macro_file |
⌘ + ⌥ + 1 | set_layout |
⌘ + ⌥ + 2 | set_layout |
⌘ + ⌥ + 3 | set_layout |
⌘ + ⌥ + 4 | set_layout |
⌘ + ⌥ + ⇧ + 2 | set_layout |
⌘ + ⌥ + ⇧ + 3 | set_layout |
⌘ + ⌥ + 5 | set_layout |
⌃ + 1 | focus_group |
⌃ + 2 | focus_group |
組合鍵 | 功能 |
⌃ + 3 | focus_group |
⌃ + 4 | focus_group |
⌃ + ⇧ + 1 | move_to_group |
⌃ + ⇧ + 2 | move_to_group |
⌃ + ⇧ + 3 | move_to_group |
⌃ + ⇧ + 4 | move_to_group |
⌃ + 0 | focus_side_bar |
⌘ + 1 | select_by_index |
⌘ + 2 | select_by_index |
⌘ + 3 | select_by_index |
組合鍵 | 功能 |
⌘ + 4 | select_by_index |
⌘ + 5 | select_by_index |
⌘ + 6 | select_by_index |
⌘ + 7 | select_by_index |
⌘ + 8 | select_by_index |
⌘ + 9 | select_by_index |
⌘ + 0 | select_by_index |
f2 | next_bookmark |
⇧ + f2 | prev_bookmark |
⌘ + f2 | toggle_bookmark |
組合鍵 | 功能 |
⌘ + ⇧ + f2 | clear_bookmarks |
⌥ + f2 | select_all_bookmarks |
⌘ + k,⌘ + u | upper_case |
⌘ + k,⌘ + l | lower_case |
⌘ + k,⌘ + space | set_mark |
⌘ + k,⌘ + a | select_to_mark |
⌘ + k,⌘ + w | delete_to_mark |
⌘ + k,⌘ + x | swap_with_mark |
⌘ + k,⌘ + g | clear_bookmarks |
⌘ + plus | increase_font_size |
組合鍵 | 功能 |
⌘ + equals | increase_font_size |
⌘ + minus | decrease_font_size |
⌃ + ⇧ + w | insert_snippet |
⌃ + ⇧ + k | run_macro_file |
⌘ + ⌥ + q | wrap_lines |
⌘ + ⌥ + [ | fold |
⌘ + ⌥ + ] | unfold |
⌘ + k,⌘ + 1 | fold_by_level |
⌘ + k,⌘ + 2 | fold_by_level |
⌘ + k,⌘ + 3 | fold_by_level |
組合鍵 | 功能 |
⌘ + k,⌘ + 4 | fold_by_level |
⌘ + k,⌘ + 5 | fold_by_level |
⌘ + k,⌘ + 6 | fold_by_level |
⌘ + k,⌘ + 7 | fold_by_level |
⌘ + k,⌘ + 8 | fold_by_level |
⌘ + k,⌘ + 9 | fold_by_level |
⌘ + k,⌘ + 0 | unfold_all |
⌘ + k,⌘ + j | unfold_all |
⌘ + k,⌘ + t | fold_tag_attributes |
⌘ + ⌥ + o | toggle_overwrite |
組合鍵 | 功能 |
⌥ + f2 | context_menu |
⌘ + ⌥ + c | toggle_case_sensitive |
⌘ + ⌥ + r | toggle_regex |
⌘ + ⌥ + w | toggle_whole_word |
⌘ + ⌥ + a | toggle_preserve_case |
⏎ | find_next |
⇧ + ⏎ | find_prev |
⌥ + ⏎ | find_all |
⏎ | find_next |
⇧ + ⏎ | find_prev |
組合鍵 | 功能 |
⌥ + ⏎ | find_all |
⌃ + ⌥ + ⏎ | replace_all |
⏎ | hide_panel |
⇧ + ⏎ | find_prev |
⌥ + ⏎ | find_all |
⌘ + , | open_file |
⌘ + k,⌘ + y | yank |
⌘ + k,⌘ + k | run_macro_file |
⌘ + k,⌘ + ⌫ | run_macro_file |
⌘ + k,⌘ + c | show_at_c⏎ |
組合鍵 | 功能 |
⌃ + y | yank |
⌘ + ⌫ | run_macro_file |
⌘⌦ | run_macro_file |
⌃ + k | run_macro_file |
⌃ + l | show_at_c⏎ |
⌃ + o | insert_snippet |
⌃ + ⌘ + d | noop |
⌃ + ⌘ + ⇧ + d | noop |
留言
張貼留言