gioele / vim-autoswap

Please Vim, stop with these swap file messages. Just switch to the correct window!
Creative Commons Zero v1.0 Universal
115 stars 25 forks source link

"Undefined variable: active_window" #6

Closed jpmorris closed 8 years ago

jpmorris commented 8 years ago

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.

gioele commented 8 years ago

Vim on Windows is not supported by vim-autoswap. If you know a way of retrieving window names and focusing them programmatically, please let me know. Or submit a patch. :)

jpmorris commented 8 years ago

Is there a way you could just disable the window swapping feature in windows (and print an error msg, or a prompt: 'are you sure you don't have this open twice?') but keep the automatic if-swap-file-is-older deletion working?

gioele commented 8 years ago

You could comment out the lines dealing with finding the active window and change the first elseif into if.