Vim shortcut, vim1. vim Environment Settings
Vim behavior record file path ~ /. Viminfo
Set the file path in the vim environment ~ /. Vimrc
In ~ /. Manually write the following content in vimrc (double quotation marks "indicate comments ):
Set nohlsearch "highlightSet backspace = 2 "deleted with backkeySet autoindent "
VI/Vim is one of the most powerful and popular text editors in the liux system. Learn Vim while reading learning the VI and VIM editor, and write simple notes for future queries.Before reading this book, we often used Vim to edit some simple files and some basic simple commands. But while reading the book, I found that
[vim] with sudo permission to save vim open readonly file
The following command is to be stated in this article:
: W! sudo tee% >/dev/null
In the Linux configuration, you will change to read-only files, such as/etc/profile
$ ls-al/etc/profile-rw-r–r–1 root root 1139 Mar 17:30/etc/profile
Use VIM to open the file/etc/profile modified, save will be wrong:
: WE45:
I still recommend all new vim friends first go to use vimtutor practice, and then go to see Vim's help document, write very carefully, and can immediately combat, effective quickly, many of the following are the examples of VIM help document, I feel very good, took out.The reason why vim is efficient is because it has a high-efficiency mobile mechanism, as a lear
Enable Vim syntax highlighting settings in SSH Secure Shell Client
The related settings on the SSH Secure Shell client are: Setting --> profile setting --> connection --> terminal, select ANSI or xterm.
====================================When you use Vim to edit a terminal, by default, the editing interface does not display line numbers, syntax High Brightness Display, smart indentation, and other functio
Vim/Vi practical skills (version 2) and vim Practical SkillsVim/Vi Practical Skills
1. Import files
: R [file name] # import to the currently edited File
For example, r/etc/inittab
The upper part of the file is the/etc/services file, and the lower part is the/etc/inittab file.
2. Run the command [do not exit vi]
:! [Command]
:! Ls-l/home/hadoop
Extended-import the command execution result to the current
[Vim] vim learning notes-open, switch, and close multiple filesOne case is to use vim in shell to open multiple files, and the other case is to open multiple files in the vim editor.Open multiple files at the same timeVim file1 file2Open the file and display vim-o file1 file
Vim learning notes series (preface) and vim learning notes
This morning, we saw that the great gods were using vim for programming. The screen was intuitive and the speed was very fast. The operation only needed a command character.
Therefore, it can be inferred that the vim command operators are complex, so the le
Improve Efficiency Emmet. vim and emmet. vimImprove Efficiency Emmet. vim
Reprinted please indicate the source: http://blog.csdn.net/hpu_zyh/article/details/48069159Blog homepage | simplified book | zhihu | Weibo | github
Emmet-The essential toolkit for web-developers EmmetWith powerfulVimIt's no longer beautiful.HeardEmmentAndVimBetter configuration (haha, the more correct this is)
It can also be use
Vim cursor positioning, vimVim cursor Positioning
* Locate the specified row n:Enter "nG ".Or enter "ngg ".Or enter ": n"Here, n is the row number of the specified row. Note that sometimes G = gg.* Jump to the top of the screen:Enter "H ".This is the first non-empty character. Adding a number N indicates the number of rows (such as the N row of the 'nh 'positive number) from the top of the window)* Jump to the bottom of the screen:Enter "L ".This is t
Vim's DIY preference configuration under Mac"First execute:"CP/USR/SHARE/VIM/VIMRC ~/.VIMRC"Copy the default configuration file, and then execute:"Vim ~/.VIMRC"Edit the file at the end of the file to add"Syntax on"Save to exit"========================== below is the configuration content =================="Configuration file for VimSet Modelines=0 "cve-2007-2438"Normally we use
Modify the. vimrc file under your user directory. There is a "." In ubuntu, it indicates a hidden file. Then, put the configuration content in the file. I. find a plug-in: AutoComplPop. Download the latest http://www.vim.org/scripts/script.php for this tool from the URL below? Script_id
Modify the. vimrc file under your user directory. There is a "." In ubuntu, it indicates a hidden file.
Then, put the configuration content in the file.
I. code prompts
Find a plug-in: AutoComplPop. Download the
Sprout new note-vim command "=", "d", and "y" usage (combined with the cursor movement command, it will be very convenient in some cases), vim is very convenient
Vim has many commands. on the Internet, you can search for a bunch of posts and articles to list commands for various functions.
For "=", "d", and "y", I accidentally discovered some of the same usage.
Common Vim shortcut keys and keyboard diagrams, and vim shortcut keys and keyboards
Common Vim shortcut keys
H-move the cursor one character left. j-move the cursor one character down.
K-move the cursor up one character l-move the cursor down one character to 15 rows-15j
Ctrl + f-move one page down on the screen Ctrl + d-move half page down
Ctrl + B-move one pag
Vim auto-complete, vim auto-complete, and so on. In summary, copy and paste the following code ~ /. Vimrc, save, close all vim, and open it. Enter the cursor inside the brackets. Www.2cto.com [plain]: inoremap ()
Vim (multiline comment and delete multiline comment )., Vim multi-line--- All in ESC mode:1. Comments in multiple lines in vim.(1) press Ctrl + v to enter the column mode;(2) select to end at the specified position at the beginning of the line to be commented. (Use the up/down key to determine the number of rows)(3) Press "I" to enter the insert mode;(4). Enter t
Linux applications: Vim quick operations and vim quick operations
1. Delete characters
X: Delete characters under the cursor
Dd: deletes a whole line, including line breaks.
J: Delete the line break of the current row. It can be executed anywhere in the current row.
2. Undo and undo
U: undo the last operation. Continuous execution will be unperformed continuously.
U: undo the row. undo all the last modifi
In the past, all the auto-completion functions of VIM were downloaded from the Internet when needed, and copied to their own vimrc. I didn't know what it meant, the results show that many of the methods found to be auto-complete are quite different. Some prefer to use auto-wrap when the braces are fully filled, and others prefer to use auto-indent when the braces are fully filled, let's take a few minutes to understand how to write these configuration
1. Three modes(1) Command mode:Just start vim and enter command mode, at which point the keystroke will be treated as a command.Here are a few common commands:I switch to insert mode to enter characters.x deletes the character at which the current cursor is located.: Switch to Baseline command mode to enter commands at the bottom of the line.(2) Input modePress I in command mode to enter the input mode.In input mode, you can use the following keys:Cha
Mac, vi and VIM is God-like editor, how to delete multiple lines, at the beginning, very confused.The following is an example of editing the host fileFirst, in terminal, enter vim/etc/hosts and press RETURN.Enter the default mode of VIM.Vim has three modes of command mode, edit mode, and default modePress ESC to enter the command mode, you can use the exit, save the exit, do not save the command to exit. Co
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.