Skip to content

Saving line jumps into the jump list #661

Answered by citizenmatt
DasGandlaf asked this question in Q&A
Discussion options

You must be logged in to vote

Have you tried these mappings? We have a test that does what looks to be exactly what you're asking for 😄

fun `test mapping with updating jumplist`() {
configureByText("${c}1\n2\n3\n4\n5\n6\n7\n8\n9\n")
enterCommand(
"""
nnoremap <expr> j (v:count > 2 ? "m'" . v:count : "") . 'j'
""".trimIndent(),
)
typeText("3j" + "3j" + "<C-o>")
assertState("1\n2\n3\n${c}4\n5\n6\n7\n8\n9\n")
}

Replies: 2 comments 7 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
7 replies
@citizenmatt
Comment options

@DasGandlaf
Comment options

@DasOhmoff
Comment options

@citizenmatt
Comment options

Answer selected by DasGandlaf
@DasGandlaf
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants