Vim and the x11 clipboard

Tuesday, February 08, 2011 | En Español

We can access the clipboard of x11 (the graphical system over which most desktop environments run, such as Gnome and KDE) to share text between Vim and other graphical applications.

x11 have two different global areas where it stores content to be shared between applications, one is known as the "cut-buffer", this is the location where the text that we copy or cut is stored, this is what most people associate with system clipboard. And the other is known as "selection", in x11, whenever we select something with our mouse, we can paste this selection in the location of the mouse cursor by pressing the middle button. Vim can access the content of both storages, get the text from this global storages, or put text on them.

Read more...

Categories: FOSS, Vim

Uppercase and lowercase characters in Vim

Sunday, February 06, 2011 | En Español

In Vim, we can turn characters to uppercase, lowercase or invert the case in a few key presses.

Read more...

Categories: FOSS, Vim

Configure the syntax highlighting in Vim

Saturday, February 05, 2011 | En Español

When we enable syntax highlighting (by using :syntax enable), Vim will take into consideration the extension of the file to determine the appropriate syntax highlighting rules, and if this fails it will search the contents of the file for specific patterns in order to determine the file type. But if we are working in a temporary file that we don't intend to save, or if we opened, e.g., a file with HTML extension but we find that it contains PHP code in it, we can change the rules of the syntax highlighting.

Read more...

Categories: FOSS, Vim