| 1 | *vim-common-history* |
|---|
| 2 | |
|---|
| 3 | |
|---|
| 4 | Local History |
|---|
| 5 | ************* |
|---|
| 6 | |
|---|
| 7 | When editing files, vim provides great undo support. However, the |
|---|
| 8 | undo information is lost when you close a file or utilize one of the |
|---|
| 9 | few eclim features that require a reload of the current file. |
|---|
| 10 | |
|---|
| 11 | Eclipse provides a nice feature which can help combat both of these |
|---|
| 12 | deficiencies. It includes support for a local history, which is |
|---|
| 13 | basically a simplistic version control system that is updated every |
|---|
| 14 | time you save a file. Using this local history, you can view diffs |
|---|
| 15 | against previously saved versions of your file or revert to one of |
|---|
| 16 | those revisions. |
|---|
| 17 | |
|---|
| 18 | By default, as long as eclimd is running, any writes you make to a |
|---|
| 19 | file inside of a project will automatically be saved as a local |
|---|
| 20 | history revision. |
|---|
| 21 | |
|---|
| 22 | *:History* |
|---|
| 23 | |
|---|
| 24 | :History - Opens a temporary buffer showing the local history for the |
|---|
| 25 | current file. In this buffer you can perform the following actions |
|---|
| 26 | using the specified key bindings: |
|---|
| 27 | |
|---|
| 28 | - v - view the contents of the revision under the cursor. |
|---|
| 29 | |
|---|
| 30 | - d - diff the revision under the cursor against the current contents. |
|---|
| 31 | |
|---|
| 32 | - r - revert the current file to the revision under the cursor. |
|---|
| 33 | |
|---|
| 34 | - c - clear the local history for the file. |
|---|
| 35 | |
|---|
| 36 | |
|---|
| 37 | Configuration |
|---|
| 38 | ============= |
|---|
| 39 | |
|---|
| 40 | Eclipse Settings |
|---|
| 41 | |
|---|
| 42 | - When writing to the local history, eclim simply proxies the request |
|---|
| 43 | to eclipse, so all eclipse settings are honored. To modify these |
|---|
| 44 | settings you currently have to do so inside of the eclipse gui. |
|---|
| 45 | First shut down eclimd if you are running a headless version, then |
|---|
| 46 | open the eclipse gui and navigate to: |
|---|
| 47 | |
|---|
| 48 | > |
|---|
| 49 | Window > Preferences > General > Workspace > Local History |
|---|
| 50 | |
|---|
| 51 | < |
|---|
| 52 | |
|---|
| 53 | And there you can edit your settings as necessary. |
|---|
| 54 | |
|---|
| 55 | Vim Settings |
|---|
| 56 | |
|---|
| 57 | *g:EclimHistoryDiffOrientation* |
|---|
| 58 | |
|---|
| 59 | - g:EclimHistoryDiffOrientation (Default: 'vertical') - When |
|---|
| 60 | initiating diffs, this setting controls whether the diff window is |
|---|
| 61 | opened as a horizontal split or vertical. Supported values include |
|---|
| 62 | 'horizontal' and 'vertical'. |
|---|
| 63 | |
|---|
| 64 | vim:ft=eclimhelp |
|---|