Posts

Showing posts from 2019

GNU/Linux multi-boot: from Grub to Burg and back to Grub2

Image
GNU/Linux multi-boot: From Grub to Burg and back to Grub2 Table of Contents 1. What's a Boot Loader in Linux? 2. From Grub to Burg 3. From Burg to Grub2: backgrounds and themes 4. Even easier: Grub Customizer 5. The easiest of all: Linux Manjaro Figure 1: GNU and Linux together 1 What's a Boot Loader in Linux? GNU/Linux, or simply Linux, can be installed in the same computer next to other operating systems. Linux users often install various distributions on different hard disk partitions to test their functionality and choose the best solution. The Boot Loader is a program that allows you to select the system to launch. Figure 2: A simple textual boot loader 2 From Grub to Burg One of the earliest boot loaders was LILO (LInux LOader). Throughout the 1990s it was used as the default boot loader for Linux distributions, then was gradually being abandoned for Grub . The first implementation of Grub was strictly tex

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

Make Emacs totally portable under Windows

Image
Make Emacs totally portable under Windows Table of Contents 1. Emacs for Windows is natively portable, but not too much 2. A basic solution: create a batch file inside the bin folder 3. Second part of the solution: launch system valid for any drive letter associated with the key 4. It's not over: we can also create a Documents folder valid for all drive letters 5. 32bit version for all computers Figure 1: Emacs + USB Pendrive = Emacs Portable 1 Emacs for Windows is natively portable, but not too much Emacs needs no introduction , it is simply a work of art in computer engineering. Although native to the Unix world, Emacs is also available in Windows version and is already distributed in portable mode, ie without the need for the typical installation within the operating system. However, the portability of Emacs for Windows is limited, in the absence of specific configuration, to the basic version. As soon as you try to customize th

Installing an additional Linux distribution on a computer with a double-disk SSD, UEFI interface and pre-installed Ubuntu

Image
Installing an additional Linux distribution on a computer with a double-disk SSD, UEFI interface and pre-installed Ubuntu Table of Contents 1. The choice of the computer 2. Assembly and configuration of the additional disk 3. Installation of the operating system 4. A further step, but only in some cases: changing the boot sequence 5. Final adjustments: touchpad and resolution 5.1. The tapping enablement in the touchpad 5.2. Reduce the screen resolution 1 The choice of the computer For this test I looked for a computer having the following features: Pre-installed open source operating system Simple installation of ad additional solid-state drive Cheap price! I chose an Italian laptop branded Microtech with a little SSD M2 internal disk, (32 Gb), pre-installed OS GNU/Linux Ubuntu and slot for an additional disk under the chassis (€310,00). Figure 1: The notebook used for this article To install the additional operating sys

Emacs Org Mode code blocks with and without colors

Image
Emacs Org Mode code blocks with and without colors Table of Contents 1. Coloring the code blocks in Emacs Org Mode 2. How to install the htmlize library 3. Colored Code Examples 3.1. First example: HTML code with and without colored syntax. 3.2. Second example: LaTeX code with and without colored syntax. 3.3. Third example: Ruby code with and without colored syntax. Figure 1: Photo by Sharon Pittaway on Unsplash 1 Coloring the code blocks in Emacs Org Mode Emacs Org Mode is an excellent environment to develop any kind of argument. If you need to display blocks of source codes in Org Mode, it may be very useful to know that there are two basic versions for displaying them. The first one is the monochromatic visualisation mode. In order to obtain this visualisation you must just wrap your code block into the tags #+BEGIN_SRC and #+END_SRC . This is already a good way of displaying source codes. But you can get a prettier look by

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