yanni4night / sublime-custominsert

A sublime 2 /3 plugin that can easily insert custom content.
MIT License
2 stars 0 forks source link

Cursors #6

Open Kcko opened 9 years ago

Kcko commented 9 years ago

It would be great, if i can set placeholders for some position and when i hit TAB -> i get to this placeholder position.

In short, I would like to have the same functionality as sublime snippet in default.

eg: My snippet for commenting some code ...

//($0 - RJ, {%datetime%})$1

1) I insert this custom insert via context or key shortcut 2) Hit the tab, cursor moved to $0 (I wrote something) 3) Hit the tab again, cursor moved to $1 ..and I continue writing

is it understandable? It would be great :+1:

Kcko commented 9 years ago

No answer? :-)

yanni4night commented 9 years ago

@Kcko You mean that we could overwrite TAB by moving curosr.But when and where should we do it? I think it will bring confusion.

Kcko commented 9 years ago

Do you know how to workssnippets in ST2? You set the placeholder and jumping on them by using TAB.

I would also like this plugin. For example. my snippet<- RJ,% {datetime}%> After insertion, I have to manually go back to the beginning and add a comment If it was like this <$ 0 - RJ,% datetime% {}> $ 1 So I was at the cursor position 0, I wrote a comment and other TAB I got to the end and continued writing code

It has been understood?

yanni4night commented 9 years ago

It seems that snippet cannot contain dynamic variables except some native environment variables.

Still working on it.