Skip to content

Commit

Permalink
Merge pull request #182 from curlpipe/0.7.2
Browse files Browse the repository at this point in the history
0.7.2
  • Loading branch information
curlpipe authored Nov 28, 2024
2 parents b58c3fc + 4989c08 commit 6bc2a50
Show file tree
Hide file tree
Showing 13 changed files with 1,577 additions and 486 deletions.
42 changes: 21 additions & 21 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.1"
version = "0.7.2"
edition = "2021"
authors = ["Curlpipe <[email protected]>"]
description = "A simple but flexible text editor."
Expand Down
10 changes: 3 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +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 features out of the box, including
- syntax highlighting
- undo and redo
- search and replace
- line numbers
- opening multiple files
- full mouse cursor interaction
3. :package: Has useful features out of the box

...then Ox is right up your street

Expand Down Expand Up @@ -66,6 +60,8 @@ It works best on linux, but macOS and Windows are also supported.
- :eye: UI that shows you the state of the editor and file
- :computer_mouse: You can move the cursor and select text with your mouse
- :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

### Robustness

Expand Down
40 changes: 40 additions & 0 deletions config/.oxrc
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,46 @@ commands = {
editor:reload_config()
editor:display_info("Configuration file reloaded")
end,
["split"] = function(arguments)
local file = arguments[2]
local result = false
if arguments[1] == "left" then
result = editor:open_split_left(file)
elseif arguments[1] == "right" then
result = editor:open_split_right(file)
elseif arguments[1] == "up" then
result = editor:open_split_up(file)
elseif arguments[1] == "down" then
result = editor:open_split_down(file)
elseif arguments[1] == "grow" then
result = true
local amount = tonumber(arguments[3]) or 0.15
editor:grow_split(amount, arguments[2])
elseif arguments[1] == "shrink" then
result = true
local amount = tonumber(arguments[3]) or 0.15
editor:shrink_split(amount, arguments[2])
elseif arguments[1] == "focus" then
result = true
if arguments[2] == "up" then
editor:focus_split_up()
elseif arguments[2] == "down" then
editor:focus_split_down()
elseif arguments[2] == "left" then
editor:focus_split_left()
elseif arguments[2] == "right" then
editor:focus_split_right()
else
editor:display_error("Unknown direction for split focus")
end
else
result = true
editor:display_error(tostring(arguments[1]) .. " is not a valid split command")
end
if not result then
editor:display_error("Failed to open file, please check your path")
end
end,
["macro"] = function(arguments)
if arguments[1] == "record" then
editor:macro_record_start()
Expand Down
Loading

0 comments on commit 6bc2a50

Please sign in to comment.