john pfeiffer
  • Home
  • Categories
  • Tags
  • Archives

Nano

vi ~/.bashrc

alias nano='nano -S -c -u' # -S = smooth scroll , -c = line number, -u = undo

-S (--smooth) -B (--backup) -m (--mouse) (but can cause problems with copy pasting in putty portable) -c (--const) (always shows the line number and column of the cursor) -u (--undo) (meta u for undo, meta e for redo)


ctl + k = cut a line # multiple cuts in a row will all be added to the buffer ctl + u = paste a line # can also paste a block of ctl+k lines from the buffer together

ctl + o = save current changes ctl + x = exit # prompted to save or discard

ctl + c to cancel the above

ctl + w = find a string

alt + w = find again

ctrl + v = page down (argh confused with paste) ctrl + y = page up ctrl + space = forward a word

alt + / = last line of the file alt + \ = first line of the file

meta = esc or alt

meta + space = back a word

meta + u = undo meta + e = redo

CUSTOMIZE SYNTAX HIGHLIGHT COLORS sudo su cd /usr/share/nano/nanorc

If sensibly using a light background and dark font...

sed 's/yellow/blue/g' -i .nanorc sed 's/white/green/g' -i .nanorc

http://www.nano-editor.org/


  • « Opscode knife aws ec2
  • twisted socket bind REUSEADDR shutdown »

Published

Sep 18, 2013

Category

linux

~185 words

Tags

  • linux 249
  • nano 2