Here Are Some Tips & Tricks for (Mac) OS X and GNU/Linux Nano Text Editor Including Shortcuts, Line Numbers, Going to Line Number etc. Basic Things. vi is definitely a powerful text editor, you can read How to Use vi Text Editor, but basically for the new Linux and OS X user, Nano appears better. It is better to help the user to shift from closed source software like Microsoft Windows in a smooth way. When Nano’s limitations will push them to use vi, they’ll definitely use vi. A human trying to ssh for the first time in life, if we instruct them to use vi, only the difficulty of using a text editor becomes the reason to fear ssh, honestly, that is not exactly what is called Free Software agonistic approach. These Nano Text Editor Tips & Tricks are possibly not for 100% new user, but can help many users in real life.
Nano Text Editor Tips & Tricks : OS X and Syntax Highlighting
We love Syntax Highlighting. Only for Nano, we have some useful guides and projects :
We are not mentioning more guides related to Syntax Highlighting for Nano. You can perform a search on this website later, if you want.
---
Nano Text Editor Tips & Tricks
These are the parameters which you can define in ~./nanorc
file, most can be understood from the name. Use one by one. Do not copy paste the whole file. You’ll need to run source ~./nanorc
after each changes :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# Turn on auto-indent set autoindent # Turn on the creation of backup files set backup set backupdir "/path/to/backups" set mouse set multibuffer set casesensitive set noconvert set nofollow # Turn off the Help set nohelp set historylog set view set nowrap set regexp set smooth set speller aspell set tabsize 10 set tabstospaces set tempfile set fill 72 |

unset
does opposite action versus set
. It forces to change the default behavior. Everyone knows the Mac keyboard shortcuts, yet if you press control
+ G on Mac or ctrl
+ G on other keyboards, you’ll get all the shortcuts. You will get many great stuffs here than any blog websites :
http://www.nano-editor.org/docs.php
One thing, quite commonly we need to use is – going to Line number AB. For example, you ran :
1 |
nginx -t |
You might get error in configtest with line number 80. In that case, you can open the file with cursor on the line in this way :
1 |
nano +80 /etc/nginx/sites-available/default |
Here’s what we’ve got for you which might like :
Additionally, performing a search on this website can help you. Also, we have YouTube Videos.
Take The Conversation Further ...
We'd love to know your thoughts on this article.
Meet the Author over on Twitter to join the conversation right now!
If you want to Advertise on our Article or want a Sponsored Article, you are invited to Contact us.
Contact Us