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

Python sections are syntax highlighted but not indented #2

Open
chadwhitacre opened this issue May 16, 2012 · 4 comments
Open

Python sections are syntax highlighted but not indented #2

chadwhitacre opened this issue May 16, 2012 · 4 comments

Comments

@chadwhitacre
Copy link
Contributor

Auto-indenting doesn't seem to take in Python sections. E.g., I get:

if foo:
bar

Instead of:

if foo:
    bar
@patcoll
Copy link
Contributor

patcoll commented May 16, 2012

It feels like vim only allows one indentation style per file, but I could be wrong. Need to research more. I'm thinking back to all the times I tried to edit JavaScript within a script tag in an HTML doc... It always indented with my HTML indentation settings and not my JavaScript settings. Perhaps we just standardize on expandtab with 4 spaces.

@patcoll
Copy link
Contributor

patcoll commented May 16, 2012

Regardless I'm thinking the VIM plugin will have to be structured like this:

https://github.com/kchmck/vim-coffee-script

That way we can just set filetype=aspen and all will work, with the syntax, indentation, etc concerns separated nicey nice. Will probably steal techniques from that package.

@chadwhitacre
Copy link
Contributor Author

There's lots of info, including indentation hints, on http://vim.wikia.com/wiki/Different_syntax_highlighting_within_regions_of_a_file.

@pjz
Copy link
Contributor

pjz commented Aug 1, 2014

I asked a question on Stackoverflow so maybe the crowd will know.

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

3 participants