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

(Difference between pages)
 
m (Actions)
 
Line 1: Line 1:
<div class="container" style="font-family: Open Sans; font-size: 14px; line-height: 20px;"><div class="row"><div class="col-xs-12 col-md-8 col-lg-8">
+
* 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.
{{Slideshow}}
+
* Even if not specified in the "command" column, most commands fired in normal mode accept a "<num> prefix" (Eg. `5w` is equivalent to `wwwww`).
</div><div class="col-xs-12 col-md-4 col-lg-4">
+
* Most commands will work in visual mode as well as in normal mode.
[http://distrowatch.com/table.php?distribution=funtoo '''Funtoo Linux'''] is a Linux-based operating system that is a variant of [http://en.wikipedia.org/wiki/Gentoo_Linux Gentoo Linux], led by [[User:Drobbins|Daniel Robbins]] (the creator and former Chief Architect of Gentoo) who serves as benevolent dictator for life (BDFL) of the project. ''Funtoo Linux is optimized for the best possible performance, supporting Intel Core i7, AMD FX Processors, and others.''  [[Subarches|See what we support.]] See [[#Distinctives|Distinctives]], below, for more information about what makes us special.  
+
  
'''Other Funtoo Projects include''':
+
== Deplacements ==
*  '''[[Keychain]]''', an SSH/GPG agent front-end.
+
* '''[[Metro]]''', automated Funtoo build engine.
+
* '''[[Linux_Fundamentals,_Part_1|Learn Linux]]'''! [[Awk_by_Example,_Part_1|Awk]], [[Bash_by_Example,_Part_1|Bash]], [[Sed_by_Example,_Part_1|Sed]]  and more.
+
  
  
'''Ebuild pages recently updated:''' {{#ask: [[Category:Ebuilds]]
+
{{TableStart|striped=true}}
| order=descending
+
<tr>
| sort=Modification date
+
  <th>command</th>
| format=list
+
  <th>meaning</th>
| limit=10
+
  <th>description</th>
| searchlabel=
+
</tr>
}} [[Ebuilds|more...]]
+
<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}}
  
'''Want to submit a screenshot? [http://forums.funtoo.org/index.php?/topic/180-screenshots/ See here.]'''
+
== Switch to insert mode ==
</div></div><div class="row"><div class="col-xs-12">
+
{{Announce|[[Support Funtoo]] and help us grow! '''Donate $15 per month and get a free SSD-based [[Funtoo Hosting|Funtoo Virtual Container]].'''}}
+
</div></div><div class="row"><div class="col-xs-12 col-md-4 col-lg-4">
+
=== News ===
+
{{NewsList|3}}
+
[[News|View More News...]]
+
  
=== Expand the wiki! ===
+
{{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}}
  
The [[:Help:Funtoo_Editing_Guidelines | How to 'wiki']] will help get you started on wiki editing. Have a look at [[Requested-Documents]] and [[:Category:Needs_Updates | pages that need to be updated.]]
+
== Actions ==
  
See [[:Category:Ebuilds|Ebuilds]] for a list of all ebuild pages, and [[Adding an Ebuild to the Wiki]] for information on how to add one.
+
{{TableStart|striped=true}}
</div><div class="col-sm-12 col-xs-12 col-md-4 col-lg-4">
+
<tr>
=== Distinctives ===
+
  <th>command</th>
 
+
  <th>meaning</th>
