Vim Tips Wiki
(modify examples for moved Searching)
(Change <tt> to <code>, perhaps also minor tweak.)
 
(3 intermediate revisions by 2 users not shown)
Line 2: Line 2:
 
__NOTOC__
 
__NOTOC__
 
==Editing==
 
==Editing==
*Practice in the [[project:Sandbox|sandbox]] (try something then click "Show preview").
+
*Practice in the [[project:Sandbox|sandbox]] (try something then click "Preview").
 
*Use our [[Vim Tips Wiki:Todo|todo list]] to find a page to improve.
 
*Use our [[Vim Tips Wiki:Todo|todo list]] to find a page to improve.
 
*Click "Edit this page".
 
*Click "Edit this page".
 
*Work on the text in the edit box, or copy and edit in Vim.
 
*Work on the text in the edit box, or copy and edit in Vim.
 
*Explain your edit in the "Summary" box (e.g. "typo" or "added example").
 
*Explain your edit in the "Summary" box (e.g. "typo" or "added example").
*Click "Show preview" to check for mistakes.
+
*Click "Preview" to check for mistakes.
 
*Click "Save" (if you have an account, check you are logged on first).
 
*Click "Save" (if you have an account, check you are logged on first).
  +
  +
==Talk pages and signatures==
  +
*Do not use the talk page (aka discussion page) for a tip.
  +
*Any discussion about a tip should be in the "Comments" section at the bottom of the tip.
  +
*All old comments are eventually deleted, after any useful information is used.
  +
*You can add a comment for a user: On the user's page, click "Talk page" to open the talk page, then click "Leave message" to add a new section, or click "[edit]" at the right of an existing heading.
  +
*On other non-tip pages, you click "Discussion" to open the talk page, then click "New section" to add a new section.
  +
*Add a signature to your comment: On the last line of your comment, type a space then four tilde characters ("<code><nowiki> ~~~~</nowiki></code>"). When you click "Preview" you will see that the four tildes are replaced by your name and the current date/time on the server.
   
 
==Formatting==
 
==Formatting==
*<tt><nowiki>''italics''</nowiki></tt> displays as ''italics''.
+
*<code><nowiki>''italics''</nowiki></code> displays as ''italics''.
*<tt><nowiki>'''bold'''</nowiki></tt> displays as '''bold'''.
+
*<code><nowiki>'''bold'''</nowiki></code> displays as '''bold'''.
*"Type <tt>&lt;tt>:bd&lt;/tt></tt> to ..." displays as "Type <tt>:bd</tt> to ...".
+
*"Type <code>&lt;code>:bd&lt;/code></code> to ..." displays as "Type <code>:bd</code> to ...".
*<tt><nowiki>==Main heading==</nowiki></tt> (''not'' "Main Heading").
+
*<code><nowiki>==Main heading==</nowiki></code> (''not'' "Main Heading").
*<tt><nowiki>===This is a subheading===</nowiki></tt>
+
*<code><nowiki>===This is a subheading===</nowiki></code>
*Put <tt>:</tt> at start of a line to indent that line.
+
*Put <code>:</code> at start of a line to indent that line.
*Put <tt>*</tt> at start of a line for a bullet point (like this list).
+
*Put <code>*</code> at start of a line for a bullet point (like this list).
*Put <tt>#</tt> at start of a line for a numbered point.
+
*Put <code>#</code> at start of a line for a numbered point.
   
Use <tt><nowiki><pre>...</pre></nowiki></tt> around code blocks, with two-space indents for Vim script.
+
Use <code><nowiki><pre>...</pre></nowiki></code> around code blocks, with two-space indents for Vim script.
   
Use <tt><CR></tt> (not <tt><cr></tt> and not <tt>&amp;lt;CR&amp;gt;</tt>).
+
Use <code><CR></code> (not <code><cr></code> and not <code>&amp;lt;CR&amp;gt;</code>).
   
 
==Style guide==
 
==Style guide==
Line 29: Line 37:
 
A paragraph should be one long line, with a single blank line between paragraphs. Sentences are separated by a single space.
 
A paragraph should be one long line, with a single blank line between paragraphs. Sentences are separated by a single space.
   
