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

autoloading functions #50

Open
farisachugthai opened this issue Sep 9, 2019 · 3 comments
Open

autoloading functions #50

farisachugthai opened this issue Sep 9, 2019 · 3 comments

Comments

@farisachugthai
Copy link

Have you considered moving the functions into a file in an "autoload" dir and moving the syntax expressions into their own syntax file? Itd allow you to take advantage of the pre-existing python architecture in vim

@bfredl
Copy link
Owner

bfredl commented Sep 9, 2019

We can move the functions to "autoload" but I do not see what this has to do with "pre-existing python architecture" ?

@farisachugthai
Copy link
Author

Oh sorry. I meant, in the sense of a syntax file, you could start with

if b:loaded_syntax
  finish
endif

runtime! syntax/python.vim  syntax/python/*.vim

So you get the added highlighting groups defined in the main python syntax files.

@bfredl
Copy link
Owner

bfredl commented Sep 10, 2019

But the plugin doesn't assume that the filetype is python, it works with jupyter kernel in any language. What is defined in the plugin is highlight groups, not syntax items.

You can use g:ipy_set_ft option to automatically set the filetype of the output buffer if you want.

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