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

Syntax highlighting for example code within the header #5

Open
jacobwilliams opened this issue Mar 1, 2015 · 0 comments
Open

Syntax highlighting for example code within the header #5

jacobwilliams opened this issue Mar 1, 2015 · 0 comments

Comments

@jacobwilliams
Copy link

I was thinking a good feature would be this: to have a new block type that allows you to put sourcecode within a commented portion of the header, and still have it be syntax highlighted as though it were not commented. Here is an example:

!*****************************************************************************************
!****f* json_module/json_create_array
!
!  NAME
!    json_create_array
!
!  DESCRIPTION
!    Allocate a json_value pointer and make it an array variable.
!    The pointer should not already be allocated.
!
!  EXAMPLE
!    type(json_value),pointer :: p
!    call json_create(p,'arrayname')
!
!  SOURCE

    subroutine json_create_array(me,name)

    implicit none

    type(json_value),pointer            :: me
    character(kind=CK,len=*),intent(in) :: name

    call json_value_create(me)
    call to_array(me,name)

    end subroutine json_create_array
!*****************************************************************************************

Currently, the output looks like this

What I would like is to be able to indicate that the EXAMPLE block should be syntax highlighted, excluding the first comment character. Note that I can't put it in the source items block, because it would highlight each line as a comment. It might also be useful to be able to specify some different settings for this type of block (for example, perhaps I wouldn't want to show the line numbers for these, but I do for the main SOURCE).

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