AspenWeb / simplate.vim

Simplate support for Vim
simplates.org
Other
6 stars 1 forks source link

Python sections are syntax highlighted but not indented #2

Open chadwhitacre opened 12 years ago

chadwhitacre commented 12 years ago

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

if foo:
bar

Instead of:

if foo:
    bar
patcoll commented 12 years ago

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 commented 12 years ago

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 commented 10 years ago

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

pjz commented 10 years ago

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