Home

characterwise

Characterwise refers to operations, selections, or processing that apply to text one character at a time, rather than by lines, words, or rectangular blocks. It is a common concept in text editors and programming tasks, enabling fine-grained edits and transformations.

In text editors, characterwise is a key granularity for selections and operations. For example, in Vim, there

In programming and text processing, characterwise processing means iterating over or transforming strings at the level

are
three
visual
selection
modes:
characterwise,
linewise,
and
blockwise.
A
characterwise
selection
covers
text
from
the
first
to
the
last
character,
potentially
spanning
multiple
lines.
Operators
such
as
d
(delete),
y
(yank),
c
(change),
or
>
(indent)
act
on
a
range
defined
by
a
following
motion;
if
the
motion
is
character-based,
the
result
is
a
characterwise
operation,
whereas
line-based
motions
yield
linewise,
and
blockwise
motions
yield
a
rectangular
selection.
In
Vim,
pressing
v
enters
characterwise
Visual
mode,
while
Ctrl-V
enters
Block
mode
and
V
enters
Line
mode.
of
individual
characters.
This
is
opposed
to
wordwise
processing,
which
relies
on
word
boundaries,
or
grapheme-aware
processing,
which
treats
user-perceived
characters
as
units.
Characterwise
handling
is
sensitive
to
encoding,
especially
for
Unicode
text
where
a
single
user-perceived
character
may
consist
of
multiple
code
points.
The
term
is
used
across
editors
and
languages
to
describe
per-character
operations
and
should
be
distinguished
from
per-word
or
per-line
approaches.