Skip to content

Instantly share code, notes, and snippets.

View base16-brushtrees-dark.lua
-- Base16 Theme: Brush Trees Dark
-- http://chriskempson.com/projects/base16/
-- Theme author: Abraham White <abelincoln.white@gmail.com>
-- 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 Jan 1, 2016
HTML lexer changes
View html.lua
-- 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
View lexertest.html
<!doctype HTML>
<meta charset="utf-8">
<style>
body {
width: 400px;
}
</style>
<style type="text/css">
body {
width: 400px;
@rgieseke
rgieseke / highlight.lua
Last active Oct 10, 2015
Textadept: highlight active buffer
View highlight.lua
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 Mar 30, 2012
ta - Command line loader for Textadept
View ta
#!/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 Mar 27, 2012
German translation for Textadept
View locale.de.conf
% 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 Aug 27, 2011
Textadept loading shell script for OS X
View ta
#!/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 Jun 18, 2011
Latex lexer with only l.* token names
View testlatex.lua
-- 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 Jan 2, 2011
Modified snapopen to use shortened filenames, requires common.display_filename.
View snapopen.lua
-- 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 Dec 19, 2010
Textadept: Ack plugin
View ack.lua
module('_m.common.ack', package.seeall)
-- load with
-- require 'common.ack'
-- in init.lua
options = '--nocolor --nogroup '
local L = _G.locale.localize
local sep = '/'
You can’t perform that action at this time.