Author Topic: c-paren and c_paren  (Read 3189 times)

mwb1100

  • Senior Community Member
  • Posts: 156
  • Hero Points: 13
c-paren and c_paren
« on: October 03, 2012, 07:45:22 AM »
I'm just starting to look at making some custom macros to bind to keys and was going to start with trying to add a 'surround-with' functionality to the '(' key when text is selected (I've gotten very used to this feature from Visual Assist).  Anyway, I figured I'd start with looking at what the `c-paren` command did as a starting point, since that's what the '(' key is bound to by default for C/C++.  I had a hard time finding the function in the macros provided with SE because apparently it's named `c_paren` even though the command the key is mapped to is named `c-paren`.

Are commands with dashes in the name automatically mapped to Slick-C macro functions with underscores? If I create a macro named `foo_bar` and want to bind it to a key, will using either `foo_bar` or `foo-bar` in the keyboard configuration dialog work?

hs2

  • Senior Community Member
  • Posts: 2761
  • Hero Points: 292
Re: c-paren and c_paren
« Reply #1 on: October 03, 2012, 08:16:04 AM »
Yes. Underscore(s) of SE command names are always converted to dash(es) in the public SE command dictionary.
HS2
« Last Edit: October 03, 2012, 08:18:31 AM by hs2 »