[TxMt] Suggestions for implementing incremental-search like functionality

Chriztian Steinmeier chriztian at steinmeier.dk
Thu Mar 13 12:47:42 UTC 2014


I edit/write/manipulate a lot of XML files and I'd like to create a simple way to use XPath for searching/selecting in the current document. Ideally, I'd open a textfield akin to the "Incremental Search" (CTRL+S) field and just write the expression, hit enter and the results would open in a "Web Preview" window.

I can get the durrent document's contents and do the XPath stuff, but I don't know how to hi-jack (if at all possible) the Incremental Search bar, or create something that worked similar.

Any clues for how to approach that?

An alternative way would be to just open a $DIALOG, asking for the XPath expression and then do the processing - but I can't see a $DIALOG command that lets me do that (read input)...

--
Chriztian


More information about the textmate mailing list