Ubuntu12.04 used in the vim settings is a reference to this article, to share with everyone!
Setting method in ubuntu10.10:
$cd /etc/vim
$sudo cp vimrc vimrc.bak
$sudo gedit vimrc< Br>
Then copy the following to the bottom of the penultimate paragraph of the text
set number " display line number
set tabstop=4 " Set the length of the tab to 4
set cindent "Set the automatic indentation method using C/C++ language
set cinoptions={0,1s,t0,n-2,p2s,(03s ,=.5s,>1s,=1s,:1s "Setting the specific indentation method of C/C++ language
Other settings such as the following code can be added at their own discretion :
set nocompatible " Turn off vi compatibility mode
syntax on " Auto syntax highlighting
colorscheme molokai " Set color scheme
set Number " Display line number
set cursorline " Highlight current line
set ruler " Open status bar ruler
set shiftwidth=4 " Set< < and >> The width of the command when moving is 4
set softtabstop=4 " so that you can delete 4 spaces at a time when pressing the backspace key
set tabstop=4 " Tab length is 4
set nobackup " does not back up when overwriting files
set autochdir " automatically switches the current directory to the directory where the current file is located
filetype plugin indent on " ; Open Plugin
set backupcopy=yes " Set the behavior when backing up as an overlay
set ignorecase smartcase " ignore case when searching, but keep it when there are one or more uppercase letters Case sensitive
set nowrapscan " Prevent re-searching when searching for both ends of the file
set incsearch " Display search results when entering search content
set hlsearch " Highlight the found text when searching
set noerrorbells " Close error message ringing
set novisualbell " Turn off using visible ringing instead of calling
Set t_vb= " Terminal code for emptying the wrong ringtone
" set showmatch " When inserting parentheses, briefly jump to the matching parenthesis
" set matchtime=2 " Brief jump to Time to match parentheses
set magic " Set magic
set hidden " Allows you to switch buffers when there are unsaved changes. The modification at this time is saved by vim
set guioptions-=T " Hide Toolbar
set guioptions-=m " Hide Menu Bar
set smartindent " Use Smart Auto Indent when opening new lines
set backspace=indent,eol,start
" Not set in the insert state. You cannot use the backspace key and the Delete key to delete the carriage return
set cmdheight=1 " The number of lines in the command line is 1
set laststatus=2 " Display status bar (default is 1, the status bar cannot be displayed)
set statusline=\\ %<%F[ ,null,null,3],%1*%M%*%n%R%H]%=\\ %y\\ %0(%{&fileformat}\\ %{&encoding}\\ %c:%l/%L%)\\
" Set in Status display information
set foldenable " Start folding
set foldmethod=syntax " Set syntax folding
set foldcolumn=0 " Set the width of the collapsed area < Br>
setlocal foldlevel=1 " Set the number of fold layers to
" set foldclose=all " Set to automatically close the fold
" nnoremap @=((foldclosed( Line('.')) < 0) ? 'zc' : 'zo')
" Use the space bar to toggle the
" return OS type, eg: windows, or linux, mac, et.st..
function! MySys()
if has("win16")
1, need to upload or download, you need to use the rz and sz commands. If you do not have th
Preparation before installation 1. kail linux 2.0 download (multiple versions of ISO) Downl
What is a process? A process is a running instance of an already launched executable. The process ha
With ubuntu for a long time, many people will suddenly give a hint: disk space is less than 1G! Then
Create a user with a password under Linux
Linux command learning - netstat
Summary of Techniques for Copying Files Between Linux Systems
PCI device driver development under Linux
Linux switch command (shutdown, reboot, halt, init)
8 tips make you a superb Linux end user
CentOS open port 80, 8080 or open a port
Win7 system web page font size setting method
Windows Azure supports FedEx import/export data
How to close the operation center of Windows 8 system
Alternative usage of Net commands in XP
Summary of tar commands in Linux system
Red Flag Linux6.0 system to install VirtualBox skills
Win7 can't verify what the publisher is doing win7 can't verify the publisher's solution
Win10 upgrade assistant login failure how to do win10 upgrade assistant can not log in solution
Win10 Quick Reset Method for Modern Applications
Win7 uses the group policy method to turn off the full-duplex audio mode