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

keep other autocmds, 'autocmd! -> autocmd' #60

Merged
merged 1 commit into from
Nov 4, 2015

Conversation

robinro
Copy link
Contributor

@robinro robinro commented Oct 18, 2015

Maybe I'm missing something that needs autocmd!, but in my setup it's not needed and will fix the bug in #47

* fixes bogado#47
* clearing autocmds is not necessary, double calls are unlikely and won't cause harm
@joe-skb7
Copy link
Contributor

joe-skb7 commented Nov 3, 2015

+1. Should be merged. It allows me to fix (with another additional patch) the issue #61.

@robinro
Copy link
Contributor Author

robinro commented Nov 4, 2015

@joe-skb7 glad this helps you!
What other patch is needed?

@joe-skb7
Copy link
Contributor

joe-skb7 commented Nov 4, 2015

@robinro Thanks for your patches! They fixed almost all issues I was suffering from. The last issue I have is described at #61.

Basically I tend to check some quick ideas quite often. To do that I'm creating new main.c file and put some code in it. I don't want to write boilerplate code each time though, so I created ~/.vim/skeleton/template.c file with boilerplate, like that:

#include <stdio.h>
#include <stdlib.h>

int main(void)
{
    return EXIT_SUCCESS;
}

And added next line into my ~/.vimrc:

au BufNewFile main.c silent! 0r ~/.vim/skeleton/template.c

Now when I'm creating new main.c file with vim, like that:

vim main.c

I have template code added to it instantaneously.

But the problem is that this trick doesn't work when file-line plugin is in use. I managed to workaround this issue with your patch plus my hacky change to the plugin. The change is described at #61 as well. I even forked this project and added 2 of your patches and my workaround: https://github.com/joe-skb7/file-line . And my workaround is here: joe-skb7@6108b56

I'm not really good with vim script language, so this hack is only thing I came up with, sorry :(
If you could find a proper solution to this issue and write production-ready patch -- I would be really happy, though :)

It would be also great if you can pull your pending changes to your forked file-line project, so everybody can use it instead of this original one (seems like it's dead in the water, probably author abandoned it).

Thanks!

UPDATE

@robinro I see your patches are merged now. Thanks @bogado !

bogado added a commit that referenced this pull request Nov 4, 2015
keep other autocmds, 'autocmd! -> autocmd'
@bogado bogado merged commit 55d2c4f into bogado:master Nov 4, 2015
@robinro
Copy link
Contributor Author

robinro commented Nov 5, 2015

@joe-skb7 sorry for closing #61 too quickly. I'll put #62 on my agenda for next week.

Thanks @bogado for merging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Breaks templates loading Breaks MRU plugin
3 participants