100 likes | 249 Views
October 24 , 2013. HPC workshop – Introductory Session nano editor. Creating and Opening Files Save and Exit Navigation Shortcuts Copying, Cutting and Pasting Searching and Replacing More Information Tutorials. Outline. Basics. N ew or existing files # nano
E N D
October 24, 2013 HPC workshop – Introductory Session nano editor
Creating and Opening Files • Save and Exit • Navigation • Shortcuts • Copying, Cutting and Pasting • Searching and Replacing • More Information • Tutorials Outline
New or existing files • # nano • Type your text, WYSIWYG • Ctrl+O to save, enter filename, Ctrl+X to exit • # nano /nethome/pdavila/example.txt • Configuration files • # nano-w~/.nanorc • It is very important that you use the -w switch when opening a configfile! • Hold Alt, press L (M-L) to toggle Line Wrapping Opening and creating files
Basic ways to move the cursor • Home, End, Page Up, Page Down, and the arrow keys • Shortcuts • Ctrl+A, Ctrl+E (Home, End) • Ctrl+Y,Ctrl+V (Page Up, Page Down) • Ctr+F, Ctrl+B (move cursor forward, backward) • Ctrl+P, Ctrl+N (move cursor up, down one line) Navigation
Shortcuts Note: Meta (M) is Alt key (pc), Esc key (mac)
Copy, Cut and Paste a single line • Alt+6, Ctrl+K and Ctrl+U • Move multiple lines • Multiple Ctrl+K followed by on Ctrl+U • Highlighting • Ctrl+6 or Alt-A at beginning, move to end Copying, Cutting and Pasting
Search • Ctrl+W, type string, press Enter. • Alt-W to search for the same string again • Replace • Ctrl-\, type string to search, type string to replace, confirm (Yes, No, All, Cancel) Searching and Replace