tmsvg / pear-tree

A Vim auto-pair plugin that supports multi-character pairs, intelligent matching, and more
MIT License
392 stars 12 forks source link

Possible for PearTreeJump to search beyond current line #24

Open perks opened 5 years ago

perks commented 5 years ago

Currently the (PearJumpTree) command invokes pear_tree#GetSurroudingPair() to get positions to jump past, and it works as long as the pairs are located on the same line/ cursor is within an actual pair.

Was wondering if it would be possible to modify (or add a new) command so that if #GetSurroundPair() is empty, it could then search for the next closer and jump past it.

Ex:

foo() {
    ThisAllWorks("as Expected"); | [cursor]  //Will jump the \" and \) correctly, 
             //however will not jump out to the closing \}
}   // <-Here->