


Explore VIM advanced operation skills
Introduction This article collects some simple VIM operations that either cannot be completed by other ordinary text editors or are completed very slowly. Through the introduction of this article, beginners can strengthen their determination and confidence in learning VIM. If you have any good simple techniques that are easy to demonstrate, please leave a message. In addition, unless otherwise stated, the keys mentioned in this article are case-sensitive. For example, when the article says "press G," the key you press should be "Shift+G." 1. Preparation First, we open VIM and enter a piece of text for today's demonstration: thisisatest2. Find and replace. Press ESC several times to enter Normal mode and enter the following command: :%s//\r/g/. The effect you get after pressing Enter
Jan 05, 2024 am 10:52 AM
I cannot access the Internet after CentOS is installed. How to solve the problem?
The main reason why CentOS cannot access the Internet normally after installation is because the gateway is in the No state under the directory /etc/sysconfig/network-scripts/. This requires changing it to yes: 1. First enter /etc/sysconfig/network- Under scripts/, find the file ifcfg-eno (the number after the file is random, and different computers have different numbers after installation), use the vim/vi editor to open the file; 2. After configuring, wq saves and exits, then the network configuration It still doesn’t take effect, you need to restart the network service servicenetworkrestartOk! Done
Jan 04, 2024 pm 06:06 PM
How to solve the problem that OpenCV cannot read video files on CentOS
Under CentOS, I followed the tutorial steps to install OpenCV, but in the end I could not read the video file because ffmpeg was missing. So I installed ffmqeg through the software management in CentOS, but it still had no effect. Then I compiled ffmpeg, but it still had no effect. In fact, a key step is missed, which is to associate ffmpeg with OpenCV. The details are as follows: 1. Obtain ffmpeg: Download ffmpeg through cvs, and enter the command line: svncheckoutsvn://svn.ffmpeg.org/ffmpeg/trunkffmpeg 2. Configure ffmpeg: Enter the ffmpeg directory and execute ./c
Jan 04, 2024 am 11:43 AM
How to solve the diamond garbled problem in Linux? How to fix Linux diamond garbled characters?
Solution to the Linux diamond garbled code: Execute the command: vim/var/lib/locales/supported.d/local to delete the original class content inside and add it as: en_US.UTF-8UTF-8 Execute the command: vim/etc/default Modify /locale to: LANG="en_US.UTF-8"LANGUAGE="en_US:en" Remember to save after modification. Please use root permissions to enter the modification. Then restart directly and it will be OK.
Jan 03, 2024 pm 11:38 PM
How does Debian's missing verification public key solve the security update problem?
Author:SamsonDate:11/02/2014Testplatform:3.13.0-24-genericGNUbash,4.3.11(1)-release Add Debian security updates to the system's update source configuration file: v0id@v0id/etc/apt/sources. list.d$sudovimofficial-package-repositories.listdebhttp://security.debian.org/wheezy/updatesmaincontribnon-free use ap
Jan 03, 2024 pm 10:42 PM
How to set permissions for files in Linux? Linux file permission setting tips
If we want to run such a file, we need to add an executable permission to the file separately. How to add an executable file to the file? There are three types of access permissions for files or directories: read-only, write-only and executable. Let's take a look at the detailed operation process. Log in to the Linux system, create a new terminal, use the touch command in the terminal to create a file, use the Vim editor, write some content in the file, enter: wq to save and exit, return to the terminal, use ls-l to view file permissions, use the chmod command and + The x parameter gives the file executable permissions, where
Jan 03, 2024 pm 07:46 PM
Steps and methods to add swap partition - Linux System Guide
If you want to add a swap partition in a Linux system, how do you add it? Let’s take a look at the detailed tutorial below. 1. First, click "Launcher" on the dock bar, find "Deepin Terminal" and run it. 2. Then set a password for the root user. Because the installation process is for the administrator user, the root password is not set. sudopasswdroot3. After the setting is completed, execute the su command to switch to the root user. 4. Execute the following command to generate a swap file in the root directory, count sets the number of blocks, and bs sets the block size to generate a 4G swap. ddif=/dev/zeroof=/swapfilecou
Jan 03, 2024 pm 07:10 PM
How to find and access shadow files using Linux?
Linux systems are generally used to build servers, so how to find shadow files in the Linux system and enter and view shadow files? Let’s take a look at the detailed tutorial below. 1. First log in to the Linux system or server using the root account. Note: Because the permissions of the shadow file are 000, the actual encrypted password saved cannot be viewed by other users except the root user. This effectively ensures the security of the password. If the permissions of this file have changed, you need to pay attention to whether it is a malicious attack. 2. Enter the command w and press enter to check whether the current user is the root user. If not, switch the user to root. 3. Enter the command cd/etc and press enter e
Jan 03, 2024 pm 06:11 PM
Delete redundant linux system boot items
Since I upgraded the system, the new and old versions (Grub and Grub2) of the boot system appear in the grub boot mode, with two boot items each for normal startup and recovery mode, as shown in the following figure: Baidu cannot find the relevant or I had to get up in the middle of the night to study a similar tutorial, but now I have finished it and written down notes. At this time, we select the new version of the boot item (the old version of the boot cannot log in to the system). After entering the system, open the terminal interface, use the cd command to switch to the /boot partition, and then use the ls command to view the partition. At this time, there should be The two folders grub and grub2 are displayed. The focus is on the grub2 folder. Use the cd command to switch to the /boot/grub2/ directory, and then use ls
Jan 03, 2024 pm 03:17 PM
Vim shortcut key list
The Vim editor is a command line-based tool that is an enhanced version of the legendary editor vi. Although there are many rich text editors with graphical interfaces, familiarity with Vim can be helpful to every Linux user - whether you are an experienced system administrator or a novice user who has just started using Raspberry Pi. This lightweight editor is a very powerful tool. In the hands of an experienced user, it can do incredible things. In addition to regular text editing functions, it also supports some advanced features. For example, regular expression-based search and replacement, encoding conversion, and programming features such as syntax highlighting, code folding, etc. There is a very important point to note when using Vim, that is, the function of the keys depends on the current editor
Jan 03, 2024 pm 01:30 PM
Steps to disable Centos disk writing
A Linux file has 3 times by default. atime: The access time to this file. ctime: The time when the inode of this file changed. mtime: The modification time of this file. If there are multiple small files (for example, there are multiple small pictures on the web server page), it is usually not necessary to record the access time of the file, which can reduce the I/O of writing to disk. How to configure this? First, modify the file system configuration file: vim /etc/fstab. Then, use the noatime and nodiratime commands on a partition that contains a large number of small files. For example:/dev/sda5/data/picsext3noatime,nodira
Jan 03, 2024 pm 01:18 PM
How to solve the problem of being unable to save after editing vimrc in Ubuntu system?
Solve the problem that directly edited vimrc cannot be saved 1. Open the terminal and enter cd/etc/vim and press Enter 2. Write sudochmod777vimrc, press Enter, enter the password, press Enter, then we list the vimrc file and enter vimvimrc and press Enter 3. Enter e4 , you can edit it or you can directly edit the vimrc file after completing the second step. 5. Open the location of the vimrc file and edit it directly, then save it. Related recommendations: How to take a screenshot of the Ubuntu login interface? How to set up the Ubuntu 16.04 system after installation ?How to customize touchpad gestures in Ubuntu 16.04 system?
Jan 03, 2024 pm 12:29 PM
Solve the permission problem caused by mounting NTFS partition on Linux
When my Linux automatically mounts the NTFS partition, it always reports an error with some files when I decompress the folder. I used the ls-lia command to check the permissions and found that the owner of the automatically mounted NTFS partition is root and belongs to the plugdev group. Although I can still copy, remove, and edit files freely, decompression always reports an error. I tried to use chmod and chown to change the owner of the files and folders in the entire NTFS partition to me, and the modification permissions were 777. Although the program prompts that the execution is successful, when executing the ls-lia command, it is found that these two commands have no effect at all. Using sudovim/etc/fstab, we found that the configuration is like this. UUI
Jan 03, 2024 am 08:47 AM
How to use markers for text selection in the Vim editor
A text or source code editor based on a graphical interface that provides some functions such as text selection. What I'm trying to say is that probably most people don't think this is a feature. But this is not the case with command line-based editors like Vim. When you use Vim only with the keyboard, you need to learn specific commands to select the text you want. In this tutorial, we will discuss in detail the functionality of text selection and the flags functionality in Vim. Before that, it should be noted that the examples, commands and instructions mentioned in this tutorial were all tested in the Ubuntu16.04 environment. The version of Vim is 7.4. Vim’s text selection function We assume that you already have basic knowledge of the Vim editor (if not, you can read first: h
Jan 02, 2024 pm 10:37 PM
Hot tools Tags

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article
Assassin's Creed Shadows: Seashell Riddle Solution
What's New in Windows 11 KB5054979 & How to Fix Update Issues
Where to find the Crane Control Keycard in Atomfall
How to fix KB5055523 fails to install in Windows 11?
InZoi: How To Apply To School And University

Hot Tools

vc9-vc14 (32+64 bit) runtime library collection (link below)
Download the collection of runtime libraries required for phpStudy installation

VC9 32-bit
VC9 32-bit phpstudy integrated installation environment runtime library

PHP programmer toolbox full version
Programmer Toolbox v1.0 PHP Integrated Environment

VC11 32-bit
VC11 32-bit phpstudy integrated installation environment runtime library

SublimeText3 Chinese version
Chinese version, very easy to use
