Difference between pages "Install/Overview" and "Package:Vim/Cheatsheet"

< Install(Difference between pages)
(Live CD)
 
m (Actions)
 
Line 1: Line 1:
<noinclude>
+
* The description given in the "description" column is rather short, often it is best to try it your self and see what it actually does.
{{InstallPart|an initial overview of the installation process as well as LiveCD download and boot instructions.}}
+
* Even if not specified in the "command" column, most commands fired in normal mode accept a "<num> prefix" (Eg. `5w` is equivalent to `wwwww`).
</noinclude>
+
* Most commands will work in visual mode as well as in normal mode.
== Installation Overview ==
+
  
This is a basic overview of the Funtoo installation process:
+
== Deplacements ==
  
# [[#Live CD|Download and boot the live CD of your choice]].
 
# [[#Prepare Hard Disk|Prepare your disk]].
 
# [[#Creating filesystems|Create]] and [[#Mounting filesystems|mount]] filesystems.
 
# [[#Installing the Stage 3 tarball|Install the Funtoo stage tarball]] of your choice.
 
# [[#Chroot into Funtoo|Chroot into your new system]].
 
# [[#Downloading the Portage tree|Download the Portage tree]].
 
# [[#Configuring your system|Configure your system]] and [[#Configuring your network|network]].
 
# [[#Configuring and installing the Linux kernel|Install a kernel]].
 
# [[#Installing a Bootloader|Install a bootloader]].
 
# [[#Finishing Steps|Complete final steps]].
 
# [[#Restart your system|Reboot and enjoy]].
 
  
=== Live CD ===
+
{{TableStart|striped=true}}
 +
<tr>
 +
  <th>command</th>
 +
  <th>meaning</th>
 +
  <th>description</th>
 +
</tr>
 +
<tr>
 +
  <td>w</td>
 +
  <td>word</td>
 +
  <td>move to next word</td>
 +
</tr>
 +
<tr>
 +
  <td>W</td>
 +
  <td>Word</td>
 +
  <td>move to the next word (broad sens)</td>
 +
</tr>
 +
<tr>
 +
  <td>b</td>
 +
  <td>begin</td>
 +
  <td>move to the previous word beginning</td>
 +
</tr>
 +
<tr>
 +
  <td>B</td>
 +
  <td>Begin</td>
 +
  <td>move to the previous word beginning (broad sense)</td>
 +
</tr>
 +
<tr>
 +
  <td>e</td>
 +
  <td>end</td>
 +
  <td>move to the next word end</td>
 +
</tr>
 +
<tr>
 +
  <td>E</td>
 +
  <td>End</td>
 +
  <td>move to the next word end (broad sense)</td>
 +
</tr>
 +
<tr>
 +
  <td><nowiki>{</nowiki></td>
 +
  <td></td>
 +
  <td>move to the previous blank line</td>
 +
</tr>
 +
<tr>
 +
  <td><nowiki>}</nowiki></td>
 +
  <td></td>
 +
  <td>move to the next blank line</td>
 +
</tr>
 +
<tr>
 +
  <td>f<char></td>
 +
  <td>fetch</td>
 +
  <td>move to the next occurrence of the character <char></td>
 +
</tr>
 +
<tr>
 +
  <td>F<char></td>
 +
  <td>Fetch</td>
 +
  <td>move to the previous occurrence of the character <char></td>
 +
</tr>
 +
<tr>
 +
  <td>$</td>
 +
  <td></td>
 +
  <td>move to the end of the line</td>
 +
</tr>
 +
<tr>
 +
  <td>^</td>
 +
  <td></td>
 +
  <td>move to the first non-whitespace character of the line</td>
 +
</tr>
 +
<tr>
 +
  <td>zz</td>
 +
  <td></td>
 +
  <td>center the viewport on the currently</td>
 +
</tr>
 +
<tr>
 +
  <td><num>gg</td>
 +
  <td>goto</td>
 +
  <td>move to line number <num> (default is 1 if <num> is omitted)</td>
 +
</tr>
 +
<tr>
 +
  <td>G</td>
 +
  <td></td>
 +
  <td>move to the last line</td>
 +
</tr>
 +
<tr>
 +
  <td>C-o</td>
 +
  <td></td>
 +
  <td>Go to the previous cursor position</td>
 +
</tr>
 +
{{TableEnd}}
  
