Add visual whitespace indicators to diff and staging views#5553
Open
themactep wants to merge 1 commit intojesseduffield:masterfrom
Open
Add visual whitespace indicators to diff and staging views#5553themactep wants to merge 1 commit intojesseduffield:masterfrom
themactep wants to merge 1 commit intojesseduffield:masterfrom
Conversation
Toggle with `<c-v>` to render spaces as middle dots (·) and tabs as right arrows (→) in diffs, staging, patch building, and merge conflict views. Configurable via `gui.showWhitespace`.
Author
|
and here's how it works |
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Toggle with
<c-v>to render spaces as middle dots (·) and tabs as right arrows (→ followed by dashes to fill the tab stop) in diffs, staging, patch building, and merge conflict views.Config
gui.showWhitespace(defaultfalse) — enable permanentlykeybinding.universal.toggleShowWhitespace(default<c-v>)Implementation
pkg/utils/show_whitespace.go— ANSI-aware whitespace character replacementpkg/gui/view_helpers.go— string-based view filteringpkg/gui/tasks_adapter.go— PTY/streaming writer filterpkg/gui/controllers/toggle_show_whitespace_action.go— toggle actionpkg/gui/context/patch_explorer_context.go— patch explorerpkg/gui/context/merge_conflicts_context.go— merge conflictspkg/gui/controllers/helpers/staging_helper.go— staging viewspkg/gui/controllers/helpers/patch_building_helper.go— patch buildingpkg/gui/controllers/local_commits_controller.go— custom patch panelvendor/github.com/jesseduffield/gocui/view.go— lineWrap recognizes·as break pointpkg/utils/lines.go— WrapViewLinesToWidth recognizes·as break pointMarkers render with ANSI faint (
\x1b[2m) for subtle appearance.