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:

87649

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 (48 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-08-14
aws-sam-translator - 1.112.0
Ebuild name:

dev-python/aws-sam-translator-1.112.0

Description

A library that transform SAM templates into AWS CloudFormatio

Added to portage

2026-08-14

boto3 - 1.43.71
Ebuild name:

dev-python/boto3-1.43.71

Description

The AWS SDK for Python

Added to portage

2026-08-14

botocore - 1.43.71
Ebuild name:

dev-python/botocore-1.43.71

Description

Low-level, data-driven core of boto 3

Added to portage

2026-08-14

cfitsio - 4.7.0
Ebuild name:

sci-libs/cfitsio-4.7.0

Description

C and Fortran library for manipulating FITS files

Added to portage

2026-08-14

cfn-lint - 1.55.1
Ebuild name:

dev-python/cfn-lint-1.55.1

Description

CloudFormation Linter

Added to portage

2026-08-14

claude-code - 2.1.231
Ebuild name:

dev-util/claude-code-2.1.231

Description

Claude Code - an agentic coding tool by Anthropic

Added to portage

2026-08-14

cproc - 0_pre20260527
Ebuild name:

sys-devel/cproc-0_pre20260527

Description

C11 compiler using QBE as backend

Added to portage

2026-08-14

dbeaver-bin - 26.1.4
Ebuild name:

dev-db/dbeaver-bin-26.1.4

Description

Free universal database tool (community edition)

Added to portage

2026-08-14

duplicity - 3.2.0
Ebuild name:

app-backup/duplicity-3.2.0

Description

Secure backup system using GnuPG to encrypt data

Added to portage

2026-08-14

filelock - 3.32.3
Ebuild name:

dev-python/filelock-3.32.3

Description

A platform independent file lock for Python

Added to portage

2026-08-14

firewalld - 2.5.1
Ebuild name:

net-firewall/firewalld-2.5.1

Description

Firewall daemon with D-Bus interface providing a dynamic firewall

Added to portage

2026-08-14

gawk - 5.4.1-r1
Ebuild name:

sys-apps/gawk-5.4.1-r1

Description

GNU awk pattern-matching language

Added to portage

2026-08-14

hypothesis - 6.165.6
Ebuild name:

dev-python/hypothesis-6.165.6

Description

A library for property based testing

Added to portage

2026-08-14

libgit2 - 1.9.7
Ebuild name:

dev-libs/libgit2-1.9.7

Description

A linkable library for Git

Added to portage

2026-08-14

lv - 0.15.0-r1
Ebuild name:

app-emacs/lv-0.15.0-r1

Description

Other echo area

Added to portage

2026-08-14

mcrypt - 2.6.8-r3
Ebuild name:

app-crypt/mcrypt-2.6.8-r3

Description

Replacement of the old unix crypt(1)

Added to portage

2026-08-14

md5deep - 4.4
Ebuild name:

app-crypt/md5deep-4.4

Description

Expanded md5sum program with recursive and comparison options

Added to portage

2026-08-14

md6sum - 1.0-r3
Ebuild name:

app-crypt/md6sum-1.0-r3

Description

A C implementation of MD6

Added to portage

2026-08-14

mhash - 0.9.9.9-r4
Ebuild name:

app-crypt/mhash-0.9.9.9-r4

Description

Library providing a uniform interface to a large number of hash algorith

Added to portage

2026-08-14

minisign - 0.12
Ebuild name:

app-crypt/minisign-0.12

Description

Dead simple tool to sign files and verify signatures

Added to portage

2026-08-14

mit-krb5 - 1.22.2-r2
Ebuild name:

app-crypt/mit-krb5-1.22.2-r2

Description

MIT Kerberos V

Added to portage

2026-08-14

ml-dtypes - 0.6.0
Ebuild name:

dev-python/ml-dtypes-0.6.0

Description

A stand-alone implementation of several NumPy dtype extensions

Added to portage

2026-08-14

opencl-headers - 2026.05.29
Ebuild name:

dev-util/opencl-headers-2026.05.29

Description

Unified C language headers for the OpenCL API

Added to portage

2026-08-14

opencl-icd-loader - 2025.07.22
Ebuild name:

dev-libs/opencl-icd-loader-2025.07.22

Description

Official Khronos OpenCL ICD Loader

Added to portage

2026-08-14

pandoc-bin - 3.10.2
Ebuild name:

app-text/pandoc-bin-3.10.2

Description

Conversion between markup formats (binary package)

Added to portage

2026-08-14

pbr - 7.1.0
Ebuild name:

dev-python/pbr-7.1.0

Description

Inject some useful and sensible default behaviors into setuptools

Added to portage

2026-08-14

platformdirs - 4.11.3
Ebuild name:

dev-python/platformdirs-4.11.3

Description

A small Python module for determining appropriate platform-specific

Added to portage

2026-08-14

progressbar2 - 4.6.0
Ebuild name:

dev-python/progressbar2-4.6.0

Description

Text progressbar library for python

Added to portage

2026-08-14

pypdf - 6.16.0
Ebuild name:

dev-python/pypdf-6.16.0

Description

Python library to work with PDF files

Added to portage

2026-08-14

pytest-rerunfailures - 16.5
Ebuild name:

dev-python/pytest-rerunfailures-16.5

Description

pytest plugin to re-run tests to eliminate flaky failures

Added to portage

2026-08-14

pyzotero - 1.13.6
Ebuild name:

dev-python/pyzotero-1.13.6

Description

A Python client for the Zotero API

Added to portage

2026-08-14

racket - 9.3
Ebuild name:

dev-scheme/racket-9.3

Description

General purpose, multi-paradigm Lisp-Scheme programming language

Added to portage

2026-08-14

ruff - 0.16.3
Ebuild name:

dev-util/ruff-0.16.3

Description

An extremely fast Python linter, written in Rust

Added to portage

2026-08-14

sqlparse - 0.6.0
Ebuild name:

dev-python/sqlparse-0.6.0

Description

A non-validating SQL parser module for Python

Added to portage

2026-08-14

tox - 4.60.0
Ebuild name:

dev-python/tox-4.60.0

Description

virtualenv-based automation of test activities

Added to portage

2026-08-14

uutils-coreutils - 0.10.0
Ebuild name:

sys-apps/uutils-coreutils-0.10.0

Description

GNU coreutils rewritten in Rust

Added to portage

2026-08-14

uvicorn - 0.52.3
Ebuild name:

dev-python/uvicorn-0.52.3

Description

Lightning-fast ASGI server implementation

Added to portage

2026-08-14

wrapt - 2.4.0_rc2
Ebuild name:

dev-python/wrapt-2.4.0_rc2

Description

Module for decorators, wrappers and monkey patching

Added to portage

2026-08-14

xdg-dbus-proxy - 0.1.8
Ebuild name:

sys-apps/xdg-dbus-proxy-0.1.8

Description

Filtering proxy for D-Bus connections

Added to portage

2026-08-14

2026-08-13
acl - 2.4.0
Ebuild name:

virtual/acl-2.4.0

Description

Virtual for acl support (sys/acl.h)

Added to portage

2026-08-13

aiohttp-socks - 0.12.0
Ebuild name:

dev-python/aiohttp-socks-0.12.0

Description

SOCKS proxy connector for aiohttp

Added to portage

2026-08-13

ansible-compat - 26.8.0
Ebuild name:

dev-python/ansible-compat-26.8.0

Description

Contains functions that facilitate working with various versions o

Added to portage

2026-08-13

apache-arrow - 25.0.1-r1
Ebuild name:

dev-libs/apache-arrow-25.0.1-r1

Description

A cross-language development platform for in-memory data

Added to portage

2026-08-13

bcachefs-tools - 1.39.1
Ebuild name:

sys-fs/bcachefs-tools-1.39.1

Description

Tools for bcachefs

Added to portage

2026-08-13

boto3 - 1.43.70
Ebuild name:

dev-python/boto3-1.43.70

Description

The AWS SDK for Python

Added to portage

2026-08-13

botocore - 1.43.70
Ebuild name:

dev-python/botocore-1.43.70

Description

Low-level, data-driven core of boto 3

Added to portage

2026-08-13

bpf-linker - 0.11.0
Ebuild name:

dev-util/bpf-linker-0.11.0

Description

Simple BPF static linker

Added to portage

2026-08-13

braintree - 4.46.0
Ebuild name:

dev-python/braintree-4.46.0

Description

Braintree Python Library

Added to portage

2026-08-13

caffe2 - 2.12.0-r3
Ebuild name:

sci-ml/caffe2-2.12.0-r3

Description

A deep learning framework

Added to portage

2026-08-13

charset-normalizer - 3.5.0
Ebuild name:

dev-python/charset-normalizer-3.5.0

Description

The Real First Universal Charset Detector

Added to portage

2026-08-13

clang - 23.1.0_rc3
Ebuild name:

dev-python/clang-23.1.0_rc3

Description

Python bindings for llvm-core/clang

Added to portage

2026-08-13

clang - 23.1.0_rc3
Ebuild name:

llvm-core/clang-23.1.0_rc3

Description

C language family frontend for LLVM

Added to portage

2026-08-13

clang-common - 23.1.0_rc3
Ebuild name:

llvm-core/clang-common-23.1.0_rc3

Description

Common files shared between multiple slots of clang

Added to portage

2026-08-13

compiler-rt - 23.1.0_rc3
Ebuild name:

llvm-runtimes/compiler-rt-23.1.0_rc3

Description

Compiler runtime library for clang (built-in part)

Added to portage

2026-08-13

compiler-rt-sanitizers - 23.1.0_rc3
Ebuild name:

llvm-runtimes/compiler-rt-sanitizers-23.1.0_rc3

Description

Compiler runtime libraries for clang (sanitizers &

Added to portage

2026-08-13

datasets - 5.0.1-r2
Ebuild name:

sci-ml/datasets-5.0.1-r2

Description

Access and share datasets for Audio, Computer Vision, and NLP tasks

Added to portage

2026-08-13

discord - 1.0.153
Ebuild name:

net-im/discord-1.0.153

Description

All-in-one voice and text chat for gamers

Added to portage

2026-08-13

dolphin - 2606a
Ebuild name:

games-emulation/dolphin-2606a

Description

Gamecube and Wii game emulator

Added to portage

2026-08-13

flang - 23.1.0_rc3
Ebuild name:

llvm-core/flang-23.1.0_rc3

Description

LLVM's Fortran frontend

Added to portage

2026-08-13

flang-rt - 23.1.0_rc3
Ebuild name:

llvm-runtimes/flang-rt-23.1.0_rc3

Description

LLVM's Fortran runtime

Added to portage

2026-08-13

flatpak - 1.18.1
Ebuild name:

sys-apps/flatpak-1.18.1

Description

Linux application sandboxing and distribution framework

Added to portage

2026-08-13

glibc - 2.43-r3
Ebuild name:

sys-libs/glibc-2.43-r3

Description

GNU libc C library

Added to portage

2026-08-13

glibc - 2.44-r1
Ebuild name:

sys-libs/glibc-2.44-r1

Description

GNU libc C library

Added to portage

2026-08-13

httpx-socks - 0.13.0
Ebuild name:

dev-python/httpx-socks-0.13.0

Description

Proxy (HTTP, SOCKS) transports for httpx

Added to portage

2026-08-13

hypothesis - 6.165.4
Ebuild name:

dev-python/hypothesis-6.165.4

Description

A library for property based testing

Added to portage

2026-08-13

intel-microcode - 20260812_p20260813
Ebuild name:

sys-firmware/intel-microcode-20260812_p20260813

Description

Intel IA32/IA64 microcode update data

Added to portage

2026-08-13

libclc - 23.1.0_rc3
Ebuild name:

llvm-runtimes/libclc-23.1.0_rc3

Description

OpenCL C library

Added to portage

2026-08-13

libcxx - 23.1.0_rc3
Ebuild name:

llvm-runtimes/libcxx-23.1.0_rc3

Description

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

Added to portage

2026-08-13

libcxxabi - 23.1.0_rc3
Ebuild name:

llvm-runtimes/libcxxabi-23.1.0_rc3

Description

Low level support for a standard C++ library

Added to portage

2026-08-13

libgcc - 23.1.0_rc3
Ebuild name:

llvm-runtimes/libgcc-23.1.0_rc3

Description

Compiler runtime library for clang, compatible with libgcc_s

Added to portage

2026-08-13

liblore - 0.9.0
Ebuild name:

dev-python/liblore-0.9.0

Description

Shared library for public-inbox / lore.kernel.org access

Added to portage

2026-08-13

libunwind - 23.1.0_rc3
Ebuild name:

llvm-runtimes/libunwind-23.1.0_rc3

Description

C++ runtime stack unwinder from LLVM

Added to portage

2026-08-13

lit - 23.1.0_rc3
Ebuild name:

dev-python/lit-23.1.0_rc3

Description

A stand-alone install of the LLVM suite testing tool

Added to portage

2026-08-13

lld - 23.1.0_rc3
Ebuild name:

llvm-core/lld-23.1.0_rc3

Description

The LLVM linker (link editor)

Added to portage

2026-08-13

lldb - 23.1.0_rc3
Ebuild name:

llvm-core/lldb-23.1.0_rc3

Description

The LLVM debugger

Added to portage

2026-08-13

llvm - 23.1.0_rc3
Ebuild name:

dev-ml/llvm-23.1.0_rc3

Description

OCaml bindings for LLVM

Added to portage

2026-08-13

llvm - 23.1.0_rc3
Ebuild name:

llvm-core/llvm-23.1.0_rc3

Description

Low Level Virtual Machine

Added to portage

2026-08-13

llvm-common - 23.1.0_rc3
Ebuild name:

llvm-core/llvm-common-23.1.0_rc3

Description

Common files shared between multiple slots of LLVM

Added to portage

2026-08-13

mattermost-desktop-bin - 6.2.3_rc2
Ebuild name:

net-im/mattermost-desktop-bin-6.2.3_rc2

Description

Mattermost Desktop application

Added to portage

2026-08-13

mattermost-desktop-bin - 6.3.0
Ebuild name:

net-im/mattermost-desktop-bin-6.3.0

Description

Mattermost Desktop application

Added to portage

2026-08-13

mlir - 23.1.0_rc3
Ebuild name:

llvm-core/mlir-23.1.0_rc3

Description

Multi-Level Intermediate Representation (library only)

Added to portage

2026-08-13

opam - 2.5.2
Ebuild name:

dev-ml/opam-2.5.2

Description

A source-based package manager for OCaml

Added to portage

2026-08-13

opam-common - 2.5.2
Ebuild name:

dev-ml/opam-common-2.5.2

Description

Core libraries for opam

Added to portage

2026-08-13

opam-installer - 2.5.2
Ebuild name:

dev-ml/opam-installer-2.5.2

Description

Core installer for opam packages

Added to portage

2026-08-13

openmp - 23.1.0_rc3
Ebuild name:

llvm-runtimes/openmp-23.1.0_rc3

Description

OpenMP runtime libraries for LLVM/clang compiler

Added to portage

2026-08-13

openmp-amdgcn-amd-amdhsa - 23.1.0_rc3
Ebuild name:

llvm-runtimes/openmp-amdgcn-amd-amdhsa-23.1.0_rc3

Description

OpenMP target library for amdgcn devices

Added to portage

2026-08-13

openmp-nvptx64-nvidia-cuda - 23.1.0_rc3
Ebuild name:

llvm-runtimes/openmp-nvptx64-nvidia-cuda-23.1.0_rc3

Description

OpenMP target library for nvptx64 devices

Added to portage

2026-08-13

openmp-spirv64-intel - 23.1.0_rc3
Ebuild name:

llvm-runtimes/openmp-spirv64-intel-23.1.0_rc3

Description

OpenMP target library for spirv64 Intel devices

Added to portage

2026-08-13

polly - 23.1.0_rc3
Ebuild name:

llvm-core/polly-23.1.0_rc3

Description

Polyhedral optimizations for LLVM

Added to portage

2026-08-13

pyproject-fmt - 2.27.1
Ebuild name:

dev-python/pyproject-fmt-2.27.1

Description

Format your pyproject.toml file

Added to portage

2026-08-13

pytest-lazy-fixtures - 1.4.1
Ebuild name:

dev-python/pytest-lazy-fixtures-1.4.1

Description

Allows you to use fixtures in @pytest.mark.parametrize

Added to portage

2026-08-13

python - 3.10.21
Ebuild name:

dev-lang/python-3.10.21

Description

An interpreted, interactive, object-oriented programming language

Added to portage

2026-08-13

python - 3.11.16
Ebuild name:

dev-lang/python-3.11.16

Description

An interpreted, interactive, object-oriented programming language

Added to portage

2026-08-13

python - 3.12.14
Ebuild name:

dev-lang/python-3.12.14

Description

An interpreted, interactive, object-oriented programming language

Added to portage

2026-08-13

python-discovery - 1.5.2
Ebuild name:

dev-python/python-discovery-1.5.2

Description

Python interpreter discovery

Added to portage

2026-08-13

python-engineio - 4.13.5
Ebuild name:

dev-python/python-engineio-4.13.5

Description

Python implementation of the Engine.IO realtime server

Added to portage

2026-08-13

python-tests - 3.12.14
Ebuild name:

dev-python/python-tests-3.12.14

Description

Test modules from dev-lang/python

Added to portage

2026-08-13

pythran - 0.19.0_rc1
Ebuild name:

dev-python/pythran-0.19.0_rc1

Description

Ahead of Time compiler for numeric kernels

Added to portage

2026-08-13

pyzotero - 1.13.5
Ebuild name:

dev-python/pyzotero-1.13.5

Description

A Python client for the Zotero API

Added to portage

2026-08-13

repo - 2.65
Ebuild name:

dev-vcs/repo-2.65

Description

Google tool for managing git, particularly multiple repos

Added to portage

2026-08-13

root - 6.40.02
Ebuild name:

sci-physics/root-6.40.02

Description

C++ data analysis framework and interpreter from CERN

Added to portage

2026-08-13

rsync - 3.5.0
Ebuild name:

net-misc/rsync-3.5.0

Description

File transfer program to keep remote files into sync

Added to portage

2026-08-13

rw - 0.10
Ebuild name:

sci-mathematics/rw-0.10

Description

Compute rank-width decompositions of graphs

Added to portage

2026-08-13

shadow - 4.20.2
Ebuild name:

sys-apps/shadow-4.20.2

Description

Utilities to deal with user accounts

Added to portage

2026-08-13

sqlglot - 30.17.0
Ebuild name:

dev-python/sqlglot-30.17.0

Description

An easily customizable SQL parser and transpiler

Added to portage

2026-08-13

types-setuptools - 84.0.0.20260812
Ebuild name:

dev-python/types-setuptools-84.0.0.20260812

Description

Typing stubs for setuptools

Added to portage

2026-08-13

typing-inspection - 0.4.4
Ebuild name:

dev-python/typing-inspection-0.4.4

Description

Runtime typing introspection tools

Added to portage

2026-08-13

uftrace - 0.19
Ebuild name:

dev-util/uftrace-0.19

Description

Function (graph) tracer for user-space

Added to portage

2026-08-13

xrootd - 5.9.7
Ebuild name:

net-libs/xrootd-5.9.7

Description

Extended ROOT remote file server

Added to portage

2026-08-13

xrootd - 6.1.1
Ebuild name:

net-libs/xrootd-6.1.1

Description

Extended ROOT remote file server

Added to portage

2026-08-13

xxhash - 4.0.0
Ebuild name:

dev-python/xxhash-4.0.0

Description

Python binding for the xxHash library

Added to portage

2026-08-13

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