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:

84415

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-04-14
android-studio - 2025.3.3.7
Ebuild name:

dev-util/android-studio-2025.3.3.7

Description

Android development environment based on IntelliJ IDEA

Added to portage

2026-04-14

authlib - 1.6.10
Ebuild name:

dev-python/authlib-1.6.10

Description

A Python library in building OAuth and OpenID Connect servers and clients

Added to portage

2026-04-14

awscli - 1.44.79
Ebuild name:

app-admin/awscli-1.44.79

Description

Universal Command Line Environment for AWS

Added to portage

2026-04-14

boto3 - 1.42.89
Ebuild name:

dev-python/boto3-1.42.89

Description

The AWS SDK for Python

Added to portage

2026-04-14

botocore - 1.42.89
Ebuild name:

dev-python/botocore-1.42.89

Description

Low-level, data-driven core of boto 3

Added to portage

2026-04-14

chromium - 149.0.7779.3
Ebuild name:

www-client/chromium-149.0.7779.3

Description

Open-source version of Google Chrome web browser

Added to portage

2026-04-14

clang - 23.0.0_pre20260413
Ebuild name:

dev-python/clang-23.0.0_pre20260413

Description

Python bindings for llvm-core/clang

Added to portage

2026-04-14

clang - 23.0.0_pre20260413
Ebuild name:

llvm-core/clang-23.0.0_pre20260413

Description

C language family frontend for LLVM

Added to portage

2026-04-14

clang-common - 23.0.0_pre20260413
Ebuild name:

llvm-core/clang-common-23.0.0_pre20260413

Description

Common files shared between multiple slots of clang

Added to portage

2026-04-14

cli-helpers - 2.14.0
Ebuild name:

dev-python/cli-helpers-2.14.0

Description

Python helpers for common CLI tasks

Added to portage

2026-04-14

cmd2 - 3.5.0
Ebuild name:

dev-python/cmd2-3.5.0

Description

Extra features for standard library's cmd module

Added to portage

2026-04-14

compiler-rt - 23.0.0_pre20260413
Ebuild name:

llvm-runtimes/compiler-rt-23.0.0_pre20260413

Description

Compiler runtime library for clang (built-in part)

Added to portage

2026-04-14

compiler-rt-sanitizers - 23.0.0_pre20260413
Ebuild name:

llvm-runtimes/compiler-rt-sanitizers-23.0.0_pre20260413

Description

