0% found this document useful (0 votes)
6 views2 pages

Nano Text Editor Commands Guide

Uploaded by

fazin barin
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views2 pages

Nano Text Editor Commands Guide

Uploaded by

fazin barin
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

NANO(1) General Commands Manual NANO(1)

N#NA#AM#ME#E
nano - Nano's ANOther text editor, inspired by Pico

S#SY#YN#NO#OP#PS#SI#IS#S
n#na#an#no#o [_#o_#p_#t_#i_#o_#n_#s]
[[+#+_#l_#i_#n_#e[,#,_#c_#o_#l_#u_#m_#n]] _#f_#i_#l_#e]...

n#na#an#no#o [_#o_#p_#t_#i_#o_#n_#s]
[_#f_#i_#l_#e[:#:_#l_#i_#n_#e[:#:_#c_#o_#l_#u_#m_#n]]]...

n#na#an#no#o [_#o_#p_#t_#i_#o_#n_#s] [[+#+[c#cr#rC#CR#R]{/#/|?


#?}_#s_#t_#r_#i_#n_#g] _#f_#i_#l_#e]...

N#NO#OT#TI#IC#CE#E
Since version 8.0, to be newcomer friendly, ^#^F#F starts a forward search,
^#^B#B starts a backward search, M#M-#-F#F searches the next occurrence
forward,
and M#M-#-B#B searches the next occurrence backward. If you want those
keystrokes to do what they did before version 8.0, add the following
lines at the end of your _#n_#a_#n_#o_#r_#c file:

b#bi#in#nd#d ^#^F#F f#fo#or#rw#wa#ar#rd#d m#ma#ai#in#n


b#bi#in#nd#d ^#^B#B b#ba#ac#ck#k m#ma#ai#in#n
b#bi#in#nd#d M#M-#-F#F f#fo#or#rm#ma#at#tt#te#er#r m#ma#ai#in#n
b#bi#in#nd#d M#M-#-B#B l#li#in#nt#te#er#r m#ma#ai#in#n

D#DE#ES#SC#CR#RI#IP#PT#TI#IO#ON#N
n#na#an#no#o is a small and friendly text editor. It copies the look and
feel
of Pico, but is free software, and implements several features that
Pico lacks, such as: opening multiple files, scrolling per line,
undo/redo, syntax coloring, line numbering, and soft-wrapping overlong
lines.

When giving a filename on the command line, the cursor can be put on a
specific line by adding the line number with a plus sign (+#+) before the
filename, and even in a specific column by adding it with a comma.
Negative numbers count from the end of the file or line. The line and
column numbers may also be specified by gluing them with colons after
the filename. (When a filename contains a colon followed by digits,
escape the colon by preceding it with a triple backslash.)

The cursor can be put on the first or last occurrence of a specific


string by specifying that string after +#+/#/ or +#+?#? before the filename.
The string can be made case sensitive and/or caused to be interpreted
as a regular expression by inserting c#c and/or r#r after the +#+ sign.
These search modes can be explicitly disabled by using the uppercase
variant of those letters: C#C and/or R#R. When the string contains spaces,
it needs to be enclosed in quotes. To give an example: to open a file
at the first occurrence of the word "Foo", you would do:
n#na#an#no#o +#+c#c/#/F#Fo#oo#o _#f_#i_#l_#e

As a special case: if instead of a filename a dash (-#-) is given,


n#na#an#no#o
will read data from standard input.

E#ED#DI#IT#TI#IN#NG#G
Entering text and moving around in a file is straightforward: typing
the letters and using the normal cursor movement keys. Commands are
entered by using the Control (^) and the Alt or Meta (M-) keys. Typing
^#^K#K deletes the current line and puts it in the cutbuffer. Consecutive
^#^K#Ks will put all deleted lines together in the cutbuffer. Any cursor
movement or executing any other command will cause the next ^#^K#K to
overwrite the cutbuffer. A ^#^U#U will paste the current contents of the
cutbuffer at the current cursor position.

When a more precise piece of text needs to be cut or copied, you can
mark its start with ^#^6#6, move the cursor to its end (the marked text
will be highlighted), and then use ^#^K#K to cut it, or M#M-#-6#6 to copy it
to
the cutbuffer. You can also save the marked text to a file with ^#^O#O, or
spell check it with ^#^T#T^#^T#T.

On some terminals, text can be selected also by holding down Shift


while using the arrow keys. Holding down the Ctrl or Alt key too will
increase the stride. Any cursor movement without Shift being held will
cancel such a selection.

Any valid Unicode code point can be inserted into the buffer by typing
M#M-#-V#V followed by the hexadecimal digits of the code point (concluded
with <#<S#Sp#pa#ac#ce#e>#> or <#<E#En#nt#te#er#r>#> when it are fewer than
six digits). A literal
control code (except ^#^J#J) can be inserted by typing M#M-#-V#V followed by
the
pertinent keystroke.

The two lines at the bottom of the screen show some important commands;
the built-in help (^#^G#G) lists all the available ones. The default key
bindings can be changed via a _#n_#a_#n_#o_#r_#c file -- see
n#na#an#no#or#rc#c(5).

O#OP#PT#TI#IO#ON#NS#S
-#-A#A, -#--#-s#sm#ma#ar#rt#th#ho#om#me#e
Make the Home key smarter. When Home is pressed anywhere but at
the very beginning of non-whitespace characters on a line, the
cursor will jump to that beginning (either forwards or
backwards). If the cursor is already at that position, it will
jump to the

You might also like