• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

.github/H03-May-2022-

cargo-crates/H03-May-2022-860,891662,916

src/H13-Sep-2019-1,8811,517

.gitignoreH A D13-Sep-2019356 3127

.travis.ymlH A D13-Sep-2019380 1511

Cargo.lockH A D13-Sep-201965 KiB1,4151,268

Cargo.tomlH A D13-Sep-2019282 1715

LICENSEH A D13-Sep-20191 KiB2217

README.mdH A D13-Sep-20193.6 KiB10374

README.md

1# xi-term
2
3[![Build Status](https://travis-ci.org/xi-frontend/xi-term.svg?branch=master)](https://travis-ci.org/xi-frontend/xi-term)
4
5Formerly `xi-tui`, `xi-term` is a terminal frontend for [xi](https://github.com/xi-editor/xi-editor/).
6
7It is experimental and under development, so don't expect anything magical (yet!).
8
9## Installation
10
11The frontend assumes that you have installed the
12[core editor](https://github.com/xi-editor/xi-editor)
13and is available in your PATH. The following should suffice:
14
15```bash
16git clone https://github.com/xi-editor/xi-editor
17cd xi-editor/rust
18cargo install --path .
19
20# if you want syntax highlighting, you need to install the syntect plugin:
21cd syntect-plugin
22make install
23
24# You need to add ~/.cargo/bin to your PATH
25# (this is where `cargo install` places binaries).
26# In your .bashrc (or equivalent), add `export PATH=$PATH:~/.cargo/bin`
27```
28
29Then you can clone this repository and run the frontend with
30`cargo run --release -- <your_file>`.
31`your_file` can be an existing file or any dummy name.
32
33## Logging
34
35For debugging, it can be useful to have logs.
36You can specify a location for log files `xi-term` with `-l <logfile>`.
37Two files will be written:
38
39- `<logfile>`: all the `xi-term` logs
40- `<logfile>.rpc`: the RPC messages exchanged between the core and the frontend
41
42## Screenshots
43
44![a python file](.github/python.png)
45
46![the README file](.github/README.png)
47
48## Shortcuts
49
50For now, there are only two shortcuts:
51
52- `^w` saves the current view
53- `^c` exits
54
55## Commands
56`xi-term` supports a vim-like command prompt for executing commands, accessed
57via Alt-X.
58
59Currently supported commands:
60
61| Short form | Long form | Description |
62| ---------- | --------- | ----------- |
63| q | quit | Quits xi-term |
64| s | save | Saves the current file |
65| o `filename` | open `filename` | Open `filename` for editing |
66| b | backspace | Delete the previous character and move the cursor one position back |
67| d | delete | Delete the character under the cursor |
68| bn | next-buffer | Switch to the next buffer |
69| bp | prev-buffer | Switch to the previous buffer |
70| pd | page-down | Advance the current view by one page |
71| pu | page-up | Move the current view back by one page |
72| ml | move-left | Move the cursor one position left |
73| mr | move-right | Move the cursor one position right |
74| mu | move-up | Move the cursor one line up |
75| md | move-down | Move the cursor one line down |
76| t `theme` | theme `theme-name` | Set the theme to `theme`|
77| ln | line-numbers | Toggle displaying line numbers |
78
79Future commands:
80
81| Short form | Long form | Description |
82| ---------- | --------- | ----------- |
83| c | close | Closes the current view |
84| ? `string` | search `string` | Search for `string` |
85| sl | select-left | Move the cursor one position left and update the current selection accordingly |
86| sr | select-right | Move the cursor one position right and update the current selection accordingly |
87| su | select-up | Move the cursor one line up and update the current selection accordingly |
88| sd | select-down | Move the cursor one line down and update the current selection accordingly |
89
90## Preferences
91Xi-core supports several user-configurable options through a `preferences.xiconfig` file.
92The default location for this is `$XDG_CONFIG_HOME/xi/preferences.xiconfig`, or, if
93`$XDG_CONFIG_HOME` is not set, it defaults to `$HOME/xi/preferences.xiconfig`.
94
95## Caveats
96
97### Colors
98
99If you have the `syntect` plugin installed, colors will be enabled by default, with two caveats:
100
101- you must have true colors enabled. Otherwise, some portions of text won't be displayed
102- the default theme is for dark backgrounds
103