- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
does anyone know if it is possible to create a keyboard shortcut like CRTL+SHF+L for propcase?
I am looking to create a keyboard shortcut: CRTL+SHFT+P to convert text into propcase instead of typing it in.
Just like how CTRL+SHIFT+L convert all the text into lower case.
thanks
KC
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
I don't see anything in the Enhanced Editor commands that looks likely for Propcase.
And I can see why not as there are some folks that use varaiables like AgeAtArrest, or PaymentDate. Propcase would not know in the case of compound words like that to leave alone or create as shown.
One of the things that I actually use Excel for is to turn file layout documentation into SAS Input, Format and Label statements as often the documentation comes as a table that can be copied and Pasted into Excel. I add a column with the desired variable name (if needed) and then can use an Excel formula to create cells with string values like:
varname = "Text from the description column"
That I can copy into the editor as a Label entry.
The description column could be modified using the Excel propcase.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
It would help to know what editor you are using.
You can certainly create abbreviations for propcase, or perhaps modify the keys menu.
Paige Miller
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
I am using the enhanced editor. I am not looking to create an abbreviation for propcase. I want to create a keybord shortcut which transforms the select text to propcase. If I copy my la my labels from a word.doc file into SAS instead of manually updating them I would like to be able to select the text and press CTL+SHT+alphaKey to have the text converted to propcase just like CTL+SHT+L does when it allows the user to convert the selected text in lower case.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
The PROPCASE SAS language function is only available when you run SAS code, and it applies only to SAS data. So I don't think you can create a shortcut that would apply this to the text of your SAS program - that functionality would have to be added to the enhanced editor. Given the editor has been a legacy, maintenance-only product for many years I can't see this happening.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
In the enhanced editor, you can create an abbreviation, so for example whenever you type PR or any other string you want (lower or upper case, it doesn't matter) and press ENTER, the string propcase appears in your code.
Paige Miller
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
I don't see anything in the Enhanced Editor commands that looks likely for Propcase.
And I can see why not as there are some folks that use varaiables like AgeAtArrest, or PaymentDate. Propcase would not know in the case of compound words like that to leave alone or create as shown.
One of the things that I actually use Excel for is to turn file layout documentation into SAS Input, Format and Label statements as often the documentation comes as a table that can be copied and Pasted into Excel. I add a column with the desired variable name (if needed) and then can use an Excel formula to create cells with string values like:
varname = "Text from the description column"
That I can copy into the editor as a Label entry.
The description column could be modified using the Excel propcase.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Thank you everyone.
Too bad this functionality doesn't exist. I will move the text file to excel, update them in excel and then do a SAS import.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hello @Kc2,
You can create a keyboard macro in the Enhanced Editor that comes very close to this functionality (difference: not selected text, but the next word is converted to mixed case):
- From the main menu select Tools --> Keyboard Macros --> Macros...
- Press the "Create..." button.
- Enter a suitable keyboard macro name and description and put together the commands shown in the screenshot below from the list of "Commands" (after selecting the respective "Categories" or category "All"). When finished, confirm with OK.
- Press the "Assign keys..." button.
- Click into the field "Press new shortcut key" and press the desired shortcut key (e.g. Alt+P). Make sure that it is "Currently assigned to: None." Confirm with OK.
@Kc2 wrote:
If I copy ... my labels from a word.doc file into SAS ...
Then another option would be to perform the conversion in Word: select the text to be converted and press Shift+(up to three times F3).