Showing posts with label vi. Show all posts
Showing posts with label vi. Show all posts

Wednesday, November 2, 2011

20 years of vim

Wow, I just stumbled on this article on Ars technica (via Hacker News). This article celebrates 20 years of Vim, an vi clone. I have to say I exclusively use vi (Vim actually, but in compatibility mode) for all my editing, or almost all, this post wasn't written in vi. ;)

The first time I used vi was in 1990, or something like that, but it was only for a short period of time when I had an opportunity to work on an Unix system. If I remember correctly it was produced by ICL and it was based on Intel 80386 running on 16MHz.

It's my personal opinion that if you regard yourself an advanced computer user that you either have to learn how to use vi or Emacs (or XEmacs). After all, if you remotely connect to a server, there will be vi, but very probably no gedit, eclipse, or something like that. I strongly believe that in vi I can work more efficiently then in any modern GUI editor. While we are at vi and Emacs, there used to be many flame wars between proponents of vi and those of Emacs. Anyway, I think they are both very good and capable editors. The main Achilles' heel of Emacs was memory consumption, but according to today's measures these are now relatively modest comparing it to some other tools and applications.

Several things I find very interesting in the article about the Vim. The first is a short history of vi editor, among other facts mentioned is that it was written by Bill Joy. Also interesting is the reason why letters hjkl were chosen for moving cursor. Apparently, the terminal used for vi development had arrows on those keys so they were chosen for that reason. But, they proved to be practical and thus were retained until today. Apart from Vim, there were other vi clones of which nvi that ships with BSD operating systems, along with Vim, are the only ones that survived until today. I just checked software repository of Fedora, and there is nvi! I also know that I saw elvis on several occasions, but there is no package in the Fedora repository.

Also, would recommend that you read comments (there are funny ones) and a short history of Vim written by its main author.

Thursday, January 4, 2007

vi tips & tricks

Note: This post has been transferred from my old home page on January 4th, 2020 and the date of the publication is only approximate.

Stuff collected from different places. Majority of this came from the one Slashdot discussion. I don't know if there is something like Did you know... welcome screens (fortune might be, I'll have to check) but from this stuff I would like to write it at some point.
All your comments, criticisms and a like please send me on my e-mail address!

Spelling checking

Enabling spell checking

To enable spell checking in vi just execute the following command:
:setlocal spell
This will enable spell checking of English language. You can also ask for suggestions. Just place cursor on misspelled word and press z=. You'll be provided with a list of suggestions you can select from.

Installing spell files

vi, at least in Fedora, comes without any spell checking dictionary except for English. In order to be able to spell check Croatian and other languages you have to run vi as a root and then try to enable spell checking in a language you need, e.g. for Croatian:
:setlocal spell spelllang=hr_HR
vi will then ask you if you wish to download dictionaries for hr language and guide you through the installation process, which is very simple.

Links to other similar sites

[20120610] Best of Vim Tips
VI wiki with tips
Scripting the Vim editor, Part 1: Variables, values, and expressions
Best of Vim Tips
Vim anti-patterns

About Me

scientist, consultant, security specialist, networking guy, system administrator, philosopher ;)

Blog Archive