gioele / vim-autoswap Goto Github PK
View Code? Open in Web Editor NEWPlease Vim, stop with these swap file messages. Just switch to the correct window!
License: Creative Commons Zero v1.0 Universal
Please Vim, stop with these swap file messages. Just switch to the correct window!
License: Creative Commons Zero v1.0 Universal
Sometimes, vim-autoswap will open the vim instance that currently has the file buffer open when the file is no longer visible in the currently active window.
It would be nice to have an option to make the file open automatically in a new tab, so that it becomes immediately visible in the recently opened vim instance.
The plugin doesn't seem to work on konsole (kde terminal).
In cases where vim crashes and a newer swapfile exists, a readonly version of the file opens. I understand this is by design. What if I want to see the swapfile, or override the readonly version with the new one? Ideally whenever this happens I'd like 2 panes to open, one with the swapfile and one with the old version, and be able to do a side-by-side comparison and pick between them. What's the best way to achieve this?
I'm using the same vim configuration on both my personal macOS Sierra (10.12.4) laptop and on my CentOS 7 server. I have tmux running on both and let g:autoswap_detect_tmux = 1
. On CentOS if I have the file open in one vim session and I try to open it in a new pane the cursor jumps panes correctly. On my laptop if I try the same thing it instead falls back to opening a readonly version. What am I missing?
Vim-autoswap is using step 3 - "Otherwise, if swapfile is older than file itself, just get rid of it" - when I have the file open in vim in another tmux pane in the same tmux window. I am using iTerm and am ssh'd into a CentOS 7 box that is running tmux 2.2, have the title
option set in my vimrc, and have wmctrl
installed. What step might I be missing here?
I had Conway's old version of autoswap working. At some point, it stopped working properly. I would open another version of a file in a different vim session and it would give me a black screen. I could usually hit CTRL-C and bring up the file. Sometimes, though, especially, with tmux, the file would hang indefinitely and never open.
I decided to try to address this issue with this plugin. However, now the second file refuses to load at all. After doing vim <file>
, the screen goes black briefly and then spits me back out to command line.
I've got nvim 0.3.4, which I suspect might be the issue. I'm running MacOS with vim 8. Please advise.
using nvim,macos,iterm
when open file direct must ctrl+c to continue
when use fzf to open file. whole ui blocks and only to kill.
test switch this plugin, problems gone.
seems following code blocks
call system('osascript -e ''tell application "Terminal" to set frontmost of '.a:active_window.' to true''')
If vim is asked to open an already opened file at a certain line number, it will focus the editor where the file is being edited, but not at the correct line.
To reproduce:
$ printf "a\nb\nc\nd" > /tmp/foo
$ vim /tmp/foo
$ vim +4 /tmp/foo # should focus the fourth line but it will not
Hi,
I'm experiencing huge latency as vim-autoswap tries to figure out what to do with an already-open file. (As the title states, lag times are approaching 15 seconds.)
What's more, it only works in Terminal.app (not in MacVim or iTerm), but I suppose that's a separate issue (#11?).
I'm getting the following error:
Error detected while processing function AS_HandleSwapfile..AS_DetectActiveWindow:
line 8:
E121: Undefined variable: active_window
E15: Invalid expression: active_window
I'm using Vim 7.4.777, windows 7 64bit, installed without admin privileges. I installed the plugin through vundle with a known post-crash swapfile already created.
I'm on macOS and using Hyper terminal and when autoswap is activated, Terminal.app opens and the autoswap never happens.
Looking at this issue, it looks like Terminal is hardcoded in.
Although I'm unsure as to why the Apple script is necessary, as a proposed fix, you could use the environment variable TERM_PROGRAM
instead of the hardcoded Terminal
line.
When using vim it works great, Unfortunately when using neovim however, it doesn't focus on the currently open session (It detects a swap file and alerts me it's opening in read-only mode as if it can't see the other instance of neovim editing the file)
I tried working around this with set titlestring=%{expand(\"%:p:h\")}
in my vimrc, but this did not solve the issue.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.