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

Sourcing special file on startup? #37

Open
lesguillemets opened this issue Mar 18, 2014 · 4 comments
Open

Sourcing special file on startup? #37

lesguillemets opened this issue Mar 18, 2014 · 4 comments

Comments

@lesguillemets
Copy link

Is there any default file like .vimrc that is sourced automatically on starting vim via vim-anywhere (along with .vimrc and .gvimrc)? I'm currently quite happy with editing ./bin/run, adding -c or -s options by hand, but I'd feel more comfortable if this application had such default file to write my preferences in.

One might want to source additional file on starting vim via vim-anywhere because the context it's usually used is somewhat different from usual editing with vim. As for me, I'd prefer white background because most websites have white backgrounds. One might want to set default filetype to markdown, or enable plugins designed specifically for text editing, not coding (I'm thinking of something like vim-quotable).

@cknadler
Copy link
Owner

vim-anywhere just invokes regular MacVim or GVim depending on your system. These both automatically source ~/.gvimrc and you can override your defaults to have them source whatever you'd like.

@lesguillemets
Copy link
Author

Sorry I was terribly unclear. My suggestion was to have yet another file, say .vimanywhererc, that is sourced in addition to ~/.gvimrc only when gvim is invoked by vim-anywhere. I use GVim for coding, but I usually write plain texts or markdowns when I invoke it by vim-anywhere, so I thought it might be convenient to have GVim ready for writing texts (not codes) when I press ctrl+alt+v.

To be clear:

  • Regular GVim automatically sources ~/.vimrc and ~/.gvimrc.
  • How about having GVim when activated by vim-anywhere (e.g. pressing ctrl+alt+v) source ~/.vimrc, ~/.gvimrc and .vim-anywhererc?

This is a tiny suggestion and vim-anywhere is amazing anyway. Thank you very much.

@cknadler
Copy link
Owner

No worries.

You bring up a great point. I actually have the same problem, but I'm trying to think of any way other than adding a .vim-anywhererc. Another solution would be to force the file type of the GVim instance to be text or markdown. That or allowing you to put a vim-anywhere configuration section in your .vimrc or .gvimrc and only activate it when vim-anywhere is invoked.

I'll look in to all three ideas and see what I come up with over the weekend.

Thanks! ^_^

@lesguillemets
Copy link
Author

Thanks. Your ideas seems nice.

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

No branches or pull requests

2 participants