from small one page howto to huge articles all in one place

search text in:




Other .linuxhowtos.org sites: www.linuxhowtos.org
toolsntoys.linuxhowtos.org



Last additions:
How to make X listen on port 6000

How to make X listen on port 6000

words:

34

views:

83809

userrating:

average rating: 1.2 (52 votes) (1=very good 6=terrible)


May, 25th 2007:
April, 26th 2007:
Apr, 10th. 2007:
Druckversion . pdf icon
You are here: Tutorials per portage category->app-editors->VI

2. Commands



Below you will find a cheat-sheet with vi commands. This cheat sheet will also come in handy in the next section of this document,
Practice Lesson #1.



vi cheat-sheet


a. cursor movements (items below are sometimes called objects):
h - left one character
l - right one character
j - down one line
k - up one line
w - right one word
b - back one word
$ - to the end of line
0 - to the beginning of the line
) - right one sentence
( - left one sentence
} - right one paragraph
{ - left one paragraph
Ctrl-F - forward one page
Ctrl-B - back one page
G - go to (without arguments, go to end of file)
b. deleting:
d - delete
then add one of the cursor movement symbols to
show what should be deleted, i.e.:
d$ - delete to end of line
d0 - delete to the beginning of the line
d} - delete to the end of paragraph
dd - delete delete (delete the whole line)
x - delete character cursor is on
c. other basic commands:
r - replace one character
ZZ - save and exit (hold down shift and press "z" twice)
y - yank (copy into temporary buffer)
then add cursor movement symbol to show what should be
copied, for example: y) - copy to the end of sentence
Y - yank line cursor is on
p - paste below cursor line (deleted or copied text)
P - paste above cursor line
u - undo last editing command
/sometext - search for "sometext"

d. any command can take numeric argument before the name of "object", i.e.:
5dd - delete 5 lines beginning with cursor line (or) d5d - same
2dw - delete two words (or) d2w - delete two words
c3w - change 3 words
3Ctrl-B - move up three pages
1G - go to the first line
e. external commands can be performed on the selected text (in lines)
if command is started with "!", i.e.:
!}fmt - reformat paragraph to 72 columns
f. command line (sometimes called "ex mode"):
:
g. from the command line a "set" command can be executed to
customize editing environment, i.e.:
:set all - will show the state of all options
:set number - will show on the screen numbers of all lines
:set autoindent // obvious
h. from the command line operations can be performed on the range of lines,
i.e.:
:18,24 del - delete from line 18 to line 24
:23,48 copy 17 - block from line 23 to 48 copy to line 17
:2,17 move 92 - block from line 2 to 17 move to line 92
i. from the command line any external UNIX command can be performed on
the range of lines if line range is superseded by "!":
:11,16! sed -e "s/^//*/" -e "s/$/*//"

(the command above wraps the block of text with
"C" style comments - /* text */. It can be done
easier, but this is an example)
:14,19! sort -r +3
(sort the table in reverse order by fourth column)
j. file manipulation from the command line:
:r somefile - read in "somefile"
:x - save and exit (if file is "Read Only", this command will
exit without saving)
:wq - write and quit (same as above)
:w - write (save) if the file permissions allow it
:w! - save file even if it is read-only as long as we own it
:w somefile - save this file as "somefile"
:q - quit without saving
:q! - quit without saving if changes were made
k. text input commands (all require "Esc" to terminate):
i - insert text before the character cursor is on
I - insert text at the beginning of the line
a - append (insert text after the character cursor is on)
A - append text to the end of the line
c - change (replace previous text with new one)
takes arguments just like the delete command - it is
a fast and powerful way of changing original text -
much more so than typical "overwrite"

R - start overwriting text
o - start entering text at the beginning of the new line
below the cursor
O - start entering text at the beginning of the new line
above the cursor
l. if in doubt, press "Esc"


/* The article above and any accompanying files are freely
* distributable, but please leave this notice and the text intact.
* Home for this document: http://www.infobound.com/vi.html
* Copyright (C) 1994, 1999 Tony Thomas
* Contact author through email:
tony@infobound.com
* Last revision Feb 23, 1999
* UNIX is a trademark of X/Open
*/

rate this article:
current rating: average rating: 1.2 (26 votes) (1=very good 6=terrible)
Your rating:
Very good (1) Good (2) ok (3) average (4) bad (5) terrible (6)

back



Support us on Content Nation

New Packages

