Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems with swp files #16

Closed
martin-hoger opened this issue Mar 6, 2014 · 14 comments
Closed

Problems with swp files #16

martin-hoger opened this issue Mar 6, 2014 · 14 comments

Comments

@martin-hoger
Copy link

Hi Szymon,

sometimes I used to experience that the Ctrl space didn't load my workspace and just hanged. I had to press ctrl+C, delete the workspace and create it again.
Today I have realized that the problem was caused by loading a "crached" file which had an existing swp file.

Not sure if this is something you can deal with, just wanted to let you know about the behaviour.

Best from Czech,

Martin

@szw
Copy link
Collaborator

szw commented Mar 6, 2014

Hi Martin,

Interesting! I don't use swap files at all but I think even if there is something wrong with swap files, the plugin should inform user about that, and at least it should quit gracefully or abort the action. I'll look at this in a spare moment.

BTW. I'm open to pull requests as well ;)

Best regards!

s.

@martin-hoger
Copy link
Author

Normally when opening crasched file vim show a screen with info about the file:

2014-03-06--48ac

But somehow when the file is loaded by the plugin, it just hangs. I guess it might be problem of vim not showing the screen, or something like this.

I am not so experience in vimscript, so I might not be able to debug it. But thats not a big problem, when the swp file is deleted, it works well. It doesn't happen that often, so I can live with it quite well.

BTW: Is there an advantage not sing swp files? Is vim running faster or something like this?

@szw
Copy link
Collaborator

szw commented Mar 6, 2014

Yeah, I've got it. Ideally it should ask the user with the same screen. I believe it does, but it is not displayed, because the screen is not refreshed at that moment. But this is only my guessing. I will look at the code perhaps on the weekend.

I don't like swap files for a few reasons. I've set the updatetime quite fast (a lot of plugins depends on that, for example Tagbar. Also I like my vim to be responsive, and it doesn't write anything at each CursorHold event. And the last reason is the headache you mentioned with opening the same file from multiple vim instances. For example, I like to have a project opened in my main Vim instance, then in a second terminal (tmux window) I'd like to have opened some files just temporarily (some in-place editons before commit or sth). Also with CtrlSpace I like to have tabs with files belonging to other projects (for example, to boilerplate code preview), which might be opened in other tmux sessions too.

@martin-hoger
Copy link
Author

I think you gave me good reasons to try to switch swap off. :)
Can I ask how fast your updatetime is? Just out of curiosity...

@szw
Copy link
Collaborator

szw commented Mar 6, 2014

:) Sure. Right now my updatetime is set to 200ms. You can find my whole .vimrc here: https://github.com/szw/dotfiles/blob/master/vimrc#L80

@martin-hoger
Copy link
Author

Cool, thank you!

@szw szw added the bug label Mar 18, 2014
@zackp30
Copy link

zackp30 commented Jul 3, 2014

Same issue here, looks like the screen "is there", but the menu isn't being rendered, however the key-bindings still work (e.g, pressing d a few times will delete the swap file (not recommended for obvious reasons), and the session is regained). Would be nice to see this fixed.

Awesome plugin by the way.

Thanks!

@martin-hoger
Copy link
Author

I can recommend to switch off swap. Since then no issue like this.

@zackp30
Copy link

zackp30 commented Jul 5, 2014

I would prefer to keep swap files.

@szw
Copy link
Collaborator

szw commented Jul 8, 2014

Yeap, it deserves to be solved in some elegant way. I will handle that issue soon.

@zackp30
Copy link

zackp30 commented Jul 8, 2014

Thanks! 😄

@szw szw closed this as completed in 1debd7e Jul 15, 2014
@szw
Copy link
Collaborator

szw commented Jul 15, 2014

Ok, now it should ask you if it cannot proceed with temp files.

@bodograumann
Copy link
Contributor

I have just started using ctrlspace (which is great btw.) and am now seeing this issue. Should I open a new report about it?

@cometsong
Copy link
Member

@bodograumann - yes please open a new issue with a full description of the scenario and how we can reproduce it. :)

@vim-ctrlspace vim-ctrlspace locked as resolved and limited conversation to collaborators Apr 30, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants