Showing posts with label vim. Show all posts
Showing posts with label vim. Show all posts

Roundup of Vim Articles

Regular readers of this blog may be aware of the numerous Vim related articles that were posted here. Notable among them being a concise tutorial on using Vim, the new features of Vim 7.0, making Vim behave like an ordinary text editor (Cream for Vim), a talk given by Bram Moolenaar on the Seven habits of effective text editing and Increasing your productivity using Vim, just to name a few.

More over, over a year back, 50% of this blog readers polled Vim/Vi as the favourite text editor of their choice.

Now here is another resource for Vim/Vi enthusiasts. Nicola Paolucci has collected 10 classic Vim articles which (he claims) transformed him from a Vim hater to a Vim lover. Check out his collection. Perhaps you as well might experience a mind shift towards Vim - my all time favourite text editor.

Over 10 power user tips for Vim editor

After using Vi or Vim for a couple of days, ever been left wondering what is it that makes Vi enthusiasts sing eulogies of this geeky text editor ? Then here are a number of reasons which will make you wonder why you hadn't embraced Vim sooner.

Swaroop C H has compiled over 10 specific ways to improve your productivity with Vim. These are the same functionality he found in Emacs and for which he provides equivalent commands in Vim.

The tips include :
Swapping caps-lock and Control keys, using incremental search for navigation, Making better use of the buffers in Vim, mastering vim regular expressions and picking up fine grained text manipulation commands in Vim among many others.

Most of the settings he lists can be made permanent by entering them in your .vimrc configuration file which resides in your home directory in Linux. Of course, if you are still putoff then there is another project called Cream for Vim which will save the day for you.

Apart from providing the power user tips, he also lists some additional plugins which further extends the functionality of this wonderful editor. Do read his tips to know more.

7 Habits for effective text editing 2.0

Being a Vi enthusiast, I am always on the look out for articles related to Vi, or rather Vi's modern avatar Vim - the versatile text editor created by Bram Moolenaar. In the past, this blog has seen a number of posts related to Vim. In fact if you ask me, the proverb "Too much of a thing" doesn't hold true for Vim.

It can easily take you a life time to learn each and every aspect of Vim though in most cases you can get along quite well by mastering just a couple of Vi commands. The sheer number of features and the permutations and combinations are that many. Then you have branched projects which aim to make Vim much more easier for the average computer user. Cream for Vim being a case to the point.

Today I stumbled upon this video which explains the 7 Habits for effective text editing in Vim which I found informative. The video is one of the series of Google TechTalks. In this video, Bram Moolenaar himself talks on the most efficient ways of editing text in Vim. The regular readers of this blog will know that Bram Moolenaar now works for Google.

The preamble of Google TechTalks goes thus :
Google TeckTalks are designed to disseminate a wide spectrum of views on topics including Current Affairs, Science, Medicine, Engineering, Business, Humanities, Law, Entertainment, and the Arts.
The video is a bit large (over 500 MB in size) and stretches over 1 hour. So make sure you have the required bandwidth to view the video. It is every bit worth watching.

How to use Tabs in Vim Text Editor

Vim
Vim is a very powerful text editor created by Bram Moolenaar. Vim is so versatile that it can even be used as a plug-in in Microsoft Visual Studio.

If you are interested in learning how to use Vim editor, then check out the following resources :
This interesting article shows how to use Tabs in Vim. Tab support is one of the new features in Vim 7.0 and it is possible to use tabs in both GUI mode of Vim as well as the console mode.

Cream for Vim - Making Vim more user friendly

Learning to use Vi editor could be a real pain for most people as it has a relatively steep learning curve. But once the most common commands are mastered, one gets to enjoy the sheer power of this editor made available at ones finger tips. And there are an ever growing group of Vi enthusiasts around (myself included) who swear by it over other text editors. The modern avatar of Vi is Vim (VI iMproved) created by Bram Moolenaar and released as an open source software package. VIM is an excellent vi clone with a slew of additional features and which can be further enhanced and modified using scripts. On last count there are 1557 scripts available at the Vim.org website which enhances the editor for a variety of uses.

Fig: This article displayed in Cream editor

One project which has gained a lot of popularity in the Vim community is Cream. Cream consists of a collection of scripts and plug-ins which aims to make it much more easier for a new user to cut his teeth in Vim and the user can easily use most of the features of Vim which has made it the popular editor it is by just navigating the menu. All it takes to install Cream in Debian based distributions is to run the command :
# apt-get install cream
... which will install the collection of scripts in the necessary places as well as provide an entry in the Gnome Applications Menu. The only requisite is that you should already have GVim installed on your machine. Once Cream is installed, one can double click the menu entry in the Gnome Applications menu and GVim is started with the Cream scripts in place. At this point one might ask what is unique about this project ? Well for one, this redesigns GVim to bring the same ease of use of any ordinary text editor (read kate, kwrite, nano ...) where the user need not be bothered by the different Vi command modes; rather he/she can just start typing. Secondly, it brings a whole lot of power to the user by providing menu entries for most of the special things one can achieve in GVim. Take for instance creating folds in ones text. In GVim, one does it by pressing the key combination "v}zf" in the command mode. And a new user who is trying Vi will in most cases be ignorant about this. Cream has a menu entry for folding the paragraphs in ones text and all it takes is to just select the paragraph which has to be folded and press F9 or click on the menu Tools --> Folding --> Set fold (selection). And voila! a fold is created. But this is only a small part of the features provided by Cream.

Fig: One can create folds in Cream with ease

The developers of Cream have given it a great deal of attention in providing the same key bindings found in editors in Windows for the most common tasks like cut/copy/paste , undo/redo, open/close a file and so on. For example, to undo the most recent changes, one can press Ctrl+Z instead of the usual way of moving into command mode by pressing 'Esc' and then pressing 'u'. By remapping the shortcuts, the developers of Cream have considerably reduced the learning curve to make it almost negligible.

Another thing which I found really useful is the "Settings" menu which contains options for setting various parameters like the tabstop width, toggling auto-indent and setting the preferences like the font used, bracket flashing and so on. But what is to be noted is that the settings that are changed are automatically made permanent until the user changes them again.

This is different in the original GVim in that the changed settings apply only to that instance of the editor and in-order to make the settings permanent, you have to save them in the gvimrc configuration file residing in the /etc/vim/ directory.
Fig: Calendar plugin

Cream also installs a few additional plugins along with it. One which took my fancy is the calendar plugin which embeds a calendar inside the editor. And one can view the calendar by pressing Ctrl + F11. Why just a calendar... there is also a game called typing tutor which can be played inside the editor to while away ones time and improve ones typing speed at the same time. All in all, this is a very interesting project which reconfigures the Vim editor to make it as easy to use as an ordinary text editor without sacrificing any of its underlying power.

Vim Tip : Using Viewports

Vi(m) is a versatile editor with great power built into it. There are a whole lot of commands which one can use to accomplish complex tasks which are next to impossible in other text editors barring say an Emacs. A couple of months back, in an article on Vim editor, I had covered some of the most commonly used commands. But what I had covered was only a tiny spec of the number of commands available for this editor.

Joe 'Zonker' Brockmeier has written a very interesting article which explains the concept of viewports in Vim. Viewports enable one to open and view multiple documents in the Vim editor simultaneously. It is similar to but not the same as the tabs concepts one see in many GUI text editors where multiple documents can be opened in tabs inside a single editor instance.

I have been a Vim user since the first time I started using it and I have never felt the need to use another one for any of my editing purposes be it web development, coding or writing a letter. It is really fascinating that in a couple of keystrokes, one can accomplish such complex tasks in Vim which would require much greater effort in other text editors.

 
 
 
 
Copyright © Sun solaris admin