Funtoo Linux is a meta-distribution, which means it is built (fully automatically) with the functionality and optimizations that ''you'' want, not what some distro maintainer thought was best for you. Packages are installed directly from source code, thanks to the [http://en.wikipedia.org/wiki/Portage_(software) Portage ports system], inspired by the FreeBSD ports system, written in Python and with full advanced package management functionality.
+
  <th>description</th>
 
+
</tr>
''Benefits for desktops'': leaner, optimized, faster system. ''Additional benefits for servers'': enable only what you actually need to reduce attack surface, thus improving security.
+
<tr>
 
+
  <td><num>dd</td>
We use [http://en.wikipedia.org/wiki/Git_(software) Git] for all our development, and we also use Git to deliver our ports tree to you.
+
  <td>delete</td>
 
+
  <td>delete <num> lines</td>
In contrast to Gentoo Linux, we offer a number of innovations, including our extensive use of git, [[Funtoo 1.0 Profile|our profile system]], [[Package:Boot-Update|boot-update]] boot management tool, our incredibly flexible [[Funtoo Linux Networking|template-based networking scripts]], [[Metro Quick Start Tutorial|Metro]] distribution build system, support of Debian, RHEL and other kernels, [[Creating_Python-related_Ebuilds|enhanced Python support]], Portage mini-manifests, user-centric distribution model, and a large number of community infrastructure improvements.
+
</tr>
</div><div class="col-sm-12 col-xs-12 col-md-4 col-lg-4">
+
<tr>
=== Getting Started ===
+
  <td><num>yy</td>
 
+
  <td>yank</td>
'''[[Funtoo Linux Installation|Install Funtoo Linux]]''' and get involved in our user community. Get to know fellow users on our '''[http://forums.funtoo.org forums]'''. Funtoo Linux has a very active [http://en.wikipedia.org/wiki/IRC IRC] community on [http://freenode.net Freenode] (in the <code>#funtoo</code> channel) and you are encouraged to hang out with us.
+
  <td>copy <num> lines to vim's default buffer</td>
 
+
</tr>
'''[[Reporting Bugs|We welcome bug reports and suggestions]]'''.  Please report bugs to our '''[http://bugs.funtoo.org bug tracker]'''. We take all bugs seriously, and all work performed is tracked on our bug tracker, for purposes of transparency.
+
<tr>
 
+
  <td>x</td>
'''{{CreateAccount}}''', which allows you to log in to the wiki, [http://forums.funtoo.org forums] and [https://bugs.funtoo.org bug tracker]. See the [[Funtoo Authentication FAQ|Auth FAQ]] for more info about account creation.
+
  <td></td>
 
+
  <td>remove the character under the cursor</td>
'''See our [[Funtoo Linux FAQ|FAQ]] for answers to common questions.'''
+
</tr>
 
+
<tr>
Other resources include [http://larrythecow.org larrythecow.org], the Gentoo blog aggregator, [http://kernel-seeds.org kernel-seeds.org], and [http://git.funtoo.org git.funtoo.org], our cgit repository browser.
+
  <td><num>p</td>
</div></div></div>
+
  <td>paste</td>
 
+
  <td>paste <num> times vim's default buffer after the cursor</td>
__NOTITLE__
+
</tr>
__NOEDITSECTION__
+
<tr>
{{#subobject:|slideIndex=0|slideCaption=
+
  <td><num>P</td>
<h4>h3nnn4n</h4>
+
  <td>Paste</td>
 
+
  <td>paste <num> times vim's default buffer before the cursor</td>
Awesome WM / Conky / screenfetch
+
</tr>
|slideImage=File:H3nnn4n.jpg}}
+
<tr>
{{#subobject:|slideIndex=1|slideCaption=
+
  <td><code>~</code> (tilde)</td>
<h4>Help us document the Gentoo Ecosystem!</h4>
+
  <td></td>
From Enoch to Gentoo to Funtoo to ChromeOS, and beyond...
+
  <td>swap case under the cursor</td>
|slideImage=File:Ecosystem-snapshot.jpg|slideLink=Gentoo Ecosystem}}
+
</tr>
{{#subobject:|slideIndex=2|slideCaption=
+
<tr>
<h4>brushdemon</h4>
+
  <td>.</td>
 
+
  <td></td>
OpenBox / screenfetch
+
  <td>repeat previous action (kind of "live macro", try it yourself and see)</td>
|slideImage=File:brushdemon.jpg}}
+
</tr>
{{#subobject:|slideIndex=3|slideCaption=
+
<tr>
<h4>drobbins</h4>
+
  <td>/<pattern><CR></td>
 
+
  <td></td>
[[GNOME First Steps|GNOME 3.14]]  / [[Funtoo_Linux_FAQ#Do_you_support_systemd.3F|without systemd]] / Badgers optional
+
  <td>search next occurrence of <pattern></td>
|slideImage=File:gnome3122.jpg|slideLink=GNOME First Steps}}
+
</tr>
 
+
<tr>
{{#subobject:|slideIndex=4|slideCaption=
+
  <td>?<pattern><CR></td>
<h4>spectromas</h4>
+
  <td></td>
 
+
  <td>search previous occurrence of <pattern></td>
[[Package:Awesome_(Window_Manager)|Awesome WM]]
+
</tr>
|slideImage=File:awesome.jpg|slideLink=Package:Awesome (Window Manager)}}
+
<tr>
 
+
  <td>*</td>
{{#seo:
+
  <td></td>
|title=Funtoo Linux
+
  <td>look for the next occurrence of the word under the cursor</td>
|keywords=funtoo,linux,gentoo,Daniel Robbins
+
</tr>
|description=Funtoo Linux is a Gentoo-based OS that uses a git-based Portage tree. Run by Daniel Robbins, creator of Gentoo.
+
<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