- as rdf newsfeed
- as rss newsfeed
- as Atom newsfeed
2026-03-18
Dist-Zilla-Plugin-Test-Compile - 2.59.0
Ebuild name:

dev-perl/Dist-Zilla-Plugin-Test-Compile-2.59.0

Description

Common tests to check syntax of your modules, using

Added to portage

2026-03-18

Dist-Zilla-Plugin-Test-MinimumVersion - 2.0.11
Ebuild name:

dev-perl/Dist-Zilla-Plugin-Test-MinimumVersion-2.0.11

Description

Release tests for minimum required versions

Added to portage

2026-03-18

Dist-Zilla-Plugin-Test-Perl-Critic - 3.5.0
Ebuild name:

dev-perl/Dist-Zilla-Plugin-Test-Perl-Critic-3.5.0

Description

Tests to check your code against best practices

Added to portage

2026-03-18

EV - 4.370.0
Ebuild name:

dev-perl/EV-4.370.0

Description

Perl interface to libev, a high performance full-featured event loop

Added to portage

2026-03-18

Exporter-Tiny - 1.6.3
Ebuild name:

dev-perl/Exporter-Tiny-1.6.3

Description

An exporter with the features of Sub but only core dependencies

Added to portage

2026-03-18

File-DesktopEntry - 0.230.0
Ebuild name:

dev-perl/File-DesktopEntry-0.230.0

Description

Object to handle .desktop files

Added to portage

2026-03-18

File-MimeInfo - 0.360.0
Ebuild name:

dev-perl/File-MimeInfo-0.360.0

Description

Determine file type

Added to portage

2026-03-18

File-Scan-ClamAV - 1.960.0
Ebuild name:

dev-perl/File-Scan-ClamAV-1.960.0

Description

Connect to a local Clam Anti-Virus clamd service and send command

Added to portage

2026-03-18

Graphics-Toolkit-Color - 1.972.0
Ebuild name:

dev-perl/Graphics-Toolkit-Color-1.972.0

Description

Color palette constructor

Added to portage

2026-03-18

HTML-HTMLDoc - 0.250.0
Ebuild name:

dev-perl/HTML-HTMLDoc-0.250.0

Description

Perl interface to the htmldoc program for producing PDF-Files from HT

Added to portage

2026-03-18

aurorae - 6.6.3
Ebuild name:

kde-plasma/aurorae-6.6.3

Description

Themeable window decoration for KWin

Added to portage

2026-03-18

bluedevil - 6.6.3
Ebuild name:

kde-plasma/bluedevil-6.6.3

Description

Bluetooth stack for KDE Plasma

Added to portage

2026-03-18

breeze - 6.6.3
Ebuild name:

kde-plasma/breeze-6.6.3

Description

Breeze visual style for the Plasma desktop

Added to portage

2026-03-18

breeze-grub - 6.6.3
Ebuild name:

kde-plasma/breeze-grub-6.6.3

Description

Breeze theme for GRUB

Added to portage

2026-03-18

breeze-gtk - 6.6.3
Ebuild name:

kde-plasma/breeze-gtk-6.6.3

Description

Official GTK+ port of Plasma's Breeze widget style

Added to portage

2026-03-18

breeze-plymouth - 6.6.3
Ebuild name:

kde-plasma/breeze-plymouth-6.6.3

Description

Breeze theme for Plymouth

Added to portage

2026-03-18

discover - 6.6.3
Ebuild name:

kde-plasma/discover-6.6.3

Description

KDE Plasma resources management GUI

Added to portage

2026-03-18

drkonqi - 6.6.3
Ebuild name:

kde-plasma/drkonqi-6.6.3

Description

Plasma crash handler, gives the user feedback if a program crashed

Added to portage

2026-03-18

expat - 2.7.5
Ebuild name:

dev-libs/expat-2.7.5

Description

Stream-oriented XML parser library

Added to portage

2026-03-18

flatpak-kcm - 6.6.3
Ebuild name:

kde-plasma/flatpak-kcm-6.6.3

Description

Flatpak Permissions Management KCM

Added to portage

2026-03-18

kactivitymanagerd - 6.6.3
Ebuild name:

kde-plasma/kactivitymanagerd-6.6.3

Description

System service to manage user's activities, track the usage patt

Added to portage

2026-03-18

kde-cli-tools - 6.6.3
Ebuild name:

kde-plasma/kde-cli-tools-6.6.3

Description

Tools based on KDE Frameworks 6 to better interact with the system

Added to portage

2026-03-18

kde-cli-tools-common - 6.6.3
Ebuild name:

kde-plasma/kde-cli-tools-common-6.6.3

Description

Added to portage

2026-03-18

kde-gtk-config - 6.6.3
Ebuild name:

kde-plasma/kde-gtk-config-6.6.3

Description

Syncs KDE Plasma theme settings to GTK applications

Added to portage

2026-03-18

kdecoration - 6.6.3
Ebuild name:

kde-plasma/kdecoration-6.6.3

Description

Plugin based library to create window decorations

Added to portage

2026-03-18

kdeplasma-addons - 6.6.3
Ebuild name:

kde-plasma/kdeplasma-addons-6.6.3

Description

Extra Plasma applets and engines

Added to portage

2026-03-18

kdesu-gui - 6.6.3
Ebuild name:

kde-plasma/kdesu-gui-6.6.3

Description

Graphical frontend for KDE Frameworks' kdesu

Added to portage

2026-03-18

keditfiletype - 6.6.3
Ebuild name:

kde-plasma/keditfiletype-6.6.3

Description

File Type Editor

Added to portage

2026-03-18

kgamma - 6.6.3
Ebuild name:

kde-plasma/kgamma-6.6.3

Description

Screen gamma values kcontrol module

Added to portage

2026-03-18

kglobalacceld - 6.6.3
Ebuild name:

kde-plasma/kglobalacceld-6.6.3

Description

Daemon providing Global Keyboard Shortcut (Accelerator) functionalit

Added to portage

2026-03-18

kinfocenter - 6.6.3
Ebuild name:

kde-plasma/kinfocenter-6.6.3

Description

Utility providing information about the computer hardware

Added to portage

2026-03-18

kmenuedit - 6.6.3
Ebuild name:

kde-plasma/kmenuedit-6.6.3

Description

KDE Plasma menu editor

Added to portage

2026-03-18

knighttime - 6.6.3
Ebuild name:

kde-plasma/knighttime-6.6.3

Description

Helpers for scheduling the dark-light cycle

Added to portage

2026-03-18

kpipewire - 6.6.3
Ebuild name:

kde-plasma/kpipewire-6.6.3

Description

Components relating to Flatpak pipewire use in Plasma

Added to portage

2026-03-18

krdp - 6.6.3
Ebuild name:

kde-plasma/krdp-6.6.3

Description

Library and examples for creating an RDP server

Added to portage

2026-03-18

kscreen - 6.6.3
Ebuild name:

kde-plasma/kscreen-6.6.3

Description

KDE Plasma screen management

Added to portage

2026-03-18

kscreenlocker - 6.6.3
Ebuild name:

kde-plasma/kscreenlocker-6.6.3

Description

Library and components for secure lock screen architecture

Added to portage

2026-03-18

ksshaskpass - 6.6.3
Ebuild name:

kde-plasma/ksshaskpass-6.6.3

Description

Implementation of ssh-askpass with KDE Wallet integration

Added to portage

2026-03-18

ksystemstats - 6.6.3
Ebuild name:

kde-plasma/ksystemstats-6.6.3

Description

Plugin-based system monitoring daemon

Added to portage

2026-03-18

kwallet-pam - 6.6.3
Ebuild name:

kde-plasma/kwallet-pam-6.6.3

Description

PAM module to not enter KWallet password again after login

Added to portage

2026-03-18

kwayland - 6.6.3
Ebuild name:

kde-plasma/kwayland-6.6.3

Description

Qt-style API to interact with the wayland-client API

Added to portage

2026-03-18

kwin - 6.6.3
Ebuild name:

kde-plasma/kwin-6.6.3

Description

Flexible, composited Window Manager for windowing systems on Linux

Added to portage

2026-03-18

kwin-x11 - 6.6.3
Ebuild name:

kde-plasma/kwin-x11-6.6.3

Description

Flexible, composited X window manager

Added to portage

2026-03-18

kwrited - 6.6.3
Ebuild name:

kde-plasma/kwrited-6.6.3

Description

KDE Plasma daemon listening for wall and write messages

Added to portage

2026-03-18

layer-shell-qt - 6.6.3
Ebuild name:

kde-plasma/layer-shell-qt-6.6.3

Description

Qt component to allow applications make use of Wayland wl-layer-she

Added to portage

2026-03-18

libpciaccess - 0.19
Ebuild name:

x11-libs/libpciaccess-0.19

Description

Library providing generic access to the PCI bus and devices

Added to portage

2026-03-18

marknote - 1.5.0-r1
Ebuild name:

app-text/marknote-1.5.0-r1

Description

Markdown editor with a wide range of formating options for everyday note

Added to portage

2026-03-18

plasma-pass - 1.3.1
Ebuild name:

kde-misc/plasma-pass-1.3.1

Description

Plasma applet to access password from pass

Added to portage

2026-03-18

systemd-initctl - 3
Ebuild name:

sys-apps/systemd-initctl-3

Description

initctl Compatibility Daemon

Added to portage

2026-03-18

yt-dlp-ejs - 0.8.0
Ebuild name:

dev-python/yt-dlp-ejs-0.8.0

Description

External JavaScript for yt-dlp supporting many runtimes

Added to portage

2026-03-18

2026-03-17
Dist-Zilla-Plugin-ContributorsFile - 0.4.0
Ebuild name:

dev-perl/Dist-Zilla-Plugin-ContributorsFile-0.4.0

Description

Add a file listing all contributors

Added to portage

2026-03-17

Dist-Zilla-Plugin-Git - 2.52.0
Ebuild name:

dev-perl/Dist-Zilla-Plugin-Git-2.52.0

Description

Update your git repository after release

Added to portage

2026-03-17

Dist-Zilla-Plugin-ModuleBuildTiny - 0.20.0
Ebuild name:

dev-perl/Dist-Zilla-Plugin-ModuleBuildTiny-0.20.0

Description

Build a Build.PL that uses Module

Added to portage

2026-03-17

Dist-Zilla-Plugin-PodWeaver - 4.10.0
Ebuild name:

dev-perl/Dist-Zilla-Plugin-PodWeaver-4.10.0

Description

Weave your Pod together from configuration and Dist

Added to portage

2026-03-17

Dist-Zilla-Plugin-ReadmeFromPod - 0.400.0
Ebuild name:

dev-perl/Dist-Zilla-Plugin-ReadmeFromPod-0.400.0

Description

dzil plugin to generate README from POD

Added to portage

2026-03-17

ansible-pylibssh - 1.4.0
Ebuild name:

dev-python/ansible-pylibssh-1.4.0

Description

Python bindings for libssh client specific to Ansible use case

Added to portage

2026-03-17

awscli - 1.44.59
Ebuild name:

app-admin/awscli-1.44.59

Description

Universal Command Line Environment for AWS

Added to portage

2026-03-17

boto3 - 1.42.69
Ebuild name:

dev-python/boto3-1.42.69

Description

The AWS SDK for Python

Added to portage

2026-03-17

botocore - 1.42.69
Ebuild name:

dev-python/botocore-1.42.69

Description

Low-level, data-driven core of boto 3

Added to portage

2026-03-17

claude-code - 2.1.77
Ebuild name:

dev-util/claude-code-2.1.77

Description

Claude Code - an agentic coding tool by Anthropic

Added to portage

2026-03-17

clzip - 1.16
Ebuild name:

app-arch/clzip-1.16

Description

C language version of lzip

Added to portage

2026-03-17

difftastic - 0.68.0
Ebuild name:

dev-util/difftastic-0.68.0

Description

A structural diff that understands syntax.

Added to portage

2026-03-17

dovecot - 2.4.2-r3
Ebuild name:

net-mail/dovecot-2.4.2-r3

Description

An IMAP and POP3 server written with security primarily in mind

Added to portage

2026-03-17

elfutils - 0.193-r2
Ebuild name:

dev-libs/elfutils-0.193-r2

Description