Headings user lower case except for the first word and proper names. Omit redundant spaces (<tt>==See also==</tt> not <tt>== See Also ==</tt>). No&nbsp;blank line following a heading.
+
Headings user lower case except for the first word and proper names. Omit redundant spaces (<code>==See also==</code> not <code>== See Also ==</code>). No&nbsp;blank line following a heading.
   
We say "Put the following in your <tt><nowiki>[[vimrc]]</nowiki></tt>" to link to the [[vimrc]] page.
+
We say "Put the following in your <code><nowiki>[[vimrc]]</nowiki></code>" to link to the [[vimrc]] page.
   
 
==Links==
 
==Links==
Line 56: Line 64:
 
*[http://www.vim.org/scripts/ Vim scripts site]
 
*[http://www.vim.org/scripts/ Vim scripts site]
   
Using the <tt><nowiki>{{help}}</nowiki></tt> template [[Template:Help|can be tricky]]. It's probably best just to use plain text (for example, <tt>:help >></tt>) in problem cases and let [[User:JohnBeckett|someone else]] worry about the details later.
+
Using the <code><nowiki>{{help}}</nowiki></code> template [[Template:Help|can be tricky]]. It's probably best just to use plain text (for example, <code>:help >></code>) in problem cases and let [[User:JohnBeckett|someone else]] worry about the details later.
   
 
[[Category:Policy]]
 
[[Category:Policy]]

Latest revision as of 04:34, 16 July 2012

Vim Tip Guidelines
Quick reference
General guidelines
Titles and renaming a tip
Comments
Categories
Discussion page
Merging similar tips
Deleting a tip
Templates
Formatting code blocks
Entities and other magic
Script comments

Editing[]

  • Practice in the sandbox (try something then click "Preview").
  • Use our todo list to find a page to improve.
  • Click "Edit this page".
  • Work on the text in the edit box, or copy and edit in Vim.
  • Explain your edit in the "Summary" box (e.g. "typo" or "added example").
  • Click "Preview" to check for mistakes.
  • Click "Save" (if you have an account, check you are logged on first).

Talk pages and signatures[]

  • Do not use the talk page (aka discussion page) for a tip.
  • Any discussion about a tip should be in the "Comments" section at the bottom of the tip.
  • All old comments are eventually deleted, after any useful information is used.
  • You can add a comment for a user: On the user's page, click "Talk page" to open the talk page, then click "Leave message" to add a new section, or click "[edit]" at the right of an existing heading.
  • On other non-tip pages, you click "Discussion" to open the talk page, then click "New section" to add a new section.
  • Add a signature to your comment: On the last line of your comment, type a space then four tilde characters (" ~~~~"). When you click "Preview" you will see that the four tildes are replaced by your name and the current date/time on the server.

Formatting[]

  • ''italics'' displays as italics.
  • '''bold''' displays as bold.
  • "Type <code>:bd</code> to ..." displays as "Type :bd to ...".
  • ==Main heading== (not "Main Heading").
  • ===This is a subheading===
  • Put : at start of a line to indent that line.
  • Put * at start of a line for a bullet point (like this list).
  • Put # at start of a line for a numbered point.

Use <pre>...</pre> around code blocks, with two-space indents for Vim script.

Use <CR> (not <cr> and not &lt;CR&gt;).

Style guide[]

Vim's name has changed over the years. The current documentation uses "Vim" (however, we say "gvim" because the alternatives are too ugly).

A paragraph should be one long line, with a single blank line between paragraphs. Sentences are separated by a single space.

Headings user lower case except for the first word and proper names. Omit redundant spaces (==See also== not == See Also ==). No blank line following a heading.

We say "Put the following in your [[vimrc]]" to link to the vimrc page.

Links[]

External links to other web sites should only be used where the site is likely to be maintained with a significant amount of useful Vim information. No links to personal blogs (except on a user page).

List of example links:

*[[Searching]]
*[[Searching|How to search]]
*{{help|*}}
*{{script|id=1234}} maintains a history of yanks and deletes
*{{script|id=1234|text=YankRing}}
*http://www.vim.org/scripts/
*[http://www.vim.org/scripts/ Vim scripts site]

This is how the list appears:

Using the {{help}} template can be tricky. It's probably best just to use plain text (for example, :help >>) in problem cases and let someone else worry about the details later.