Mercurial > vim-lawrencium
annotate doc/lawrencium.txt @ 43:fc20a265551d
Added auto cd'ing into the repo root for `:Hg`.
This can be disabled with the `lawrencium_auto_cd` global.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Tue, 14 Aug 2012 22:26:59 -0700 |
parents | a63ec818ab21 |
children | 6a4f5200d8da |
rev | line source |
---|---|
0 | 1 *lawrencium.txt* Mercurial wrapper for VIM |
2 | |
13 | 3 |
4 LAWRENCIUM REFERENCE MANUAL | |
5 by Ludovic Chabant | |
6 | |
7 | |
8 *lawrencium* | |
0 | 9 |
13 | 10 1. Introduction |lawrencium-intro| |
11 2. Commands |lawrencium-commands| | |
31
3a0f7bb6ea64
Hgstatus window improvements and bug fixes:
Ludovic Chabant <ludovic@chabant.com>
parents:
20
diff
changeset
|
12 3. Status Window |lawrencium-status-window| |
0 | 13 |
13 | 14 |
15 ============================================================================= | |
16 1. Introduction *lawrencium-intro* | |
0 | 17 |
18 When a file from a Mercurial repository is open in a buffer, that buffer gets | |
19 new commands defined. | |
20 | |
13 | 21 This plugin is only available if 'compatible' is not set. |
22 | |
23 Grab the latest version or report a bug on BitBucket: | |
24 | |
25 http://bitbucket.org/ludovicchabant/vim-lawrencium | |
26 | |
27 | |
28 | |
29 ============================================================================= | |
30 2. Commands *lawrencium-commands* | |
0 | 31 |
32 All commands defined by |lawrencium| are local to each buffer. | |
33 | |
13 | 34 *:Hg* |
6
1da613c13d81
Better hg-status window.
Ludovic Chabant <ludovic@chabant.com>
parents:
0
diff
changeset
|
35 :Hg {args} Run an arbitrary Mercurial command. Similar to :!hg |
0 | 36 [args] but the '--repository' is automatically |
37 specified with the root of the repository the current | |
20
01932a36df03
Updated documentation.
Ludovic Chabant <ludovic@chabant.com>
parents:
13
diff
changeset
|
38 file belongs to, and it will auto-complete any |
01932a36df03
Updated documentation.
Ludovic Chabant <ludovic@chabant.com>
parents:
13
diff
changeset
|
39 standard command or option. |
43
fc20a265551d
Added auto cd'ing into the repo root for `:Hg`.
Ludovic Chabant <ludovic@chabant.com>
parents:
40
diff
changeset
|
40 |
fc20a265551d
Added auto cd'ing into the repo root for `:Hg`.
Ludovic Chabant <ludovic@chabant.com>
parents:
40
diff
changeset
|
41 Also, unless the `lawrencium_auto_cd` global is set to |
fc20a265551d
Added auto cd'ing into the repo root for `:Hg`.
Ludovic Chabant <ludovic@chabant.com>
parents:
40
diff
changeset
|
42 `0`, it will temporarily set the current directory to be |
fc20a265551d
Added auto cd'ing into the repo root for `:Hg`.
Ludovic Chabant <ludovic@chabant.com>
parents:
40
diff
changeset
|
43 the root of the repository so that auto-completed |
fc20a265551d
Added auto cd'ing into the repo root for `:Hg`.
Ludovic Chabant <ludovic@chabant.com>
parents:
40
diff
changeset
|
44 filenames work out of the box. |
0 | 45 |
13 | 46 *:Hg!* |
6
1da613c13d81
Better hg-status window.
Ludovic Chabant <ludovic@chabant.com>
parents:
0
diff
changeset
|
47 :Hg! {args} Like |:Hg|, but the output of the command is placed in |
0 | 48 a temp file and edited in the |preview-window|. |
49 | |
13 | 50 *:Hgcd* |
6
1da613c13d81
Better hg-status window.
Ludovic Chabant <ludovic@chabant.com>
parents:
0
diff
changeset
|
51 :Hgcd[!] {path} |:cd| relative to the root of the repository. |
0 | 52 |
13 | 53 *:Hglcd* |
6
1da613c13d81
Better hg-status window.
Ludovic Chabant <ludovic@chabant.com>
parents:
0
diff
changeset
|
54 :Hglcd[!] {path} |:lcd| relative to the root of the repository. |
1da613c13d81
Better hg-status window.
Ludovic Chabant <ludovic@chabant.com>
parents:
0
diff
changeset
|
55 |
13 | 56 *:Hgedit* |
6
1da613c13d81
Better hg-status window.
Ludovic Chabant <ludovic@chabant.com>
parents:
0
diff
changeset
|
57 :Hgedit {file} |:edit| {file} relative to the root of the repository. |
1da613c13d81
Better hg-status window.
Ludovic Chabant <ludovic@chabant.com>
parents:
0
diff
changeset
|
58 |
13 | 59 *:Hgedit!* |
6
1da613c13d81
Better hg-status window.
Ludovic Chabant <ludovic@chabant.com>
parents:
0
diff
changeset
|
60 :Hgedit! {file} |:edit!| {file} relative to the root of the repository. |
0 | 61 |
13 | 62 *:Hgstatus* |
0 | 63 :Hgstatus Shows the output of 'hg status' in the |
31
3a0f7bb6ea64
Hgstatus window improvements and bug fixes:
Ludovic Chabant <ludovic@chabant.com>
parents:
20
diff
changeset
|
64 |preview-window|. Some extra-commands, along with some |
3a0f7bb6ea64
Hgstatus window improvements and bug fixes:
Ludovic Chabant <ludovic@chabant.com>
parents:
20
diff
changeset
|
65 default mappins, are available in this window. See |
3a0f7bb6ea64
Hgstatus window improvements and bug fixes:
Ludovic Chabant <ludovic@chabant.com>
parents:
20
diff
changeset
|
66 |lawrencium-status-window|. |
13 | 67 |
68 *:Hgdiff* | |
69 :Hgdiff Diffs the current file against its parent revision. | |
70 | |
71 *:Hgdiff_f* | |
72 :Hgdiff {revspec} Diffs the current file against the specified revision. | |
73 | |
74 *:Hgvdiff* | |
75 :Hgvdiff Same as |:Hgdiff| but uses a vertical split. | |
76 | |
77 *:Hgvdiff_f* | |
78 :Hgvdiff {revspec} Same as |:Hgdiff_f| but uses a vertical split. | |
79 | |
80 *:Hgcommit* | |
81 :Hgcommit Opens a new window to edit a commit message into a | |
82 temporary file and, upon quitting the buffer, if that | |
83 file has been written to, commit the current changes | |
84 to the repository. | |
85 | |
86 *:Hgvcommit* | |
87 :Hgvcommit Same as |:Hgcommit| but uses a vertical split to edit | |
88 the commit message. | |
0 | 89 |
38
a384b4aff211
Updated documentation with `Hgrevert`.
Ludovic Chabant <ludovic@chabant.com>
parents:
34
diff
changeset
|
90 :Hgrevert {files} *:Hgrevert* |
a384b4aff211
Updated documentation with `Hgrevert`.
Ludovic Chabant <ludovic@chabant.com>
parents:
34
diff
changeset
|
91 Reverts the given files (in repo-relative paths). If no |
a384b4aff211
Updated documentation with `Hgrevert`.
Ludovic Chabant <ludovic@chabant.com>
parents:
34
diff
changeset
|
92 file are given, reverts the current file. |
a384b4aff211
Updated documentation with `Hgrevert`.
Ludovic Chabant <ludovic@chabant.com>
parents:
34
diff
changeset
|
93 |
a384b4aff211
Updated documentation with `Hgrevert`.
Ludovic Chabant <ludovic@chabant.com>
parents:
34
diff
changeset
|
94 :Hgrevert! {files} *:Hgrevert!* |
a384b4aff211
Updated documentation with `Hgrevert`.
Ludovic Chabant <ludovic@chabant.com>
parents:
34
diff
changeset
|
95 Same as |:Hgrevert| but with the --no-backup option |
a384b4aff211
Updated documentation with `Hgrevert`.
Ludovic Chabant <ludovic@chabant.com>
parents:
34
diff
changeset
|
96 given to prevent a .orig backup file from being |
a384b4aff211
Updated documentation with `Hgrevert`.
Ludovic Chabant <ludovic@chabant.com>
parents:
34
diff
changeset
|
97 created. |
0 | 98 |
99 | |
31
3a0f7bb6ea64
Hgstatus window improvements and bug fixes:
Ludovic Chabant <ludovic@chabant.com>
parents:
20
diff
changeset
|
100 ============================================================================= |
3a0f7bb6ea64
Hgstatus window improvements and bug fixes:
Ludovic Chabant <ludovic@chabant.com>
parents:
20
diff
changeset
|
101 3. Status Window *lawrencium-status-window* |
3a0f7bb6ea64
Hgstatus window improvements and bug fixes:
Ludovic Chabant <ludovic@chabant.com>
parents:
20
diff
changeset
|
102 |
3a0f7bb6ea64
Hgstatus window improvements and bug fixes:
Ludovic Chabant <ludovic@chabant.com>
parents:
20
diff
changeset
|
103 The `hg status` window opened by Lawrencium has a few special commands |
3a0f7bb6ea64
Hgstatus window improvements and bug fixes:
Ludovic Chabant <ludovic@chabant.com>
parents:
20
diff
changeset
|
104 defined in it. Also, unless the global `lawrencium_define_mappings` is set to |
3a0f7bb6ea64
Hgstatus window improvements and bug fixes:
Ludovic Chabant <ludovic@chabant.com>
parents:
20
diff
changeset
|
105 `0`, some commands are mapped to keyboard shortcuts, as detailed in the |
3a0f7bb6ea64
Hgstatus window improvements and bug fixes:
Ludovic Chabant <ludovic@chabant.com>
parents:
20
diff
changeset
|
106 following descriptions. |
3a0f7bb6ea64
Hgstatus window improvements and bug fixes:
Ludovic Chabant <ludovic@chabant.com>
parents:
20
diff
changeset
|
107 |
3a0f7bb6ea64
Hgstatus window improvements and bug fixes:
Ludovic Chabant <ludovic@chabant.com>
parents:
20
diff
changeset
|
108 |
3a0f7bb6ea64
Hgstatus window improvements and bug fixes:
Ludovic Chabant <ludovic@chabant.com>
parents:
20
diff
changeset
|
109 *:Hgstatusedit* |
3a0f7bb6ea64
Hgstatus window improvements and bug fixes:
Ludovic Chabant <ludovic@chabant.com>
parents:
20
diff
changeset
|
110 :Hgstatusedit Open the file mentioned on the current line. |
3a0f7bb6ea64
Hgstatus window improvements and bug fixes:
Ludovic Chabant <ludovic@chabant.com>
parents:
20
diff
changeset
|
111 Mapped to <cr>. |
3a0f7bb6ea64
Hgstatus window improvements and bug fixes:
Ludovic Chabant <ludovic@chabant.com>
parents:
20
diff
changeset
|
112 |
3a0f7bb6ea64
Hgstatus window improvements and bug fixes:
Ludovic Chabant <ludovic@chabant.com>
parents:
20
diff
changeset
|
113 *:Hgstatusaddremove* |
3a0f7bb6ea64
Hgstatus window improvements and bug fixes:
Ludovic Chabant <ludovic@chabant.com>
parents:
20
diff
changeset
|
114 :Hgstatusaddremove Run `hg addremove` on the file mentioned on the |
3a0f7bb6ea64
Hgstatus window improvements and bug fixes:
Ludovic Chabant <ludovic@chabant.com>
parents:
20
diff
changeset
|
115 current line, or on the lines currently selected in |
3a0f7bb6ea64
Hgstatus window improvements and bug fixes:
Ludovic Chabant <ludovic@chabant.com>
parents:
20
diff
changeset
|
116 visual selection mode (see |visual-start|). |
3a0f7bb6ea64
Hgstatus window improvements and bug fixes:
Ludovic Chabant <ludovic@chabant.com>
parents:
20
diff
changeset
|
117 Mapped to <C-A>. |
3a0f7bb6ea64
Hgstatus window improvements and bug fixes:
Ludovic Chabant <ludovic@chabant.com>
parents:
20
diff
changeset
|
118 |
3a0f7bb6ea64
Hgstatus window improvements and bug fixes:
Ludovic Chabant <ludovic@chabant.com>
parents:
20
diff
changeset
|
119 *:Hgstatusdiff* |
3a0f7bb6ea64
Hgstatus window improvements and bug fixes:
Ludovic Chabant <ludovic@chabant.com>
parents:
20
diff
changeset
|
120 :Hgstatusdiff Open a diff window on the file mentioned on the |
3a0f7bb6ea64
Hgstatus window improvements and bug fixes:
Ludovic Chabant <ludovic@chabant.com>
parents:
20
diff
changeset
|
121 current line, between the working directory version |
3a0f7bb6ea64
Hgstatus window improvements and bug fixes:
Ludovic Chabant <ludovic@chabant.com>
parents:
20
diff
changeset
|
122 and the parent revision version. Similar to running |
3a0f7bb6ea64
Hgstatus window improvements and bug fixes:
Ludovic Chabant <ludovic@chabant.com>
parents:
20
diff
changeset
|
123 |:Hgdiff| on that file. |
3a0f7bb6ea64
Hgstatus window improvements and bug fixes:
Ludovic Chabant <ludovic@chabant.com>
parents:
20
diff
changeset
|
124 Mapped to <C-D>. |
3a0f7bb6ea64
Hgstatus window improvements and bug fixes:
Ludovic Chabant <ludovic@chabant.com>
parents:
20
diff
changeset
|
125 |
3a0f7bb6ea64
Hgstatus window improvements and bug fixes:
Ludovic Chabant <ludovic@chabant.com>
parents:
20
diff
changeset
|
126 *:Hgstatusvdiff* |
3a0f7bb6ea64
Hgstatus window improvements and bug fixes:
Ludovic Chabant <ludovic@chabant.com>
parents:
20
diff
changeset
|
127 :Hgstatusvdiff Similar to |:Hgstatusdiff|, but use a vertical split. |
3a0f7bb6ea64
Hgstatus window improvements and bug fixes:
Ludovic Chabant <ludovic@chabant.com>
parents:
20
diff
changeset
|
128 Similar to running |:Hgvdiff| on that file. |
3a0f7bb6ea64
Hgstatus window improvements and bug fixes:
Ludovic Chabant <ludovic@chabant.com>
parents:
20
diff
changeset
|
129 Mapped to <C-V>. |
3a0f7bb6ea64
Hgstatus window improvements and bug fixes:
Ludovic Chabant <ludovic@chabant.com>
parents:
20
diff
changeset
|
130 |
34
cfc15ff67aaf
Updated documentation.
Ludovic Chabant <ludovic@chabant.com>
parents:
31
diff
changeset
|
131 *:Hgstatuscommit* |
cfc15ff67aaf
Updated documentation.
Ludovic Chabant <ludovic@chabant.com>
parents:
31
diff
changeset
|
132 :Hgstatuscommit Runs |:Hgcommit| on the files currently mentioned in |
cfc15ff67aaf
Updated documentation.
Ludovic Chabant <ludovic@chabant.com>
parents:
31
diff
changeset
|
133 the buffer, or in the current selection. The first |
cfc15ff67aaf
Updated documentation.
Ludovic Chabant <ludovic@chabant.com>
parents:
31
diff
changeset
|
134 option means you can delete lines from the buffer |
cfc15ff67aaf
Updated documentation.
Ludovic Chabant <ludovic@chabant.com>
parents:
31
diff
changeset
|
135 until the remaining filenames are those you want to |
cfc15ff67aaf
Updated documentation.
Ludovic Chabant <ludovic@chabant.com>
parents:
31
diff
changeset
|
136 commit. |
cfc15ff67aaf
Updated documentation.
Ludovic Chabant <ludovic@chabant.com>
parents:
31
diff
changeset
|
137 Mapped to <C-S>. |
cfc15ff67aaf
Updated documentation.
Ludovic Chabant <ludovic@chabant.com>
parents:
31
diff
changeset
|
138 |
cfc15ff67aaf
Updated documentation.
Ludovic Chabant <ludovic@chabant.com>
parents:
31
diff
changeset
|
139 *:Hgstatusvcommit* |
cfc15ff67aaf
Updated documentation.
Ludovic Chabant <ludovic@chabant.com>
parents:
31
diff
changeset
|
140 :Hgstatusvcommit Similar to |:Hgstatuscommit|, but use a vertical |
cfc15ff67aaf
Updated documentation.
Ludovic Chabant <ludovic@chabant.com>
parents:
31
diff
changeset
|
141 split, as with |:Hgvcommit|. |
cfc15ff67aaf
Updated documentation.
Ludovic Chabant <ludovic@chabant.com>
parents:
31
diff
changeset
|
142 Not mapped byd default. |
cfc15ff67aaf
Updated documentation.
Ludovic Chabant <ludovic@chabant.com>
parents:
31
diff
changeset
|
143 |
31
3a0f7bb6ea64
Hgstatus window improvements and bug fixes:
Ludovic Chabant <ludovic@chabant.com>
parents:
20
diff
changeset
|
144 *:Hgstatusrefresh* |
3a0f7bb6ea64
Hgstatus window improvements and bug fixes:
Ludovic Chabant <ludovic@chabant.com>
parents:
20
diff
changeset
|
145 :Hgstatusrefresh Refreshes the status window by running `hg status` |
3a0f7bb6ea64
Hgstatus window improvements and bug fixes:
Ludovic Chabant <ludovic@chabant.com>
parents:
20
diff
changeset
|
146 again. |
3a0f7bb6ea64
Hgstatus window improvements and bug fixes:
Ludovic Chabant <ludovic@chabant.com>
parents:
20
diff
changeset
|
147 Mapped to <C-R>. |
3a0f7bb6ea64
Hgstatus window improvements and bug fixes:
Ludovic Chabant <ludovic@chabant.com>
parents:
20
diff
changeset
|
148 |
40
a63ec818ab21
Added `qnew` and `qrefresh` commands to the `Hgstatus` window.
Ludovic Chabant <ludovic@chabant.com>
parents:
38
diff
changeset
|
149 *:Hgstatusqnew* |
a63ec818ab21
Added `qnew` and `qrefresh` commands to the `Hgstatus` window.
Ludovic Chabant <ludovic@chabant.com>
parents:
38
diff
changeset
|
150 :Hgstatusqnew {patch} {message}. |
a63ec818ab21
Added `qnew` and `qrefresh` commands to the `Hgstatus` window.
Ludovic Chabant <ludovic@chabant.com>
parents:
38
diff
changeset
|
151 If you have the 'mq' extension enabled, creates a new |
a63ec818ab21
Added `qnew` and `qrefresh` commands to the `Hgstatus` window.
Ludovic Chabant <ludovic@chabant.com>
parents:
38
diff
changeset
|
152 patch with the file currently mentioned in the buffer, |
a63ec818ab21
Added `qnew` and `qrefresh` commands to the `Hgstatus` window.
Ludovic Chabant <ludovic@chabant.com>
parents:
38
diff
changeset
|
153 or in the current selection. You must give a patch name, |
a63ec818ab21
Added `qnew` and `qrefresh` commands to the `Hgstatus` window.
Ludovic Chabant <ludovic@chabant.com>
parents:
38
diff
changeset
|
154 and may optionally write a commit message for the patch |
a63ec818ab21
Added `qnew` and `qrefresh` commands to the `Hgstatus` window.
Ludovic Chabant <ludovic@chabant.com>
parents:
38
diff
changeset
|
155 (without surrounding quotes). |
a63ec818ab21
Added `qnew` and `qrefresh` commands to the `Hgstatus` window.
Ludovic Chabant <ludovic@chabant.com>
parents:
38
diff
changeset
|
156 |
a63ec818ab21
Added `qnew` and `qrefresh` commands to the `Hgstatus` window.
Ludovic Chabant <ludovic@chabant.com>
parents:
38
diff
changeset
|
157 *:Hgstatusqrefresh* |
a63ec818ab21
Added `qnew` and `qrefresh` commands to the `Hgstatus` window.
Ludovic Chabant <ludovic@chabant.com>
parents:
38
diff
changeset
|
158 :Hgstatusqrefresh If you have the 'mq' extension enabled, refreshes the |
a63ec818ab21
Added `qnew` and `qrefresh` commands to the `Hgstatus` window.
Ludovic Chabant <ludovic@chabant.com>
parents:
38
diff
changeset
|
159 current patch with the files currently mentioned in the |
a63ec818ab21
Added `qnew` and `qrefresh` commands to the `Hgstatus` window.
Ludovic Chabant <ludovic@chabant.com>
parents:
38
diff
changeset
|
160 buffer, or in the current selection. |
a63ec818ab21
Added `qnew` and `qrefresh` commands to the `Hgstatus` window.
Ludovic Chabant <ludovic@chabant.com>
parents:
38
diff
changeset
|
161 |
31
3a0f7bb6ea64
Hgstatus window improvements and bug fixes:
Ludovic Chabant <ludovic@chabant.com>
parents:
20
diff
changeset
|
162 *lawrencium-status-mappings* |
3a0f7bb6ea64
Hgstatus window improvements and bug fixes:
Ludovic Chabant <ludovic@chabant.com>
parents:
20
diff
changeset
|
163 A few other mappings are available in the status window: |
3a0f7bb6ea64
Hgstatus window improvements and bug fixes:
Ludovic Chabant <ludovic@chabant.com>
parents:
20
diff
changeset
|
164 |
3a0f7bb6ea64
Hgstatus window improvements and bug fixes:
Ludovic Chabant <ludovic@chabant.com>
parents:
20
diff
changeset
|
165 <C-N> Jump to the next filename. |
3a0f7bb6ea64
Hgstatus window improvements and bug fixes:
Ludovic Chabant <ludovic@chabant.com>
parents:
20
diff
changeset
|
166 <C-P> Jump to the previous filename. |
3a0f7bb6ea64
Hgstatus window improvements and bug fixes:
Ludovic Chabant <ludovic@chabant.com>
parents:
20
diff
changeset
|
167 q Quit the status window. |
3a0f7bb6ea64
Hgstatus window improvements and bug fixes:
Ludovic Chabant <ludovic@chabant.com>
parents:
20
diff
changeset
|
168 |
0 | 169 |
170 vim:tw=78:et:ft=help:norl: |