Skip to content

Is it possible to create "snippets"? #422

Answered by chrisant996
cglong asked this question in Q&A
Discussion options

You must be logged in to vote

Tab is typically for completion. What you're looking for is more like "replacement" not "completion". For example, completion lets you start to type the first few characters of something, press Tab, and get help completing what you started typing. E.g. cd %userpTab would complete to cd %USERPROFILE%.

Also, the specific example homeTab -> cd %USERPROFILE% probably isn't a good example for "replacement snippets". Because if you want to change to your user profile directory, you could just type ~Enter.

A better fit in a command shell would be to create an alias. Then you don't even have to manually expand it.

Create an alias with doskey home=cd %userprofile%. If you want to expand to literally

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@cglong
Comment options

Answer selected by cglong
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants