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:

83001

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-01-29
aspell - 0.60.8.2
Ebuild name:

app-text/aspell-0.60.8.2

Description

Free and Open Source spell checker designed to replace Ispell

Added to portage

2026-01-29

avahi - 0.9_rc3
Ebuild name:

net-dns/avahi-0.9_rc3

Description

System which facilitates service discovery on a local network

Added to portage

2026-01-29

bareos - 25.0.1
Ebuild name:

app-backup/bareos-25.0.1

Description

Featureful client/server network backup suite

Added to portage

2026-01-29

bareos - 25.0.1
Ebuild name:

dev-python/bareos-25.0.1

Description

python bindings for bareos network backup suite

Added to portage

2026-01-29

bedrock-server - 1.21.132.3
Ebuild name:

games-server/bedrock-server-1.21.132.3

Description

The official bedrock (non-java) based server for the sandbox

Added to portage

2026-01-29

borgmatic - 2.1.1
Ebuild name:

app-backup/borgmatic-2.1.1

Description

Automatically create, prune and verify backups with borgbackup

Added to portage

2026-01-29

confuse - 2.2.0
Ebuild name:

dev-python/confuse-2.2.0

Description

Confuse is a configuration library for Python that uses YAML

Added to portage

2026-01-29

dunst - 1.13.1
Ebuild name:

x11-misc/dunst-1.13.1

Description

Lightweight replacement for common notification daemons

Added to portage

2026-01-29

dustrac - 2.2.0
Ebuild name:

games-sports/dustrac-2.2.0

Description

Tile-based, cross-platform 2D racing game

Added to portage

2026-01-29

faudio - 26.01
Ebuild name:

app-emulation/faudio-26.01

Description

Accuracy-focused XAudio reimplementation for open platforms

Added to portage

2026-01-29

firefox - 147.0.2
Ebuild name:

www-client/firefox-147.0.2

Description

Firefox Web Browser

Added to portage

2026-01-29

hypothesis - 6.151.3
Ebuild name:

dev-python/hypothesis-6.151.3

Description

A library for property based testing

Added to portage

2026-01-29

intel-vc-intrinsics - 0.24.3
Ebuild name:

dev-libs/intel-vc-intrinsics-0.24.3

Description

A set of new intrinsics on top of core LLVM IR instructions

Added to portage

2026-01-29

openjdk-bin - 21.0.10_p7
Ebuild name:

dev-java/openjdk-bin-21.0.10_p7

Description

Prebuilt Java JDK binaries provided by Eclipse Temurin

Added to portage

2026-01-29

openjdk-bin - 26_beta32
Ebuild name:

dev-java/openjdk-bin-26_beta32

Description

Prebuilt Java JDK binaries provided by Eclipse Temurin

Added to portage

2026-01-29

openjdk-bin - 27_alpha6
Ebuild name:

dev-java/openjdk-bin-27_alpha6

Description

Prebuilt Java JDK binaries provided by Eclipse Temurin

Added to portage

2026-01-29

openrct2 - 0.4.30
Ebuild name:

games-simulation/openrct2-0.4.30

Description

An open source re-implementation of Chris Sawyer's RollerCoaster T

Added to portage

2026-01-29

osm - 2.2
Ebuild name:

app-emacs/osm-2.2

Description

OpenStreetMap tile-based viewer for GNU Emacs

Added to portage

2026-01-29

osm - 9999
Ebuild name:

app-emacs/osm-9999

Description

OpenStreetMap tile-based viewer for GNU Emacs

Added to portage

2026-01-29

picard - 3.0.0_alpha1
Ebuild name:

media-sound/picard-3.0.0_alpha1

Description

Cross-platform music tagger

Added to portage

2026-01-29

qdirstat - 2.0
Ebuild name:

sys-apps/qdirstat-2.0

Description

Qt-based directory statistics

Added to portage

2026-01-29

stress-ng - 0.20.00
Ebuild name:

app-benchmarks/stress-ng-0.20.00

Description

Stress test for a computer system with various selectable ways

Added to portage

2026-01-29

tmuxp - 1.64.0
Ebuild name:

app-misc/tmuxp-1.64.0

Description

tmux session manager. built on libtmux

Added to portage

2026-01-29

tomcat - 10.1.52
Ebuild name:

www-servers/tomcat-10.1.52

Description

Tomcat Servlet-6.0/JSP-3.1/EL-5.0/WebSocket-2.1/JASPIC-3.0 Container

