-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
server: reload on vim swap file update #1160
Comments
You can create a file named |
@ehuss Thanks for tip. I do have I'll try to see if I can do documentation update PR sometime this week. |
The serve and watch commands use .gitignore file in book root directory to read exclude patterns used when watching for changed files. A .gitignore from parent directory or user home is not used though. Add documentation of this behaviour to both commands.
Mention that .gitignore is used for watch excludes (#1160)
The documentation has been updated to make it easier to learn about how excludes work. |
The serve and watch commands use .gitignore file in book root directory to read exclude patterns used when watching for changed files. A .gitignore from parent directory or user home is not used though. Add documentation of this behaviour to both commands.
Mention that .gitignore is used for watch excludes (rust-lang#1160)
I am using
vim
to edit files whilemdbook server is running
. Every timevim
updates it swap file I get page reload.Swap file updates are happening even without file save, about every 30 seconds if there was some activity in the file. Constant reloads in
mdbook serve
is quite annoying, especially when editing long page and each reload jumps to the top.I think
mdbook watch
will have same issue, but since files are opened from filesystem and there is no websocket connection to trigger page reload on change, it is not as noticeable.I've looked for ways to pass list of exclude patterns either on command line or through
book.toml
, but there seems to be no option for that.Version:
mdbook v0.3.5
mdbook serve
logThe log is pruned to show only lines with detected file changes for better illustration of rebuild frequency. In reality, every
Files changed
line is followed by book build and websocket accepting new connection on tcp (page reload).From list of changed files it can be seen that
mdbook
updates built data due to swap change about 5x more frequently than actual number of file changes.The text was updated successfully, but these errors were encountered: