Sublime Text 2 預設快速鍵清單(批次生成)

想把 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, " + ");

組合鍵功能
⌘ + ⇧ + nnew_window
⌘ + ⇧ + wclose_window
⌘ + oprompt_open
⌘ + ⇧ + treopen_last_file
⌘ + ⌥ + upswitch_file
⌘ + nnew_file
⌘ + ssave
⌘ + ⇧ + sprompt_save_as
⌘ + ⌥ + ssave_all
⌘ + wclose
組合鍵功能
⌘ + k,⌘ + btoggle_side_bar
⌘ + ⌃ + ftoggle_full_screen
⌘ + ⌃ + ⇧ + ftoggle_distraction_free
⌘ + zundo
⌘ + ⇧ + zredo
⌘ + yredo_or_repeat
⌘ + usoft_undo
⌘ + ⇧ + usoft_redo
⌘ + xcut
⌘ + ccopy
組合鍵功能
⌘ + vpaste
⌘ + ⇧ + vpaste_and_indent
⌃ + ⌥ + leftmove
⌃ + ⌥ + rightmove
⌃ + ⌥ + ⇧ + leftmove
⌃ + ⌥ + ⇧ + rightmove
⌃ + leftmove
⌃ + rightmove
⌃ + ⇧ + leftmove
⌃ + ⇧ + rightmove
組合鍵功能
⌃ + ⌥ + upscroll_lines
⌃ + ⌥ + downscroll_lines
⌃ + ⇧ + upselect_lines
⌃ + ⇧ + downselect_lines
⌘ + ⇧ + [prev_view
⌘ + ⇧ + ]next_view
⌘ + ⌥ + leftprev_view
⌘ + ⌥ + rightnext_view
⌃⇥next_view_in_stack
⌃ + ⇧⇥prev_view_in_stack
組合鍵功能
⌘ + aselect_all
⌘ + ⇧ + lsplit_selection_into_lines
single_selection
clear_fields
clear_fields
hide_panel
hide_overlay
hide_auto_complete
⌘ + ]indent
⌘ + [unindent
組合鍵功能
tabinsert_best_completion
tabinsert_best_completion
tabreplace_completion_with_next_completion
tabreindent
tabindent
tabnext_field
tabcommit_completion
⇧⇥insert
⇧⇥unindent
⇧⇥unindent
組合鍵功能
⇧⇥unindent
⇧⇥prev_field
⌘ + lexpand_selection
⌘ + dfind_under_expand
⌘ + k,⌘ + dfind_under_expand_skip
⌘ + ⇧ + spaceexpand_selection
⌃ + ⇧ + mexpand_selection
⌃ + mmove_to
⌘ + ⇧ + jexpand_selection
⌘ + ⇧ + aexpand_selection
組合鍵功能
⌘ + ⌥ + .close_tag
⌃ + qtoggle_record_macro
⌃ + ⇧ + qrun_macro
⌘ + ⏎run_macro_file
⌘ + ⇧ + ⏎run_macro_file
commit_completion
⌘ + tshow_overlay
⌘ + pshow_overlay
⌘ + ⇧ + pshow_overlay
⌘ + ⌃ + pprompt_select_project
組合鍵功能
⌘ + rshow_overlay
⌃ + gshow_overlay
⌘ + ishow_panel
⌘ + ⇧ + ishow_panel
⌘ + fshow_panel
⌘ + ⌥ + fshow_panel
⌘ + ⌥ + ereplace_next
⌘ + gfind_next
⌘ + ⇧ + gfind_prev
⌘ + eslurp_find_string
組合鍵功能
⌘ + ⇧ + eslurp_replace_string
⌥ + ⌘ + gfind_under
⇧ + ⌥ + ⌘ + gfind_under_prev
⌃ + ⌘ + gfind_all_under
⌘ + ⇧ + fshow_panel
f4next_result
⇧ + f4prev_result
f6toggle_setting
⌃ + f6next_misspelling
⌃ + ⇧ + f6prev_misspelling
組合鍵功能
⌃ + ⌘ + upswap_line_up
⌃ + ⌘ + downswap_line_down
⌃ + ⌫delete_word
⌃⌦delete_word
⌘ + forward_slashtoggle_comment
⌘ + ⌥ + forward_slashtoggle_comment
⌘ + jjoin_lines
⌘ + ⇧ + dduplicate_line
⌃ + backquoteshow_panel
⌃ + spaceauto_complete
組合鍵功能
⌃ + spacereplace_completion_with_auto_complete
⌘ + ⌥ + pshow_scope_name
⌃ + ⇧ + pshow_scope_name
f7build
⌘ + bbuild
⌘ + ⇧ + bbuild
⌃ + ttranspose
f5sort_lines
⌃ + f5sort_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
⌘ + ⌥ + 1set_layout
⌘ + ⌥ + 2set_layout
⌘ + ⌥ + 3set_layout
⌘ + ⌥ + 4set_layout
⌘ + ⌥ + ⇧ + 2set_layout
⌘ + ⌥ + ⇧ + 3set_layout
⌘ + ⌥ + 5set_layout
⌃ + 1focus_group
⌃ + 2focus_group
組合鍵功能
⌃ + 3focus_group
⌃ + 4focus_group
⌃ + ⇧ + 1move_to_group
⌃ + ⇧ + 2move_to_group
⌃ + ⇧ + 3move_to_group
⌃ + ⇧ + 4move_to_group
⌃ + 0focus_side_bar
⌘ + 1select_by_index
⌘ + 2select_by_index
⌘ + 3select_by_index
組合鍵功能
⌘ + 4select_by_index
⌘ + 5select_by_index
⌘ + 6select_by_index
⌘ + 7select_by_index
⌘ + 8select_by_index
⌘ + 9select_by_index
⌘ + 0select_by_index
f2next_bookmark
⇧ + f2prev_bookmark
⌘ + f2toggle_bookmark
組合鍵功能
⌘ + ⇧ + f2clear_bookmarks
⌥ + f2select_all_bookmarks
⌘ + k,⌘ + uupper_case
⌘ + k,⌘ + llower_case
⌘ + k,⌘ + spaceset_mark
⌘ + k,⌘ + aselect_to_mark
⌘ + k,⌘ + wdelete_to_mark
⌘ + k,⌘ + xswap_with_mark
⌘ + k,⌘ + gclear_bookmarks
⌘ + plusincrease_font_size
組合鍵功能
⌘ + equalsincrease_font_size
⌘ + minusdecrease_font_size
⌃ + ⇧ + winsert_snippet
⌃ + ⇧ + krun_macro_file
⌘ + ⌥ + qwrap_lines
⌘ + ⌥ + [fold
⌘ + ⌥ + ]unfold
⌘ + k,⌘ + 1fold_by_level
⌘ + k,⌘ + 2fold_by_level
⌘ + k,⌘ + 3fold_by_level
組合鍵功能
⌘ + k,⌘ + 4fold_by_level
⌘ + k,⌘ + 5fold_by_level
⌘ + k,⌘ + 6fold_by_level
⌘ + k,⌘ + 7fold_by_level
⌘ + k,⌘ + 8fold_by_level
⌘ + k,⌘ + 9fold_by_level
⌘ + k,⌘ + 0unfold_all
⌘ + k,⌘ + junfold_all
⌘ + k,⌘ + tfold_tag_attributes
⌘ + ⌥ + otoggle_overwrite
組合鍵功能
⌥ + f2context_menu
⌘ + ⌥ + ctoggle_case_sensitive
⌘ + ⌥ + rtoggle_regex
⌘ + ⌥ + wtoggle_whole_word
⌘ + ⌥ + atoggle_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,⌘ + yyank
⌘ + k,⌘ + krun_macro_file
⌘ + k,⌘ + ⌫run_macro_file
⌘ + k,⌘ + cshow_at_c⏎
組合鍵功能
⌃ + yyank
⌘ + ⌫run_macro_file
⌘⌦run_macro_file
⌃ + krun_macro_file
⌃ + lshow_at_c⏎
⌃ + oinsert_snippet
⌃ + ⌘ + dnoop
⌃ + ⌘ + ⇧ + dnoop

留言