Added to portage

2026-01-29

ttl - 0.15.2
Ebuild name:

net-analyzer/ttl-0.15.2

Description

Modern traceroute/mtr-style TUI with hop stats and optional ASN/geo enrichm

Added to portage

2026-01-29

xarray - 2026.1.0
Ebuild name:

dev-python/xarray-2026.1.0

Description

N-D labeled arrays and datasets in Python

Added to portage

2026-01-29

2026-01-28
actioncable - 8.1.2
Ebuild name:

dev-ruby/actioncable-8.1.2

Description

Integrated WebSockets for Rails

Added to portage

2026-01-28

actionmailbox - 8.1.2
Ebuild name:

dev-ruby/actionmailbox-8.1.2

Description

Framework for designing email-service layers

Added to portage

2026-01-28

actionmailer - 8.1.2
Ebuild name:

dev-ruby/actionmailer-8.1.2

Description

Framework for designing email-service layers

Added to portage

2026-01-28

actiontext - 8.1.2
Ebuild name:

dev-ruby/actiontext-8.1.2

Description

Edit and display rich text in Rails applications

Added to portage

2026-01-28

activestorage - 8.1.2
Ebuild name:

dev-ruby/activestorage-8.1.2

Description

Attach cloud and local files in Rails applications

Added to portage

2026-01-28

awscli - 1.44.26
Ebuild name:

app-admin/awscli-1.44.26

Description

Universal Command Line Environment for AWS

Added to portage

2026-01-28

biglybt - 4.0.0.0
Ebuild name:

net-p2p/biglybt-4.0.0.0

Description

Feature-filled Bittorrent client based on Azureus

Added to portage

2026-01-28

boto3 - 1.42.36
Ebuild name:

dev-python/boto3-1.42.36

Description

The AWS SDK for Python

Added to portage

2026-01-28

botocore - 1.42.36
Ebuild name:

dev-python/botocore-1.42.36

Description

Low-level, data-driven core of boto 3

Added to portage

2026-01-28

cachetools - 6.2.6
Ebuild name:

dev-python/cachetools-6.2.6

Description

Extensible memoizing collections and decorators

Added to portage

2026-01-28

caffe2 - 2.10.0-r1
Ebuild name:

sci-ml/caffe2-2.10.0-r1

Description

A deep learning framework

Added to portage

2026-01-28

claude-code - 2.1.20-r1
Ebuild name:

dev-util/claude-code-2.1.20-r1

Description

Claude Code - an agentic coding tool by Anthropic

Added to portage

2026-01-28

cmd2 - 3.1.2
Ebuild name:

dev-python/cmd2-3.1.2

Description

Extra features for standard library's cmd module

Added to portage

2026-01-28

commons-text - 1.15.0
Ebuild name:

dev-java/commons-text-1.15.0

Description

Apache Commons Text is a library focused on algorithms working on stri

Added to portage

2026-01-28

cryptography - 46.0.4
Ebuild name:

dev-python/cryptography-46.0.4

Description

Library providing cryptographic recipes and primitives

Added to portage

2026-01-28

feathernotes - 1.4.0
Ebuild name:

app-text/feathernotes-1.4.0

Description

Lightweight Qt Notes-Manager for Linux

Added to portage

2026-01-28

firefox-bin - 147.0.2
Ebuild name:

www-client/firefox-bin-147.0.2

Description

Firefox Web Browser

Added to portage

2026-01-28

freepg - 2.5.17
Ebuild name:

app-crypt/freepg-2.5.17

Description

Cross-distro GnuPG fork focused on OpenPGP compliance

Added to portage

2026-01-28

freewvs - 0.1.5
Ebuild name:

app-misc/freewvs-0.1.5

Description

Scans filesystem for known vulnerable web applications

Added to portage

2026-01-28

haruna - 1.7.1
Ebuild name:

media-video/haruna-1.7.1

Description

Video player built with Qt/QML and libmpv

Added to portage

2026-01-28

intune-portal - 1.2511.11
Ebuild name:

sys-apps/intune-portal-1.2511.11

Description

Microsoft Intune Company Portal to access a corporate environment

Added to portage

2026-01-28

libnbd - 1.24.0-r1
Ebuild name:

sys-libs/libnbd-1.24.0-r1

Description

NBD client library in userspace

Added to portage

2026-01-28

libnss-mysql - 1.7.1-r1
Ebuild name:

sys-auth/libnss-mysql-1.7.1-r1

