| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 9f0d071 commit 6f45935
4 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -60,7 +60,7 @@ | |||
| 60 | 60 | #today_fmt = '%B %d, %Y' | |
| 61 | 61 | ||
| 62 | 62 | # List of documents that shouldn't be included in the build. | |
| 63 | - #unused_docs = [] | ||
| 63 | + unused_docs = ['configuration-options'] | ||
| 64 | 64 | ||
| 65 | 65 | # List of directories, relative to source directory, that shouldn't be searched | |
| 66 | 66 | # for source files. | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,255 @@ | |||
| 1 | + General | ||
| 2 | + ------- | ||
| 3 | + This refers to the ``[general]`` section in your `$XDG_CONFIG_HOME/bpython/config` file. | ||
| 4 | + | ||
| 5 | + auto_display_list | ||
| 6 | + ^^^^^^^^^^^^^^^^^ | ||
| 7 | + Display the autocomplete list as you type (default: True). | ||
| 8 | + When this is off, you can hit tab to see the suggestions. | ||
| 9 | + | ||
| 10 | + autocomplete_mode | ||
| 11 | + ^^^^^^^^^^^^^^^^^ | ||
| 12 | + There are three modes for autocomplete. simple, substring, and fuzzy. | ||
| 13 | + Simple matches methods with a common prefix, substring matches methods with a common | ||
| 14 | + subsequence, and fuzzy matches methods with common characters (default: | ||
| 15 | + simple). | ||
| 16 | + | ||
| 17 | + .. versionadded:: 0.12 | ||
| 18 | + | ||
| 19 | + syntax | ||
| 20 | + ^^^^^^ | ||
| 21 | + Syntax highlighting as you type (default: True). | ||
| 22 | + | ||
| 23 | + arg_spec | ||
| 24 | + ^^^^^^^^ | ||
| 25 | + Display the arg spec (list of arguments) for callables, when possible (default: True). | ||
| 26 | + | ||
| 27 | + hist_file | ||
| 28 | + ^^^^^^^^^ | ||
| 29 | + History file (default: ``~/.pythonhist``). | ||
| 30 | + | ||
| 31 | + paste_time | ||
| 32 | + ^^^^^^^^^^ | ||
| 33 | + The time between lines before pastemode is activated in seconds (default: 0.02). | ||
| 34 | + | ||
| 35 | + hist_length | ||
| 36 | + ^^^^^^^^^^^ | ||
| 37 | + Number of lines to store in history (set to 0 to disable) (default: 100) | ||
| 38 | + | ||
| 39 | + tab_length | ||
| 40 | + ^^^^^^^^^^ | ||
| 41 | + Soft tab size (default 4, see pep-8) | ||
| 42 | + | ||
| 43 | + pastebin_url | ||
| 44 | + ^^^^^^^^^^^^ | ||
| 45 | + The pastebin url to post to (without a trailing slash). This pastebin has | ||
| 46 | + to be a pastebin which uses LodgeIt. Examples are: http://paste.pocoo.org/xmlrpc/ and | ||
| 47 | + http://bpaste.net/xmlrpc/ (default: http://bpaste.net/xmlrpc/) | ||
| 48 | + | ||
| 49 | + pastebin_private | ||
| 50 | + ^^^^^^^^^^^^^^^^ | ||
| 51 | + If the pastebin supports a private option to make a random paste id, use it. | ||
| 52 | + Default: True). | ||
| 53 | + | ||
| 54 | + .. versionadded:: 0.12 | ||
| 55 | + | ||
| 56 | + pastebin_show_url | ||
| 57 | + ^^^^^^^^^^^^^^^^^ | ||
| 58 | + The url under which the new paste can be reached. ``$paste_id`` will be | ||
| 59 | + replaced by the ID of the new paste. Examples are: http://bpaste.net/show/$paste_id/ | ||
| 60 | + and http://paste.pocoo.org/show/$paste_id/ (default: http://bpaste.net/show/$paste_id/) | ||
| 61 | + | ||
| 62 | + pastebin_helper | ||
| 63 | + ^^^^^^^^^^^^^^^ | ||
| 64 | + | ||
| 65 | + The name of a helper executable that should perform pastebin upload on bpython's | ||
| 66 | + behalf. If set, this overrides `pastebin_url`. It also overrides `pastebin_show_url`, | ||
| 67 | + as the helper is expected to return the full URL to the pastebin as the first word of | ||
| 68 | + its output. The data is supplied to the helper via STDIN. | ||
| 69 | + | ||
| 70 | + An example helper program is ``pastebinit``, available for most systems. The | ||
| 71 | + following helper program can be used to create `gists <http://gist.github.com>`_: | ||
| 72 | + | ||
| 73 | + .. code-block:: python | ||
| 74 | + | ||
| 75 | + #!/usr/bin/env python | ||
| 76 | + | ||
| 77 | + import sys | ||
| 78 | + import urllib2 | ||
| 79 | + import json | ||
| 80 | + | ||
| 81 | + def do_gist_json(s): | ||
| 82 | + """ Use json to post to github. """ | ||
| 83 | + gist_public = False | ||
| 84 | + gist_url = 'https://api.github.com/gists' | ||
| 85 | + | ||
| 86 | + data = {'description': None, | ||
| 87 | + 'public': None, | ||
| 88 | + 'files' : { | ||
| 89 | + 'sample': { 'content': None } | ||
| 90 | + }} | ||
| 91 | + data['description'] = 'Gist from BPython' | ||
| 92 | + data['public'] = gist_public | ||
| 93 | + data['files']['sample']['content'] = s | ||
| 94 | + | ||
| 95 | + req = urllib2.Request(gist_url, json.dumps(data), {'Content-Type': 'application/json'}) | ||
| 96 | + try: | ||
| 97 | + res = urllib2.urlopen(req) | ||
| 98 | + except HTTPError, e: | ||
| 99 | + return e | ||
| 100 | + | ||
| 101 | + try: | ||
| 102 | + json_res = json.loads(res.read()) | ||
| 103 | + return json_res['html_url'] | ||
| 104 | + except HTTPError, e: | ||
| 105 | + return e | ||
| 106 | + | ||
| 107 | + if __name__ == "__main__": | ||
| 108 | + s = sys.stdin.read() | ||
| 109 | + print do_gist_json(s) | ||
| 110 | + | ||
| 111 | + | ||
| 112 | + .. versionadded:: 0.12 | ||
| 113 | + | ||
| 114 | + .. _configuration_color_scheme: | ||
| 115 | + | ||
| 116 | + color_scheme | ||
| 117 | + ^^^^^^^^^^^^ | ||
| 118 | + See :ref:`themes` for more information. | ||
| 119 | + | ||
| 120 | + Color schemes should be put in ``$XDG_CONFIG_HOME/bpython/`` | ||
| 121 | + | ||
| 122 | + e.g to use the theme ``$XDG_CONFIG_HOME/bpython/foo.theme`` set ``color_scheme = foo`` | ||
| 123 | + | ||
| 124 | + If you set the colorscheme to `foo` this will be translated to | ||
| 125 | + ``$XDG_CONFIG_HOME/bpython/foo.theme`` so be sure to put the file in that directory. | ||
| 126 | + | ||
| 127 | + Leave blank or set to "default" to use the default (builtin) theme. | ||
| 128 | + | ||
| 129 | + flush_output | ||
| 130 | + ^^^^^^^^^^^^ | ||
| 131 | + Whether to flush all output to stdout on exit (default: True). | ||
| 132 | + | ||
| 133 | + Keyboard | ||
| 134 | + -------- | ||
| 135 | + This section refers to the ``[keyboard]`` section in your ``$XDG_CONFIG_HOME/bpython/config``. | ||
| 136 | + | ||
| 137 | + You can set various keyboard shortcuts to be used by bpython. However, we have yet to map all keys | ||
| 138 | + to their respective control codes. If you configure a key combination which is not yet supported | ||
| 139 | + by bpython it will raise an exception telling you the key does not exist in bpython.keys. | ||
| 140 | + | ||
| 141 | + Valid keys are: | ||
| 142 | + | ||
| 143 | + * Control + any alphanumeric character (C-a through A-z, also a few others). | ||
| 144 | + * Any function key ranging from F1 to F12. | ||
| 145 | + | ||
| 146 | + pastebin | ||
| 147 | + ^^^^^^^^ | ||
| 148 | + Default: <F8> | ||
| 149 | + | ||
| 150 | + last_output | ||
| 151 | + ^^^^^^^^^^^ | ||
| 152 | + Default: F9 | ||
| 153 | + | ||
| 154 | + Shows the last output in the systems $PAGER. | ||
| 155 | + | ||
| 156 | + save | ||
| 157 | + ^^^^ | ||
| 158 | + Default: C-s | ||
| 159 | + | ||
| 160 | + Saves the current session to a file (prompts for filename) | ||
| 161 | + | ||
| 162 | + undo | ||
| 163 | + ^^^^ | ||
| 164 | + Default: C-r | ||
| 165 | + | ||
| 166 | + Rewinds the last action. | ||
| 167 | + | ||
| 168 | + up_one_line | ||
| 169 | + ^^^^^^^^^^^ | ||
| 170 | + Default: C-p | ||
| 171 | + | ||
| 172 | + Move the cursor up, by one line. | ||
| 173 | + | ||
| 174 | + down_one_line | ||
| 175 | + ^^^^^^^^^^^^^ | ||
| 176 | + Default: C-n | ||
| 177 | + | ||
| 178 | + Move the cursor down, by one line. | ||
| 179 | + | ||
| 180 | + cut_to_buffer | ||
| 181 | + ^^^^^^^^^^^^^ | ||
| 182 | + Default: C-k | ||
| 183 | + | ||
| 184 | + Cuts the current line to the buffer. | ||
| 185 | + | ||
| 186 | + search | ||
| 187 | + ^^^^^^ | ||
| 188 | + Default: C-o | ||
| 189 | + | ||
| 190 | + Search up for any lines containing what is on the current line. | ||
| 191 | + | ||
| 192 | + yank_from_buffer | ||
| 193 | + ^^^^^^^^^^^^^^^^ | ||
| 194 | + Default: C-y | ||
| 195 | + | ||
| 196 | + Pastes the current line from the buffer (the one you previously cutted) | ||
| 197 | + | ||
| 198 | + clear_word | ||
| 199 | + ^^^^^^^^^^ | ||
| 200 | + Default: C-w | ||
| 201 | + | ||
| 202 | + Clear the word the cursor is currently on. | ||
| 203 | + | ||
| 204 | + clear_line | ||
| 205 | + ^^^^^^^^^^ | ||
| 206 | + Default: C-u | ||
| 207 | + | ||
| 208 | + Clears to the beginning of the line. | ||
| 209 | + | ||
| 210 | + clear_screen | ||
| 211 | + ^^^^^^^^^^^^ | ||
| 212 | + Default: C-l | ||
| 213 | + | ||
| 214 | + Clears the screen to the top. | ||
| 215 | + | ||
| 216 | + show_source | ||
| 217 | + ^^^^^^^^^^^ | ||
| 218 | + Default: F2 | ||
| 219 | + | ||
| 220 | + Shows the source of the currently being completed (python) function. | ||
| 221 | + | ||
| 222 | + exit | ||
| 223 | + ^^^^ | ||
| 224 | + Default: C-d | ||
| 225 | + | ||
| 226 | + Exits bpython (use on empty line) | ||
| 227 | + | ||
| 228 | + CLI | ||
| 229 | + --- | ||
| 230 | + This refers to the ``[cli]`` section in your config file. | ||
| 231 | + | ||
| 232 | + suggestion_width | ||
| 233 | + ^^^^^^^^^^^^^^^^ | ||
| 234 | + Default: 0.8 | ||
| 235 | + | ||
| 236 | + The width of the suggestion window in percent of the terminal width. | ||
| 237 | + | ||
| 238 | + .. versionadded:: 0.9.8 | ||
| 239 | + | ||
| 240 | + trim_prompts | ||
| 241 | + ^^^^^^^^^^^^ | ||
| 242 | + Default: False | ||
| 243 | + | ||
| 244 | + Trims lines starting with '>>> ' when set to True. | ||
| 245 | + | ||
| 246 | + GTK | ||
| 247 | + --- | ||
| 248 | + This refers to the ``[gtk]`` section in your `$XDG_CONFIG_HOME/bpython/config` file. | ||
| 249 | + | ||
| 250 | + font | ||
| 251 | + ^^^^ | ||
| 252 | + Default: Monospace 10 | ||
| 253 | + | ||
| 254 | + The font to be used by the GTK version. | ||
| 255 | + | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments