Properties naming: what casing do you use/should i use?

I have a question which may lead to bikeshedding as it’s opinion-based. Nevertheless, here it goes.

I would like to know what case do you use for your properties?

  • lowercase
  • CamelCase
  • Title case
  • snake_case
  • something else entirely

How did i come to this question: I wanted to rename all properties to Title case (where only the first letter is capital, while all others are lowercase) because i thought it looks a little better, and I just found out that aliases cannot be renamed via the UI.

As i tried to manually rename to Title case for a few notes, I can say that using Aliases instead of aliases still searches through the list of aliases.

So to me it looks like it’s just in the All properties view where i cannot do the rename.

  1. Is this limitation on purpose? Will something really break if i rename all my aliases to Aliases?
  2. What style do you use, and why?
  3. Other thoughts you may have on this subject.

Thank you.

The aliases key is one of the 3 “default” keys Obsidian provides :blush: (along with tags and cssclasses) and I’m not sure if or to what extend they can really be manipulated.
(They can’t be deleted at least)

Concerning your the rest of your question, I’ve come to use, over time, lowercase and camelCase (although I also sometimes use acronyms/abbreviations :sweat_smile:) for the name of my keys :blush:

As a long time Templater user, having to name constants/variables in my templates, I kind of naturally came to use camelCase because I somewhat had readability issues (for some reasons :woman_shrugging: ) with snake_case and kebab-case and I found that both _ and - were taking too much unnecessary space (as I couldn’t resist to use very descriptive constant/variable names :innocent: )… which was also true for me when it comes to keys in Properties :blush: .

The second reason is that having used Dataview for some time, I discovered “special characters” in key names needed to be handled in a specific way which I didn’t want to have to remember (as I can be very lazy :innocent: :sweat_smile: ).
And this is still true for Obsidian’s bases :blush: … but were I think Dataview was forgiving when it comes to spaces in key names (I don’t remember exactly), Obsidian’s bases aren’t so you need to use something like: note["My Key"] instead of a plain myKey

Now, I’ve got to say that how you name your keys is up to you :blush:
I mean, there’s no right or wrong here :smile: !

I’m just a lazy Obsidian user who enjoy “short-ish” key names in Properties :smile:

1 Like