What is the difference between vi and nano
I generally prefer nano because for the times that …. However, if you prefer to do most editing in the terminal vi has …. I generally prefer nano because for the times that I need a terminal-based text editor, I usually don't need a very complicated editor, and I don't like having to remember all the commands when all I ever need to do is write some text and then "save-and-exit" and nano has a command-reminder at the bottom. I guess if you are used to vi and know the commands it is "better" than nano in the sense that it has more features, but to me, it's needlessly feature-rich for most things I do in a terminal-based text-editor.
However, if you prefer to do most editing in the terminal vi has a rich set of tools that are available but not necessary. At a minimum, the syntax highlighting alone is often beneficial.
I think that, with little exception, there is not much differencce between the basic functionality of most editors. It really boils down to what you spend the time to become comfortable with. If you take the time to learn vi inside and out you will feel limited when you dont have access to it.
If you master the emacs environment, kate , the visual studio editor, or any other fully functional editor you will become more productive with that tool. If all you really want to do is place text to a file all tools are about the same and nano probably brings the least 'baggage' in the terminal setting. Oh well, it's been civilised so far, let's keep it that way. I've used both vi and nano and prefer nano simply because I find it more user friendly. Then again, I never do serious editing in a terminal.
Until I got to grips with vim, I used to use nano quite a lot for editing text files on the command line. It took a little while to get my head around using vim, but learning to use it properly was time well spent IMHO! Nowadays, I seem to spend a LOT of time with vim in the terminal. In fact I'd now go as far as saying it is my favourite text editor full-stop. Since learning to use vim, I've found that I can be far more productive using vim than any other editor I have tried before.
For instance, Nano doesn't include multiple modes. Instead, both editing and operations are all performed under the same instance in Nano. Nano doesn't have a concept of modes. Nano is gracious enough to include a cheat sheet at the bottom of its editor window.
This cheat sheet lists the most commonly used keyboard shortcuts used with Nano. It is dynamic, though, so depending on which command you are using in Nano, that cheat sheet will display different suggestions. As we mentioned above, debating the Vi versus. Nano topic is almost a religious argument. Depending on who you ask, you will get a different answer with different reasoning.
I prefer Nano, but that preference very much goes against the normal opinion. So, let me explain both points of view. Vi is a long-standing tradition in the Linux world. If you need a one-stop-shop in the command-line to write and edit documents — from configuration files to programming or basic document creation — you can do it all in Vi.
Because Vi has a plugin system, it's very extensible, too, though plugins need to be installed, configured, and maintained separately from Vi. Once you understand how Vi works, how to recognize which mode you are in, and know what commands to use, it's not a hard application to run. Learning to use Vi does take a bit of practice, though.
Nano is often described as a great command-line editor for beginners. That's because it is very straightforward and easy to use. I wouldn't let that "beginners" label hold any weight, though. Vi was a great utility back in the '70s, '80s, and '90s, but the interaction paradigm with computer systems has long since changed. That doesn't negate the fact that you need a command-line editor for Linux, though, especially with server administration. Sometimes you are required to hop into the command line to fix or configure things in Linux.
The reason I prefer Nano is that it is lightweight and quick to use. When I'm configuring or fixing things in Linux, I want to be able to hop into a configuration file, update what I need to, and then move on. Though Vi can be easy to use once you learn it, Vi still requires overhead to use. The Nano text editor an ideal tool for beginners. On startup, the Nano text editor shows the following interface.
When you search for terminal-based text file editing, then you will find that two of the top choices are Vim and Nano. Which one is better? This article highlights some of the differences that set these text editors apart. The graphs in the image above show the learning curves of various text editors, in which Nano and Vim are also included.
When you start working with Vim, you might not even know how to edit a file on it. Initially, you might need to find a cheat sheet on Google, but in a couple of hours, you will to know the basics of the Vim text editor.
The toolbar and menus will also make it easy to learn how to use Vim. Then you have Nano, which is an improved text editor of Pico, has no learning curve, and is relatively user-friendly compared to Vim. Bottom line: start with nano , and move to vim if nano gets tedious. I read through the other posts. Initially I would have agreed with them.
However, I have taken the time to really learn nano. It is actually quite powerful. For example, you can have syntax highlighting. You just need to configure your. There are a large number of additional keyboard commands that you can use. I made myself a whole page of shortcuts. It is very much like using Wordstar or other text based word processors of the old days.
I would not say it is more powerful, but it is as powerful. Start with this nano cheat sheet to find a large number of the commands. If you have used emacs you will find this is very similar, but in my mind easier. I don't fault people that still use vim. There have been holy wars for years for vim vs emacs.
Adding nano has just added a third very powerful editor to that discussion. But do not discount it as a weak beginners tool. The big difference is that vim is modal and nano is not. So with vim you are constantly changing between command mode and edit mode.
In nano, as in emacs, you are in one mode and your commands use special key combinations. As you use the editor more you will start to learn all the most used commands. And if you use it a lot you will learn most of them. One other note is that for the read file function there are two mode for that. Either it will read a file into the current edit buffer, or into a new buffer to go between. Make sure to look that one up. Vim is powerful, but tough to learn.
It is so called "modal editor", as opposed to usual editors, like nano. Vim allows you to reach all text with just a few key presses, so if you have touch-type ability, your movement without a mouse would be even faster than with one.
So, if you do not work with text a lot e. Otherwise I'd suggest you to learn Vim. It is worth noting that nowadays there's more than one vim.
0コメント