Это правда. XBrackets работает со скобками на уровне обычного текста, абстрагируясь от таких понятий, как языки программирования, и в общем-то не претендуя на стопроцентную достоверность нахождения парных скобок. Настройки для пропуска скобок после // и экранированных скобок ( \] , \{ ) сужают область абстрагирования, но опять же не связаны с понятиями языков программирования и блоков кода. Фигурные скобки { } рассматриваются плагином точно так же, как все остальные, без каких-либо дополнительных предположений о контексте их использования.se7h wrote:подобный функционал лучше всего добавить в плагин CodeFold[/url]
XBrackets plugin
- Author
- Message
-
Offline
- Posts: 1294
- Joined: Thu Nov 16, 2006 11:53 am
- Location: Kyiv, Ukraine
-
Offline
- Posts: 139
- Joined: Fri Feb 12, 2010 11:33 am
DV
Спасибо за добавления параметра hlt_bkgnd. Если можно, ещё пара вопросов:
Можно ли сделать, что бы выделение самого AkelPad "перебивало" выделение XBrackets?
Сейчас:

Хотелось бы:

Сейчас при выделении слова, двойным кликом в том числе, если выделение находится перед/после скобки, включается подсветка:


Можно ли сделать, что бы этого не происходило при выделении?

Спасибо за добавления параметра hlt_bkgnd. Если можно, ещё пара вопросов:
Можно ли сделать, что бы выделение самого AkelPad "перебивало" выделение XBrackets?
Сейчас:

Хотелось бы:

Сейчас при выделении слова, двойным кликом в том числе, если выделение находится перед/после скобки, включается подсветка:


Можно ли сделать, что бы этого не происходило при выделении?

-
Offline
- Posts: 1294
- Joined: Thu Nov 16, 2006 11:53 am
- Location: Kyiv, Ukraine
Можно сделать лучше:Deim0s wrote:Можно ли сделать, что бы выделение самого AkelPad "перебивало" выделение XBrackets?
Code: Select all
color = (background_color + highlight_color)/2По поводу второго вопроса - works as designed.
-
Offline
- Posts: 139
- Joined: Fri Feb 12, 2010 11:33 am
DV

(это как хотелось бы, но без второго вопроса пока невозможно
)
то сейчас выглядит так:

если я Вас правильно понял:

Было бы не плохо на данный момент, если можно реализовать.
Если взять вот такую ситуацию с выделением:Можно сделать лучше:

