In emacs
, you can open new files with Ctrl+X, Ctrl+F
And go to the previous file with Ctrl+B, and go to the next file with Ctrl+N.
How to do this in nano
text editor? While nano
is launched, and then open new files, and how to switch between the opened files in the nano
text editor?
To delete the current line, press Ctrl-k . Saving your work: To save your edited file to disk, press Ctrl-o . Nano displays the current filename. (To save the file under a different name, delete the filename that Nano displays and type a new one.)
Find and Replace: Press Alt-R (hold down the ALT key and press the R key). You'll be asked what to search for. Enter it, then press the Enter or Return key. You'll be asked for replacement text.
Put "set multibuffer" into ~/.nanorc or start nano with -F. Toggle this inside nano with alt-F. You can now read files into their own buffer with ctrl-R.
Use alt-comma and alt-period to go forward and backward in the file list.
To switch between open files in nano
alt+. -- move forward one file
alt+, -- move back one file
Open as many files as you want by listing them as separate arguments to nano
, like so:
nano file1.txt file2.log file3.c file4.js file5.py
The first file is opened, e.g. file1.txt
. Use the keyboard shortcuts below to switch between the files.
alt+. -- move forward one file
alt+, -- move back one file
nano --version
GNU nano, version 2.9.3
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With