Franco Pasut Web Site

  • it
  • About
  • Contact
  • Posts

Posts

October 1, 2021

Vim: searching for text containing a slash or a question mark

Vim: the search command

To activate a text search in Vim, press one of the following trigger keys in your keyboard:

  • the slash "/" key (do not confuse with the back-slash "\" key)
  • the question mark key.

By pressing the slash "/" key will activate a forward search.

By pressing the question mark "/" key will activate a backward search.

To move the cursor to the results in your document, press the "n" key (mnemonic for “next”). To invert the direction of the cursor, press the "N" key, (“upper n”).

read more
September 21, 2021

Vim, Markdown, Snippets, UltiSnips: how to get a well-formatted link with a single command

Objective of this post

The objective of this post is to get a correctly formatted link in Markdown by merging in a single command a fragment of text and an Internet address previously saved in the Vim clipboard.

Of course I assume that everybody that’s reading this post knows how to create a well formatted link in Markdown, i.e. text in square brackets and URL in round brackets.

Why did I ask myself this question?

read more
September 15, 2021

LaTeX: creating and using variables to save time and reduce typing errors

Variables and legal documents

My work consists of writing legal documents.

Legal documents are full of data and many of them have to be repeatedly inserted.

Think, for example, about the names of people or of places, dates of events, etc.

A method is needed to avoid manually repeating recurring data when writing documents, both to avoid wasting time and typing errors.

A good system is to use “variables”, i.e. placeholders that take on different values depending on the documents in which they are inserted.

read more
September 11, 2021

Emacs, Expand-region and LaTeX

Emacs and text objects

In composite documents there are often text fragments within well-defined semantic elements: parentheses of various kinds, single or double inverted commas, trailing commas, etc.

In some text editors (Vim, in particular) they’re called “text objects”.

Emacs can handle these text blocks with a package called Expand-region that “increases the selected region by semantic units (original definition from the programmer’s GitHub page): parenthesis, brackets, quotes, sentences and other objects”.

read more
September 1, 2021

Vim: Cut, Copy and Paste to and from the System Clipboard

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 it’s not true.

Vim uses another system to exchange information with other applications.

For example, in Vim under GNU/Linux, the key combination Ctrl-v corresponds to the visual block function and does not affect the pasting text.

read more
July 27, 2021

Linux: move "home/user" directory back to the same "root" partition

What’s my target?

I’ve installed, as it should always be, a Linux distribution in two separate partitions.

In particular: the root directory in /dev/sdb2 partition and the home/user directory in /dev/sdb3 one.

After some time, I wanted to return the home/user directory to the same root partition.

Why I need it? I’d like to dedicate every partition to different Linux distributions.

What I’ve read before writing this article?

In the net I found many tutorials about moving the home/user directory to other partition, but not so many on the opposite operation.

read more
  • ««
  • «
  • 7
  • 8
  • 9
  • 10
  • 11
  • »
  • »»
© Franco Pasut Web Site 2025