Libraries/utilities to handle ELF objects (drop in replacement for libel

Added to portage

2026-03-17

elfutils - 0.194-r1
Ebuild name:

dev-libs/elfutils-0.194-r1

Description

Libraries/utilities to handle ELF objects (drop in replacement for libel

Added to portage

2026-03-17

evisum - 1.0.0
Ebuild name:

sys-process/evisum-1.0.0

Description

System and process monitor written with EFL

Added to portage

2026-03-17

ffmpeg - 8.1
Ebuild name:

media-video/ffmpeg-8.1

Description

Complete solution to record/convert/stream audio and video

Added to portage

2026-03-17

hiredis - 3.3.1
Ebuild name:

dev-python/hiredis-3.3.1

Description

Python extension that wraps hiredis

Added to portage

2026-03-17

libbpf - 1.7.0
Ebuild name:

dev-libs/libbpf-1.7.0

Description

Stand-alone build of libbpf from the Linux kernel

Added to portage

2026-03-17

navi2ch - 1.8.4-r2
Ebuild name:

app-emacs/navi2ch-1.8.4-r2

Description

A navigator for the Japanese textboard 2ch

Added to portage

2026-03-17

nerd-icons - 0.1.0
Ebuild name:

app-emacs/nerd-icons-0.1.0

Description

Emacs Nerd Font Icons Library

Added to portage

2026-03-17

obs-studio - 32.1.0
Ebuild name:

media-video/obs-studio-32.1.0

Description

Software for Recording and Streaming Live Video Content

Added to portage

2026-03-17

openfortivpn - 1.24.1
Ebuild name:

net-vpn/openfortivpn-1.24.1

Description

Fortinet compatible VPN client

Added to portage

2026-03-17

pipx - 1.9.0
Ebuild name:

dev-python/pipx-1.9.0

Description

Install and Run Python Applications in Isolated Environments

Added to portage

2026-03-17

plasma-pass - 1.3.0-r1
Ebuild name:

kde-misc/plasma-pass-1.3.0-r1

Description

Plasma applet to access password from pass

Added to portage

2026-03-17

postfix - 3.12_pre20260316
Ebuild name:

mail-mta/postfix-3.12_pre20260316

Description

A fast and secure drop-in replacement for sendmail

Added to portage

2026-03-17

prek - 0.3.6
Ebuild name:

dev-util/prek-0.3.6

Description

Better `pre-commit`, re-engineered in Rust

Added to portage

2026-03-17

pyasn1 - 0.6.3
Ebuild name:

dev-python/pyasn1-0.6.3

Description

ASN.1 library for Python

Added to portage

2026-03-17

pyproject-fmt - 2.19.0
Ebuild name:

dev-python/pyproject-fmt-2.19.0

Description

Format your pyproject.toml file

Added to portage

2026-03-17

signal-desktop-bin - 8.2.1
Ebuild name:

net-im/signal-desktop-bin-8.2.1

Description

Allows you to send and receive messages of Signal Messenger on your

Added to portage

2026-03-17

simdjson - 4.4.1
Ebuild name:

dev-libs/simdjson-4.4.1

Description

SIMD accelerated C++ JSON library

Added to portage

2026-03-17

simpleeval - 1.0.7
Ebuild name:

dev-python/simpleeval-1.0.7

Description

A simple, safe single expression evaluator library

Added to portage

2026-03-17

solarus-quest-editor - 2.0.3-r1
Ebuild name:

games-misc/solarus-quest-editor-2.0.3-r1

Description

Quest editor for Solarus game engine

Added to portage

2026-03-17

telegram-desktop - 6.6.2
Ebuild name:

net-im/telegram-desktop-6.6.2

Description

Official desktop client for Telegram

Added to portage

2026-03-17

tg_owt - 0_pre20260309
Ebuild name:

media-libs/tg_owt-0_pre20260309

Description

WebRTC build for Telegram

Added to portage

2026-03-17

types-docutils - 0.22.3.20260316
Ebuild name:

dev-python/types-docutils-0.22.3.20260316

Description

Typing stubs for docutils

Added to portage

2026-03-17

util-linux - 2.41.3-r1
Ebuild name:

sys-apps/util-linux-2.41.3-r1

Description

Various useful Linux utilities

Added to portage

2026-03-17

uv - 0.10.11
Ebuild name:

dev-python/uv-0.10.11

Description

A Python package installer and resolver, written in Rust

Added to portage

2026-03-17

uv-build - 0.10.11
Ebuild name:

dev-python/uv-build-0.10.11

Description

PEP517 uv build backend

Added to portage

2026-03-17

uvicorn - 0.42.0
Ebuild name:

dev-python/uvicorn-0.42.0

Description

Lightning-fast ASGI server implementation

Added to portage

2026-03-17

xfconf - 4.21.2
Ebuild name:

xfce-base/xfconf-4.21.2

Description

A configuration management system for Xfce

Added to portage

2026-03-17

xmms2 - 0.9.7
Ebuild name:

media-sound/xmms2-0.9.7

Description

X(cross)platform Music Multiplexing System, next generation of the XMMS pla

Added to portage

2026-03-17

zen-sources - 6.19.8
Ebuild name:

sys-kernel/zen-sources-6.19.8

Description

The Zen Kernel Live Sources

Added to portage

2026-03-17

rdf newsfeed | rss newsfeed | Atom newsfeed
Copyright 2004-2025 Sascha Nitsch Unternehmensberatung GmbH
- Copyright and legal notices -
Time to create this page: 73.4 ms