This repository was archived by the owner on Oct 6, 2024. It is now read-only.
Conversation
Do pathfinding in a subprocess which runs a "server" within a stripped-down, plugin-free Vim. This increases the speed of pathfinding significantly. It also leaves the user's cursor alone, and doesn't block - so they may continue working. This is necessary to implement #12. The client is responsible for launching and connecting to the server. The server will shut down it's Vim process when the client disconnects. The server starts using a custom vimrc (serverrc.vim), which disables unnecessary features like syntax highlighting and other plugins. pathfinder.vim checks for the existance of a g:pf_server_communiation_file variable (which the client sets using --cmd), if that exists it starts in server mode, otherwise it starts in client mode. Communication between the client (user's Vim) and server (subprocess Vim) happens with a temporary file and multiprocessing.connection classes. The current buffer contents, g:pf_motions setting, scrolloff setting, start and target positions and the window size are transferred to the server before each pathfinding request. The window size is restored using &lines and &columns, meaning the surrounding windows don't need to be transferred.
Pathfinding runs when... - The cursor has not moved for a configurable (g:pf_autorun_delay) time (default 2 seconds) > End position is the current cursor position - An edit (x,rx,p etc.) was made in normal mode > End position is the position just before the edit - Switching modes from normal, visual or visual-line > End position is the position just before switching modes The start position is wherever the cursor was after... - The pathfinder last ran - Switching window or tab - Opening a file or an empty buffer - Loading a session
Must have accidentally deleted this
If Vim has +popupwin (available in 8.2), use that to display the full output in a box at the bottom of the screen. Otherwise, display a single-line compact form using echo. (Having only one line prevents a "press enter" prompt from appearing.)
This causes the history from the user's Vim to be deleted.
Increase the time the popup is shown for when it has a lot of lines, so that it doesn't disappear too fast for the user to read it. Suggestion: make this configurable.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
README.mdwith new informationCloses #12