diff options
author | mitchell <70453897+667e-11@users.noreply.github.com> | 2010-06-14 18:11:45 -0400 |
---|---|---|
committer | mitchell <70453897+667e-11@users.noreply.github.com> | 2010-06-14 18:11:45 -0400 |
commit | ffbbad57c26c69f3eb9ea4f698f7a2a8873afe4a (patch) | |
tree | 351d96c19f1927092cd6afbf6c0860ce6d57a9a4 /core | |
parent | 86bd03922258db49a406b8643055b9a9ea385d1c (diff) |
Create ~/.textadept/init.lua if one does not already exist; core/init.lua
Diffstat (limited to 'core')
-rw-r--r-- | core/init.lua | 8 |
1 files changed, 8 insertions, 0 deletions
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' |