This digest is from the network, the initial author is not clear, so no original link is left. If anyone knows, please tell them.
Vim as one of the best text editors, using vim to write documents, writing code is very pleasant things. Whenever you
practical problem: under Linux system, using cat to view text files containing Chinese is normal, but using vim to open it is garbled
Workaround: When you open a text file with Vim, enter it in command mode:
: Set Encoding=utf8
can be solved.
Http://homepage.ttu.edu.tw/u9106240/page_main/vim_menu.html
Enter input mode
Enter the following instruction in command mode, and the program will enter the input (insert) modeThe user can then modify the file,If you want to jump out of the input
Basic operation of Vim
Start vimEnter the command in the terminal: Vim in the terminal interface or gvim separate out a window.
Text inputEnter the character "a" or "I" in normal mode to enter text editing mode.
File SaveAfter the text is
Three modes of VIMThere are three modes of vim, namely:
General mode
Edit mode
Command-line mode
Common operationswhich
The cursor moves to the beginning of the line, except that "^" can be used, and "0" has the same effect.
: Network Disk DownloadVim is a rich and powerful text editor, its code completion, compilation and error jump and other convenient programming features are particularly rich, in the programmer is very widely used. Vim can greatly improve the
I. Common functions of VIMVim is a text editor developed from VI. Code completion, compilation and error jump and other convenient programming features are particularly rich, widely used in programmers, and Emacs parallel to become UNIX-like system
To move from one file to anotherCopy and paste between different files
Edit another file:edit foo.txt 关闭当前文件,打开指定文件,当前文件未保存会出现错误信息:e! foo.txt 缩写,强制打开指定文件错误有对应的 ID 号, :help E37 查看错误帮助Open multiple files at the same timevi a.ts main.lisp:files
Enter edit modeEdit mode, which is the mode that we can modify the document, configureI insert in the current word match eitherI (uppercase) is inserted at the beginning of the line where the cursor isA inserts after the current characterA
I. Introduction of VIMVim is an upgraded version of VI (Vim config file in/ETC/VIMRC)Vim is a color-displayYum Install-y vim-enhancedGeneral mode, edit mode, command modeSecond, Vim color display and move the cursorVim View/etc/passwd
The use of the VI editor/vim editor for the Kali Linux system differs from CentOS in many ways. The basic use method is as follows1, VI of the basic conceptBasically, vi can be divided into three states, namely command mode, insert mode (and bottom
The IDE under the Mac is really bad, eventually giving up the IDE ready to use VIM to see the code, then you need to set up vim.Place the home directory below. The VIMRC in Vim is replaced with the following:"Set vundle Settings here"git clone https:
First, move the cursor1、移动到行尾"$",移动到行首"0"(数字),移动到行首第一个字符处"^"2、移动到段首"{",移动到段尾"}"3、移动到下一个词"w",移动到上一个词"b"4、移动到文档开始"gg",移动到文档结束"G"5、跳到第n行"ngg" 或 "nG" 或 ":n"6、移动光标到屏幕顶端"H",移动到屏幕中间"M",移动到底部"L"7、移动到上次编辑文件的位置 "`"Second, edit the operation1. Insert after
This is an imported old blog, may have a timeliness problem.1. Install Homebrew (Package Manager, used to install vim)& /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"2.安装Vim(系统自带的Vim不是最新版)& brew
I used to use vim to edit the Python code, the folding function is no problemLater, when I edited the Go code, I found that I saved, collapsed all disappeared , I am puzzled, I infer that it is related to the plugin I use, because I save the time
I. Introduction of VIMVim is an upgraded version of VI: Available with color display1. Install VimYum Install-y vim-enhancedvim/etc/passwd2. Three modes:General mode: DD P yy edit mode: Edit file Content Command mode::/?Two, Vim color display and
Vim new starter VIM Advanced Advanced Tutorial vim keying diagram Vim Official document
h or LEFT ARROW key (←) The cursor moves one character to the left
J or DOWN ARROW key (↓) cursor moves down one character
K or Up ARROW key (↑) The
Use VIM to open a blank document, and then paste the copied code into it, found that it has automatic indentation function, resulting in the pasted text line is more than one line on the right, looks mess. The quicker solution is to enter the
The learning curve of Vim is quite large (see the learning curve of various text editors), so if you start to see a bunch of Vim's command classifications, you're bound to lose interest in the editor. The following article is translated from "Learn
1.vim editing process after entering the command lineAbout the edit:A converts the command-line mode to edit mode, with the cursor at the beginning,I insert, O lowercase means go to the next line to edit; Capital O means to go to the previous line
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