home *** CD-ROM | disk | FTP | other *** search
/ Maximum CD 2010 November / maximum-cd-2010-11.iso / DiscContents / calibre-0.7.13.msi / file_2323 < prev    next >
Encoding:
Text File  |  2007-11-29  |  3.7 KB  |  86 lines

  1. #Bind keys for exit (keys only work on empty lines
  2. debug_output("off")             #"on" saves log info to./pyreadline_debug_log.txt
  3.                                 #"on_nologfile" only enables print warning messages
  4. bind_exit_key("Control-d")
  5. bind_exit_key("Control-z")
  6.  
  7. #Commands for moving    
  8. bind_key("Home",                "beginning_of_line")
  9. bind_key("End",                 "end_of_line")
  10. bind_key("Left",                "backward_char")
  11. bind_key("Control-b",           "backward_char")
  12. bind_key("Right",               "forward_char")
  13. bind_key("Control-f",           "forward_char")
  14. bind_key("Alt-f",               "forward_word")
  15. bind_key("Alt-b",               "backward_word")
  16. bind_key("Clear",               "clear_screen")
  17. bind_key("Control-l",           "clear_screen")
  18. bind_key("Control-a",           "beginning_of_line")
  19. bind_key("Control-e",           "end_of_line")
  20. #bind_key("Control-l",          "redraw_current_line")
  21.  
  22. #Commands for Manipulating the History
  23. bind_key("Return",              "accept_line")
  24. bind_key("Control-p",           "previous_history")
  25. bind_key("Control-n",           "next_history")
  26. bind_key("Up",                  "history_search_backward")
  27. bind_key("Down",                "history_search_forward")
  28. bind_key("Alt-<",               "beginning_of_history")
  29. bind_key("Alt->",               "end_of_history")
  30. bind_key("Control-r",           "reverse_search_history")
  31. bind_key("Control-s",           "forward_search_history")
  32. bind_key("Alt-p",               "non_incremental_reverse_search_history")
  33. bind_key("Alt-n",               "non_incremental_forward_search_history")
  34.  
  35. bind_key("Control-z",           "undo")
  36. bind_key("Control-_",           "undo")
  37.  
  38. #Commands for Changing Text
  39. bind_key("Delete",              "delete_char")
  40. bind_key("Control-d",           "delete_char")
  41. bind_key("BackSpace",           "backward_delete_char")
  42. #bind_key("Control-Shift-v",    "quoted_insert")
  43. bind_key("Control-space",       "self_insert")
  44. bind_key("Control-BackSpace",   "backward_delete_word")
  45.  
  46. #Killing and Yanking
  47. bind_key("Control-k",           "kill_line")
  48. bind_key("Control-shift-k",     "kill_whole_line")
  49. bind_key("Escape",              "kill_whole_line")
  50. bind_key("Meta-d",              "kill_word")
  51. bind_key("Control-w",           "unix_word_rubout")
  52. #bind_key("Control-Delete",     "forward_kill_word")
  53.  
  54. #Copy paste
  55. bind_key("Shift-Right",         "forward_char_extend_selection")
  56. bind_key("Shift-Left",          "backward_char_extend_selection")
  57. bind_key("Shift-Control-Right", "forward_word_extend_selection")
  58. bind_key("Shift-Control-Left",  "backward_word_extend_selection")
  59. bind_key("Control-m",           "set_mark")
  60.  
  61. bind_key("Control-Shift-x",     "copy_selection_to_clipboard")
  62. #bind_key("Control-c",           "copy_selection_to_clipboard")  #Needs allow_ctrl_c(True) below to be uncommented
  63. bind_key("Control-q",           "copy_region_to_clipboard")
  64. bind_key('Control-Shift-v',     "paste_mulitline_code")
  65. bind_key("Control-x",           "cut_selection_to_clipboard")
  66.  
  67. bind_key("Control-v",           "paste")
  68. bind_key("Control-y",           "yank")
  69. bind_key("Alt-v",               "ipython_paste")
  70.  
  71. #Unbinding keys:
  72. #un_bind_key("Home")
  73.  
  74. #Other
  75. bell_style("none") #modes: none, audible, visible(not implemented)
  76. show_all_if_ambiguous("on")
  77. mark_directories("on")
  78. completer_delims(" \t\n\"\\'`@$><=;|&{(?")
  79. debug_output("off")
  80. #allow_ctrl_c(True)  #(Allows use of ctrl-c as copy key, still propagate keyboardinterrupt when not waiting for input)
  81.  
  82. history_filename("~/.pythonhistory")
  83. history_length(200) #value of -1 means no limit
  84.  
  85. #set_mode("vi")  #will cause following bind_keys to bind to vi mode as well as activate vi mode
  86. #ctrl_c_tap_time_interval(0.3)