4 ms·
Nano does what is does very well. Want to quickly modify some some file it is the tool of choice in the way a hammer is the tool to drive a nail. Right tool for
by danieltillett 9y ago
Nano does what is does very well. Want to quickly modify some some file it is the tool of choice in the way a hammer is the tool to drive a nail. Right tool for the right job.
- oneeyedpigeon 9y agoIt depends on your experience, familiarity with the tools, and nature of the change. For example, you might think a single character change would be faster in nano, but that’s not necessarily the case. By the time you’ve moved the cursor using the cursor keys, deleted the old character, and typed the new one, an experienced vi user could well have made the same change faster. We can all think of far more complicated changes that are considerable more efficient in vi. So the question is 'given perfect familiarity with the tools, and all else being equal, what kind of changes, if any, are more suitable for nano rather than vi. None of that is to say that nano doesn’t have a place.
- edflsafoiewq 9y agoI dislike using nano because of this: open a narrow terminal and open a file with lines long enough to wrap. Insert a character on the wrapping line. nano will insert a line break, hard-wrapping the line. Probably you can customize this, but I don't want to have to customize an editor so it doesn't break my files.
- Fnoord 9y agoLearning some basics of vi(m) and using some plugins to enhance it can improve your productivity compared to Nano on the long term (e.g. syntax highlighting with color palettes, linter, tmux support, and what not). That said, I prefer Sublime/Vim (Sublime also has these plugins), but Nano is a decent alternative and resembles the first text editor I ever used. Sublime is lightning fast for me, but it isn't open source. To break the habit of firing up Nano I symlinked it from /usr/local/bin/nano to /usr/bin/vim. If you use Vim regularly, the shortcuts will stick in your head whereas if you resort to Nano you won't memorise them for long. If I ever still require Nano then I can execute it by executing /usr/bin/nano For people on a Mac, I can recommend the app CheatSheet [1] available in Homebrew. If you're lost in an application holding Command (⌘) for a few sec will represent you with a cheatsheet of shortcuts. It won't work with CLI apps though. [1] https://www.cheatsheetapp.com/CheatSheet/ https://www.cheatsheetapp.com/CheatSheet/