Skip to content

Commit

Permalink
Merge pull request #186 from curlpipe/0.7.4
Browse files Browse the repository at this point in the history
0.7.4
  • Loading branch information
curlpipe authored Dec 6, 2024
2 parents 8aa69a6 + 9ba7451 commit 8a2b313
Show file tree
Hide file tree
Showing 31 changed files with 2,230 additions and 625 deletions.
37 changes: 15 additions & 22 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ members = [

[package]
name = "ox"
version = "0.7.3"
version = "0.7.4"
edition = "2021"
authors = ["Curlpipe <[email protected]>"]
description = "A simple but flexible text editor."
Expand Down
15 changes: 10 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@
The simple but flexible text editor
<br><br>
<div align="center" style="display:inline;">
<img src="https://i.postimg.cc/zXB5y0r3/ox-blank.gif" width="49%">
<img src="https://i.postimg.cc/pVkRV33g/ox-code.gif" width="49%">
<img src="/assets/showcase.gif?raw=true" width="100%">
</div>
<br>
</p>


![Build Status](https://img.shields.io/github/forks/curlpipe/ox.svg?style=for-the-badge)
![Build Status](https://img.shields.io/github/stars/curlpipe/ox.svg?style=for-the-badge)
![License](https://img.shields.io/github/license/curlpipe/ox.svg?style=for-the-badge)
Expand All @@ -28,7 +28,7 @@ Ox is an independent text editor that can be used to write everything from text
If you're looking for a text editor that...
1. :feather: Is lightweight and efficient
2. :wrench: Can be configured to your heart's content
3. :package: Has useful features out of the box
3. :package: Has useful features out of the box and a library of plug-ins for everything else

...then Ox is right up your street

Expand All @@ -46,8 +46,12 @@ It works best on linux, but macOS and Windows are also supported.

### Strong configurability

- :electric_plug: Plug-In system where you can write your own plug-ins or integrate other people's
- :wrench: A wide number of options for configuration with everything from colours to the status line to syntax highlighting being open to customisation
- :electric_plug: Plug-In system where you can write your own plug-ins or choose from pre-existing ones
- 💬 Discord RPC
- 📗 Git integration with diffs, stats and more
- 🕸️ Handy web development tools such as Emmet and live HTML viewer
- ⏲️ Productivity tools such as a pomodoro timer and todo list tracker
- :wrench: A wide number of options for configuration including colours, key bindings and behaviours
- :moon: Ox uses Lua as a configuration language for familiarity when scripting and configuring
- :handshake: A configuration assistant to quickly get Ox set up for you from the get-go

Expand All @@ -62,6 +66,7 @@ It works best on linux, but macOS and Windows are also supported.
- :writing_hand: Convenient shortcuts when writing code
- :crossed_swords: Multi-editing features such as multiple cursors and recordable macros
- :window: Splits to view multiple documents on the same screen at the same time
- :file_cabinet: File tree to view, open, create, delete, copy and move files

### Robustness

Expand Down
Binary file added assets/showcase.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
39 changes: 39 additions & 0 deletions config/.oxrc
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,23 @@ event_mapping = {
editor:macro_record_stop()
editor:display_info("Macro recorded")
end,
-- Splits
["ctrl_alt_left"] = function()
editor:focus_split_left()
end,
["ctrl_alt_right"] = function()
editor:focus_split_right()
end,
["ctrl_alt_down"] = function()
editor:focus_split_down()
end,
["ctrl_alt_up"] = function()
editor:focus_split_up()
end,
-- File Tree
["ctrl_space"] = function()
editor:toggle_file_tree()
end,
}

-- Define user-defined commands
Expand Down Expand Up @@ -401,6 +418,22 @@ colors.error_bg = {41, 41, 61}
colors.selection_fg = {255, 255, 255}
colors.selection_bg = {59, 59, 130}

colors.file_tree_bg = {41, 41, 61}
colors.file_tree_fg = {255, 255, 255}
colors.file_tree_selection_fg = {255, 255, 255}
colors.file_tree_selection_bg = {59, 59, 130}

colors.file_tree_red = {240, 104, 89}
colors.file_tree_orange = {240, 142, 89}
colors.file_tree_yellow = {240, 237, 89}
colors.file_tree_green = {89, 240, 169}
colors.file_tree_lightblue = {89, 225, 240}
colors.file_tree_darkblue = {89, 149, 240}
colors.file_tree_purple = {139, 89, 240}
colors.file_tree_pink = {215, 89, 240}
colors.file_tree_brown = {158, 94, 94}
colors.file_tree_grey = {150, 144, 201}

-- Configure Line Numbers --
line_numbers.enabled = true
line_numbers.padding_left = 1
Expand All @@ -410,6 +443,12 @@ line_numbers.padding_right = 1
terminal.mouse_enabled = true
terminal.scroll_amount = 4

-- Configure File Tree --
file_tree.width = 30
file_tree.move_focus_to_file = true
file_tree.icons = false
file_tree.language_icons = true

-- Configure Tab Line --
tab_line.enabled = true
tab_line.separators = true
Expand Down
5 changes: 4 additions & 1 deletion kaolinite/src/document/disk.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,11 @@ impl Document {
/// disk errors.
#[cfg(not(tarpaulin_include))]
pub fn open<S: Into<String>>(size: Size, file_name: S) -> Result<Self> {
// Try to find the absolute path and load it into the reader
let file_name = file_name.into();
let file = load_rope_from_reader(BufReader::new(File::open(&file_name)?));
let full_path = std::fs::canonicalize(&file_name)?;
let file = load_rope_from_reader(BufReader::new(File::open(&full_path)?));
// Find the string representation of the absolute path
let file_name = get_absolute_path(&file_name);
Ok(Self {
info: DocumentInfo {
Expand Down
Loading

0 comments on commit 8a2b313

Please sign in to comment.