|
| 1 | +vim-autoswap.txt |
| 2 | + |
| 3 | +================================================================================ |
| 4 | +CONTENTS *vim-autoswap-contents* |
| 5 | + |
| 6 | +1. vim-autoswap........................................|vim-autoswap-vim-autoswap| |
| 7 | + 1.1. Why autoswap?................................|vim-autoswap-why_autoswap?| |
| 8 | + 1.2. Limitations....................................|vim-autoswap-limitations| |
| 9 | + 1.3. Installation..................................|vim-autoswap-installation| |
| 10 | + 1.4. Authors............................................|vim-autoswap-authors| |
| 11 | + 1.5. Development....................................|vim-autoswap-development| |
| 12 | + 1.6. License............................................|vim-autoswap-license| |
| 13 | + |
| 14 | +================================================================================ |
| 15 | +VIM-AUTOSWAP *vim-autoswap-vim-autoswap* |
| 16 | + |
| 17 | +Please Vim, stop with these swap file messages. Just switch to the correct window! |
| 18 | + |
| 19 | +-------------------------------------------------------------------------------- |
| 20 | +WHY AUTOSWAP? *vim-autoswap-why_autoswap?* |
| 21 | + |
| 22 | +Dealing with swap files is annoying. Most of the time you have to deal with |
| 23 | +a swap file because you either have the same file open in another |
| 24 | +window or it is a swap file left there by a previous crash. |
| 25 | + |
| 26 | +This plugin does for you what you would do in these cases: |
| 27 | + |
| 28 | +1. Is file already open in another Vim session in some other window? |
| 29 | +2. If so, swap to the window where we are editing that file. |
| 30 | +3. Otherwise, if swapfile is older than file itself, just get rid of it. |
| 31 | +4. Otherwise, open file read-only so we can have a look at it and may save it. |
| 32 | + |
| 33 | +Damian Conway presented this plugin at OSCON 2013 in his talk |
| 34 | +"More instantly better Vim (http://programming.oreilly.com/2013/10/more-instantly-better-vim.html)". |
| 35 | + |
| 36 | +The original version of this plugin (only for MacOS) is available at http://is.gd/IBV2013, |
| 37 | +together with other plugins presented in the same talk. This version has |
| 38 | +been modified to work also on Linux systems. Both Vim and GVim are supported. |
| 39 | + |
| 40 | +-------------------------------------------------------------------------------- |
| 41 | +LIMITATIONS *vim-autoswap-limitations* |
| 42 | + |
| 43 | +At the moment this plugin does not reliably detect files open within tabs in |
| 44 | +Apple Terminal and iTerm2 as it matches based on the window name, not tab name. |
| 45 | + |
| 46 | +-------------------------------------------------------------------------------- |
| 47 | +INSTALLATION *vim-autoswap-installation* |
| 48 | + |
| 49 | +Copy the `autoswap.vim` file in your `~/.vim/plugin` directory. |
| 50 | + |
| 51 | +Or use pathogen and just clone the git repository: |
| 52 | +> |
| 53 | + $ cd ~/.vim/bundle |
| 54 | + $ git clone https://github.com/gioele/vim-autoswap.git |
| 55 | +< |
| 56 | + |
| 57 | +Make sure that the `title` option is enabled and the `titlestring` |
| 58 | +variable contains the filename and the string `VIM` (the default |
| 59 | +`titlestring` will work just fine). To enable the `title` option |
| 60 | +set it in your `~/.vimrc` file: |
| 61 | +> |
| 62 | + $ echo 'set title titlestring=' >> ~/.vimrc |
| 63 | +< |
| 64 | + |
| 65 | +Linux users: you must install `wmctrl` to be able to automatically |
| 66 | +switch to the Vim window with the open file. |
| 67 | +`wmctrl` is already packaged for most distributions. |
| 68 | + |
| 69 | +KDE/Konsole users: in addition to `wmctrl` you must install also |
| 70 | +the `vim-konsole` (https://github.com/gergap/vim-konsole) plugin. |
| 71 | + |
| 72 | +tmux users: if `tmux` is detected, autoswap can change the current |
| 73 | +pane to the one where vim is already open. `tmux` support is disabled |
| 74 | +by default. To enable support for `tmux` add |
| 75 | + to your `.vimrc`. |
| 76 | + |
| 77 | +If you use Arch Linux you can install via the `vim-autoswap-git` |
| 78 | +package in the AUR (https://aur.archlinux.org/packages/vim-autoswap-git/). |
| 79 | +The package will install this plugin and all the needed dependencies. |
| 80 | + |
| 81 | +-------------------------------------------------------------------------------- |
| 82 | +AUTHORS *vim-autoswap-authors* |
| 83 | + |
| 84 | +* Gioele Barabucci http://svario.it/gioele (made the plugin Linux-compatible, maintainer) |
| 85 | +* Damian Conway http://damian.conway.org (original author) |
| 86 | +* Greg Lutostanski (tmux support) |
| 87 | + |
| 88 | +-------------------------------------------------------------------------------- |
| 89 | +DEVELOPMENT *vim-autoswap-development* |
| 90 | + |
| 91 | +Code |
| 92 | +: http://svario.it/vim-autoswap (redirects to GitHub) |
| 93 | + |
| 94 | +Report issues |
| 95 | +: http://svario.it/vim-autoswap/issues |
| 96 | + |
| 97 | +-------------------------------------------------------------------------------- |
| 98 | +LICENSE *vim-autoswap-license* |
| 99 | + |
| 100 | +This is free software released into the public domain (CC0 license). |
| 101 | + |
| 102 | +See the `COPYING.CC0` file or http://creativecommons.org/publicdomain/zero/1.0/ |
| 103 | +for more details. |
| 104 | + |
| 105 | + vim:tw=78:ts=8:ft=help:norl: |
0 commit comments