. Vimrc &. bashrc file configuration, vimrc Configuration
/* If vim has no syntax highlighting, add the following statement */export TERM = xterm-color/Note to/etc/profile: only. if you modify vimrc, the modification content is only valid for this user. To make it all valid, you can modify the same/etc/bashrc for/etc/vimrc as the Startup File for all users. * The following is ~ /. Content of the vimrc file */set nonumber "do not set the row number set shell =/bin/bash" set shell environment syntax on "enable vim syntax highlighting colorscheme desert" set topic Color set background = darkset autoindent "set automatic indent set nocompatible" incompatible with viset showmatch "enable bracket matching" set cursorline "highlight the row where the cursor is located set r133" set ruler set laststatus = 2 "enable the status bar (default is 1) set smartindent "enable new flight with smart automatic indent set hlsearch" highlighted text set wrap "set automatic line feed set tabstop = 4" set indent to four spaces set softtabstop = 4 set shiftwidth = 4 filety Pe on "check file type set history = 500" set the number of historical rows set smartindent "Ideally add Automatic Alignment Based on the above format ls/usr/share/vim/vim72/colors/You can view vim supported topic color/* directory color scheme (copy the DIR_COLORS file in/etc to your home directory, and rename it. dir_colors) */cp/etc/DIR_COLORS ~ /. Dir_colors/* PS1 user main prompt color scheme (in. add in the bashrc file) */export PS1 = "\ [\ e [0; 36m \] \ u \ [\ e [m \] @ \ [\ e [0; 32m \] \ h: \ [\ e [0; 35m \] \ W \ [\ e [m \] \ $ "// other Equivalent Expressions # PS1 =" \ [\ 033 [36m \] \ u \[\ 033 [m \] @ \ [\ 033 [32m \] \ h: \ [\ 033 [35m \] \ W \ [\ 033 [m \] \ $ "# export PS1 // another main prompt style (add the default CentOS main prompt color identifier) # export PS1 = "[\ [\ e [0; 36m \] \ u \ [\ e [m \] @ \ [\ e [0; 32m \] \ h \ [\ e [0; 35m \] \ W \ [\ e [m \] \ $ "/*. alias commands used by individuals in the bashrc file */alias cls = 'clear' # DOS-style clear alias h = 'History | tail 'Alias hg = 'History | grep' alias hl = 'History | less 'stty erase ^ H # Clear the backspace (this is necessary) /*/etc/profile file setting */export PATH = $ PATH:/opt/perl/site/bin:/opt/perl/bin
In linux, where is the vim configuration file vimrc?
There is a. vimrc under the user's home directory (/home/user name)
There is also a vimrc under/etc
Generally, this configuration file only applies to. vimrc under the user's home directory.
After the change, use the su-user name to make the configuration take effect (for example, su-zhang3)
. Vimrc can be viewed using ls-al for hidden files.
How to enable/etc/vim/vimrc
Use sudo vim/etc/vim/vimrc in the terminal
In the figure, gedit/etc/vim/vimrc
Oh, you need to configure vim, right? There is no need to change this/etc/vim/vimrc
Modify ~ /. Vim/vimrc or ~ /. Vimrc forgot, hey.