mirror of
https://github.com/JakeStanger/ironbar.git
synced 2026-07-11 10:15:20 +01:00
[GH-ISSUE #304] Hot reload don't work when file is edited using Vim #5745
Labels
No labels
A:Build
A:CI
A:Client
A:Config
A:Core
A:Documentation
A:Documentation
A:IPC
A:Testing
A:UX/UI
blocked
BREAKING CHANGE
duplicate
good first issue
GTK4
help wanted
invalid
M:Battery
M:Battery
M:Bindmode
M:Bluetooth
M:Brightness
M:Cairo
M:Clipboard
M:Clock
M:Clock
M:Custom
M:Focused
M:Keyboard
M:Launcher
M:Menu
M:Music
M:Music
M:Music
M:Network Manager
M:Notifications
M:SysInfo
M:Tray
M:Volume
M:Workspaces
partially resolved
P:Critical
P:High
P:Low
P:Medium
pull-request
T:Bug
T:Bug
T:Core Enhancement
T:Module Enhancement
T:New Module
T:Question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
JakeStanger/ironbar#5745
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Rodrigodd on GitHub (Sep 10, 2023).
Original GitHub issue: https://github.com/JakeStanger/ironbar/issues/304
See https://github.com/notify-rs/notify/issues/247. By default, vim writes to a backupfile, that is them moved to replace the original, which actually deletes the original file, and replace it by a new one, with another inode, which makes notify-rs loose track of the file.
To Reproduce
Steps to reproduce the behavior:
sytle.cssin vim:vim ~/.config/style.css.:set nowritebackup?is on (which is by default), and write the file::w.You can use
ls -i ~/.config/style.cssbefore and after:wto verify that the inode of the file changed.Expected behavior
Hot-reload should work regardless of how the file is changed.
System information:
4e67b73Additional context
See https://github.com/notify-rs/notify/issues/247. See also https://github.com/notify-rs/notify/issues/247#issuecomment-644014318, that recommends watching the folder containing the file, instead of the file directly, and react to "remove" and "create" events.
Another workaround is to disable writebackup in vim:
:set nowritebackup.@JakeStanger commented on GitHub (Sep 10, 2023):
Thanks for reporting, that does explain why I've had issues with Vim. Watching the directory instead should be fine as a fix, since there's going to be very little activity inside there.