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

A nicer way to "set path"? #5

Open
ashwinvis opened this issue Jan 23, 2020 · 0 comments
Open

A nicer way to "set path"? #5

ashwinvis opened this issue Jan 23, 2020 · 0 comments

Comments

@ashwinvis
Copy link
Contributor

ashwinvis commented Jan 23, 2020

NOTE: nothing urgent

While set path=** is great, but it can be a pain if you set it globally. It tries to look for all the files and can freeze vim. For example, in the directory /home/user:

:find<Tab>

What I do now is have a per-project /home/user/path/to/project/.vimrc which is automatically sourced by having the following in the ~/.vimrc:

if getcwd() =~# '^\(/home/user/path/to/project/\)'
  set secure exrc  "execute project / directory specific .vimrc
endif

It is risky to have exrc activated globally as it may execute arbitary scripts.

An alternative would be to:

set wildignore= ...

Although I have not yet found a good example. It requires some regex-fu to set it nicely, doesn't it?

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

1 participant