Posts

Showing posts with the label Gvim

Vim: Cut, Copy and Paste to and from the system clipboard

Image
Vim: Cut, Copy and Paste to and from the system clipboard Table of Contents 1. Cut, Copy and Paste using the computer keyboard 2. Vim and the clipboard 3. From Vim to the Clipboard 4. From the Clipboard to Vim 5. Some key shortcuts in gVim Figure 1: Vim 1 Cut, Copy and Paste using the computer keyboard Everybody knows how to use the keyboard combinations Ctrl-c , Ctrl-x , and Ctrl-v in Windows and Linux (or Cmd-c , Cmd-x and Cmd-v in macOS) to copy, cut and paste text across applications. Many think that those combinations are universal and work with any application. But Vim and gVim are different, they use another system to exchange information with the rest of the IT world. For example, in Vim under Linux, the key combination Ctrl-v corresponds to the visual block function and does not affect the pasting text. I wrote this article to remind me, as a non-programmer, the key combinations to be used in the Vim world to sha...

How and why to exit from the Insert Mode of gVim without pressing the ESC key

Image
This article was written specifically for the graphic version of Vim, ie for gVim. I use gVim about every day and every time I need to write more than some words. Vim is fast, light, mind friendly, really efficient. I like to find any solution to improve my gVim experience to get the best results in the less time considering that I hardly ever look at the keyboard when I write (my past as a pianist helps me!). One of the problems I have to solve is the exit from the Insert Mode . The <ESC> key: a fundamental in Vim and gVim One of the Vim and gVim fundamental is the <ESC> key. You read in vimtutor and other tutorials that the canonical way to exit from insert mode is to press the <ESC> key. That’s true. But the <ESC> key is at the edge of the keyboard, far from the center of it. Then when you need to exit frequently from the insert mode it could be a little uncomfortable. The built-in alternative: <Ctrl-c> There’s a built-in alternative. You can u...

Square Brackets Motion in Markdown and LaTeX in Vim environment

Image
Foreword on Markdown, LaTeX and Vim Markdown and LaTeX are awesome markup languages, expecially when you use them in creating and developing structured texts. I assume that the reader already has at least a bit knowledge of them. A structured text is a text subdivided into chapters, sections, or subsections, etc. The more complex the text, the more those two languages are useful. At the same time Vim is an excellent integrated environment for writing in Markdown and LaTeX , available in almost every operating system. One of Vim most useful features is its ability to quickly jump through the sections of structured texts. Square brackets can be very useful for Vim jumping through the sections of structured texts. But be careful: the same combinations of square brackets can have different effects in Markdown and LaTeX for Vim. Here is a brief comparative overview of the square brackets jumping movements in Markdown and LaTeX in a Vim (and GVim ) environment. Square b...

Vim and Emacs: Cut, Copy and Paste

Image
Table of Contents 1. The traditional Cut, Copy and Paste key combinations 2. Vim and the clipboard 3. From Vim to Clipboard 4. From Clipboard to Vim 5. Vim and the shortcuts 6. Emacs and the clipboard 7. Kill, Copy and Yank in Emacs

Quickly enter data in legal documents with bookmarks in Vim

Image
A working scenario: legal acts with preset data In a legal act there are standard data used in many documents: name of the lawyer, name of the claimant, place of the court of justice, date of the hearing, etc. So, to save time, it is useful to have a system to upload data into the document once and to use them whenever you need during the preparation of the document. LaTeX is an excellent system to write legal acts. And one of the most effective tools for writing LaTeX code is Vim . Create a Vim document with bookmarks Vim has a native command to set bookmarks: the mark command. In the simplest way you can set a bookmark in Vim by pressing, in Normal Mode, the key m followed by a letter. An elementary example could be the combination: ma that create the a bookmark. You can put this bookmark wherever you want in the document. So you can put a bookmark, for example, where you need to enter data in a legal act: ma for the name of the defendant, mb for the name or the claima...

Vis, Vis, Vi, Vim... Gvim

Image
Via RayHightower.com Latin and Technology Via Pixabay.com Do You know the Latin language? And do You know declination for the word "Vis", the Latin word for "Force" or "Vigour"? No problem. This is not a Latin lesson. We must know that "Vim", today, is not intended as a Latin word. When I went to school and studied Latin, many and many years ago, I would not have imagined that I would have associated that name to some technological jewels. Vim, Vi and Gvim represent the essence of efficiency and lightness. Why Vim? Why Vim? You could say: I don't need an old-style text editor, I can use the modern graphical editors, with the visual menu and a lot of functions . Yes, obviously. But Vim has a different philosophy: to minimize keystrokes and finger movements.  One keystroke is better than two. A jumping keystroke is better than a mouse movement. With only one keystroke you can instantly fly from the begin to the end of a word,...