Skip to content

Instantly share code, notes, and snippets.

-- Base16 Theme: Brush Trees Dark
-- http://chriskempson.com/projects/base16/
-- Theme author: Abraham White <[email protected]>
-- Template Repository: https://github.com/rgieseke/ta-themes
local buffer = buffer
local property, property_int = buffer.property, buffer.property_int
-- Base16 colors
property['color.base00'] = 0x675848
@rgieseke
rgieseke / html.lua
Last active January 1, 2016 05:38
HTML lexer changes
-- Copyright 2006-2013 Mitchell mitchell.att.foicica.com. See LICENSE.
-- HTML LPeg lexer.
local l = lexer
local token, word_match = l.token, l.word_match
local P, R, S, V = lpeg.P, lpeg.R, lpeg.S, lpeg.V
local M = {_NAME = 'html'}
case_insensitive_tags = true
<!doctype HTML>
<meta charset="utf-8">
<style>
body {
width: 400px;
}
</style>
<style type="text/css">
body {
width: 400px;
@rgieseke
rgieseke / highlight.lua
Last active October 10, 2015 16:17
Textadept: highlight active buffer
local line_number_back = buffer.style_back[33]
local current_line_back = buffer.caret_line_back
local function active()
local buffer = buffer
buffer.style_back[33] = current_line_back
buffer.set_fold_margin_colour(1, current_line_back)
buffer:set_fold_margin_hi_colour(1, current_line_back)
end
@rgieseke
rgieseke / ta
Created March 30, 2012 14:38
ta - Command line loader for Textadept
#!/bin/bash
# Put this script somewhere on your path to start or switch to Textadept from
# the command line.
if [[ "$1" == "-h" || "$1" == "--help" ]]; then
echo "ta - shell script to load Textadept.app"
echo "Example usage"
echo "ta : start or switch to Textadept"
echo "ta [file(s)] : open file(s) in Textadept"
@rgieseke
rgieseke / locale.de.conf
Created March 27, 2012 14:45
German translation for Textadept
% Copyright 2007-2012 Mitchell mitchell.att.foicica.com. See LICENSE.
%
% Localization file.
% The localized strings may contain UTF-8 characters, but not UTF-16 or UTF-32.
% The latter must be converted manually from the \U+xxxx format. Note that if
% you use the \ddd repesentation of characters, it must be in DECIMAL format,
% not Octal.
%
% Each line contains a "message = localized string" pair. The message should not
% be localized. Extra spaces around '=' are ignored.
@rgieseke
rgieseke / ta
Created August 27, 2011 17:38
Textadept loading shell script for OS X
#!/bin/bash
if [[ "$1" == "-h" || "$1" == "--help" ]]; then
echo "ta - shell script to load Textadept.app"
echo "Example usage"
echo "ta : start or switch to Textadept"
echo "ta [file(s)] : open file(s) in Textadept"
echo "ta -u [folder] : opens a new Textadept instance with the given user home"
echo "ta -n [session] : opens a new Textadept instance with the given session"
elif [ "${1:0:1}" == "-" ]; then
@rgieseke
rgieseke / testlatex.lua
Created June 18, 2011 11:12
Latex lexer with only l.* token names
-- Copyright 2006-2011 Mitchell mitchell<att>caladbolg.net. See LICENSE.
-- Modified by Robert Gieseke.
-- LaTeX LPeg lexer.
local l = lexer
local token, style, color, word_match = l.token, l.style, l.color, l.word_match
local P, R, S = l.lpeg.P, l.lpeg.R, l.lpeg.S
local table = _G.table
module(...)
@rgieseke
rgieseke / snapopen.lua
Created January 2, 2011 13:56
Modified snapopen to use shortened filenames, requires common.display_filename.
-- Copyright 2007-2011 Mitchell mitchell<att>caladbolg.net. See LICENSE.
-- Modified to use shortened filenames
local L = _G.locale.localize
---
-- Snapopen for the textadept module.
module('_m.textadept.snapopen', package.seeall)
if WIN32 then
@rgieseke
rgieseke / ack.lua
Created December 19, 2010 10:01
Textadept: Ack plugin
module('_m.common.ack', package.seeall)
-- load with
-- require 'common.ack'
-- in init.lua
options = '--nocolor --nogroup '
local L = _G.locale.localize
local sep = '/'