This are my notes in the fields of computer science and technology. Everything is written with ABSOLUTE NO WARRANTY of fitness for any purpose. Of course, feel free to comment anything.

Sunday, August 9, 2009

Compact guide to less commands

Movement

Arrows, page up/down, home/end keys all work as expected. In addition the following are sometimes useful:
d/uMove half page forward / backward
20gMove to line 20
20%Move to the 20% point
ma/'aset markpoint "a" / move to markpoint "a"
(also instead of "a" any other lowcase letter)

Search

/patternsearch pattern forward
?patternsearch pattern backward
nnext match
Nprevious match
/!patternsearch non-matching line
Esc-uturn match highlighting on/off

Misc

=show info about the file and current position
! commandexecute command and show its output
s filenamesave to file (if the input was a pipe)

No comments:

About Me

My photo
Hamburg, Hamburg, Germany
Former molecular biologist and web developer (Rails) and currently research scientist in bioinformatics.