Difference between revisions of "User:Thisoldman"

From ArchWiki
Jump to: navigation, search
m (How to write good)
(Sandboxing)
Line 1: Line 1:
== How to write good ==
+
==Sandbox==
# Correct spelling is esential.
+
==CODELINE template==
# Verbs always has to agree with their subjects.
+
===Repeating commands===
# Avoid run-on sentences they are hard to read.
+
 
# About those fragments.
+
If a command is prefixed by a number, then that command will be executed that number of times over (there are exceptions, but they still make sense, like the {{Codeline|'s'}} command). For example, pressing {{Codeline|'3i'}} then {{Codeline|'Help! '}} then {{Codeline|'ESC'}} will print {{Codeline|'Help! Help! Help!'}}. Pressing {{Codeline|'2}⁣'}} will advance you two paragraphs. This comes in handy with the next few commands…
# Remember to not ever split an infinitive.
+
 
# Parentheses are (usually) not necessary.
+
===Deleting===
# Do not end a sentence with a preposition. This is something the reader will not put up with.
+
 
# Use the apostrophe in it's proper place and omit it when its not needed.
+
The <span style="background-color:#e8e9f3;">{{Codeline|'x'}}</span> command will delete the character under the cursor. <span style="background-color:#e8e9f3;">{{Codeline|'X'}}</span> will delete the character before the cursor. This is where those number functions get fun. <span style="background-color:#e8e9f3;">{{Codeline|'6x'}}</span> will delete 6 characters. Pressing <span style="background-color:#e8e9f3;">{{Codeline|'.'}}</span> (dot) will repeat the previous command. So, lets say you have the word "foobar" in a few places, but after thinking about it, you’d like to see just “foo”. Move the cursor under the "b", hit <span style="background-color:#e8e9f3;">{{Codeline|'3'⁣'x'}}</span>, move to the next "foobar" and hit <span style="background-color:#e8e9f3;">{{Codeline|'.'}}</span> (dot).
# The passive voice is to be avoided.
+
 
# Proofread your writing to see if you any words out.
+
The {{Codeline|'d'}} will tell vim that you want to delete something. After pressing {{Codeline|'d'}}, you need to tell vim what to delete. Here you can use the movement commands. {{Codeline|'dW'}} will delete up to the next word. {{Codeline|'d^'}} will delete up unto the beginning of the line. Prefacing the delete command with a number works well too: {{Codeline|'3dW'}} will delete the next three words. {{Codeline|'D'}} (uppercase) is a shortcut to delete until the end of the line (basically {{Codeline|'d$'}}). Pressing {{Codeline|'dd'}} will delete the whole line.
 +
 
 +
To delete then replace the current word, place the cursor on the word and execute the command {{Codeline|'cw'}}. This will delete the word and change to insert mode. To replace only a single letter use {{Codeline|'r'}}.
 +
 
 +
==KEYPRESS template==
 +
===Repeating commands===
 +
 
 +
If a command is prefixed by a number, then that command will be executed that number of times over (there are exceptions, but they still make sense, like the {{Keypress|s}} command). For example, pressing {{Keypress|3}}{{Keypress|i}} then “Help! ” then {{Keypress|ESC}} will print “Help! Help! Help!“. Pressing {{Keypress|2}}{{Keypress|<nowiki>}</nowiki>}} will advance you two paragraphs. This comes in handy with the next few commands…
 +
===Deleting===
 +
 
 +
The {{Keypress|x}} command will delete the character under the cursor. {{Keypress|X}} will delete the character before the cursor. This is where those number functions get fun. {{Keypress|6}}{{Keypress|x}} will delete 6 characters. Pressing {{Keypress|.}} (dot) will repeat the previous command. So, lets say you have the word "foobar" in a few places, but after thinking about it, you’d like to see just “foo”. Move the cursor under the "b", hit {{Keypress|3}}{{Keypress|x}}, move to the next "foobar" and hit {{Keypress|.}} (dot).
 +
 
 +
The {{Keypress|d}} will tell vim that you want to delete something. After pressing {{Keypress|d}}, you need to tell vim what to delete. Here you can use the movement commands. {{Keypress|d}}{{Keypress|W}} will delete up to the next word. {{Keypress|d}}{{Keypress|^}} will delete up unto the beginning of the line. Prefacing the delete command with a number works well too: {{Keypress|3}}{{Keypress|d}}{{Keypress|W}} will delete the next three words. {{Keypress|D}} (uppercase) is a shortcut to delete until the end of the line (basically {{Keypress|d}}{{Keypress|$}}). Pressing {{Keypress|d}}{{Keypress|d}} will delete the whole line.
 +
 
 +

Revision as of 17:02, 23 October 2011

Sandbox

CODELINE template

Repeating commands

If a command is prefixed by a number, then that command will be executed that number of times over (there are exceptions, but they still make sense, like the Template:Codeline command). For example, pressing Template:Codeline then Template:Codeline then Template:Codeline will print Template:Codeline. Pressing Template:Codeline will advance you two paragraphs. This comes in handy with the next few commands…

Deleting

The Template:Codeline command will delete the character under the cursor. Template:Codeline will delete the character before the cursor. This is where those number functions get fun. Template:Codeline will delete 6 characters. Pressing Template:Codeline (dot) will repeat the previous command. So, lets say you have the word "foobar" in a few places, but after thinking about it, you’d like to see just “foo”. Move the cursor under the "b", hit Template:Codeline, move to the next "foobar" and hit Template:Codeline (dot).

The Template:Codeline will tell vim that you want to delete something. After pressing Template:Codeline, you need to tell vim what to delete. Here you can use the movement commands. Template:Codeline will delete up to the next word. Template:Codeline will delete up unto the beginning of the line. Prefacing the delete command with a number works well too: Template:Codeline will delete the next three words. Template:Codeline (uppercase) is a shortcut to delete until the end of the line (basically Template:Codeline). Pressing Template:Codeline will delete the whole line.

To delete then replace the current word, place the cursor on the word and execute the command Template:Codeline. This will delete the word and change to insert mode. To replace only a single letter use Template:Codeline.

KEYPRESS template

Repeating commands

If a command is prefixed by a number, then that command will be executed that number of times over (there are exceptions, but they still make sense, like the Template:Keypress command). For example, pressing Template:KeypressTemplate:Keypress then “Help! ” then Template:Keypress will print “Help! Help! Help!“. Pressing Template:KeypressTemplate:Keypress will advance you two paragraphs. This comes in handy with the next few commands…

Deleting

The Template:Keypress command will delete the character under the cursor. Template:Keypress will delete the character before the cursor. This is where those number functions get fun. Template:KeypressTemplate:Keypress will delete 6 characters. Pressing Template:Keypress (dot) will repeat the previous command. So, lets say you have the word "foobar" in a few places, but after thinking about it, you’d like to see just “foo”. Move the cursor under the "b", hit Template:KeypressTemplate:Keypress, move to the next "foobar" and hit Template:Keypress (dot).

The Template:Keypress will tell vim that you want to delete something. After pressing Template:Keypress, you need to tell vim what to delete. Here you can use the movement commands. Template:KeypressTemplate:Keypress will delete up to the next word. Template:KeypressTemplate:Keypress will delete up unto the beginning of the line. Prefacing the delete command with a number works well too: Template:KeypressTemplate:KeypressTemplate:Keypress will delete the next three words. Template:Keypress (uppercase) is a shortcut to delete until the end of the line (basically Template:KeypressTemplate:Keypress). Pressing Template:KeypressTemplate:Keypress will delete the whole line.