Skip to main content

File Editor

Text Editors

ed (1969)

original, line oriented standard for  Unix

ex (1976)

extended, more powerful version of ed, introduced visual mode for full screen editing

vi (1976)

classic, efficient, visual full-screen editor built on top of ex

emacs (1976)

extensible, feature-rich ecosystem known for customisation

pico (1992)

simple, menu-driven, for non-technical users

vim (1991)

improved and advanced version of vi, with modern features

nano (1999)

free open source clone of pico

 

echo 'export EDITOR=nano' >> ~/.bashrc

set nano as default text editor

 

 

vi commands

mode

command

function

esc

up

down

left

right

move around

esc

shift g

move to end

esc

i

insert

insert

a

move right (and insert)

insert

o

line break (and insert)

insert

esc

escape current mode

esc

x

remove character

esc

r

replace character

esc

d

delete line

esc

u

bring line back

esc

:q!

quit

esc

:wq!

save and quit

 

nano commands

ctrl o

save current file (write out)

ctrl s

save current file (newer versions)

ctrl x

exit

ctrl w

search for specific text

ctrl \

find and replace

ctrl k

cut line

ctrl u

paste line

alt 6

copy line

alt n

toggle line numbers

alt u

undo

alt e

re-do