Mercurial > vim-lawrencium
comparison doc/lawrencium.txt @ 48:85e39bdd7089
Lots of changes that should have gone in other commits (ugh):
- merged changes from @soliman
- removed the bang edit command setting. The preview windows is not really
well suited for some things, so it's been replaced with a normal split
window for `Hg!` and `Hgstatus`.
- officialized `Hglog`.
- fixed some problems on Windows.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Thu, 08 Nov 2012 13:58:29 -0800 |
parents | 6a4f5200d8da |
children | dffb41c2067c |
comparison
equal
deleted
inserted
replaced
46:6a4f5200d8da | 48:85e39bdd7089 |
---|---|
25 *lawrencium* | 25 *lawrencium* |
26 | 26 |
27 1. Introduction |lawrencium-intro| | 27 1. Introduction |lawrencium-intro| |
28 2. Commands |lawrencium-commands| | 28 2. Commands |lawrencium-commands| |
29 3. Status Window |lawrencium-status-window| | 29 3. Status Window |lawrencium-status-window| |
30 4. Global Settings |lawrencium-global-settings| | 30 4. Log Window |lawrencium-log-window| |
31 5. Global Settings |lawrencium-global-settings| | |
31 | 32 |
32 | 33 |
33 ============================================================================= | 34 ============================================================================= |
34 1. Introduction *lawrencium-intro* | 35 1. Introduction *lawrencium-intro* |
35 | 36 |
61 the root of the repository so that auto-completed | 62 the root of the repository so that auto-completed |
62 filenames work out of the box. | 63 filenames work out of the box. |
63 | 64 |
64 *:Hg!* | 65 *:Hg!* |
65 :Hg! {args} Like |:Hg|, but the output of the command is placed in | 66 :Hg! {args} Like |:Hg|, but the output of the command is placed in |
66 a temp file and edited in the |preview-window|, unless | 67 a temp file and edited in a split window. |
67 the |lawrencium_hg_bang_edit_command| global setting | |
68 specifies that another type of window or buffer should | |
69 be used. | |
70 | 68 |
71 Once the output is open in a buffer, Lawrencium will | 69 Once the output is open in a buffer, Lawrencium will |
72 try to set the file type according to the Mercurial | 70 try to set the file type according to the Mercurial |
73 command that was run. See |lawrencium_hg_commands_file_types|. | 71 command that was run. See |lawrencium_hg_commands_file_types|. |
74 | 72 |
83 | 81 |
84 *:Hgedit!* | 82 *:Hgedit!* |
85 :Hgedit! {file} |:edit!| {file} relative to the root of the repository. | 83 :Hgedit! {file} |:edit!| {file} relative to the root of the repository. |
86 | 84 |
87 *:Hgstatus* | 85 *:Hgstatus* |
88 :Hgstatus Shows the output of 'hg status' in the | 86 :Hgstatus Shows the output of 'hg status' in a split window. |
89 |preview-window|. Some extra-commands, along with some | 87 Some extra-commands, along with some default mappings, |
90 default mappins, are available in this window. See | 88 are available in this window. See |
91 |lawrencium-status-window|. | 89 |lawrencium-status-window|. |
92 | 90 |
93 *:Hgdiff* | 91 *:Hgdiff* |
94 :Hgdiff Diffs the current file against its parent revision. | 92 :Hgdiff Diffs the current file against its parent revision. |
95 | 93 |
119 :Hgrevert! {files} *:Hgrevert!* | 117 :Hgrevert! {files} *:Hgrevert!* |
120 Same as |:Hgrevert| but with the --no-backup option | 118 Same as |:Hgrevert| but with the --no-backup option |
121 given to prevent a .orig backup file from being | 119 given to prevent a .orig backup file from being |
122 created. | 120 created. |
123 | 121 |
122 *:Hglog* | |
123 :Hglog | |
124 Opens the history (log) for the currently edited file | |
125 in a split window. Some extra-commands, along with | |
126 some default mappings, are available in this window. | |
127 See |lawrencium-log-window|. | |
128 | |
129 *:Hglog_f* | |
130 :Hglog {file} Same as |:Hglog|, but opens the log for the specified | |
131 file instead of the currently edited file. | |
132 | |
124 | 133 |
125 ============================================================================= | 134 ============================================================================= |
126 3. Status Window *lawrencium-status-window* | 135 3. Status Window *lawrencium-status-window* |
127 | 136 |
128 The `hg status` window opened by Lawrencium has a few special commands | 137 The `hg status` window opened by Lawrencium has a few special commands |
131 following descriptions. | 140 following descriptions. |
132 | 141 |
133 | 142 |
134 *:Hgstatusedit* | 143 *:Hgstatusedit* |
135 :Hgstatusedit Open the file mentioned on the current line. | 144 :Hgstatusedit Open the file mentioned on the current line. |
136 Mapped to <cr>. | 145 Mapped to <CR>. |
137 | 146 |
138 *:Hgstatusaddremove* | 147 *:Hgstatusaddremove* |
139 :Hgstatusaddremove Run `hg addremove` on the file mentioned on the | 148 :Hgstatusaddremove Run `hg addremove` on the file mentioned on the |
140 current line, or on the lines currently selected in | 149 current line, or on the lines currently selected in |
141 visual selection mode (see |visual-start|). | 150 visual selection mode (see |visual-start|). |
142 Mapped to <C-A>. | 151 Mapped to <CTRL-A>. |
143 | 152 |
144 *:Hgstatusdiff* | 153 *:Hgstatusdiff* |
145 :Hgstatusdiff Open a diff window on the file mentioned on the | 154 :Hgstatusdiff Open a diff window on the file mentioned on the |
146 current line, between the working directory version | 155 current line, between the working directory version |
147 and the parent revision version. Similar to running | 156 and the parent revision version. Similar to running |
148 |:Hgdiff| on that file. | 157 |:Hgdiff| on that file. |
149 Mapped to <C-D>. | 158 Mapped to <CTRL-D>. |
150 | 159 |
151 *:Hgstatusvdiff* | 160 *:Hgstatusvdiff* |
152 :Hgstatusvdiff Similar to |:Hgstatusdiff|, but use a vertical split. | 161 :Hgstatusvdiff Similar to |:Hgstatusdiff|, but use a vertical split. |
153 Similar to running |:Hgvdiff| on that file. | 162 Similar to running |:Hgvdiff| on that file. |
154 Mapped to <C-V>. | 163 Mapped to <CTRL-V>. |
155 | 164 |
156 *:Hgstatuscommit* | 165 *:Hgstatuscommit* |
157 :Hgstatuscommit Runs |:Hgcommit| on the files currently mentioned in | 166 :Hgstatuscommit Runs |:Hgcommit| on the files currently mentioned in |
158 the buffer, or in the current selection. The first | 167 the buffer, or in the current selection. The first |
159 option means you can delete lines from the buffer | 168 option means you can delete lines from the buffer |
160 until the remaining filenames are those you want to | 169 until the remaining filenames are those you want to |
161 commit. | 170 commit. |
162 Mapped to <C-S>. | 171 Mapped to <CTRL-S>. |
163 | 172 |
164 *:Hgstatusvcommit* | 173 *:Hgstatusvcommit* |
165 :Hgstatusvcommit Similar to |:Hgstatuscommit|, but use a vertical | 174 :Hgstatusvcommit Similar to |:Hgstatuscommit|, but use a vertical |
166 split, as with |:Hgvcommit|. | 175 split, as with |:Hgvcommit|. |
167 Not mapped byd default. | 176 Not mapped byd default. |
168 | 177 |
169 *:Hgstatusrefresh* | 178 *:Hgstatusrefresh* |
170 :Hgstatusrefresh Refreshes the status window by running `hg status` | 179 :Hgstatusrefresh Refreshes the status window by running `hg status` |
171 again. | 180 again. |
172 Mapped to <C-R>. | 181 Mapped to <CTRL-R>. |
173 | 182 |
174 *:Hgstatusqnew* | 183 *:Hgstatusqnew* |
175 :Hgstatusqnew {patch} {message}. | 184 :Hgstatusqnew {patch} {message}. |
176 If you have the 'mq' extension enabled, creates a new | 185 If you have the 'mq' extension enabled, creates a new |
177 patch with the file currently mentioned in the buffer, | 186 patch with the file currently mentioned in the buffer, |
192 q Quit the status window. | 201 q Quit the status window. |
193 | 202 |
194 | 203 |
195 | 204 |
196 ============================================================================= | 205 ============================================================================= |
197 4. Global Settings *lawrencium-global-settings* | 206 4. Log Window *lawrencium-log-window* |
207 | |
208 The `hg log` window opened by Lawrencium has a few special commands | |
209 defined in it. Also, unless the global |lawrencium_define_mappings| is set to | |
210 `0`, some commands are mapped to keyboard shortcuts, as detailed in the | |
211 following descriptions. | |
212 | |
213 *:Hglogrevedit* | |
214 :Hglogrevedit Looks at the revision specified on the current line, | |
215 and opens that revision for edit in the previous | |
216 window (although as a read-only buffer). | |
217 Mapped to |<CR>| | |
218 | |
219 *lawrencium-log-mappings* | |
220 A few other mappings are available in the log window: | |
221 | |
222 q Quit the log window. | |
223 | |
224 | |
225 | |
226 ============================================================================= | |
227 5. Global Settings *lawrencium-global-settings* | |
198 | 228 |
199 The following global settings can be defined in your |vimrc| to change the | 229 The following global settings can be defined in your |vimrc| to change the |
200 default behaviour of Lawrencium. | 230 default behaviour of Lawrencium. |
201 | 231 |
202 *lawrencium_hg_executable* | 232 *lawrencium_hg_executable* |
215 *lawrencium_define_mappings* | 245 *lawrencium_define_mappings* |
216 g:lawrencium_define_mappings | 246 g:lawrencium_define_mappings |
217 Specifies whether Lawrencium should define default | 247 Specifies whether Lawrencium should define default |
218 keyboard shortcuts. | 248 keyboard shortcuts. |
219 Defaults to `1`. | 249 Defaults to `1`. |
220 | |
221 *lawrencium_hg_bang_edit_command* | |
222 g:lawrencium_hg_bang_edit_command | |
223 Defines the Vim command to run when using the |:Hg!| | |
224 command (with the bang) in order to show the output. | |
225 | |
226 Defaults to |pedit|, which opens the output of the | |
227 command in the |preview-window|. A good alternative | |
228 is to use |edit|, to open the output in a normal | |
229 buffer. | |
230 | 250 |
231 *lawrencium_hg_commands_file_types* | 251 *lawrencium_hg_commands_file_types* |
232 g:lawrencium_hg_commands_file_types | 252 g:lawrencium_hg_commands_file_types |
233 Defines the |file-types| that Lawrencium should use | 253 Defines the |file-types| that Lawrencium should use |
234 when editing the output of |:Hg!| based on the | 254 when editing the output of |:Hg!| based on the |