| 1 | import wx, wx.stc |
|---|
| 2 | |
|---|
| 3 | NewWiki="Ctrl-N" |
|---|
| 4 | OpenWiki="Ctrl-Alt-O" |
|---|
| 5 | OpenWikiNewWindow="" |
|---|
| 6 | SearchWiki="Ctrl-Alt-F" |
|---|
| 7 | ViewBookmarks="Ctrl-Shift-B" |
|---|
| 8 | ShowTreeControl="Ctrl-T" |
|---|
| 9 | ShowToolbar="Ctrl-Shift-T" |
|---|
| 10 | ShowDocStructure="" |
|---|
| 11 | ShowTimeView="" |
|---|
| 12 | StayOnTop="" |
|---|
| 13 | OpenWikiWord="Ctrl-O" |
|---|
| 14 | Save="Ctrl-S" |
|---|
| 15 | Print="Ctrl-P" |
|---|
| 16 | Rename="Ctrl-Alt-R" |
|---|
| 17 | Delete="Ctrl-D" |
|---|
| 18 | AddBookmark="Ctrl-Alt-B" |
|---|
| 19 | CatchClipboardAtPage="" |
|---|
| 20 | CatchClipboardAtCursor="" |
|---|
| 21 | CatchClipboardOff="" |
|---|
| 22 | ActivateLink="Ctrl-L" |
|---|
| 23 | if wx.Platform == "__WXMSW__": |
|---|
| 24 | ActivateLinkNewTab="Ctrl-Alt-L" |
|---|
| 25 | ActivateLinkBackground="Ctrl-Shift-L" |
|---|
| 26 | else: |
|---|
| 27 | |
|---|
| 28 | |
|---|
| 29 | |
|---|
| 30 | |
|---|
| 31 | ActivateLinkNewTab="Alt-Shift-L" |
|---|
| 32 | ActivateLinkBackground="Alt-Shift-Ctrl-L" |
|---|
| 33 | |
|---|
| 34 | |
|---|
| 35 | ViewParents="Ctrl-Up" |
|---|
| 36 | ViewParentless="Ctrl-Shift-Up" |
|---|
| 37 | ViewChildren="Ctrl-Down" |
|---|
| 38 | ViewHistory="Ctrl-H" |
|---|
| 39 | ClipboardCopyUrlToCurrentWikiword="" |
|---|
| 40 | AddVersion="" |
|---|
| 41 | SetAsRoot="Ctrl-Shift-Q" |
|---|
| 42 | ResetRoot="" |
|---|
| 43 | UpHistory="Ctrl-Alt-Up" |
|---|
| 44 | DownHistory="Ctrl-Alt-Down" |
|---|
| 45 | GoBack="Alt-Left" |
|---|
| 46 | GoForward="Alt-Right" |
|---|
| 47 | GoUpwardFromSubpage="" |
|---|
| 48 | if wx.Platform == "__WXMAC__": |
|---|
| 49 | GoHome="Ctrl-Shift-H" |
|---|
| 50 | StartIncrementalSearch="Alt-Shift-F" |
|---|
| 51 | FocusFastSearchField="Alt-Shift-S" |
|---|
| 52 | else: |
|---|
| 53 | GoHome="Ctrl-Q" |
|---|
| 54 | StartIncrementalSearch="Ctrl-F" |
|---|
| 55 | FocusFastSearchField="Ctrl-Shift-F" |
|---|
| 56 | Bold="Ctrl-B" |
|---|
| 57 | Italic="Ctrl-I" |
|---|
| 58 | Heading="Ctrl-Alt-H" |
|---|
| 59 | SpellCheck="" |
|---|
| 60 | Cut="Ctrl-X" |
|---|
| 61 | Copy="Ctrl-C" |
|---|
| 62 | CopyToScratchPad="Ctrl-Alt-C" |
|---|
| 63 | Paste="Ctrl-V" |
|---|
| 64 | SelectAll="Ctrl-A" |
|---|
| 65 | Undo="Ctrl-Z" |
|---|
| 66 | Redo="Ctrl-Y" |
|---|
| 67 | AddFileUrl="" |
|---|
| 68 | FindAndReplace="Ctrl-R" |
|---|
| 69 | ReplaceTextByWikiword="Ctrl-Shift-R" |
|---|
| 70 | ConvertAbsoluteRelativeFileUrl="" |
|---|
| 71 | RewrapText="Ctrl-W" |
|---|
| 72 | Eval="Ctrl-E" |
|---|
| 73 | InsertDate="Ctrl-Alt-D" |
|---|
| 74 | MakeWikiWord="Ctrl-J" |
|---|
| 75 | |
|---|
| 76 | ShowFolding="" |
|---|
| 77 | ToggleCurrentFolding="" |
|---|
| 78 | UnfoldAll="" |
|---|
| 79 | FoldAll="" |
|---|
| 80 | |
|---|
| 81 | ShowEditor="Ctrl-Shift-A" |
|---|
| 82 | ShowPreview="Ctrl-Shift-S" |
|---|
| 83 | ShowSwitchEditorPreview="Ctrl-Shift-Space" |
|---|
| 84 | |
|---|
| 85 | |
|---|
| 86 | |
|---|
| 87 | |
|---|
| 88 | ZoomIn="" |
|---|
| 89 | ZoomOut="" |
|---|
| 90 | CloneWindow="" |
|---|
| 91 | |
|---|
| 92 | ContinueSearch="F3" |
|---|
| 93 | BackwardSearch="Shift-F3" |
|---|
| 94 | if wx.Platform == "__WXMAC__": |
|---|
| 95 | AutoComplete="Alt-Space" |
|---|
| 96 | else: |
|---|
| 97 | AutoComplete="Ctrl-Space" |
|---|
| 98 | ActivateLink2="Ctrl-Return" |
|---|
| 99 | SwitchFocus="F6" |
|---|
| 100 | CloseCurrentTab="Ctrl-F4" |
|---|
| 101 | GoNextTab="Ctrl-Tab" |
|---|
| 102 | GoPreviousTab="Ctrl-Shift-Tab" |
|---|
| 103 | |
|---|
| 104 | |
|---|
| 105 | |
|---|
| 106 | |
|---|
| 107 | LogLineUp="" |
|---|
| 108 | LogLineUpWithIndented="" |
|---|
| 109 | LogLineDown="" |
|---|
| 110 | LogLineDownWithIndented="" |
|---|
| 111 | |
|---|
| 112 | |
|---|
| 113 | Plugin_AutoNew_Numbered = "Ctrl-Shift-N" |
|---|
| 114 | |
|---|
| 115 | Plugin_GraphVizStructure_ShowRelationGraph = "" |
|---|
| 116 | Plugin_GraphVizStructure_ShowRelationGraphSource = "" |
|---|
| 117 | Plugin_GraphVizStructure_ShowChildGraph = "" |
|---|
| 118 | Plugin_GraphVizStructure_ShowChildGraphSource = "" |
|---|
| 119 | |
|---|
| 120 | |
|---|
| 121 | def makeBold(editor): |
|---|
| 122 | editor.styleSelection(u'*') |
|---|
| 123 | |
|---|
| 124 | def makeItalic(editor): |
|---|
| 125 | editor.styleSelection(u'_') |
|---|
| 126 | |
|---|
| 127 | def addHeading(editor): |
|---|
| 128 | bytePos = editor.PositionAfter(editor.GetCurrentPos()) |
|---|
| 129 | editor.CmdKeyExecute(wx.stc.STC_CMD_HOME) |
|---|
| 130 | editor.AddText(u'+') |
|---|
| 131 | editor.GotoPos(bytePos) |
|---|
| 132 | |
|---|
| 133 | def makeWikiWord(editor): |
|---|
| 134 | text = editor.GetSelectedText() |
|---|
| 135 | text = text.replace(u"'", u"") |
|---|
| 136 | text = text[0:1].upper() + text[1:] |
|---|
| 137 | text = u"[" + text + u"]" |
|---|
| 138 | editor.ReplaceSelection(text) |
|---|