1, VI or VIM configuration file path
The discovery /usr/share/vim/vimrc and /etc/vim/vimrc point to the same file, ie vimrc, vi and Vim configuration file, modify this file. This path may vary in different LINUX versions.
2, configuration color
With the color display of Xuan VI and VIM, it can highlight some special words, which is very useful for writing programs. Later, I opened the file and found that there is already a line in it. I just commented it out with quotation marks. Just remove the quotation marks in front of the line where the syntax on is located. Or add a separate line: syntax on also, and edit /etc/profile to add a line of alias vi="vim".
3. Set the mouse
When editing the text using the VI, if you want to repair the file from a position farther away from the cursor, you want to use the mouse to locate, you can default In this case, the mouse is not available. If you want to use the mouse, just take another line and write: set mouse=a to
4, set auto-indentation
By default, VI And VIM are not indented, each time you change a line, the cursor is positioned in the top grid, if you want to automatically align, please remove the quotation marks in front of the line where set autoindent, or add another line: set autoindent. This is similar to configuring colors. The result of this setting is that the new line is automatically aligned with the previous line after pressing Enter.
5, set the amount of tab indentation
If you write programs in python, then line indentation is an extremely important concept, the indentation of the same block The amount must be the same. You might like to add a space before the line to indicate indentation, but you must type the space bar multiple times. If you like to use the TAB key to indicate indentation, you may find that the text or program you write is not very good, because the default Under, VI and VIM have a large TAB indentation (at least six or seven characters). Set the TAB key indentation: set shiftwidth=3 You can also choose an indentation you like, such as 2, or 4
On the linux device model online, there are some discussions, some things I used to use, to modify a
I am a Linux rookie like many people, but it is very interested in this, not toss is not good; I dow
In Apple Mac OS and Microsoft Windows have supported multi-touch today, the Linux open source commun
The method is as follows: 1. Create a new .htaccess file in the directory where you need to use the
How to modify ssh default 22 port number
The correct way to restore EXT3 Superblock under Linux
A revolution in the operating system Linux system storms 15 years
Practical tips: What to do when the Linux system "crash"
Linux installation tslib-1.4 error and solution
Linux adsl dialing and sharing Internet
How to set Sysctl.conf to improve Linux performance (the most complete sysctl.conf excellent
Unix timestamp functions in different languages
Linux scp command using tutorial
Linux source command and its usage introduction
The difference between the init function and the init process is
Microsoft promises to shorten Win8 installation time: at least 21 minutes
Ghost solution to improper data loss
How to do WinAPN can not connect to the network under Win7
Win10 can not open the settings how to do
Simple file synchronization between Linux
WinXP local connection and network adapter missing solution
Win 7 can be opened without hard-setting method
Microsoft Mail guides the user through the use of Windows 8
How does Win10 prohibit IE11 browser from automatically updating