Funtoo doesn't provide an "official" Funtoo Live CD. We recommend using the Gentoo-based [http://www.sysresccd.org/ System Rescue CD] as it contains lots of tools and utilities and supports both 32-bit and 64-bit systems. Download it here:
+
== Switch to insert mode ==
  
http://ftp.osuosl.org/pub/funtoo/distfiles/sysresccd/
+
{{TableStart|striped=true}}
 +
<tr>
 +
  <th>command</th>
 +
  <th>meaning</th>
 +
  <th>description</th>
 +
</tr>
 +
<tr>
 +
  <td>i</td>
 +
  <td>insert</td>
 +
  <td>insert before the cursor</td>
 +
</tr>
 +
<tr>
 +
  <td>I</td>
 +
  <td>Insert</td>
 +
  <td>insert at the beginning of the line (= <code>^i</code>)</td>
 +
</tr>
 +
<tr>
 +
  <td>a</td>
 +
  <td>append</td>
 +
  <td>insert after the cursor/td>
 +
</tr>
 +
<tr>
 +
  <td>A</td>
 +
  <td>Append</td>
 +
  <td>insert at the end of the line (= <code>$a</code>)</td>
 +
</tr>
 +
<tr>
 +
  <td>o</td>
 +
  <td></td>
 +
  <td>insert on a new blank line after the current line</td>
 +
</tr>
 +
<tr>
 +
  <td>O</td>
 +
  <td></td>
 +
  <td>insert on a new blank line before the current line</td>
 +
</tr>
 +
<tr>
 +
  <td>s</td>
 +
  <td>substitute</td>
 +
  <td>remove the current character and instert instead (= <code>xi</code>)</td>
 +
</tr>
 +
