Difference between pages "Video" and "Package:Vim/Cheatsheet"

From Funtoo
(Difference between pages)
Jump to navigation Jump to search
 
 
Line 1: Line 1:
The purpose of this page is to give you streamlined steps for setting up your video hardware for X, and desktop environments such as GNOME.
* 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.


{{Important|Editors: OK, I've decided to change the plans for this page. This is going to be a page similar to [[Subarches]]. The idea is to help people to identify their hardware and guide them toward the correct driver for their chipset. The focus will be primarily on defining the types of hardware that are supported, what products they appear in, and how to know if you have this hardware, and also give people good general overview of options available to them (free vs. proprietary, etc.) Other important topics that apply to all drivers, like <code>eselect opengl</code> should be covered as well. This will then serve as the meta-page for Video support, with individual ebuild pages holding the details for each driver.}}
== Deplacements ==


== Video Driver Installation and Setup ==


Individual driver pages cover specific setup steps for each driver. The general process is as follows:
{{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}}


# Define <code>VIDEO_CARDS</code> variable in <code>/etc/make.conf</code> to refer to the name of the driver that you wish to use. Special names, rather than ebuild package names are used. For example, <code>fglrx</code> is used to refer to {{package|x11-drivers/ati-drivers}}.
== Switch to insert mode ==
# Update your system using <code>emerge</code>, if X is already installed, or <code>emerge xorg-x11</code>. Your <code>VIDEO_CARDS</code> settings will result in your selected drivers being installed.
# Configure X to use these drivers. This often involves running <code>X -configure</code> or using a supplied tool to produce an initial X configuration like <code>aticonfig --initial</code>.
# If necessary (this is typically done automatically for you,) run <code>eselect opengl</code> and <code>eselect opencl</code> to set the working OpenGL and OpenCL implementation.


== Selecting a Video Driver ==
{{TableStart|striped=true}}
 
<tr>
First determine which video card you have and which driver it requires.
  <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}}


<console>###i## lspci -nn | grep -i vga</console>
== Actions ==


 
{{TableStart|striped=true}}
Once hardware is determined use the following sections to add or edit the <code>VIDEO_CARDS</code> global variable in <code>/etc/[[make.conf]]</code>.  See the specific driver pages for more granular details including kernel configurations, frame buffer settings, and X configuration.
<tr>
 
  <th>command</th>
{{TableStart}}
  <th>meaning</th>
<tr class="warn"><th>Package Name</th><th>License</th><th>Developed by</th><th><code>VIDEO_CARDS</code> setting</th></tr>
  <th>description</th>
<tr><td>{{Package|x11-drivers/xf86-video-ati}}</td><td>'''Open Source'''</td><td>Community</td><td><code>radeon, radeonsi</code></td></tr>
</tr>
<tr><td>{{Package|x11-drivers/ati-drivers}}</td><td>Proprietary</td><td>AMD</td><td><code>fglrx</code></td></tr>
<tr>
<tr><td>{{Package|x11-drivers/xf86-video-intel}}</td><td>'''Open Source'''</td><td>[http://www.intel.com Intel]</td><td><code>intel</code></td></tr>
  <td><num>dd</td>
<tr><td>{{Package|x11-drivers/xf86-video-nouveau}}</td><td>'''Open Source'''</td><td>Community</td><td><code>nouveau</code></td></tr>
  <td>delete</td>
<tr><td>{{Package|x11-drivers/nvidia-drivers}}</td><td>Proprietary</td><td>[http://www.nvidia.com NVIDIA]</td><td><code>nvidia</code></td></tr>
  <td>delete <num> lines</td>
<tr><td>{{Package|x11-drivers/xf86-video-vesa}}</td><td>'''Open Source'''</td><td>Community</td><td><code>vesa</code></td></tr>
</tr>
<tr><td>{{Package|x11-drivers/xf86-video-vga}}</td><td>'''Open Source'''</td><td>Community</td><td><code>vga</code></td></tr>
<tr>
  <td><num>yy</td>
  <td>yank</td>
  <td>copy <num> lines to vim's default buffer</td>
</tr>
<tr>
  <td>x</td>
  <td></td>
  <td>remove the character under the cursor</td>
</tr>
<tr>
  <td><num>p</td>
  <td>paste</td>
  <td>paste <num> times vim's default buffer after the cursor</td>
</tr>
<tr>
  <td><num>P</td>
  <td>Paste</td>
  <td>paste <num> times vim's default buffer before the cursor</td>
</tr>
<tr>
  <td><code>~</code> (tilde)</td>
  <td></td>
  <td>swap case under the cursor</td>
</tr>
<tr>
  <td>.</td>
  <td></td>
  <td>repeat previous action (kind of "live macro", try it yourself and see)</td>
</tr>
<tr>
  <td>/<pattern><CR></td>
  <td></td>
  <td>search next occurrence of <pattern></td>
</tr>
<tr>
  <td>?<pattern><CR></td>
  <td></td>
  <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}}
{{TableEnd}}
An overview of each driver follows:
=== AMD/ATI ===
Users can choose between free ({{Package|x11-drivers/xf86-video-ati}}) and proprietary ({{Package|x11-drivers/ati-drivers}}) video drivers.  {{Package|x11-drivers/ati-drivers}} supports a variety AMD products, including Radeon R9, R7, R5 and HD 5000 Series through HD 8000 Series. Also supported are AMD A-Series APUs and Mobile Radeon HD chipsets. The free {{Package|x11-drivers/xf86-video-ati}} has an official [http://xorg.freedesktop.org/wiki/RadeonFeature/ hardware and feature compatibility matrix]. The free drivers are recommended as the proprietary drivers are not currently maintained very well by AMD.
Users of AMD Southern & Sea Islands (HD7750 and above) should enable radeonsi for better performance and functionality.
=== Intel ===
The Intel video driver ({{package|x11-drivers/xf86-video-intel}} supports [[Wikipedia:Intel_GMA|Intel GMA]] and [[Wikipedia:Intel_HD_and_Iris_Graphics|Intel HD]] graphics processors, which are found in laptops and desktop systems.
=== NVIDIA ===
Users can choose between {{Package|x11-drivers/xf86-video-nouveau}} and proprietary {{package|x11-drivers/nvidia-drivers}} video drivers released by NVIDIA. The proprietary drivers have a reputation for quality, although they are often not updated to work with the latest versions of X or the Linux kernel.
== Managing Installed Drivers ==
=== OpenGL/OpenCL ===

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