From ffbbad57c26c69f3eb9ea4f698f7a2a8873afe4a Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Mon, 14 Jun 2010 18:11:45 -0400 Subject: Create ~/.textadept/init.lua if one does not already exist; core/init.lua --- core/init.lua | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'core') diff --git a/core/init.lua b/core/init.lua index 39497614..055e09b7 100644 --- a/core/init.lua +++ b/core/init.lua @@ -7,6 +7,14 @@ package.path = _HOME..'/core/?.lua;'..package.path _USERHOME = os.getenv(not WIN32 and 'HOME' or 'USERPROFILE')..'/.textadept' local lfs = require 'lfs' if not lfs.attributes(_USERHOME) then lfs.mkdir(_USERHOME) end +if not lfs.attributes(_USERHOME..'/init.lua') then + local f = io.open(_USERHOME..'/init.lua', 'w') + if f then + f:write("-- 'require' your modules here\n\n") + f:write("require 'textadept' -- should be 'require'd last\n") + f:close() + end +end _LEXERPATH = _USERHOME..'/lexers/?.lua;'.._HOME..'/lexers' -- cgit v1.2.3