Wikia

Vim Tips Wiki

Tt

Talk0
1,610pages on
this wiki

Template page


These templates can be used in a tip to create no-wrap code samples.

Our style is to use tt tags to display code samples within other text. For example, <tt>:echo 'An example'</tt> displays as :echo 'An example'. See the code guidelines.

The templates documented here can be used when the code sample contains spaces that might wrap. This is an alternative to using &nbsp; to replace each space within the code sample.

Usage examples

Wikitext Displays as Description
Enter {{tt|:Sample arg1 arg2}} to test. Enter :Sample arg1 arg2 to test. Where text contains no = or | characters.
Enter {{tt|1=:let myvar = 'hello'}} to test. Enter :let myvar = 'hello' to test. Where text contains one or more = but no | characters.
Enter {{ttbegin}}:let myvar = 'a=b|c/d\e'{{ttend}} to test. Enter :let myvar = 'a=b|c/d\e' to test. Where text contains any characters.
Enter {{ttnowiki|:Sample <u>arg1</u> ''arg2''}} to test. Enter :Sample <u>arg1</u> ''arg2'' to test. Where text contains no = or | characters, and interpretation as wikitext is not wanted.
Enter {{tt|:Sample <u>arg1</u> ''arg2''}} to test. Enter :Sample arg1 arg2 to test. Previous example using {{tt}} showing how wikitext is displayed.

See also

Around Wikia's network

Random Wiki