Skip to content
gabdub edited this page Aug 1, 2022 · 12 revisions

Features:

  • Allow to group files in projects

  • Use a simple text format. See proj_data.lua

  • The project can be shown using a buffer or a toolbar panel (requires compiling / download from releases and set USE_LISTS_PANEL= true)

    • In buffer mode: One view is used to show the project files as a vertical list (read only)
    • In panel mode: The project files are shown in a vertical panel
  • Double click opens the file

  • Current and open files are highlighted in the tree

  • Main and context submenus to create new projects and add files to the project (the current file, all open files or all files from a directory)

  • [F4] enter/exit project edit mode

  • Search in project files results can be shown using a buffer or a toolbar panel (requires compiling / download from releases and set USE_RESULTS_PANEL= true_)

    • In buffer mode: the results are shown in another view with highlight (read only)
    • In panel mode: the results are shown in an horizontal panel
  • Recent project list

  • CTAG file search (add a text file to the project and mark it as a CTAG file) (use the RUN command to update the file)

  • RUN commands from the project (add a command to the project an run it with a double click or enter)

  • RUN command parameter %{projfiles} is replaced with a temporary filename that includes the list of all project files

  • RUN command parameter %{projfiles.ext1.ext2...} only project files with the given extensions are included

  • Select more than one file or command to open/run several at once (only in "buffer mode")

  • Trim trailing spaces (Edit menu)

  • VCS: version control systems

  • 3 options: SVN, GIT and FOLDER

  • multiple repositories per project

  • compare file to HEAD (SVN/GIT) / remote folder (FOLDER) Ctrl + [F5]

  • show file info ("svn info" / "git show" / file compare) Shift + [F5]

  • control panel (GIT:status/pull/add/commit/push, SVN:info/status/add/commit, FOLDER:update/publish) Alt + [F5]

VCS control

The module adds the following key bindings:

  • F4: (in project view) Toggle project mode (edit / select)
  • F4: (in a regular file) Go to project view (only in "buffer mode")
  • SHIFT+F4: Show/Hide project view (only in "buffer mode")
  • F5: (in project view) Refresh syntax highlighting + project folding (only in "buffer mode")
  • CTRL+F5: (in a regular file) Compare the current file to SVN/GIT HEAD/FOLDER (on / off)
  • ALT+F5: open the version control panel
  • F8: (in a regular file) Compare the file in the left panel with the file in the right panel (on / off)
  • CONTROL+, CONTROL+.: Goto previous/next compare difference
  • CONTROL+; CONTROL+:: Goto previous/next compare difference
  • CTRL+H: (in project view) Show the complete path of the file in the selected row (only in "buffer mode")
  • CTRL+SHIFT+O: Quick open project files
  • ALT+O: Open a file using the selected text or the text under the cursor / change buffer extension {c,cpp} <--> {h,hpp} / ask
  • F11: Search for the selected/current word in the project CTAG file (save current position)
  • SHIFT+F11: Navigate to previous position
  • SHIFT+F12: Navigate to next position
  • CONTROL+F11: Store current position
  • CONTROL+F12: Clear all positions
  • SHIFT+ALT+F: Search for text in all project files
  • ESC: Close search view, then, moves between project and files view (only in "buffer mode")
  • CONTROL+PgUp: Previous tab buffer
  • CONTROL+PgDn: Next tab buffer
  • ALT+PgUp: first tab buffer
  • ALT+PgDn: last tab buffer

Usage:

Unfortunately, this module depends on several other modules (such as util and actions) and the object plugs (which manage code options). The easiest way to use it is to install all the modules provided and comment or remove the unwanted parts until something breaks 😉.

At the beginning of the provided init.lua file, the following code activates "panel mode" when the toolbar object is found (textadept was compiled with USE_TA_TOOLBAR defined) and activates "buffer mode" when textadept was not recompiled:

if toolbar then
  USE_LISTS_PANEL= true   --true:show project lists in the left toolbar;   false= use a buffer
  USE_RESULTS_PANEL= true --true:show results lists in the bottom toolbar; false= use a buffer
  USE_FILE_CHOOSER= true  --true:use file chooser toolbar dialogs;         false= use TA dialogs: ui.dialogs / io.quick_open
end

This constants can be set manually to false to force "buffer mode" in one or both panels.

SELECT Mode

select mode

EDIT Mode

edit mode

File chooser dialog

When USE_FILE_CHOOSER = true, some quick open dialogs are implemented using toolbar pop-ups.

file chooser

The title of the dialogs can be drawn using native window decorations or not (useful when the selected theme is very different from the system theme).

The dialog has the following key bindings:

  • TAB/Shift+TAB: change file chooser origin: Project (Control+P), User home (Control+U), TA home (Control+T), Current file folder (Control+C), Recent files (Control+Shif+R) or File Browser (Control+F)
  • Control+O: allows to change the File browse folder
  • Control+R: reload folder without directory recursion = Click
  • Control+1: reload folder with one-level recursion = Shift+Click
  • Control+A: reload folder with full recursion = Control+Click (can be very slow)

The dialog can be opened in the desired folder using the "File" / "Tools + Quick open" menu or the following keys:

  • Control+Alt+O: open recent files (all recent files are shown)
  • Shift+Control+O: open project files (all project files are shown)
  • Control+U: open User home folder = ~/.textadept (without directory recursion by default)
  • Shift+Control+Alt+P: open Textadept home folder (without directory recursion by default)
  • Shift+Control+Alt+O: open current file folder (without directory recursion by default)
  • Shift+Alt+O: open browse folder (without directory recursion by default)

Return or double-click opens the selected file and closes the dialog. Add Shift or Control to keep the dialog open.

Project File Search

file search

see project code

Clone this wiki locally