Thread: Bracket select

  1. #1
    Registered User
    Join Date
    Oct 2007
    Posts
    166

    Bracket select

    Hey, simple question...is there a way in Visual Studio 2005 to select text between brackets? Like these
    Code:
    {}
    I searched the web some time ago but only found some wierd keycombination that I could not reproduce.:P

  2. #2
    and the hat of sweating
    Join Date
    Aug 2007
    Location
    Toronto, ON
    Posts
    3,545
    Actually those are braces.
    Code:
    () = parentheses, [] = brackets, {} = braces
    Anyways, what exactly are you trying to do?
    How do you want to select the text? You mean in the editor or programatically...?

  3. #3
    Registered User
    Join Date
    Jan 2005
    Posts
    7,366
    I don't know of any.

    Ctrl-} allows you to move the cursor between them, but I don't know any way to select that text.

  4. #4
    Registered User
    Join Date
    Apr 2006
    Posts
    2,149
    Quote Originally Posted by Daved View Post
    I don't know of any.

    Ctrl-} allows you to move the cursor between them, but I don't know any way to select that text.
    It's probably shift-Ctrl-} then.
    It is too clear and so it is hard to see.
    A dunce once searched for fire with a lighted lantern.
    Had he known what fire was,
    He could have cooked his rice much sooner.

  5. #5
    and the hat of sweating
    Join Date
    Aug 2007
    Location
    Toronto, ON
    Posts
    3,545
    Quote Originally Posted by King Mir View Post
    It's probably shift-Ctrl-} then.
    You're right, I just tried it on VC++ 2005.
    I don't know how often I'd need to use it though.

  6. #6
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Quote Originally Posted by King Mir View Post
    It's probably shift-Ctrl-} then.
    And now the question is how to do that on a non-english keyboard. Hmmm.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  7. #7
    Registered User
    Join Date
    Oct 2007
    Posts
    166
    Hey sorry for the delay, thanks for the replies!
    I am using a swedish keyboard and the } sign is at Alt Gr-0 on that. Is it not like that on an english keyboard? I can't get Ctrl-} or Shift-Ctrl-} working in any way...

  8. #8
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Quote Originally Posted by DrSnuggles View Post
    I am using a swedish keyboard and the } sign is at Alt Gr-0 on that.
    Same here. It's not working for me either >_<

    Is it not like that on an english keyboard?
    I believe it's loose somewhere on an english keyboard?

    I can't get Ctrl-} or Shift-Ctrl-} working in any way...
    I feel your pain...
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  9. #9
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    AFAIK, those are only the default key mappings. You should be able to remap to whatever you like.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  10. #10
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    So does anyone know what it's actually called? I didn't find it during a fast search through the Edit menu where most such things lie.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  11. #11
    and the hat of sweating
    Join Date
    Aug 2007
    Location
    Toronto, ON
    Posts
    3,545
    Quote Originally Posted by Salem View Post
    AFAIK, those are only the default key mappings. You should be able to remap to whatever you like.
    Or you could just install an English keyboard.

  12. #12
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Gods no. How horrible :/
    English keyboards are horrible. Keys and things being everywhere they shouldn't be.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  13. #13
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    > English keyboards are horrible. Keys and things being everywhere they shouldn't be.
    When I worked in Finland, I bought a UK keyboard with me because the native keyboards are just too weird
    Spanish keyboards are nearly as bad, but I wasn't there for very long.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  14. #14
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    It just goes to show that don't use a keyboard other than your native keyboard
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  15. #15
    Registered User
    Join Date
    Jan 2005
    Posts
    7,366
    >> It's probably shift-Ctrl-} then.
    I can't believe I never tried that. Thanks.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. temperature sensors
    By danko in forum C Programming
    Replies: 22
    Last Post: 07-10-2007, 07:26 PM
  2. brace-enclosed error
    By jdc18 in forum C++ Programming
    Replies: 53
    Last Post: 05-03-2007, 05:49 PM
  3. Directional Keys - Useing in Console
    By RoD in forum C++ Programming
    Replies: 38
    Last Post: 10-06-2002, 04:42 PM
  4. FAQ: Directional Keys - Useing in Console
    By RoD in forum FAQ Board
    Replies: 38
    Last Post: 10-06-2002, 04:42 PM