How to setup SciTE auto-closing of quotes, brackets, parens etc.

preview_player
Показать описание
In this video I walk through how to set up SciTE auto-closing quotes, curly braces, brackets, and parens. SciTE4AutoHotkey is a great AHK editor, this just makes it even better! Having SciTE automatically open & close your quotes, braces, Parens, etc. is a really handy way to level-up your coding!

Learning how to use an AutoHotkey IDE will greatly improve your coding speed!

Рекомендации по теме
Комментарии
Автор

Great tip. It worked perfectly as demonstrated. Thanks, Joe

JeanLalondeMontreal
Автор

Very interesting but Not working for me!

СергейДрузь-ьж
Автор

Thank you very much Joe!

Since I had some difficulties myself, just like Jeff Main mentioned, I would like to offer some guidance regarding potential problems.

First:




The "UserLuaScript.lua" file is also in that same folder. In this file what worked for me was the following content:

-- UserLuaScript.lua
--

-- This file contains user-defined Lua functions
-- You are encouraged to add your own custom functions here!
-- ***AutoClose Begin***
--~

--~
EventClass:BeginEvents() -- Start up the events (Calls onstartup()).
-- ***AutoClose END

rafxel
Автор

Somethings not right here. Of course the copy code on the linked website shows '***AutoClose Begin***' while the video shows '---***AutoClose Begin***' as a comment. Scite still doesn't auto close these characters. Do I need to change SciteUserHome to my scite directory???

JeffMain
Автор

As the link for lua_files is broken I will post an alternate solution.
On Scite, goto Options -> Open Lua Startup Script
And copy the next code:

local Braces={['[']=']', ['\'']='\'', ['{']='}', ['(']=')', ['"']='"'}
OnChar=function(c)
c=Braces[c]
if c and editor.Focus then editor:insert(-1, c) end
end

diegoj
Автор

Hello Joe.. I am trying to paste these lines -
--***AutoClose Begin***




EventClass:BeginEvents() -- Start up the events (Calls onstartup()).
-- ***AutoClose END




into UserLuaScript.lua But it is not letting me paste there. Infect I am unable to write anything in UserLuaScript.lua. When i open this file it shows me this warning-


please help..
Thanks..

manojaggarwal