Sublime Forum

Ask two questions

#1

1,How to set double click label to close
2,Hijack system notepad,

HKLM\Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\notepad.exe

If the file name contains spaces, it will be wrong.
QQ%E6%88%AA%E5%9B%BE20190815121712

0 Likes

#2

I do not know. But maybe it’s not possible Close tab.
Middle click works, if that ever helps.

I am lazy to maintain reg by myself if possible so personally I just go NotepadReplacer. My default text is not ST though :smile:

It looks like NotepadReplacer just hijack the reg you provide.


After reading https://stackoverflow.com/questions/2984846/set-image-file-execution-options-will-always-open-the-named-exe-file-as-defaul, this can be a bug in ST itself for using as a debugger?

0 Likes

#3

感谢回复。
1,明白了。原生没有双击关闭标签功能。

2,我原来用notepad++,AkelPad也都是劫持notepad.exe都正常。比较方便,批处理执行reg即可。
省去单独关联txt,inf等格式。我用的是便携版,打算配置好。
拷贝一份方便拷贝到其他电脑解包即用。
可能是Sublime在获取参数时,调用的是微软默认api 是按空格分割的,
遇到空格变成2个参数。 导致这个问题。可能需要Sublime做特殊处理。
用第三方再转一下也行,感觉不如原生支持好^_^

0 Likes

#4

你這麼一說… 我感覺可能我可以嘗試給 https://github.com/jfcherng/Sublime-Portable-Tool 加個功能
把自己當作是 debugger… 直接 proxy 命令給 subl.exe

0 Likes

#5

https://github.com/jfcherng/Sublime-Portable-Tool/releases/download/v1.4.0/Sublime-Text-Portable-Tool.exe

image

sublime_text.exe 放在一起,然後使用第 5 項功能(hijack)後退出。
我自己測試路徑裡有 空格、等號 的檔案也都能打開。不想用了以後執行第 6 項功能就行了。

0 Likes

#6

测试可以。暂时先用你这个方案了,辛苦。
感觉官方要简单修正这个问题也是简单,传递的参数前后加引号也是可以的。

0 Likes

#7

1,请教下jfcherng,Sublime有没有窗口置顶功能?

2,
用了几天,有时候会有批处理执行的cmd窗口弹出。
我直接写了个exe。顺便发上来。
复制以下代码块全部内容,新建 new.txt ,粘贴保存,修改扩展名txt为rar解压即得到文件
(Hijack-notepad.bat;PreSublime.exe)。

begin 644 HijackSublime.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 notepad.exe

0 Likes

#9

谢谢!
1,基本功能,置顶都没有。:neutral_face:
2,换主程序传递参数可能更好。:+1:

0 Likes

#10

能否提供 PreSublime.exe 的源代碼(給那些想自己編譯的人使用),並允許我在 Sublime-Text-Portable-Tool.exe 嵌入 PreSublime.exe

0 Likes

#11

bin文件随便用。代码是E language,不是文本格式,国外应该没人用这个。
方法同上,存为xxx.e格式。要E language IDE才能打开。

