|
1 |
| -### My modifications |
2 |
| - |
3 |
| -- New mappings on the gist-listing buffer: |
4 |
| - - Both `o` or `Enter` open the gist file in a new buffer, and close the |
5 |
| - gist-vim listing one. |
6 |
| - - `b` opens the gist file in a browser; this is necessary because |
7 |
| - `Shift-Enter` (as was originally) only works for GUI vim. |
8 |
| - - `y` copies the contents of the selected gist to the clipboard, and |
9 |
| - closes the gist-vim buffer. |
10 |
| - - `p` pastes the contents of the selected gist to the buffer from where |
11 |
| - gist-vim was called, and closes the gist-vim buffer. |
12 |
| - - Hitting `Escape` or `Tab` at the gist-vim buffer closes it. |
13 |
| -- Gist listing has fixed-length columns now, more amenable to eye inspection. |
14 |
| - Every line on the gist-listing buffer contains the gist id, name and |
15 |
| - description, in that order. Columns are now padded and truncated to offer a |
16 |
| - faster browsing, in the following way: |
17 |
| - - The gist id string is fixed at 32 characters. |
18 |
| - - The length (in characters) of the name of the gist is fixed and |
19 |
| - can be set by the user using, for example: |
20 |
| - |
21 |
| - `let g:gistvim_namelength = 20` |
22 |
| - |
23 |
| - The default value for `gistvim_namelength` is 30. If the gist (file)name |
24 |
| - exceeds that length, it is truncated to the specified length. |
25 |
| - - Finally, the gist description is truncated in length to fit the remaining |
26 |
| - of the line, avoiding wrapped lines that mess up the table layout. |
27 |
| - - Note that the gist listing buffer now does not show the field 'code' |
28 |
| - (not sure what that did in the first place). |
29 |
| - |
30 |
| -- Now the listing is complete (no need to select 'more' to see the following |
31 |
| - gists on the list), in this way the user can later perform a search (using vim's `/`, |
32 |
| - for instance) for the sought gist by name, description, etc. |
33 |
| -- The first line on the gist-listing states the number of gists listed and the |
34 |
| - user whose gists are being listed. |
35 |
| -- The height of the gist-listing buffer is now determined in the following way. |
36 |
| - If the number of gists listed equals or exceeds 10, then the height is fixed at 10. If |
37 |
| - it is smaller than 10, then the height is adjusted so that there are no empty |
38 |
| - lines displayed on the buffer. Note: right now this value (10) is fixed; I'm |
39 |
| - going to change it to a global plugin variable that defaults to 10. |
40 |
| - |
41 |
| -### Gist.vim |
| 1 | +# Gist.vim |
42 | 2 |
|
43 | 3 | This is a vimscript for creating gists (http://gist.github.com).
|
44 | 4 |
|
@@ -139,6 +99,46 @@ For the latest version please see https://github.com/mattn/gist-vim.
|
139 | 99 |
|
140 | 100 | :Gist -b
|
141 | 101 |
|
| 102 | +## List Action |
| 103 | + |
| 104 | +- New mappings on the gist-listing buffer: |
| 105 | + - Both `o` or `Enter` open the gist file in a new buffer, and close the |
| 106 | + gist-vim listing one. |
| 107 | + - `b` opens the gist file in a browser; this is necessary because |
| 108 | + `Shift-Enter` (as was originally) only works for GUI vim. |
| 109 | + - `y` copies the contents of the selected gist to the clipboard, and |
| 110 | + closes the gist-vim buffer. |
| 111 | + - `p` pastes the contents of the selected gist to the buffer from where |
| 112 | + gist-vim was called, and closes the gist-vim buffer. |
| 113 | + - Hitting `Escape` or `Tab` at the gist-vim buffer closes it. |
| 114 | +- Gist listing has fixed-length columns now, more amenable to eye inspection. |
| 115 | + Every line on the gist-listing buffer contains the gist id, name and |
| 116 | + description, in that order. Columns are now padded and truncated to offer a |
| 117 | + faster browsing, in the following way: |
| 118 | + - The gist id string is fixed at 32 characters. |
| 119 | + - The length (in characters) of the name of the gist is fixed and |
| 120 | + can be set by the user using, for example: |
| 121 | + |
| 122 | + `let g:gistvim_namelength = 20` |
| 123 | + |
| 124 | + The default value for `gistvim_namelength` is 30. If the gist (file)name |
| 125 | + exceeds that length, it is truncated to the specified length. |
| 126 | + - Finally, the gist description is truncated in length to fit the remaining |
| 127 | + of the line, avoiding wrapped lines that mess up the table layout. |
| 128 | + - Note that the gist listing buffer now does not show the field 'code' |
| 129 | + (not sure what that did in the first place). |
| 130 | + |
| 131 | +- Now the listing is complete (no need to select 'more' to see the following |
| 132 | + gists on the list), in this way the user can later perform a search (using vim's `/`, |
| 133 | + for instance) for the sought gist by name, description, etc. |
| 134 | +- The first line on the gist-listing states the number of gists listed and the |
| 135 | + user whose gists are being listed. |
| 136 | +- The height of the gist-listing buffer is now determined in the following way. |
| 137 | + If the number of gists listed equals or exceeds 10, then the height is fixed at 10. If |
| 138 | + it is smaller than 10, then the height is adjusted so that there are no empty |
| 139 | + lines displayed on the buffer. Note: right now this value (10) is fixed; I'm |
| 140 | + going to change it to a global plugin variable that defaults to 10. |
| 141 | + |
142 | 142 | ## Tips:
|
143 | 143 |
|
144 | 144 | If you set g:gist_clip_command, gist.vim will copy the gist code with option
|
|
0 commit comments