My Vim settings

Source: Internet
Author: User
Tags run python script

When writing a Python script this evening, you need to configure Vim again. Now that you have configured it, share it with us. We can make a backup here.

In the past, I seem to have written articles about Vim configuration, but this is not my own.

"Description: your vim configuration file" last change: 2013-01-13 "Author: tiandsp" E-mail: dsptian@gmail.com "version: 1.2 set nocompatible "Disable VI compatibility mode syntax on" auto syntax highlight set nobackup set noswapfile "Disable generating temporary file filetype plugin indent onset completeopt = longest, menulet G: winmanagerwindowlayout = 'fileexplorer | taglist' nmap wm: wmtoggle <CR> colorscheme molokaiset t_co = 256if & CP | set nocp | endiflet S: cpo_save = & cposet CPO & vimma P! <S-Insert> <middlemouse> nmap gx <plug> netrwbrowsexnnoremap <silent> <plug> netrwbrowsex: Call netrw # netrwbrowsex (expand ("<cword>"), 0) map <s-Insert> <middlemouse> let & CPO = s: cpo_saveunlet S: cpo_saveset autoindentset backspace = indent, EOL, startset cindentset fileencodings = UCS-bom, UTF-8, default, latin2set helplang = cnset history = 500 set nomodelineset mouse = aset printoptions = paper: letterset rulerlet $ vimrun Time = "/usr/share/Vim/vim73" set runtimepath = ~ /. Vim,/var/lib/Vim/Addons,/usr/share/Vim/vimfiles,/usr/share/Vim/vim73,/usr/share/Vim/vimfiles/after, /var/lib/Vim/Addons/after ,~ /. Vim/afterset showmatchset suffixes =. Bak ,~,. SWP ,. O ,. info ,. aux ,. log ,. DVI ,. BBL ,. blG ,. BRF ,. CB ,. IND ,. idx ,. ilg ,. success ,. out ,. tocset tabstop = 4 set termencoding = UTF-8 "VIM: Set Ft = VIM: If has (" autocmd ") autocmd filetype XML, HTML, C, Cs, Java, Perl, shell, bash, CPP, Python, Vim, PHP, ruby set number autocmd filetype XML, HTML vmap <c-o> <ESC> '<I <! -- <ESC> O <ESC> '> O --> autocmd filetype Java, C, CPP, CS vmap <c-o> <ESC> '<o/* <ESC>'> O */autocmd filetype HTML, text, PHP, Vim, C, Java, XML, bash, Shell, Perl, Python setlocal textwidth = 100 autocmd filetype HTML, XML, XSL source $ vimruntime/plugin/closetag. vim autocmd bufreadpost * \ If line ("'\" ")> 0 & line ("' \ "") <= line ("$ ") | \ exe "normal G' \" "| \ endifendif" has ("autocmd") "F5 compile and run C Programs, F6 compile and run C ++ programs" F7 run B Ash script program, F8 run Python script "Please note that the following code will report an error when used in Windows" need to be removed. /The two characters "C compilation and running Map <F5>: Call compilerungcc () <CR> func! Compilerungcc () EXEC "W" EXEC "! GCC %-g-o % <"EXEC "! ./% <"Endfunc" C ++ compilation and running Map <F6>: Call compilerungpp () <CR> func! Compilerungpp () EXEC "W" EXEC "! G ++ %-g-o % <"EXEC "! ./% <"Endfunc" bash script run Map <F7>: Call runbash () <CR> func! Runbash () EXEC "W" EXEC "! ./% "Endfunc" Python script run "Map <F8>: Call runpython () <CR> func! Runpython () EXEC "W" EXEC "! Python % "endfunc

 

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.