Commit graph

60 commits

Author SHA1 Message Date
209d631cb9
fix(ci): format 2026-02-20 20:27:55 -05:00
16f3d7bfa9 fix: cancel visual/operator-pending mode instead of closing buffer
Problem: when close() is triggered from visual or operator-pending
mode (e.g. pressing q after d in an oil buffer), the buffer closes
instead of canceling the pending operation. This happens because
keymaps without an explicit mode default to "" which covers normal,
visual, select, and operator-pending modes.

Solution: check the current mode at the top of close() and send
<Esc> to cancel the mode instead of proceeding with the close. The
check covers all visual modes (v, V, CTRL-V), select modes (s, S,
CTRL-S), and operator-pending submodes (no, nov, noV, noCTRL-V).

Based on: stevearc/oil.nvim#495
2026-02-20 16:28:26 -05:00
Muhammad Imaduddin
634049414b
fix: open files under cwd with relative name (#693) 2025-12-29 10:15:58 -08:00
Steve Walker
4c9bdf0d83
feat: copy/paste to system clipboard (#559)
* feat: copy/paste to system clipboard on macOS

* stylua

* feat: copy/paste to system clipboard on linux

* force mime type

* fix string.gsub

* vim.uv or vim.loop

* fix stylua

* support gnome directly

* support wayland

* refactor: extract clipboard actions into separate file

* fix: copy/paste in KDE

* refactor: simplify file loading

* fix: copy/paste on x11

* fix: better error message when clipboard command not found

* fix: paste on mac

* fix: pasting in Gnome

* feat: support pasting multiple files

* feat: support copying multiple files to clipboard

---------

Co-authored-by: Steve Walker <65963536+etherswangel@users.noreply.github.com>
Co-authored-by: Steven Arcangeli <stevearc@stevearc.com>
2025-03-20 08:19:18 -07:00
Steven Arcangeli
2f6ed70161 test: refactor tests to use new helper methods 2025-01-24 15:41:27 -08:00
Steven Arcangeli
57528bf9c5 feat: API to automatically open preview window after opening oil (#339) 2025-01-24 15:16:54 -08:00
David Marchante
c5f7c56644
fix: set alternate when using floating windows (#526) 2024-12-20 23:18:49 -05:00
Ezekiel Warren
60e68967e5
feat: highlight groups for hidden files (#459)
* feat: hidden highlights

* feat: OilHidden for hidden highlights instead of Comment

* fix: add the new combinatoric highlight groups

* perf: get rid of a call to is_hidden_file

* fix: tweak the default highlight group links

* fix: update function call in unit tests

---------

Co-authored-by: Steven Arcangeli <stevearc@stevearc.com>
2024-11-22 08:55:55 -08:00
Steven Arcangeli
5fa528f552 chore: refactor benchmarking to use benchmark.nvim 2024-11-21 21:39:05 -08:00
Steven Arcangeli
7d4e62942f test: add harness for measuring performance 2024-11-14 19:29:21 -08:00
Steven Arcangeli
349bca8c3e fix: process deletes in dir before moving dir 2024-08-25 20:46:46 -07:00
Steven Arcangeli
f41a0f24c0 lint: remove unused variable 2024-04-21 07:55:19 -07:00
Steven Arcangeli
a3c03e442a test: add regression test for #355 2024-04-21 07:48:03 -07:00
Steven Arcangeli
f41d7e7cd8 fix: support visual mode when preview window is open (#315) 2024-04-19 16:31:42 -04:00
Steven Arcangeli
fa3820ebf1 feat: can restore Oil progress window when minimized 2024-04-19 16:31:42 -04:00
Steven Arcangeli
a1af7a1b59 fix: diagnostic float would not open if scope=cursor (#275) 2024-01-14 12:35:35 -08:00
Steven Arcangeli
05cb8257cb fix: bug copying file multiple times 2023-11-19 23:58:40 -08:00
Steven Arcangeli
8f0bf3789f lint: fix luacheck warnings 2023-11-19 21:13:47 -08:00
Steven Arcangeli
4df43ad5f5 test: fix flaky tests 2023-11-19 21:02:06 -08:00
Steven Arcangeli
6175bd6462
feat: trash support for linux and mac (#165)
* wip: skeleton code for trash adapter

* refactor: split trash implementation for mac and linux

* fix: ensure we create the .Trash/$uid dir

* feat: code complete linux trash implementation

* doc: write up trash features

* feat: code complete mac trash implementation

* cleanup: remove previous, terrible, undocumented trash feature

* fix: always disabled trash

* feat: show original path of trashed files

* doc: add a note about calling actions directly

* fix: bugs in trash implementation

* fix: schedule_wrap in mac trash

* doc: fix typo and line wrapping

* fix: parsing of arguments to :Oil command

* doc: small documentation tweaks

* doc: fix awkward wording in the toggle_trash action

* fix: warning on Windows when delete_to_trash = true

* feat: :Oil --trash can open specific trash directories

* fix: show all trash files in device root

* fix: trash mtime should be sortable

* fix: shorten_path handles optional trailing slash

* refactor: overhaul the UI

* fix: keep trash original path vtext from stacking

* refactor: replace disable_changes with an error filter

* fix: shorten path names in home directory relative to root

* doc: small README format changes

* cleanup: remove unnecessary preserve_undo logic

* test: add a functional test for the freedesktop trash adapter

* test: more functional tests for trash

* fix: schedule a callback to avoid main loop error

* refactor: clean up mutator logic

* doc: some comments and type annotations
2023-11-05 12:40:58 -08:00
Steven Arcangeli
f72b9b2637 format: auto sort requires 2023-10-08 23:36:59 -07:00
Steven Arcangeli
25c84b6469 refactor: split parser tests into new test file 2023-09-09 19:02:38 -07:00
Steven Arcangeli
926ae067eb fix: allow converting a file to directory and vice-versa (#117)
If you rename a file to have a `/` at the end, oil will detect the
change as a delete + new directory. Similarly, if you delete the
trailing `/` from a directory, it will delete the dir and create a new
file. This should help with the case where you want to create a new file
but forgot to add the trailing `/` and now you have a file instead.
2023-09-09 18:33:47 -07:00
Steven Arcangeli
4bad15909f format: apply stylua 2023-08-25 19:02:22 -07:00
Steven Arcangeli
f86d49446a fix: data loss bug when move + delete (#162) 2023-08-25 18:56:30 -07:00
Mahlon E. Smith
ebcd720a09
fix: ssh adapter supports any system with /bin/sh (#161)
This allows support of other *nix operating systems where bash is not
universally present.
2023-08-24 09:17:54 -07:00
Steven Arcangeli
9509ae0fee fix: fix flaky test 2023-08-20 23:33:34 +00:00
Steven Arcangeli
f4819d8b43 refactor: remove cache side effects from adapter.list 2023-08-20 21:50:02 +00:00
Steven Arcangeli
4a4e0f4013 refactor: small perf win by eliminating string object keys 2023-06-25 22:44:44 -07:00
Steven Arcangeli
61f8655e03 fix: some autocmds skipped when opening files from oil (#120) 2023-06-24 23:28:57 -07:00
Steven Arcangeli
9be36a6488 fix: symbolic link target parsing fails if it has a trailing slash (#131) 2023-06-21 17:15:57 -07:00
Steven Arcangeli
a465123659 feat: oil.select can close oil buffer afterwards (#121) 2023-06-21 08:36:51 -07:00
Steven Arcangeli
a82503cd79 test: add tests for oil.select 2023-06-20 23:23:20 -07:00
Steven Arcangeli
d0efcc0c10 cleanup: remove disclaimer before saving files
Oil has been around for a few months now and there haven't been any
reports of unexpected filesystem operations.
2023-05-07 09:08:44 -07:00
Steven Arcangeli
6b05c2e913 feat: prompt user to save changes before editing moved file/dir (#93) 2023-05-07 08:07:08 -07:00
Steven Arcangeli
9871ca9737 fix: oil loses track of buffers after refresh 2023-03-29 18:43:54 -07:00
Steven Arcangeli
931453fc09 fix: oil buffers remain unmodified after saving changes 2023-03-23 21:18:46 -07:00
Steven Arcangeli
eea34329e8 refactor: extract some test utils into a shared lib 2023-03-23 21:16:16 -07:00
Steven Arcangeli
4b05ebdf20 fix: oil.close doesn't error when no other buffers exist (#79) 2023-03-20 09:25:17 -07:00
Steven Arcangeli
b8eaf88c12 fix: edge case where window options were not set 2023-03-18 15:05:59 -07:00
Steven Arcangeli
9814c8b3f1 test: fix test flakiness 2023-03-17 22:29:33 -07:00
Steven Arcangeli
d7805c7751 feat: convert oil://path/to/file.lua to normal file path (#77) 2023-03-17 21:48:38 -07:00
Steven Arcangeli
d48fa09c82 fix: oil.close() sometimes closes window too (#64) 2023-03-16 08:53:51 -07:00
Steven Arcangeli
b36ba91b7a fix: another case of incorrect alternate buffers (#60) 2023-03-06 00:14:06 -08:00
Steven Arcangeli
073ecb3d68 fix: don't close floating windows we didn't open (#64) 2023-03-04 22:32:06 -08:00
Steven Arcangeli
f1131b5e90 fix: set alternate buffer when inside oil (#60) 2023-02-24 06:24:44 -08:00
Steven Arcangeli
48eec8b7ef feat: action to open entry in new tab (#52) 2023-01-28 16:19:45 -08:00
Steven Arcangeli
47a909700d test: fix tests 2023-01-24 10:17:03 -08:00
Steven Arcangeli
4e853eabcb fix: alternate buffer preservation (#43) 2023-01-20 02:56:57 -08:00
Steven Arcangeli
31645370a1 refactor!: change scp:// urls back to oil-ssh:// 2023-01-19 00:27:09 -08:00