HippoEDIT homepage Welcome, Guest. Please login or register.
September 10, 2010, 09:01:32 pm
Home Help Search Login Register

+  HippoEDIT - Programmers text editor
|-+  General Category
| |-+  Feature requests and suggestions
| | |-+  Implemented (Moderators: alex, Stefan)
| | | |-+  Surround Selection on
« previous next »
Pages: [1] Print
Author Topic: Surround Selection on  (Read 330 times)
Arthur
Hero Member
*****

Karma: +1/-0
Offline Offline

Gender: Male
Posts: 600


He who is ashamed of asking is afraid of learning.


View Profile WWW
« on: August 28, 2009, 02:50:17 pm »

The setting to surround selection on " - can it be separated from others?
Or better yet to have them all separated for better/fine tuning?
I really find it useful to have ( or { or [ surrounded but find most often the " is not helping rather being annoying (e.g. when I need to modify exiting strings it introduces inadvertently at times an extra " which leads to compile time errors if I am not vigilant enough).


* SurroundSelection.png (1.27 KB, 186x19 - viewed 30 times.)
Logged
alex
Developer
Global Moderator
Hero Member
*****

Karma: +19/-2
Online Online

Gender: Male
Posts: 1336



View Profile WWW
« Reply #1 on: August 28, 2009, 03:17:15 pm »

Hello Arthur,

you can achieve this by changing:
Code:
<OpenClose>()[]{}""</OpenClose>

in corresponding spec file. Just remove "" and you are done (I assume you need to do this in basic_spec.xml).
But do not forget, that you are changing one of default schemes that can be overwritten.

Best regards,
Alex.
Logged

Stefan
Administrator
Hero Member
*****

Karma: +6/-0
Offline Offline

Posts: 684



View Profile
« Reply #2 on: October 10, 2009, 09:40:41 pm »

Just to be clear, if someone find this thread:

What Arthur describes disturbing him, is the feature "Auto-Brackets", not "Surround Selection on",
both found at "Tools > Options > Formatting > Smart Helpers".

I think "on" is the wrong word for this feature?
Wouldn't "with" be the better description?
"Surround Selection with Brackets",
(i was fooled too the first times, because i saw all that brackets there and thought "that must be that feature")


But the solution described by Alex is true for both features,
they use both the same source; <OpenClose> tag in <lang>_spec.xml


Explanation:
"Auto-Brackets" insert an closing bracket if an opening bracket is written.
"Surround Selection on" will put brackets on both sides of an selection - if opening bracket is pressed.

Brackets for this issue are defined in <lang>_spec.xml inside of <OpenClose>...</OpenClose> tags,
e.g. : <OpenClose>()[]{}''""</OpenClose>
Logged

Stefan, HippoEDIT beta tester  (HippoEDIT News On Twitter: http://twitter.com/hippoedit/)
alex
Developer
Global Moderator
Hero Member
*****

Karma: +19/-2
Online Online

Gender: Male
Posts: 1336



View Profile WWW
« Reply #3 on: October 10, 2009, 11:55:39 pm »

Surround selection on / * etc was copied from Visual Assist settings. So not me have invented this Wink
but nevertheless I have changed text to with Surround selection with
Logged

Pages: [1] Print 
« previous next »
Jump to:  


Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC