3

I'm using Geany 1.23.1 on Lubuntu 13.10.

I've copied over filetypes.markdown from /usr/share/geany to ~/.config/geany/filedefs.

filetypes.markdown has the following content:

# For complete documentation of this file, please see Geany's main documentation
[styling]
# Edit these in the colorscheme .conf file instead
default=default
strong=string_3
emphasis=string_4
header1=keyword_1
header2=keyword_1
header3=keyword_1
header4=keyword_1
header5=keyword_1
header6=keyword_1
ulist_item=tag_unknown
olist_item=tag_unknown
blockquote=tag_unknown
strikeout=tag_unknown
hrule=tag_unknown
link=keyword_1
code=attribute_unknown
codebk=attribute_unknown

[settings]
# default extension used when saving files
extension=mkd

# sort tags by appearance
symbol_list_sort_mode=1

Why is the third line present: # Edit these in the colorscheme .conf file instead?

What is wrong with editing filetypes.markdown itself? I would think that, at least from a user's perspective, editing ~/.config/geany/filedefs/filetypes.markdown (or any other filetypes file) would be preferable to editing a .conf file (in ~/.config/geany/colorschemes) as suggested because editing a .conf file would affect all filetypes not just filetype.markdown.

  • Total guess but is it one of those situations where the filetypes.markdown can be managed by a package, and customizations are kept in a separate file? – slm Oct 30 '13 at 03:59
  • I've just begun getting used to using Geany. I try to read the manual for help first but I couldn't get my doubt cleared up. Just as an example, we use ` and ` to enclose inline code in markdown. The original `filetype.markdown` has "code=attribute_unknown". Then I look at the appropriate `.conf` in `~/.config/geany/colorschemes` (Dark Solarized theme for geany: http://ethanschoonover.com/solarized) and see "attribute_unknown=attribute,bold" and "attribute=keyword_1" and "keyword_1=keyword" and "keyword=#0086b3;;true". –  Oct 30 '13 at 04:35
  • @slm My point is that if I edit the theme's .conf to change "keyword=#0086b3;;true" to something else, all other file types, html, css, js, py, will have the changed keyword. Whereas, I can simply edit `filetypes.markdown` in my home and not affect any other file type's appearance. Which I why I'm trying to understand the comment line I referred to in my question. _Editing filetypes.markdown doesn't seem to break anything so far._ –  Oct 30 '13 at 04:39

1 Answers1

1

The filetypes.* configuration are overriding styling rules defined in colorschemes files.

In your personal filetypes.* configuration, if you use a common named_style (they are in [named_styles] section of colorschemes files), you override this style and when you change colorscheme, you may have unexpected results.

If you create a personal named_style, you override nothing but you have to add it in each colorschemes to ensure that the visual result is compatible with it.

See Geany's documentation

freezed
  • 196
  • 9