Replace with the content of the copy
When there is a spelling error or if you want to rename an identifier, you need to replace the current name with the contents of the copy. For example, when invoking a function, the error is written:
Many of the things in a Linux system are in the form of scripting code, configuration files, and you need to edit them frequently when using Linux systems. Obviously, if there is no text editor, the road to the river is impossible.
My choice is vim.
Open vim config file (e.g. sudo, or su into root mode)1.sudo VIM/ETC/VIM/VIMRCAdd a row2.set tabstop=4Exit Save3.:wq AdvancedAfter adding the following code to the. VIMRC, restart Vim to create 4 spaces by pressing TAB:Set ts=4 (Note: TS is the
Vim has a lot of detailed commands, we use a number of common entry commands, enough to deal with the daily code editing work, if you need to use other commands later, it is not too late to query.Vim generally has 3 editing modes, namely insert mode,
Why should I learn vim?
All Unix like systems have their own VI editor
Some software's editing interface will automatically adjust the VI
As an upgraded version of VI, VIM has the program editing function, but also has the code
vim Three modes: General mode edit mode Command modeCopy and paste content can be deleted in general modeTo move the cursor :[Ctrl]+[f]: The screen moves down one page, equivalent to the [PageDown] button.[Ctrl]+[b]: The screen moves up one page,
1. 光标在屏幕文本中的移动既可以用箭头键,也可以使用 hjkl 字母键。 h (左移) j (下行) k (上行) l (右移) 2. 欲进入 Vim 编辑器(从命令行提示符),请输入:vim 文件名 3. 欲退出 Vim 编辑器,请输入 :q! 放弃所有改动。 或者输入 :wq 保存改动。 4. 在正常模式下删除光标所在位置的字符,请按: x 5.
In the process of learning to use VIM, we know that in vim, the paste copy of the command is y/p, but we always encounter such a problem: How to paste the contents of vim inside the vim or copy of the content of the vim outside to paste into
Vim Paste Code problemvim
When using Xshell for VIM operation, often directly paste some external code, and then paste on the following will appear progressive indentation of the situation, has not been to find out why, and line to get him
From: https://zhidao.baidu.com/question/267905868.htmlThere are two cases in which the open file appears with the ^m symbol:1. Vim is configured as Fileformat=unix, and the files you open are in DOS format. The Unix-formatted newline character is 0A
Vi/vimCommand modeInsert Mode AIOEdit mode:AIO is the insertion mode of Vi/vim.Command functionA append text after the cursorA at the end of the bank additional textI insert text at the cursor moneyI start inserting text at the banko Inserting rows
Vi/vim EditorOpen File:#vi [Option][file ...]+#: After opening the file, the cursor is directly at the beginning of line #;#/pattern: After opening the file, the cursor is directly at the beginning of the first line that is matched to the PATTERN;(1)
Because of my personal preference, I like to set the background color to dark when I use VIM.But each time you open a vim to reset it, it feels very troublesome.Always enter [ESC]: Set Bg=dark is inconvenientThe rough way is to go directly to
I use VIM to open a file, I want to open another file, just like windows open two Notepad, so need to split screen displayFirst open a file with vimVim File1Input command [ESC]: SP file2Split screen to open a second file file2Toggle cursor:[Ctrl] +
First confirm that in normal mode, if you do not confirm, press ESC several times.: Sy on/clearSY indicates syntax highlighting, on is open, clear is canceled.: Set go=Set represents the general setting, go is the abbreviation of GUI option, is the
One, view hard disk or directory capacity1.DF [-hmkit]-H View System disk usage-M using MBytes to display results-K displaying results using Kbytes-I view Inode-T view type2.du [-abhkms] [directory name]-S only lists the total value of the last
Environment: Kali LinuxVim's configuration file is stored in the/etc/vim directory with the configuration file named VIMRCSet nocompatible "Remove the relevant VI conformance mode to avoid bugs and limitations of previous versions"Set nu! "Show line
Reprinted from: http://blog.csdn.net/chuanj1985/article/details/6873830 in Ubuntu the configuration file for vim is stored in the/etc/vim directory with the configuration file named VIMRCThe configuration file for vim in Fedora is stored in the/etc
650) this.width=650; "src=" Https://s3.51cto.com/wyfs02/M02/97/C8/wKioL1kyuIOB8DIuAAAQijajlbg671.png "title=" Clipboard.png "alt=" Wkiol1kyuiob8diuaaaqijajlbg671.png "/>pydiction can be we use the TAB key to automatically complement the Python code
Let's take a picture first:For some small Python projects, using Vim is a good choice. What is the best practice for writing Python with Vim in the context of the self-informed answer in this article? , the following is a supplement to the old
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service