(29)Vim 5

Vim display line numbers method Detailed
display line number 1. When editing
  input command mode ": set nu" to display the number of each line is
  if you want to cancel the line number, then enter again ": set nonu" can be.
2. permanent display line numbers
  if you want to display by default every time you open a file line number, Vim you can edit the configuration file. When you open a file each time you use Vim, Vim reads the .vimrc file to the currently logged in user's home directory (user profile location), this file may be some default configuration settings for Vim.
  If .vimrc file exists, on the first reading of which is set to Vim; otherwise take the default configuration. By default, the user is not the home directory of this file, the need to manually establish the current user's home directory, such as "vim ~ / .vimrc", " ~" on behalf of home directory, the root directory of the host / root / , ordinary users stored in the home directory / home / directory. Vim editor can be used directly to generate this file and add the line "set nu" in this file, save and exit.
  After the user logs on, every time you open a file Vim will display line numbers by default.

3.Vim configuration file (.vimrc), Vim configuration tutorial
  you can use ": set all" command to view all the set parameters. The setup parameters can be written .vimrc configuration file, make them permanent, can also be performed in Vim, let them temporary effect.

  When starting Vim, Vim will be set according to the configuration file (.vimrc), so we can use this file to customize their own Vim.

  Vim configuration file into the system configuration file and user profile:
  The system configuration file is located Vim installation directory (the default path /etc/.vimrc);
  user profile located in the main directory ~ / .vimrc, i.e. by performing vim ~ /. vimrc command to make reasonable modifications to this profile. Normally, Vim user profiles need to manually create.

  Note, Vim user profile is higher than the priority system configuration files, in other words, when Vim starts, will give priority to read the Vim user profile (located in the main directory), so we only need to modify the user configuration files ( not recommended to directly modify the system configuration file).

  Vim environment configuration parameters provided are many, not enumerated in this section, you can enter in Vim ": set all" command to query
  the above manner, the user can edit the configuration file (.vimrc), and then realize Vim permanent custom.

 

Guess you like

Origin www.cnblogs.com/xinghen1216/p/11310896.html
29
5