begin 644 PreSublime.e
M0TY75$504D<9<Q$5B,T!"AES``*\M<^JH\7-N\7.`AES``(9<P`"&7,``AES
M``(9<P````$`````````!0`!`#P`````````````````````````````````
M````````````````````````!0`&``$````!`````0`'``$`````````````
M````````````````````````````````````````````&7,1%??T=609<P`!
MH,.ZOJ/%SKO%S@$9<P`!&7,``1ES``$9<P`!&7,````"`````0```#9/`'EN
M``````````````````````````````````````````````````````````L`
M``!0<F53=6)L:6UE,PL```!0<F53=6)L:6UE,P``````````````````````
M`````````````````````0````````````````````$`````````````````
M````````````````````````&7,1%=B[`%L9<P`$P,S4ZZ3*T*W%S@09<P`$
M&7,`!!ES``09<P`$&7,````#```````````````0````````````````````
M```````````````````````````````````````````````````````````9
M<Q$5YVPL5AES``/`S-/KQ<X#&7,``QES``,9<P`#&7,``QES``,9<P````0`
M````````]1C_O@H%````````````````````````````````````````````
M````````````$``!`#_O"P,$````L0````(```````(````H``$`.0```&MR
M;FQN#60P.68R,S0P.#$X-3$Q9#,Y-F8V86%F.#0T8S=E,S(U#34--PW/M<VS
MNLO0Q-:GL]:_X@```````````````!$````@>7EY(#,N='AT(&%A+G1X=`@`
M``````$),$P9`@``````````!````$UA:6X`````!`````$``00`````````
M``@````!``$$0%09`@```0D``````0,`@`L```!?QO2VK]?3L\S0\B(```#'
MZ]3:L;[7T[/,T/+6T+?%UL/2U\2CO^FS]<J\NZ^T^L+K`P```$L````(``$E
M"@`!)0L``24`````%0```",````1````!```@````0````!L:6YE```*````
M`0,`@````&D```P````$``"`````=&UP`````````````!P`````````2```
M`(X```#8````ZP```%4!``">`0``"0````-(````V`````0````K````'```
M`!(```!U````A@```*````"Y````P````#\!````````UP$``&HT````````
M````````````-ATX"``!)3<A9````````````````````#8A#0`!"OW_````
M`````````#8!&@(````@`!8!`7`)````````````````````-A<````````(
M0"$X````````````````````-ATX"``!)3<!%P```````/`_'3@*``$E-P%J
M-````````````````````#8=.`L``24W(1,````````````````````V'3@+
M``$E-QTX"``!)3HX"@`!)3<W&@(````@``$!57$*````````````````````
M-@%JL````````````````````#8A$P```````````````````#8A00``````
M`````````````#8!&A,```!<<W5B;&EM95]T97AT+F5X92``'`$``0`=.`L`
M`24W'`$``0`!&```'`$`*``!:@````#__P```````#8```#0M+6]SL2\_B`H
MH;!$.ES.TK7$SL2UM5S7P,/F7#8N='ATH;$L(+6]U]:]VKRO("AR=6XI*0`V
M`6H-```````````````=````O\G2U+CYOMW$^K7$T.C2JK>UN]C(SM+BROW6
MM0`V%P```````````0```````````````!`````#``$*#0`!"J`B&0)0(AD"
M``````$#`(`*````365S<V%G94)O>!````"]J,&BS_O/HK_RM+#,Y:&A!@``
M`'5S97(S,@L```!-97-S86=E0F]X000```!L````!``!104``44&``%%!P`!
M10`````1````)````#H````-`````0,`@````&AW;F0```\````$``"`````
M;'!497AT```2````!```@````&QP0V%P=&EO;@``#@````$#`(````!W5'EP
M90````````0``(`.````1V5T0V]M;6%N9$QI;F4^````N_&UP]:XS_*UL<>P
MP_S![M#0N[JSY<?XM<32N[CVUKC5ZR`@P_S![M#0N[JSY<?XU-K$VK3FUM"U
MQ+78UK<(````:V5R;F5L,S(/````1V5T0V]M;6%N9$QI;F5!````````````
M````````````````````````````````````````````````````&7,1%:VO
M0TH9<P`-H=>]Y:/%PKO%SCP9<P`-&7,`#1ES``T9<P`-&7,````%`````0``
M```````$````````````````````````````````````````````````````
M```````````9<Q$5V.M]1!ES``C`]<*EMZ.W\,7."!ES``@9<P`(&7,`"!ES
M``@9<P````8```````````````8`````````````````````````````````
M````````````````````````````````&7,1%6L%!ED9<P`%S,FSL[FGMM6C
M\K/7<P`%&7,`!1ES``49<P`%&7,````'`````0```+KJL.UK````````````
M`````````````````````````````````````````````"L```!%.EQ4;V]L
M7'EJ9%QH97A%:61T7%-U8FQI;64S7%!R95-U8FQI;64N97AE`@```"`````.
M``$E#P`!)6[P``1R]0`$``````0```!N=6T`<G5N````````````````````
M``#_____&7,1%<>8R/49<P`)PN"UM*/%QKO%SCL9<P`)&7,`"1ES``D9<P`)
M&7,````(`````0```!P`@.H<````````````````````````````````````
M```````````````````````````4`````0```0D``.L``(``5@```%8````9
M<Q$5$',`!QES``<```````````````````````````````````````````D`
M````````````````````````````````````````````````````````````
)````````````
`
end
1 Like

#12

最終我找到了這個 https://github.com/grumpydev/Sublime-Notepad-Replacement

v1.4.1 改為使用上述的 exe ,應該不會再彈出 cmd 了

1 Like

#13

这个可以。实现逻辑一样。

0 Likes