Description

NSS MySQL Library

Added to portage

2026-01-28

mergiraf - 0.16.3
Ebuild name:

dev-vcs/mergiraf-0.16.3

Description

Syntax-aware git merge driver

Added to portage

2026-01-28

mongodb-compass-bin - 1.49.1
Ebuild name:

dev-db/mongodb-compass-bin-1.49.1

Description

GUI for MongoDB

Added to portage

2026-01-28

plasma-keyboard - 6.5.91
Ebuild name:

kde-plasma/plasma-keyboard-6.5.91

Description

Virtual keyboard based on Qt Virtual Keyboard

Added to portage

2026-01-28

qt-creator - 18.0.2
Ebuild name:

dev-qt/qt-creator-18.0.2

Description

Lightweight IDE for C++/QML development centering around Qt

Added to portage

2026-01-28

qt-docs - 6.10.2_p202601261212
Ebuild name:

dev-qt/qt-docs-6.10.2_p202601261212

Description

Qt6 documentation and examples for Qt Creator and other tools

Added to portage

2026-01-28

qt3d - 6.10.2
Ebuild name:

dev-qt/qt3d-6.10.2

Description

3D rendering module for the Qt6 framework

Added to portage

2026-01-28

qt5compat - 6.10.2
Ebuild name:

dev-qt/qt5compat-6.10.2

Description

Qt module containing the unsupported Qt 5 APIs

Added to portage

2026-01-28

qtbase - 6.10.2
Ebuild name:

dev-qt/qtbase-6.10.2

Description

Cross-platform application development framework

Added to portage

2026-01-28

qtcharts - 6.10.2
Ebuild name:

dev-qt/qtcharts-6.10.2

Description

Chart component library for the Qt6 framework

Added to portage

2026-01-28

qtconnectivity - 6.10.2
Ebuild name:

dev-qt/qtconnectivity-6.10.2

Description

Bluetooth and NFC support library for the Qt6 framework

Added to portage

2026-01-28

qtdeclarative - 6.10.2
Ebuild name:

dev-qt/qtdeclarative-6.10.2

Description

Qt Declarative (Quick 2)

Added to portage

2026-01-28

qtgraphs - 6.10.2
Ebuild name:

dev-qt/qtgraphs-6.10.2

Description

Graphs component library for the Qt6 framework

Added to portage

2026-01-28

qthttpserver - 6.10.2
Ebuild name:

dev-qt/qthttpserver-6.10.2

Description

HTTP server functionality for the Qt6 framework

Added to portage

2026-01-28

qtimageformats - 6.10.2
Ebuild name:

dev-qt/qtimageformats-6.10.2

Description

Additional format plugins for the Qt image I/O system

Added to portage

2026-01-28

qtlanguageserver - 6.10.2
Ebuild name:

dev-qt/qtlanguageserver-6.10.2

Description

Implementation of the Language Server Protocol for Qt

Added to portage

2026-01-28

qtlocation - 6.10.2
Ebuild name:

dev-qt/qtlocation-6.10.2

Description

Location (places, maps, navigation) library for the Qt6 framework

Added to portage

2026-01-28

qtmultimedia - 6.10.2
Ebuild name:

dev-qt/qtmultimedia-6.10.2

Description

Multimedia (audio, video, radio, camera) library for the Qt6 framework

Added to portage

2026-01-28

qtnetworkauth - 6.10.2
Ebuild name:

dev-qt/qtnetworkauth-6.10.2

Description

Network authorization library for the Qt6 framework

Added to portage

2026-01-28

qtpositioning - 6.10.2
Ebuild name:

dev-qt/qtpositioning-6.10.2

Description

Physical position determination library for the Qt6 framework

Added to portage

2026-01-28

qtquick3d - 6.10.2
Ebuild name:

dev-qt/qtquick3d-6.10.2

Description

Qt module and API for defining 3D content in Qt QuickTools

Added to portage

2026-01-28

qtquicktimeline - 6.10.2
Ebuild name:

dev-qt/qtquicktimeline-6.10.2

Description

Qt module for keyframe-based timeline construction

Added to portage

2026-01-28

qtremoteobjects - 6.10.2
Ebuild name:

dev-qt/qtremoteobjects-6.10.2

Description

Inter-Process Communication (IPC) library for the Qt6 framework

Added to portage

2026-01-28

qtscxml - 6.10.2
Ebuild name:

dev-qt/qtscxml-6.10.2