<tr>
 +
  <td>S</td>
 +
  <td>Substitute</td>
 +
  <td>remove the current line and insert instead (= <code>ddi</code></td>
 +
</tr>
 +
<tr>
 +
  <td>R</td>
 +
  <td>Replace</td>
 +
  <td>insert and override on the fly</td>
 +
</tr>
 +
{{TableEnd}}
  
{{Note|If using an older version of System Rescue CD, '''be sure to select the <code>rescue64</code> kernel at the boot menu if you are installing a 64-bit system'''. By default, System Rescue CD used to boot in 32-bit mode though the latest version attempts to automatically detect 64-bit processors.}}
+
== Actions ==
  
==== Network Access ====
+
{{TableStart|striped=true}}
 
+
<tr>
Once you have booted System Rescue CD, see if you have Internet access. Internet access is required for installing Funtoo Linux:
+
  <th>command</th>
 
+
  <th>meaning</th>
<console>
+
  <th>description</th>
# ##i##ping www.google.com
+
</tr>
PING www.google.com (216.58.217.36) 56(84) bytes of data.
+
<tr>
64 bytes from den03s10-in-f4.1e100.net (216.58.217.36): icmp_seq=1 ttl=57 time=30.1 ms
+
  <td><num>dd</td>
</console>
+
  <td>delete</td>
 
+
  <td>delete <num> lines</td>
If the ping is successful (you see <code>64 bytes</code> messages as above,) then your Network is set up. Hit Control-C to stop the ping.
+
</tr>
 
+
<tr>
If you need to set up a WiFi connection for Internet access, then this needs to be done using the System Rescue CD graphical environment. Run <code>startx</code> to start a graphical session:
+
  <td><num>yy</td>
 
+
  <td>yank</td>
<console>
+
  <td>copy <num> lines to vim's default buffer</td>
# ##i##startx
+
</tr>
</console>
+
<tr>
 
+
  <td>x</td>
Then, use the NetworkManager applet (icon in lower right) to connect to a WiFi network of your choice. Next, open a terminal inside your graphical environment, and you should be able to use the terminal to complete the rest of the steps.
+
  <td></td>
 
+
  <td>remove the character under the cursor</td>
==== Remote Install ====
+
</tr>
 
+
<tr>
Alternatively, you can log into System Rescue CD over the network via SSH to perform the install from another computer, and this may be more convenient way to install Funtoo Linux.
+
  <td><num>p</td>
 
+
  <td>paste</td>
If you'd like to complete the install remotely, here's how. First, you will need to ensure that System Rescue CD has a functioning network connection. Then, you will need to set a root password for System Rescue CD:
+
  <td>paste <num> times vim's default buffer after the cursor</td>
 
+
</tr>
<console>
+
<tr>
# ##i##passwd
+
  <td><num>P</td>
New password: ##i##********
+
  <td>Paste</td>
Retype new password: ##i##********
+
  <td>paste <num> times vim's default buffer before the cursor</td>
passwd: password updated successfully
+
</tr>
#
+
<tr>
</console>
+
  <td><code>~</code> (tilde)</td>
 
+
  <td></td>
Once you have typed in a password, you will now need to determine the IP address of System Rescue CD, and then you can use <code>ssh</code> to connect to it. To determine the IP address currently being used by System Rescue CD, type <code>ifconfig</code>:
+
  <td>swap case under the cursor</td>
 
+
</tr>
<console>
+
<tr>
# ##i##ifconfig
+
  <td>.</td>
</console>
+
  <td></td>
 
+
  <td>repeat previous action (kind of "live macro", try it yourself and see)</td>
One of the interfaces should have an IP address (listed as <code>inet addr:</code>) from your LAN. You can then connect remotely, from another system on your LAN, to System Rescue CD, and perform steps from the comfort of an existing OS. On your remote system, type the following, replacing <code>1.2.3.4</code> with the IP address of System Rescue CD. Connecting from an existing Linux or MacOS system would look something like this:
+
</tr>
 
+
<tr>
<console>
+
  <td>/<pattern><CR></td>
(remote system) $ ##i##ssh root@1.2.3.4
+
  <td></td>
Password: ##i##**********
+
  <td>search next occurrence of <pattern></td>
</console>
+
</tr>
 
+
<tr>
{{Note|If you'd like to connect remotely from an existing Microsoft Windows system, you'll need to download an SSH client for Windows, such as [http://www.chiark.greenend.org.uk/~sgtatham/putty/ PuTTY].}}
+
  <td>?<pattern><CR></td>
 
+
  <td></td>
After you've logged in via SSH, you're now connected remotely to System Rescue CD and can perform the installation steps.
+
  <td>search previous occurrence of <pattern></td>
 +
</tr>
 +
<tr>
 +
  <td>*</td>
 +
  <td></td>
 +
  <td>look for the next occurrence of the word under the cursor</td>
 +
</tr>
 +
<tr>
 +
  <td>n</td>
 +
  <td></td>
 +
  <td>forward search last searched pattern</td>
 +
</tr>
 +
<tr>
 +
  <td>N</td>
 +
  <td></td>
 +
  <td>backward search last searched pattern</td>
 +
</tr>
 +
{{TableEnd}}

Latest revision as of 21:22, April 7, 2015

  • The description given in the "description" column is rather short, often it is best to try it your self and see what it actually does.
  • Even if not specified in the "command" column, most commands fired in normal mode accept a "<num> prefix" (Eg. `5w` is equivalent to `wwwww`).
  • Most commands will work in visual mode as well as in normal mode.

Deplacements

command meaning description
w word move to next word
W Word move to the next word (broad sens)
b begin move to the previous word beginning
B Begin move to the previous word beginning (broad sense)
e end move to the next word end
E End move to the next word end (broad sense)
{ move to the previous blank line
} move to the next blank line
f<char> fetch move to the next occurrence of the character <char>
F<char> Fetch move to the previous occurrence of the character <char>
$ move to the end of the line
^ move to the first non-whitespace character of the line
zz center the viewport on the currently
<num>gg goto move to line number <num> (default is 1 if <num> is omitted)
G move to the last line
C-o Go to the previous cursor position

Switch to insert mode

command meaning description
i insert insert before the cursor
I Insert insert at the beginning of the line (= ^i)
a append insert after the cursor/td>
A Append insert at the end of the line (= $a)
o insert on a new blank line after the current line
O insert on a new blank line before the current line
s substitute remove the current character and instert instead (= xi)
S Substitute remove the current line and insert instead (= ddi
R Replace insert and override on the fly

Actions

command meaning description
<num>dd delete delete <num> lines
<num>yy yank copy <num> lines to vim's default buffer
x remove the character under the cursor
<num>p paste paste <num> times vim's default buffer after the cursor
<num>P Paste paste <num> times vim's default buffer before the cursor
~ (tilde) swap case under the cursor
. repeat previous action (kind of "live macro", try it yourself and see)
/<pattern><CR> search next occurrence of <pattern>
?<pattern><CR> search previous occurrence of <pattern>
* look for the next occurrence of the word under the cursor
n forward search last searched pattern
N backward search last searched pattern