Overview for vim

How to create executable from everywhere bash script in Devuan? [with screenshots] [ex.#1]

Bash scripts are very helpful took for work routine and simplifying your work with linux.

Let's create a simple bash script, which writes something in terminal.

#!/bin/bash

for i in  {1..10}
do
  echo Hello number $i
  sleep 3s
done

What does this script? Echo command prints "Hello number #" precisely ten times, but with delay 3 seconds.

Save the code as delayed_hello.sh:

dima@computer:~/scripts$ cd /home/dima/scripts
dima@computer:~/scripts$ ls
delayed_hello.sh

Read more

Written by Administrator on Wednesday April 22, 2020

How to install vim in Trident Linux (Void linux)?

VIm is very powerful text editor for Linux system. Trident Linux is using xbps package manager, we can use it to install vim:

$ sudo xbps-install vim

The wait untili all needed packages are downloaded and installed:

3 packages will be downloaded:

3 packages will be installed:
  xxd-8.2.0496_1 vim-common-8.2.0496_1 vim-8.2.0496_1 

Size to download:             8857KB
Size required on disk:          32MB
Space available on disk:       280GB

Do you want to continue? [Y/n] y

[*] Downloading packages
[ 0%] xxd-8.2.0496_1.x86_64.xbps.sig: [512B 100%] 6757KB/s ETA: 00m00xxd-8.2.0496_1.x86_64.xbps.sig: 512B [avg rate: 6757KB/s]
xxd-8.2.0496_1.x86_64.xbps: 13KB [avg rate: 68MB/s]
xxd-8.2.0496_1: verifying RSA signature...
[ 0%] vim-common-8.2.0496_1.noarch.xbps.sig: [512B 100%] 7692KB/s ETAvim-common-8.2.0496_1.noarch.xbps.sig: 512B [avg rate: 7692KB/s]
....
....
....
[*] Collecting package files
xxd-8.2.0496_1: collecting files...
vim-common-8.2.0496_1: collecting files...
vim-8.2.0496_1: collecting files...

[*] Unpacking packages
xxd-8.2.0496_1: unpacking ...
vim-common-8.2.0496_1: unpacking ...
vim-common-8.2.0496_1: registered 'vi' alternatives group
vim-8.2.0496_1: unpacking ...
vim-8.2.0496_1: registered 'vim' alternatives group
Creating 'vim' alternatives group symlink: vim -> /usr/bin/vim-normal

[*] Configuring unpacked packages
xxd-8.2.0496_1: configuring ...
xxd-8.2.0496_1: installed successfully.
vim-common-8.2.0496_1: configuring ...
Updating GTK+ icon cache for /usr/share/icons/hicolor...
Updating GTK+ icon cache for /usr/share/icons/locolor...
vim-common-8.2.0496_1: installed successfully.
vim-8.2.0496_1: configuring ...
vim-8.2.0496_1: installed successfully.

3 downloaded, 3 installed, 0 updated, 3 configured, 0 removed.

Read more

Written by Administrator on Sunday April 19, 2020

How to create a new file using Vim and save it with desired filename

First of all, let's start vim:

$ vim

Now we can edit file. To do it, we have to change to write mode, so just click "i":

i

Now we car modify file the way we want. Let's add a string.

And now click "Esc" to go out of write mode. 

In order to save a file, type 

:wq test.txt

save as file using vim

Read more

Written by Administrator on Sunday March 22, 2020