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

Folding Import/include statements #18

Closed
nirajgup opened this issue Apr 4, 2018 · 2 comments
Closed

Folding Import/include statements #18

nirajgup opened this issue Apr 4, 2018 · 2 comments

Comments

@nirajgup
Copy link

nirajgup commented Apr 4, 2018

vim-anyfold doesn't fold import/include statements currently.

We should fold #import/#include statements for java, cpp, c, python etc.
Most major IDEs currently do this.

@pseewald
Copy link
Owner

pseewald commented Apr 4, 2018

This is supported by vim-anyfold but not enabled by default. For java, cpp, c, python, the following configuration should work:

autocmd filetype java,cpp,c,python let b:anyfold_activate=1
autocmd filetype cpp,c let g:anyfold_identify_comments=1
autocmd filetype python,java let g:anyfold_identify_comments=2
let g:anyfold_fold_comments=1
let g:anyfold_comments=['comment','string','external','include']

@nirajgup
Copy link
Author

nirajgup commented Apr 5, 2018

Thanks!

The suggested configuration works. I will close the issue.

@nirajgup nirajgup closed this as completed Apr 5, 2018
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