(это как хотелось бы, но без второго вопроса пока невозможно
то сейчас выглядит так:

если я Вас правильно понял:
будет выглядеть так:Т.е. наложение цветов: подсветку скобок на фоне выделенного текста.

Было бы не плохо на данный момент, если можно реализовать.
-
Offline
- Posts: 120
- Joined: Sat Jan 12, 2008 10:16 am
- Location: Shantou, China
New version of Akelpad, both 3.7.4 and 4.4.1, not work well with Xbrackets.dll.
I set custom Brackets most use in Chinese in Xbrackets.ini. When I enter a LeftBracket "(" via a IME, but I unable to get the RightBracket ")".
When I change sourcecode in Akeldll.h from precious version of Xbrackets
into
in order to test if bug with Xbrackets. But the result is Xbrakcets still unable to autoComplete bracket. That show XBrackets is OK, but Akelpad.
Following is my XBrackets.ini:
I set custom Brackets most use in Chinese in Xbrackets.ini. When I enter a LeftBracket "(" via a IME, but I unable to get the RightBracket ")".
When I change sourcecode in Akeldll.h from precious version of Xbrackets
Code: Select all
#define AKELDLL MAKE_IDENTIFIER(1, 1, 0, 1)
Code: Select all
#define AKELDLL MAKE_IDENTIFIER(1, 2, 0, 0)
Following is my XBrackets.ini:
Code: Select all
[Options]
OptionsFlags=4619
HighlightRGB=D0404000
HtmlFileExts=htm; xml; php
Comment1FileExts=cs; java; js; php
next_char_ok=.,!?:;<)]}"'>/ »’”〕〉》」』〗】)]}
prev_char_ok=([{<= «‘“〔〈《「『〖【([{
user_brpairs=«» ‘’ “” 〔〕 〈〉 《》 「」 『』 〖〗 【】 () [] {}
hlt_bothbr=1
ovr_autobr=0
sel_autobr=0
all_autobr=3
hlt_bkgnd=0
-
Offline
- Posts: 1294
- Joined: Thu Nov 16, 2006 11:53 am
- Location: Kyiv, Ukraine
Can you send me your "XBrackets.ini" via e-mail or upload it somewhere? (but not to rapidshare or similar, please!)cnnnc wrote:I set custom Brackets most use in Chinese in Xbrackets.ini. When I enter a LeftBracket "(" via a IME, but I unable to get the RightBracket ")".
Or it would be even better if you could debug Brackets plugin. (Of course, I can debug the plugin by myself, but I have absolutely no knowledge of Eastern languages). It would be wonderful to set a breakpoint in the beginning of OnEditCharPressed function and follow to the end of this function or at least to this line:
Code: Select all
nBracketType = getLeftBracketType(wch);-
Offline
- Posts: 120
- Joined: Sat Jan 12, 2008 10:16 am
- Location: Shantou, China
Open following URL and then select download:
http://cid-df3847632ddf72c3.skydrive.li ... ackets.ini
Oh, I unable to debug it!
http://cid-df3847632ddf72c3.skydrive.li ... ackets.ini
Oh, I unable to debug it!
-
Offline
- Posts: 1294
- Joined: Thu Nov 16, 2006 11:53 am
- Location: Kyiv, Ukraine
Well, it looks like a problem of IME or whatever that generates or passes a character code to be inserted in AkelPad's edit window.
When I intercept WM_CHAR inside XBrackets plugin and replace the character code with 0xFF08 (this is the code op the opening bracket you mentioned), this bracket is autocompleted by XBrackets. So the plugin seems to work correctly. So it looks the problem is somewhere between your input (when the pressed character code must be generated) and AkelEdit window which must receive the character code through WM_CHAR message. Either incorrect character code is generated or it is incorrectly passed to AkelEdit.
When I intercept WM_CHAR inside XBrackets plugin and replace the character code with 0xFF08 (this is the code op the opening bracket you mentioned), this bracket is autocompleted by XBrackets. So the plugin seems to work correctly. So it looks the problem is somewhere between your input (when the pressed character code must be generated) and AkelEdit window which must receive the character code through WM_CHAR message. Either incorrect character code is generated or it is incorrectly passed to AkelEdit.
-
Offline
- Posts: 1294
- Joined: Thu Nov 16, 2006 11:53 am
- Location: Kyiv, Ukraine
А разве WM_IME_CHAR не генерирует потом WM_CHAR? Для не-юникодных окон сказано прямо:Instructor wrote:DV
У cnnnc должно быть символ вставляется через WM_IME_CHAR.
А что с юникодными, надо гадать на кофейной гуще, полагаю.For a non-Unicode window, if the WM_IME_CHAR message includes a double-byte character and the application passes this message to DefWindowProc, the IME converts this message into two WM_CHAR messages, each containing one byte of the double-byte character.
-
Offline
- Posts: 1294
- Joined: Thu Nov 16, 2006 11:53 am
- Location: Kyiv, Ukraine
No, I did not. However I can ensure you that it works with IME in the same way as the latest version - i.e. has no special support of IME at allcnnnc wrote:Have you keep previous Version of Xbrackets about 26 Aug 2009 release?
I can upload a test version with test support of IME if you want. What uploading server would you prefer in such case?
-
Offline
- Posts: 1294
- Joined: Thu Nov 16, 2006 11:53 am
- Location: Kyiv, Ukraine
cnnnc, if you built XBrackets sources by yourself, you can try the following patch:
file XBrackets\Plugin.c, line 502
change
to
file XBrackets\Plugin.c, line 502
change
Code: Select all
if (bBracketsAutoComplete)
{
if (uMsg == WM_CHAR)
{
Code: Select all
if (bBracketsAutoComplete)
{
if ((uMsg == WM_CHAR) ||
(uMsg == WM_IME_CHAR && g_bAkelEdit && !g_bOldWindows))
{