Sublime Forum

Does ST2 have placeholders?

#1

Hi all…
I m not sure that’s the proper name, I mean the vim equivalent of <++>.
You put that anywhere you want in your code, and you can jump there with some keybindings… something like $N, but not for snippets!
thanks

0 Likes

#2

I’m not exactly sure of what you actually need, but there are bookmarks that sound about right for you: ctrl+f2 to set one, f2 and shift+f2 to navigate. One can have several bookmarks at one line, attached to selections, etc. They are not stored if you close and then reopen the file, but are stored across ST2 relaunches.
If you would actually want to navigate through some kind of fixed-form “hard” placeholders (if they are literally just a symbol sequence within the text) on every file you open, you’d probably have to make a small plugin to call the search command for that symbol sequence, and attach a key binding.

0 Likes

#3

Bookmarks are not convenient because there is no visual cue as to exactly where in the line the placeholder is. And also what you said, that they are not retainable.
The second suggestion is what I really need, but unfortunately, I don’t know how to program :frowning:
thanks anyway!

0 Likes