Configuration and optimization practices for the Shell Scripting development environment

Source: Internet
Author: User
Tags set background

Configuration knowledge such as Vim path is shown in table:

Related configuration Files Function description
. viminfo User's operation history using Vim
. VIMRC Configuration file for current user vim
/etc/vimrc System global VIM configuration file
/usr/share/vim/vim74/colors/ Color template file Storage path

The configuration contents of the. VIMRC are as follows:

"~/.VIMRC"Vim config file"Date 2018-01-07"blog:http://aqiang.blog.51cto.com"Blog:http://www.cnblogs.com/ivan-yang""""""""""""""""""""""""= = Global Configuration""""""""""""""""""""""""Turn off compatibility modeSet Nocompatible"Set History Step numberSet history= -"turn on related pluginsfiletype Onfiletype plugin onfiletype indent on"automatically update a file when it is externally modifiedSet Autoread"activating the use of the mouseSet mouse=a""""""""""""""""""""""""= = Font and color""""""""""""""""""""""""Open Grammarsyntax Enable"Highlight Current Lineset Cursorlinehi cursorline guibg=#00ff00hi cursorcolumn GUIBG=#00ff00set nofenset FDL=0"use spaces to replace tabSet Expandtab"Set all tab and indent to 4 spacesSet tabstop=4"set << and >> command width to 4 when movingSet shiftwidth=4"makes it possible to delete 4 spaces at a time by pressing the BACKSPACE barSet softtabstop=4Set Smarttab"indent, Auto Indent (indent the previous line)"The set autoindent command turns off automatic indentation, which is the abbreviation configured below. "You can use the shorthand for the autoindent command, which is ": Set AI" and ": Set Noai". "You can also use ": Set AI sw=4" to open indents in one command and set the indentation level. set AI"Smart IndentSet Si"Wrap LineSet Wrap"Set Soft widthSet sw=4""""""""""""""""""""""""+ Vim Interface""""""""""""""""""""""""Turn on WiLd menuSet Wildmenu"Show RulerSet Ruler"set the height of the command lineSet cmdheight=1"number of rows displayedSet Nu"Don't Redrwa, when running macros: LazyredrwaSet LZ"Set BACKSPACESet backspace=Eol,start,indentset Whichwrap+=<,>, H,l"Set magic on (setting magic)Set Magic"Turn off sound cues when you encounter an error"Turn off error message ringSet Noerrorbells"turn off using visual bells instead of callsSet Novisualbell"Display matching parentheses ([{and}])Set Showmatch"How many tenths of a second to blinkSet mat=2"highlight Search when searchingSet Hlsearch"Search is case insensitive"You can also use shorthand (": Set IC" and ": Set Noic")Set ignorecase""""""""""""""""""""""""/ = Encoding settings""""""""""""""""""""""""Set EncodingSet encoding=utf-8"Set File EncodingSet fileencodings=utf-8"set up terminal encodingSet termencoding=utf-8""""""""""""""""""""""""= = Other Settings""""""""""""""""""""""""Use Smart Auto indent when new rows are turned onset Smartindentset cinset showmatch"Hide the toolbarSet guioptions-=T"Hide the menu barSet guioptions-=m"set the terminal code for the wrong ringtoneSet VB t_vb="Display the status bar (the default is 1, indicating that the status bar cannot be displayed)Set laststatus=2"solutions for pasting non-wrapping problemsSet pastetoggle=<f9>"Set Background colorSet background=Dark"Set highlighting correlationHighlight Search ctermbg=black ctermfg=white guifg=white guibg=Black"automatically add the copyright information such as interpreter and author at the beginning of shell scriptAutocmd bufnewfile *.py,*.cc,*.SH, *.java exec": Call Settitle ()"func settitle ()ifExpand"%:e") =='SH'Call Setline (1,"#!/bin/bash") Call Setline (2,"#Author: Yang Yuanqiang") Call Setline (3,"#Blog1: http://aqiang.blog.51cto.com") Call Setline (4,"#Blog2: http://www.cnblogs.com/ivan-yang/") Call Setline (5,"#Time:". Strftime ("%F%T")) Call Setline (6,"#Name:". Expand ("%")) Call Setline (7,"#Version: V1.0") Call Setline (8,"#Description: This is a script.") Endifendfunc

Make the configuration file. VIMRC Effective

Add the Vim profile. VIMRC to the "~" Directory of the Linux system, then exit the SSH client and log in again to apply the. VIMRC settings. Examples are as follows:

ls -lh ~/. VIMRC

-rw-r--r-- 1 root root 1. 4K 1 :/USERS/IVAN/.VIMRC

Tip: The same applies to ordinary users.

When you log in again, the. VIMRC configuration is automatically loaded when you use VIM.

Configuration and optimization practices for the Shell Scripting development environment

Related Article

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.