Sublime Forum

Inserting oft repeated words

#1

I’m sure that this sort of query has been asked, but I enter the words “currently out of stock” on the website every other day and wonder what is the “quick/smart way” to do this?

Can I create a keyboard shortcut to enter these same words?

Many thanks,
Daniel.

0 Likes

#2

You can do something like this:

	{ "keys": "ctrl+k","o","o","s"], "command": "insert_snippet", "args": {"contents": "currently out of stock"}}

once you pressed the ctrl+k just type “oos” to print the contents at cursor location…

or

	{"keys": "ctrl+shift+o","ctrl+shift+o","ctrl+shift+s"], "command": "insert_snippet", "args": {"contents": "currently out of stock"}}

in this case you have to type “oos” while pressing ctrl+shift…

just add it to your User Key Bindings file…

You could also do something like

	{ "keys": "o","o","s"], "command": "insert_snippet", "args": {"contents": "currently out of stock"}}

but it will trigger every time you type the “oos” key sequence so it will trigger also when typing words like “boost”, that’s why the other suggestions include ctrl or shift keys.

hope it helps

0 Likes

#3

Thank you,

I went for the third option & am trying not to use the word “boost” in any descriptive text,
this has solved my problem and already saved lots of time!

0 Likes