Code Monkey home page Code Monkey logo

textadept-projects's Introduction

textadept-projects

Provides alternative project support to the textadept editor.

Summary

The Textadept editor is cross platform and extremely fast. Although barebones, it is very extensible via lua. As I developer, I prefer an editor with speed over an editor with everything builtin. Nothing is more frustrating than to hit a character only to wait on the editor to respond. That's why I used Textadept as much as possible.

One pain point with Textadept is the project support. This module was designed to add basic project support to Textadept with these features:

  • Project list
  • Quick open
  • Goto symbol within single file
  • Cross platform (Linux / Windows, OS X should work but needs testing)

In the future, I plan to add the following:

  • Goto definition (via tag file)
  • Goto symbol with project (via tag file)
  • Build commands
  • Automatic linting

I currently use the quickopen tool on projects with over 34,000 files. It's extremely fast on my machine, but YMMV. I have not tested on any spindle drives, just SSDs.

Usage

First step is to clone this repo into your ~/.textadept/modules directory.

Next, add the below configuration to ~/.textadept/init.lua. Adapt to your environment as needed.

By default, the following key combinations are available:

  • Alt-g: Goto symbol within file (based on ctags tagging setup below)
  • Alt-o: Quick open within project
  • Alt-p: Project selector to file quick open

Sample Configuration

local M = {}
M.project = require 'project'

keys.ag = { M.project.goto_symbol }
keys.ao = { M.project.project_quickopen }
keys.ap = { M.project.selectProject }

M.project.projects = {
    Project1 = {
        types = {}, -- File extensions to include in quickopen, empty=all
        exclude = {"/.git"}, -- Folders to exclude in quickopen
        folders = { -- Folders to find files for quickopen
            "~/dev/project1"
        },
        tagging = { -- file extension based with a default
          default = "ctags --excmd=number --sort=yes  --fields=+KS-sf -f -",
          cs = "ctags --excmd=number --sort=yes  --fields=+KS-sf -f -"
        }
    },
    BigProject2 = {
        types = {"cs","css","less","htm"},
        exclude = {"/.git"},
        folders = {
            "~/dev/project2",
            "~/dev/import/random1",
            "~/dev/import/random2"
        }
    },
    TextAdeptConf = {
        build = {},
        types = {},
        exclude = {"/.git","/.hg","/docs"},
        folders = {
            "~/.textadept"
        }
    }
}

Screenshots

Goto Symbol within file Goto Symbol

Quick open file within project Quick Open

Goto Project Goto Project

textadept-projects's People

Contributors

lmbrt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

davidhealey

textadept-projects's Issues

newer textadept is incompatible

This module is out of date and is incompatible with the current textadept.

from textadept man:

Key commands and menu commands can no longer be tables. Instead they must be Lua functions. Check your ~/.textadept/init.lua and custom modules and transform any applicable key bindings or menu items. For example:

keys.ca = {func, args}       =>  keys.ca = function() func(args) end
{'Menu Item', {func, args}}  =>  {'Menu Item', function() func(args) end}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.