Compiler runtime libraries for clang (sanit

Added to portage

2026-04-14

cramjam - 2.12.0_rc1
Ebuild name:

dev-python/cramjam-2.12.0_rc1

Description

Thin Python bindings to de/compression algorithms in Rust

Added to portage

2026-04-14

django-tables2 - 3.0.0
Ebuild name:

dev-python/django-tables2-3.0.0

Description

Table/data-grid framework for Django

Added to portage

2026-04-14

dotnet-sdk - 9.0.111-r1
Ebuild name:

dev-dotnet/dotnet-sdk-9.0.111-r1

Description

Added to portage

2026-04-14

ffmpeg-chromium - 149
Ebuild name:

media-video/ffmpeg-chromium-149

Description

FFmpeg built specifically for codec support in Chromium-based brows

Added to portage

2026-04-14

flang - 23.0.0_pre20260413
Ebuild name:

llvm-core/flang-23.0.0_pre20260413

Description

LLVM's Fortran frontend

Added to portage

2026-04-14

flang-rt - 23.0.0_pre20260413
Ebuild name:

llvm-runtimes/flang-rt-23.0.0_pre20260413

Description

LLVM's Fortran runtime

Added to portage

2026-04-14

gaupol - 1.16
Ebuild name:

media-video/gaupol-1.16

Description

Editor for text-based subtitle files

Added to portage

2026-04-14

hypothesis - 6.151.14
Ebuild name:

dev-python/hypothesis-6.151.14

Description

A library for property based testing

Added to portage

2026-04-14

libarchive - 3.8.7
Ebuild name:

app-arch/libarchive-3.8.7

Description

Multi-format archive and compression library

Added to portage

2026-04-14

libclc - 23.0.0_pre20260413
Ebuild name:

llvm-core/libclc-23.0.0_pre20260413

Description

OpenCL C library

Added to portage

2026-04-14

libcxx - 23.0.0_pre20260413
Ebuild name:

llvm-runtimes/libcxx-23.0.0_pre20260413

Description

New implementation of the C++ standard library, targeting C

Added to portage

2026-04-14

libcxxabi - 23.0.0_pre20260413
Ebuild name:

llvm-runtimes/libcxxabi-23.0.0_pre20260413

Description

Low level support for a standard C++ library

Added to portage

2026-04-14

libgcc - 23.0.0_pre20260413
Ebuild name:

llvm-runtimes/libgcc-23.0.0_pre20260413

Description

Compiler runtime library for clang, compatible with libgcc_

Added to portage

2026-04-14

libunwind - 23.0.0_pre20260413
Ebuild name:

llvm-runtimes/libunwind-23.0.0_pre20260413

Description

C++ runtime stack unwinder from LLVM

Added to portage

2026-04-14

lit - 23.0.0_pre20260413
Ebuild name:

dev-python/lit-23.0.0_pre20260413

Description

A stand-alone install of the LLVM suite testing tool

Added to portage

2026-04-14

lld - 23.0.0_pre20260413
Ebuild name:

llvm-core/lld-23.0.0_pre20260413

Description

The LLVM linker (link editor)

Added to portage

2026-04-14

lldb - 23.0.0_pre20260413
Ebuild name:

llvm-core/lldb-23.0.0_pre20260413

Description

The LLVM debugger

Added to portage

2026-04-14

llvm - 23.0.0_pre20260413
Ebuild name:

dev-ml/llvm-23.0.0_pre20260413

Description

OCaml bindings for LLVM

Added to portage

2026-04-14

llvm - 23.0.0_pre20260413
Ebuild name:

llvm-core/llvm-23.0.0_pre20260413

Description

Low Level Virtual Machine

Added to portage

2026-04-14

llvm-common - 23.0.0_pre20260413
Ebuild name:

llvm-core/llvm-common-23.0.0_pre20260413

Description

Common files shared between multiple slots of LLVM

Added to portage

2026-04-14

mlir - 23.0.0_pre20260413
Ebuild name:

llvm-core/mlir-23.0.0_pre20260413

Description

Multi-Level Intermediate Representation (library only)

Added to portage

2026-04-14

mmm-mode - 0.5.11
Ebuild name:

app-emacs/mmm-mode-0.5.11

Description

Enables the user to edit different parts of a file in different major mod

Added to portage

2026-04-14

moccur-edit - 2.16
Ebuild name:

app-emacs/moccur-edit-2.16

Description

An improved interface to color-moccur for editing

Added to portage

2026-04-14

openjdk - 27_alpha17
Ebuild name:

dev-java/openjdk-27_alpha17

Description

Open source implementation of the Java programming language

Added to portage

2026-04-14

openjdk-bin - 27_alpha17
Ebuild name:

dev-java/openjdk-bin-27_alpha17

Description

Prebuilt Java JDK binaries provided by Eclipse Temurin

Added to portage

2026-04-14

openmp - 23.0.0_pre20260413
Ebuild name:

llvm-runtimes/openmp-23.0.0_pre20260413

Description

OpenMP runtime libraries for LLVM/clang compiler

Added to portage

2026-04-14

openmp-amdgcn-amd-amdhsa - 23.0.0_pre20260413
Ebuild name:

llvm-runtimes/openmp-amdgcn-amd-amdhsa-23.0.0_pre20260413

Description

OpenMP target library for amdgcn devices

Added to portage

2026-04-14

openmp-nvptx64-nvidia-cuda - 23.0.0_pre20260413
Ebuild name:

llvm-runtimes/openmp-nvptx64-nvidia-cuda-23.0.0_pre20260413

Description

OpenMP target library for nvptx64 devic

Added to portage

2026-04-14

openmp-spirv64-intel - 23.0.0_pre20260413
Ebuild name:

llvm-runtimes/openmp-spirv64-intel-23.0.0_pre20260413

Description

OpenMP target library for spirv64 Intel devic

Added to portage

2026-04-14

openstacksdk - 4.11.0
Ebuild name:

dev-python/openstacksdk-4.11.0

Description

A collection of libraries for building applications to work with Ope

Added to portage

2026-04-14

phonenumbers - 9.0.28
Ebuild name:

dev-python/phonenumbers-9.0.28

Description

Python port of Google's libphonenumber

Added to portage

2026-04-14

polly - 23.0.0_pre20260413
Ebuild name:

llvm-core/polly-23.0.0_pre20260413

Description

Polyhedral optimizations for LLVM

Added to portage

2026-04-14

pydantic - 2.13.0
Ebuild name:

dev-python/pydantic-2.13.0

Description

Data parsing and validation using Python type hints

Added to portage

2026-04-14

pyproject-fmt - 2.21.1
Ebuild name:

dev-python/pyproject-fmt-2.21.1

Description

Format your pyproject.toml file

Added to portage

2026-04-14

python-pkcs11 - 0.9.4
Ebuild name:

dev-python/python-pkcs11-0.9.4

Description

PKCS11/Cryptoki support for Python

Added to portage

2026-04-14

sphinx-autodoc-typehints - 3.10.1
Ebuild name:

dev-python/sphinx-autodoc-typehints-3.10.1

Description

Type hints support for the Sphinx autodoc extension

Added to portage

2026-04-14

tesseract - 5.5.2-r1
Ebuild name:

app-text/tesseract-5.5.2-r1

Description

An OCR Engine, originally developed at HP, now open source

Added to portage

2026-04-14

2026-04-13
abcl - 1.10.0
Ebuild name:

dev-lisp/abcl-1.10.0

Description

Armed Bear Common Lisp is a Common Lisp implementation for the JVM

Added to portage

2026-04-13

abcl - 1.9.3-r1
Ebuild name:

dev-lisp/abcl-1.9.3-r1

Description

Armed Bear Common Lisp is a Common Lisp implementation for the JVM

Added to portage

2026-04-13

asterisk - 20.19.0
Ebuild name:

net-misc/asterisk-20.19.0

Description

Asterisk A Modular Open Source PBX System

Added to portage

2026-04-13

asterisk - 22.9.0
Ebuild name:

net-misc/asterisk-22.9.0

Description

Asterisk A Modular Open Source PBX System

Added to portage

2026-04-13

bareos - 23.1.7
Ebuild name:

app-backup/bareos-23.1.7

Description

Featureful client/server network backup suite

Added to portage

2026-04-13

bareos - 24.0.10
Ebuild name:

app-backup/bareos-24.0.10

Description

Featureful client/server network backup suite

Added to portage

2026-04-13

bareos - 25.0.3
Ebuild name:

app-backup/bareos-25.0.3

Description

Featureful client/server network backup suite

Added to portage

2026-04-13

birdtray - 1.11.4_p20260413
Ebuild name:

x11-misc/birdtray-1.11.4_p20260413

Description

A new mail system tray notification icon for Thunderbird

Added to portage

2026-04-13

ccache - 4.13.3
Ebuild name:

dev-util/ccache-4.13.3

Description

Fast compiler cache

Added to portage

2026-04-13

converseen - 0.15.2.2
Ebuild name:

media-gfx/converseen-0.15.2.2

Description

Batch image converter and resizer based on ImageMagick

Added to portage

2026-04-13

cri-tools - 1.35.0
Ebuild name:

app-containers/cri-tools-1.35.0

Description

CLI and validation tools for Kubelet Container Runtime (CRI)

Added to portage

2026-04-13

dropbox-cli - 2026.03.20
Ebuild name:

net-misc/dropbox-cli-2026.03.20

Description

Cli interface for dropbox (python), part of nautilus-dropbox

Added to portage

2026-04-13

fakeredis - 2.35.1
Ebuild name:

dev-python/fakeredis-2.35.1

Description

Fake implementation of redis API for testing purposes

Added to portage

2026-04-13

gcc - 16.0.1_p20260412
Ebuild name:

sys-devel/gcc-16.0.1_p20260412

Description

The GNU Compiler Collection

Added to portage

2026-04-13

gsm - 1.0.24-r1
Ebuild name:

media-sound/gsm-1.0.24-r1

Description

Lossy speech compression library and tool

Added to portage

2026-04-13

importlib-resources - 7.1.0
Ebuild name:

dev-python/importlib-resources-7.1.0

Description

Read resources from Python packages

Added to portage

2026-04-13

libharu - 2.4.6
Ebuild name:

media-libs/libharu-2.4.6

Description

C/C++ library for PDF generation

Added to portage

2026-04-13

libmbim - 1.34.0
Ebuild name:

net-libs/libmbim-1.34.0

Description

Mobile Broadband Interface Model (MBIM) modem protocol helper library

Added to portage

2026-04-13

libqrtr-glib - 1.4.0
Ebuild name:

net-libs/libqrtr-glib-1.4.0

Description

Qualcomm IPC Router protocol helper library

Added to portage

2026-04-13

libwacom - 2.18.0
Ebuild name:

dev-libs/libwacom-2.18.0

Description

Library for identifying Wacom tablets and their model-specific features

Added to portage

2026-04-13

libwebm - 1.0.0.32
Ebuild name:

media-libs/libwebm-1.0.0.32

Description

WebM is an open, royalty-free, media file format designed for the web.

Added to portage

2026-04-13

libwebm - 9999
Ebuild name:

media-libs/libwebm-9999

Description

WebM is an open, royalty-free, media file format designed for the web.

Added to portage

2026-04-13

libxfce4windowing - 4.20.5-r1
Ebuild name:

xfce-base/libxfce4windowing-4.20.5-r1

Description

Unified widget and session management libs for Xfce

Added to portage

2026-04-13

lxml - 6.0.4
Ebuild name:

dev-python/lxml-6.0.4

Description

A Pythonic binding for the libxml2 and libxslt libraries

Added to portage

2026-04-13

mattermost-desktop-bin - 5.13.5-r1
Ebuild name:

net-im/mattermost-desktop-bin-5.13.5-r1

Description

Mattermost Desktop application

Added to portage

2026-04-13

mattermost-desktop-bin - 6.1.1-r1
Ebuild name:

net-im/mattermost-desktop-bin-6.1.1-r1

Description

Mattermost Desktop application

Added to portage

2026-04-13

mitmproxy - 12.2.2
Ebuild name:

net-proxy/mitmproxy-12.2.2

Description

An interactive, SSL-capable, man-in-the-middle HTTP proxy

Added to portage

2026-04-13

mocker - 0.5.0
Ebuild name:

app-emacs/mocker-0.5.0

Description

Simple mocking framework for Emacs

Added to portage

2026-04-13

mocker - 0.5.0
Ebuild name:

app-emacs/mocker-0.5.0

Description

Simple mocking framework for Emacs

Added to portage

2026-04-13

msgspec - 0.21.1
Ebuild name:

dev-python/msgspec-0.21.1

Description

Fast serialization and validation library, with builtin support for many

Added to portage

2026-04-13

mypy - 1.20.1
Ebuild name:

dev-python/mypy-1.20.1

Description

Optional static typing for Python

Added to portage

2026-04-13

nfdump - 1.7.7-r1
Ebuild name:

net-analyzer/nfdump-1.7.7-r1

Description

A set of tools to collect and process netflow data

Added to portage

2026-04-13

nprolog - 5.00
Ebuild name:

dev-lang/nprolog-5.00

Description

Interpreter and compiler to be compatible with Arity/Prolog32

Added to portage

2026-04-13

openpgp-keys-franz - 20260413
Ebuild name:

sec-keys/openpgp-keys-franz-20260413

Description

OpenPGP keys used by Michal Babej (franz)

Added to portage

2026-04-13

org-mode - 9.8.2
Ebuild name:

app-emacs/org-mode-9.8.2

Description

An Emacs mode for notes and project planning

Added to portage

2026-04-13

poetry - 2.3.4
Ebuild name:

dev-python/poetry-2.3.4

Description

A frontend for poetry - a python dependency management and packaging tool

Added to portage

2026-04-13

prowlarr-bin - 2.3.6.5351
Ebuild name:

www-apps/prowlarr-bin-2.3.6.5351

Description

An indexer manager/proxy to integrate with your various PVR apps

Added to portage

2026-04-13

qwt - 6.3.0-r1
Ebuild name:

x11-libs/qwt-6.3.0-r1

Description

2D plotting library for Qt

Added to portage

2026-04-13

radicale - 3.7.1
Ebuild name:

www-apps/radicale-3.7.1

Description

A simple CalDAV calendar server

Added to portage

2026-04-13

safeeyes - 3.4.0
Ebuild name:

x11-misc/safeeyes-3.4.0

Description

Linux alternative to EyeLeo

Added to portage

2026-04-13

sogo - 5.12.7
Ebuild name:

gnustep-apps/sogo-5.12.7

Description

Groupware server built around OpenGroupware.org and the SOPE application s

Added to portage

2026-04-13

sope - 5.12.7
Ebuild name:

gnustep-libs/sope-5.12.7

Description

A set of frameworks forming a complete Web application server environment

Added to portage

2026-04-13

squid - 7.5
Ebuild name:

net-proxy/squid-7.5

Description

Full-featured web proxy cache

Added to portage

2026-04-13

talk-desktop-bin - 2.1.2
Ebuild name:

net-im/talk-desktop-bin-2.1.2

Description

Nextcloud Talk Desktop client

Added to portage

2026-04-13

thinks - 1.13
Ebuild name:

app-emacs/thinks-1.13

Description

Insert text in a think bubble

Added to portage

2026-04-13

tuxedo-drivers - 4.22.1
Ebuild name:

app-laptop/tuxedo-drivers-4.22.1

Description

Kernel modules for TUXEDO laptops

Added to portage

2026-04-13

ubelt - 1.4.2
Ebuild name:

dev-python/ubelt-1.4.2

Description

A stdlib like feel, and extra batteries. Hashing, Caching, Timing, Progress

Added to portage

2026-04-13

vanilla-sources - 7.0.0
Ebuild name:

sys-kernel/vanilla-sources-7.0.0

Description

Full sources for the Linux kernel

Added to portage

2026-04-13

voikko-fi - 2.6
Ebuild name:

dev-libs/voikko-fi-2.6

Description

Finnish dictionary for libvoikko based spell checkers (vvfst format)

Added to portage

2026-04-13

xaos - 4.3.4
Ebuild name:

x11-misc/xaos-4.3.4

Description

Very fast real-time fractal zoomer

Added to portage

2026-04-13

xdp-tools - 1.6.3-r1
Ebuild name:

net-libs/xdp-tools-1.6.3-r1

Description

The libxdp library and various tools for use with XDP

Added to portage

2026-04-13

xerces-c - 3.3.0-r1
Ebuild name:

dev-libs/xerces-c-3.3.0-r1

Description

Validating XML parser written in a portable subset of C++

Added to portage

2026-04-13

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