Skip to content

Instantly share code, notes, and snippets.

@cg00001
Last active May 8, 2024 11:37
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cg00001/8f7732a88d06a40d7e5735397c817e5a to your computer and use it in GitHub Desktop.
Save cg00001/8f7732a88d06a40d7e5735397c817e5a to your computer and use it in GitHub Desktop.
Textadept sample configuration
-- Adjust the default theme's font and size.
if not CURSES then
view:set_theme('base16-irblack', {font = 'Inconsolata Condensed Medium', size = 14})
end
-- UI Size, this works in 1366x768.
ui.size = {600,742}
-- Enable word-wrapping.
view.wrap_mode = 1
view.WRAP_WORD = true
-- Always use tabs for indentation.
buffer.use_tabs = true
buffer.tab_width = 4
-- Always strip trailing spaces on save, automatically highlight the current
-- word, and use C99-style line comments in C code.
-- Highlighting all words removed.
textadept.editing.strip_trailing_space = true
textadept.editing.comment_string.ansi_c = '//'
-- Load an external module and bind a key to it.
-- 2 lines below are commented because external modules are not used.
-- local ctags = require('ctags')
-- keys.f12 = ctags.goto_tag
-- Recognize .luadoc files as Lua code.
textadept.file_types.extensions.luadoc = 'lua'
-- Change the run commands for Lua and Python
textadept.run.run_commands.lua = 'lua5.1 "%f"'
textadept.run.run_commands.python = 'python3 "%f"'
-- Don't save session, opens a clean new textadept.
textadept.session.save_on_quit = false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment