diff options
-rw-r--r-- | core/gui.lua | 8 | ||||
-rw-r--r-- | doc/04_WorkingWithFiles.md | 2 | ||||
-rw-r--r-- | doc/06_AdeptEditing.md | 2 | ||||
-rw-r--r-- | doc/08_Preferences.md | 16 | ||||
-rw-r--r-- | properties.lua (renamed from settings.lua) | 2 |
5 files changed, 16 insertions, 14 deletions
diff --git a/core/gui.lua b/core/gui.lua index 3fd32c9b..dbbab6ce 100644 --- a/core/gui.lua +++ b/core/gui.lua @@ -208,12 +208,12 @@ end local events, events_connect = events, events.connect --- Loads the theme and settings files. +-- Loads the theme and properties files. local function load_theme_and_settings() dofile(theme) - dofile(_HOME..'/settings.lua') - if lfs.attributes(_USERHOME..'/settings.lua') then - dofile(_USERHOME..'/settings.lua') + dofile(_HOME..'/properties.lua') + if lfs.attributes(_USERHOME..'/properties.lua') then + dofile(_USERHOME..'/properties.lua') end end diff --git a/doc/04_WorkingWithFiles.md b/doc/04_WorkingWithFiles.md index 029f2e0d..764b9c0b 100644 --- a/doc/04_WorkingWithFiles.md +++ b/doc/04_WorkingWithFiles.md @@ -47,7 +47,7 @@ to tabs. If the buffer uses spaces, all indenting tabs convert to spaces.) Similarly, the "Buffer -> Indentation" menu manually sets indentation size. [language-specific modules]: 07_Modules.html#Buffer.Properties -[user settings]: 08_Preferences.html#Buffer.Settings +[user settings]: 08_Preferences.html#Buffer.Properties #### Line Endings diff --git a/doc/06_AdeptEditing.md b/doc/06_AdeptEditing.md index 518fc1bc..83e12802 100644 --- a/doc/06_AdeptEditing.md +++ b/doc/06_AdeptEditing.md @@ -82,7 +82,7 @@ Textadept curses does not support creating rectangular selections with the mouse. [`buffer.rectangular_selection_modifier`]: api/buffer.html#rectangular_selection_modifier -[settings]: 08_Preferences.html#Buffer.Settings +[settings]: 08_Preferences.html#Buffer.Properties ### Select to Matching Brace diff --git a/doc/08_Preferences.md b/doc/08_Preferences.md index 447d7ef9..2343b472 100644 --- a/doc/08_Preferences.md +++ b/doc/08_Preferences.md @@ -132,7 +132,7 @@ Learn more about snippet syntax in the [snippets LuaDoc][]. [snippets LuaDoc]: api/_M.textadept.snippets.html -## Buffer Settings +## Buffer Properties Since Textadept runs *~/.textadept/init.lua* only once on startup, it is not the appropriate place to set per-buffer properties like indentation size or @@ -140,10 +140,10 @@ view-related properties like the behaviors for scrolling and autocompletion. If you do set such properties in *~/.textadept/init.lua*, those settings only apply to the first buffer and view -- subsequent buffers and split views will not inherit those settings. Instead, put your settings in a -*~/.textadept/settings.lua* file which runs after creating a new buffer or split -view. Any settings there override Textadept's default *settings.lua* settings. -For example, to use tabs rather than spaces and have a tab size of 4 spaces by -default, your *~/.textadept/settings.lua* would contain: +*~/.textadept/properties.lua* file which runs after creating a new buffer or +split view. Any settings there override Textadept's default *properties.lua* +settings. For example, to use tabs rather than spaces and have a tab size of 4 +spaces by default, your *~/.textadept/properties.lua* would contain: buffer.tab_width = 4 buffer.use_tabs = true @@ -151,10 +151,10 @@ default, your *~/.textadept/settings.lua* would contain: (Remember that in order to have per-filetype properties, you need to have a [language-specific module][].) -Textadept's *settings.lua* is a good reference to see available properties to +Textadept's *properties.lua* is a good reference to see available properties to set. It also has many commented out properties that you can copy to your -*~/.textadept/settings.lua* and uncomment to turn on or change the value of. Use -[Adeptsense][] to view a property's documentation or read the [LuaDoc][]. +*~/.textadept/properties.lua* and uncomment to turn on or change the value of. +Use [Adeptsense][] to view a property's documentation or read the [LuaDoc][]. [language-specific module]: 07_Modules.html#Buffer.Properties [Adeptsense]: 06_AdeptEditing.html#Adeptsense diff --git a/settings.lua b/properties.lua index 5bce633e..aa317d3c 100644 --- a/settings.lua +++ b/properties.lua @@ -100,6 +100,8 @@ buffer.property['fold'] = '1' buffer.property['fold.by.indentation'] = '1' buffer.property['fold.line.comments'] = '0' buffer.fold_flags = not CURSES and c.SC_FOLDFLAG_LINEAFTER_CONTRACTED or 0 +buffer.automatic_fold = c.SC_AUTOMATICFOLD_SHOW + c.SC_AUTOMATICFOLD_CLICK + + c.SC_AUTOMATICFOLD_CHANGE -- Line Wrapping. --buffer.wrap_mode = c.SC_WRAP_WORD |