4 ms·
There are two (non-exclusive) camps for vim use. Developer and Admin. Most of the discussion here focuses on the dev-side of things naturally; but I want to to
by UI_at_80x24 7y ago
There are two (non-exclusive) camps for vim use.
Developer and Admin.
Most of the discussion here focuses on the dev-side of things naturally; but I want to touch on the Admin/sysop side.
If you are just starting out editing config files there is very little benefit to using vim over some more simple (i.e. nano)
Example: Editing an sshd_config file.
Scenerio: You want to change the default port number that sshd is listening to.
Both nano and vim make this singular task very easy and quick. As far as speed goes, I'd say they are close or equal to each other to finish this task.
Where vim really shines is for larger and more 'annoying' tasks.
Example: You need to iterate out a list of incrementing IPs for another service.
e.g.
192.168.0.1
192.168.0.2
192.168.0.3
...etc...
192.168.0.254
In nano, you need to manually edit/add each line which is combersome; however with vim there are multiple ways of doing the same thing (recorded macros are amazing!).
But in my experience the hands-down "it doesn't get better then this" 'Admin use' of vim is this:
editing YAML files (whitespace is evil, OMG why?!?) vim can be configured to convert your tabs to spaces and all pain is ended in the universe.
Little things add up.
For the odd small job, you might not see an improvement over a 'dumb' editor like nano; but the skills you learn on the small things translate into big improvements on the big jobs.
P.S. Being able to edit your editor is a HUGE benefit too.
My company wants us to keep detailed track of our time-spent on each project. So I added a hotkey (F5) to input the date/time-stamp whenever I start/stop a task.
Consider this analogy, nobody needs to modify their .bashrc file or create custom aliases. But look at how much you suffer when your customizations are not there.
You don't need to use anything more then nano, but the improvements scale exponentially when you do.
- wodenokoto 7y ago> vim can be configured to convert your tabs to spaces and all pain is ended in the universe. Every editor more advanced than notepad can be set up to do this. Personally I don't want to do this for every single text file format I might come across. Being able to add weird, personal features does sound cool though.