Description

State Chart XML (SCXML) support library for the Qt6 framework

Added to portage

2026-01-28

qtsensors - 6.10.2
Ebuild name:

dev-qt/qtsensors-6.10.2

Description

Hardware sensor access library for the Qt6 framework

Added to portage

2026-01-28

qtserialbus - 6.10.2
Ebuild name:

dev-qt/qtserialbus-6.10.2

Description

Qt module to access CAN, ModBus, and other industrial serial buses and pr

Added to portage

2026-01-28

qtserialport - 6.10.2
Ebuild name:

dev-qt/qtserialport-6.10.2

Description

Serial port abstraction library for the Qt6 framework

Added to portage

2026-01-28

qtshadertools - 6.10.2
Ebuild name:

dev-qt/qtshadertools-6.10.2

Description

Qt APIs and Tools for Graphics Pipelines

Added to portage

2026-01-28

qtspeech - 6.10.2
Ebuild name:

dev-qt/qtspeech-6.10.2

Description

Text-to-speech library for the Qt6 framework

Added to portage

2026-01-28

qtsvg - 6.10.2
Ebuild name:

dev-qt/qtsvg-6.10.2

Description

SVG rendering library for the Qt6 framework

Added to portage

2026-01-28

qttools - 6.10.2
Ebuild name:

dev-qt/qttools-6.10.2

Description

Qt Tools Collection

Added to portage

2026-01-28

qttranslations - 6.10.2
Ebuild name:

dev-qt/qttranslations-6.10.2

Description

Translation files for the Qt6 framework

Added to portage

2026-01-28

qtvirtualkeyboard - 6.10.2
Ebuild name:

dev-qt/qtvirtualkeyboard-6.10.2

Description

Customizable input framework and virtual keyboard for Qt

Added to portage

2026-01-28

qtwayland - 6.10.2
Ebuild name:

dev-qt/qtwayland-6.10.2

Description

Toolbox for making Qt based Wayland compositors

Added to portage

2026-01-28

qtwebchannel - 6.10.2
Ebuild name:

dev-qt/qtwebchannel-6.10.2

Description

Qt WebChannel

Added to portage

2026-01-28

qtwebengine - 6.10.2
Ebuild name:

dev-qt/qtwebengine-6.10.2

Description

Library for rendering dynamic web content in Qt6 C++ and QML applications

Added to portage

2026-01-28

qtwebsockets - 6.10.2
Ebuild name:

dev-qt/qtwebsockets-6.10.2

Description

Implementation of the WebSocket protocol for the Qt6 framework

Added to portage

2026-01-28

qtwebview - 6.10.2
Ebuild name:

dev-qt/qtwebview-6.10.2

Description

Module for displaying web content in a QML application using the Qt6 framew

Added to portage

2026-01-28

rails - 8.1.2
Ebuild name:

dev-ruby/rails-8.1.2

Description

ruby on rails is a web-application and persistence framework

Added to portage

2026-01-28

reaper-bin - 7.59
Ebuild name:

media-sound/reaper-bin-7.59

Description

Digital audio workstation

Added to portage

2026-01-28

rpm-sequoia - 1.9.0
Ebuild name:

app-crypt/rpm-sequoia-1.9.0

Description

Implementation of the RPM PGP interface using Sequoia

Added to portage

2026-01-28

sbctl - 0.15.4
Ebuild name:

app-crypt/sbctl-0.15.4

Description

Secure Boot key manager

Added to portage

2026-01-28

synapse - 1.146.0
Ebuild name:

net-im/synapse-1.146.0

Description

Reference implementation of Matrix homeserver

Added to portage

2026-01-28

tellico - 4.1.5
Ebuild name:

kde-misc/tellico-4.1.5

Description

Collection manager based on KDE Frameworks

Added to portage

2026-01-28

tomcat - 11.0.18
Ebuild name:

www-servers/tomcat-11.0.18

Description

Tomcat Servlet-6.1/JSP-4.0/EL-6.0/WebSocket-2.2/JASPIC-3.1 Container

Added to portage

2026-01-28

tor - 0.4.8.21-r1
Ebuild name:

net-vpn/tor-0.4.8.21-r1

Description

Anonymizing overlay network for TCP

Added to portage

2026-01-28

transmission - 4.1.0
Ebuild name:

net-p2p/transmission-4.1.0

Description

A fast, easy, and free BitTorrent client

Added to portage

2026-01-28

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