Sublime Forum

How do I set the default case for tags, attributes and values?

#1

How do I set the default case for tags and attributes?

I prefer to have upper case for tags, lower case for attributes. I’d like to be able to (a) have them come in that way as I type, even if I’m not actually typing them that way; and (b) set them all that way on a page where they’re not.

Is there a way to set that?

0 Likes

#2

regarding a), unfortunately there is no built in setting/preference to get ST to suggest/complete tags or attributes in anything other than lowercase
regarding b) you could type the following in ST’s console (View menu -> Show Console) (or write a plugin to do the following):

old_sel = [sel for sel in view.sel()]; view.sel().clear(); view.sel().add_all(view.find_by_selector('entity.name.tag')); view.run_command('upper_case'); view.sel().clear(); view.sel().add_all(old_sel);
0 Likes

#3

Thank you, kingkeith.

0 Likes