Skip to content

Feature request: jump to next trailing white space #32

@timfeirg

Description

@timfeirg

I think at least for folks using better-whitespace, the only place where the code would actually contain trailing whitespace (and be highlighted) is the lines that they are currently working on, so I figured it could be nice if there's a command that would allow one to quickly jump to highlighted whitespace in normal mode using :GoToNextTrailingWhitespace, that way one can quickly jump to trailing whitespaces in his code, which is exactly he's bee working on.

demo

step 1

def func1():
    return 23

def func2():
    # I'm just going to write a = func1()
    # but I decide that there's something wrong with func1
    # so I'm going to go back and fix func1 before I finish this line
    # while leaving the following line a highlighted whitespace
    a =◼︎

step 2

def func1():
    # I now navigate to func1 to fix what's wrong
    # and note that func1 may be actually so far away that 
    # pressing `ctrl o` cannot take me back to func2
    return 42
    # now that func1 is fixed, I can use `:GoToNextTrailingWhitespace` to quickly jump to func2 (rather than pressing `ctrl o` for so many times
    # and continue to work with variable `a`


def func2():
    a =◼︎

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions