Sunday, 15 August 2010

font lock - structural view of source code in emacs -


I have a comment on various composition levels for my code in some time, for example the following Python Code: # Level one comment for the

  list in # list: # level two comments if mod (i, 2): # level three comments print 'weird number' and: print 'even number   

I have to have different font sizes (or slightly different color) for comments of different levels, is it possible to do something like this Is the package? For example, for example, for the elisp code, I usually use comments with different title characters at different levels for ; I add , for example:

  ;;; Level 1 comments (gender level 1; level 2 comments (gender level 2; level 3 and & gt; 3 coments (gender level 3)))   

If I comment separately I can demonstrate the level using different faces, which can help me to review and understand the structures of my code. Thanks!

The face is determined by the function in the font to display the comments and strings -Virtual face-to-face . You can set that variable in its own function, which can take the indentant in the form of a quadrature for the number of semi-colon, or to select different faces.

No comments:

Post a Comment