立神gvim
set cursorline
set history=1700
set nocompatible "去掉讨厌的有关vi一致性模式,避免以前版本的一些bug和局限
set nu
filetype plugin on
filetype indent on
set autoread
set so=7
set wildmenu
set wildignore=*.o,*~,*.pyc
set wildignore+=.git\*,.hg\*,.svn\*
set ruler
set cmdheight=2
set hid
set backspace=eol,start,indent
set whichwrap+=<,>,h,l
set ignorecase
set smartcase
set hlsearch
set incsearch
set lazyredraw
set magic
set showmatch
set noerrorbells
set novisualbell
set tm=500
set foldcolumn=1
set guioptions-=m " 隐藏菜单栏
set guioptions-=T " 隐藏工具栏
set guioptions-=L " 隐藏左侧滚动条
set guioptions-=r " 隐藏右侧滚动条
set guioptions-=b " 隐藏底部滚动条
set autochdir
syntax enable
autocmd InsertLeave * se nocul " 用浅色高亮当前行
autocmd InsertEnter * se cul " 用浅色高亮当前行
color molokai
if has("gui_running")
set guioptions-=T
set guioptions-=e
set t_Co=256
set guitablabel=%M\ %t
endif
set fileencoding=utf-8
set ffs=unix,dos,mac
set formatoptions+=m
set formatoptions+=B
set nobackup
set nowb
set noswapfile
set mouse=a
set expandtab
set smarttab
set shiftwidth=4
set tabstop=4
set softtabstop=4
set expandtab
set lbr
set tw=500
set ai
set si
set wrap
set viminfo^=%
" set guifont=Liberation\Mono\ 12
set guifont=Courier\ New\ 12
set laststatus=2
set statusline=\ %{HasPaste()}%F%m%r%h\ %w\ \ CWD:\ %r%{getcwd()}%h\ \ \ Line:\ %l
set list lcs=tab:\|\
inoremap ( ()<ESC>i
inoremap { {<CR>}<ESC>o
inoremap [ []<ESC>i
inoremap " ""<ESC>i
inoremap ' ''<ESC>i
inoremap ;; <ESC>o
inoremap <C-a> <esc>ggVGm
inoremap <C-s> <esc>:w<CR>i
inoremap <C-v> <esc>"+Pi
inoremap <C-c> <esc>"+Yi
inoremap <C-z> <esc>ui
map <C-s> :w<CR>
map <C-a> ggVG
map <C-c> "+Y
map <C-v> "+P
map <C-z> u
map ff <ESC>:NERDTree<CR>
map ss <ESC>:!google-chrome %<CR>
map fp <ESC>:vsplit<CR>
map cfp <ESC>:split<CR>
map rr <ESC>ysiw
map cc <ESC>gcc
map xx <ESC>gcu
map nn gc
map zd <ESC>zfap
map ll :IndentLinesToggle<CR>
let mapleader = ","
let g:mapleader = ","
let g:Source="/home/wangzhili/wzl/"
let python_highlight_all = 1
let g:author = 'wangzhili'
let g:Email = 'wangstdio.h@gmail.com'
let g:html_indent_inctags = "html,body,head,tbody"
let g:html_indent_script1 = "inc"
let g:html_indent_style1 = "inc"
let g:pyflakes_use_quickfix = 0
let g:indentLine_color_gui = '#F8F8FF'
let g:indentLine_char = '┆'
au FileType python syn keyword pythonDecorator True None False self
au BufNewFile,BufRead *.jinja set syntax=htmljinja
au BufNewFile,BufRead *.mako set ft=mako
au FileType python map <buffer> F :set foldmethod=indent<cr>
au FileType python inoremap <buffer> $r return
au FileType python inoremap <buffer> $i import
au FileType python inoremap <buffer> $p print
au FileType python map <buffer> <leader>1 /class
au FileType python map <buffer> <leader>2 /def
au FileType python map <buffer> <leader>C ?class
au FileType python map <buffer> <leader>D ?def
au FileType javascript call JavaScriptFold()
au FileType javascript setl fen
au FileType javascript setl nocindent
au FileType javascript imap <c-t> AJS.log();<esc>hi
au FileType javascript imap <c-a> alert();<esc>hi
au FileType javascript inoremap <buffer> $r return
"回到上次编辑的位置
autocmd BufReadPost *
\ if line("'\"") > 0 && line("'\"") <= line("$") |
\ exe "normal! g`\"" |
\ endif
"end
function! JavaScriptFold()
setl foldmethod=syntax
setl foldlevelstart=1
syn region foldBraces start=/{/ end=/}/ transparent fold keepend extend
function! FoldText()
return substitute(getline(v:foldstart), '{.*', '{...}', '')
endfunction
setl foldtext=FoldText()
endfunction
map e :call Do_OneFileMake()<CR>
function Do_OneFileMake()
exec "w"
if &filetype=="java"
exec "!javac %"
exec "!gnome-terminal -t JAVA -x bash -c \"java %<;rm %<.class;read;\""
endif
if &filetype=="python"
exec "!gnome-terminal -t Python -x bash -c \"python %;read;\""
endif
if &filetype=="sh"
exec "!gnome-terminal -t SH -x bash -c \"sh %; read;\""
endif
if &filetype=="c"
exec "!gnome-terminal -t C -x bash -c \"g++ % -o %<;./%<;rm %<;read;\""
endif
if &filetype=="cpp"
exec "!gnome-terminal -t CPP -x bash -c \"g++ % -o %<;./%<;rm %<;read;\""
endif
if &filetype=="markdown"
exec "!gnome-terminal -t -MD -x bash -c\"submit.sh;read;\""
endif
normal o
exec "c"
endfunction
function InsertPythonComment()
exe 'normal'.1.'G'
let line = getline('.')
if line =~ '^#!.*$' || line =~ '^#.*coding:.*$'
return
endif
normal O
call setline('.', '#!/usr/bin/env python')
normal o
call setline('.', '# -*- coding:utf-8 -*-')
normal o
call cursor(4, 17)
endfunc
function InsertCommentWhenOpen()
if a:lastline == 1 && !getline('.')
call InsertPythonComment()
end
endfunc
function CppHeadFlie()
call setline('.','#include<map>')
normal o
call setline('.','#include<cmath>')
normal o
call setline('.','#include<queue>')
normal o
call setline('.','#include<cstdio>')
normal o
call setline('.','#include<vector>')
normal o
call setline('.','#include<string>')
normal o
call setline('.','#include<cstring>')
normal o
call setline('.','#include<sstream>')
normal o
call setline('.','#include<iostream>')
normal o
call setline('.','#include<algorithm>')
normal o
call setline('.','using namespace std;')
normal o
endfunc
function CallCppFunction()
if a:lastline == 1 && !getline('.')
call CppHeadFlie()
end
endfunc
function JavaFile()
call setline('.','public class '.expand("%<").expand('{'))
normal o
call setline('.',' public static void main(String[] args){')
normal o
normal o
call setline('.',' }')
normal o
call setline('.','}')
call cursor(3,9)
endfunc
function CallJavaFunction()
if a:lastline == 1 && !getline('.')
call JavaFile()
end
endfunc
au FileType cpp :%call CallCppFunction()
au FileType java :%call CallJavaFunction()
au FileType python :%call InsertCommentWhenOpen()
autocmd FileType python,shell set commentstring=#\ %s " 设置Python注释字符
autocmd FileType mako set cms=##\ %s
set nocompatible
filetype off
filetype plugin indent on
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
Bundle "airblade/vim-gitgutter"
Bundle "gregsexton/gitv"
Bundle "tpope/vim-commentary"
Bundle "tpope/vim-surround"
Bundle "Raimondi/delimitMate"
Bundle "mattn/emmet-vim"
Bundle 'scrooloose/nerdtree'
Bundle "MarcWeber/vim-addon-mw-utils"
Bundle "tomtom/tlib_vim"
Bundle "garbas/vim-snipmate"
Bundle "honza/vim-snippets"
Bundle 'pkufranky/VimRepress'
Bundle 'hallison/vim-markdown'
Bundle "MarcWeber/vim-addon-mw-utils"
Bundle "tomtom/tlib_vim"
Bundle "garbas/vim-snipmate"
Bundle "honza/vim-snippets"
Bundle 'gmarik/vundle'
Bundle 'kien/ctrlp.vim'
Bundle 'sukima/xmledit'
Bundle 'sjl/gundo.vim'
Bundle 'jiangmiao/auto-pairs'
Bundle 'klen/python-mode'
Bundle 'SirVer/ultisnips'
Bundle 'scrooloose/syntastic'
Bundle 't9md/vim-quickhl'
Bundle 'Lokaltog/vim-powerline'
Bundle 'scrooloose/nerdcommenter'
Bundle 'hdima/python-syntax'
Bundle 'Yggdroot/indentLine'
Bundle 'Shougo/neocomplete'
Bundle 'kevinw/pyflakes-vim'
Bundle 'pangloss/vim-javascript'
Bundle 'mathematic.vim'
inoremap <buffer> <C-X><C-U> <C-X><C-U><C-P>
inoremap <buffer> <C-S-Space> <C-X><C-U><C-P>
autocmd Filetype java setlocal omnifunc=javacomplete#Complete
autocmd Filetype java setlocal completefunc=javacomplete#CompleteParamsInfo
autocmd Filetype java,javascript,jsp inoremap <buffer> . .<C-X><C-O><C-P>
autocmd FileType python setlocal completeopt-=preview
let g:acp_enableAtStartup = 0
let g:neocomplete#enable_at_startup = 1
let g:neocomplete#enable_smart_case = 1
let g:neocomplete#sources#syntax#min_keyword_length = 3
autocmd FileType css setlocal omnifunc=csscomplete#CompleteCSS
autocmd FileType html,markdown setlocal omnifunc=htmlcomplete#CompleteTags
autocmd FileType javascript setlocal omnifunc=javascriptcomplete#CompleteJS
autocmd FileType python setlocal omnifunc=pythoncomplete#Complete
autocmd FileType xml setlocal omnifunc=xmlcomplete#CompleteTags
立神gvim的更多相关文章
- [转载] ubuntu下定制Vim/Gvim及使用技巧
vim是linux下的编辑器之神,是玩linux的必备工具,同样emacs是神的编辑器,两个编辑器是各有千秋,看个人的喜好,青菜萝卜各有所爱.我是比较喜欢vim,用vim编写bash,perl,pyt ...
- gVim 配置方案 采用Vundle管理插件
在Linux下配置vim非常简单,尤其是采用Vundle来管理插件,使得一切用起来得心应手. Maple大神在github上公布了自己的vim配置方案,相当方便好用.详见 https://github ...
- 大神的vim配置
大神的vim配置,O(∩_∩)O spf13-vim : Steve Francia's Vim Distribution __ _ _____ _ ___ _ __ / _/ |___ / __ _ ...
- 关于GVIM的配置。
最近开始考虑从常用的 Dev-Cpp 和 Visual Studio 开发环境中转到gvim+gcc+gdb. 我一直觉得IDE很好方便,不是很明白别人这样的配置.但还是开始有意识的去尝试更换环境. ...
- scrapy爬取校花网男神图片保存到本地
爬虫四部曲,本人按自己的步骤来写,可能有很多漏洞,望各位大神指点指点 1.创建项目 scrapy startproject xiaohuawang scrapy.cfg: 项目的配置文件xiaohua ...
- Vim-编辑器之神
几点声明: 作者只是一位小小的 \(OIer\) ,并不会什么过于神仙的东西,我这篇文章只是帮助人入门的而已. 若有人在 OI-Wiki上见过了原文章,原作者是我 \(......\) ,真不是抄 \ ...
- “吃神么,买神么”的第二个Sprint计划(计划过程内容)
“吃神么,买神么”项目Sprint计划 ——6.1(第二天)立会内容与进度 团队组员各自任务: 陈键.吴舒婷:继续完善前台设局与布局 林欢雯.冯美欣:开展后台的界面的设计与布局 任务的进度: 陈键. ...
- “吃神么,买神么”的第一个Sprint计划(第七天)
“吃神么,买神么”项目Sprint计划 ——5.25 星期一(第五天)立会内容与进度 摘要: 所有的部件都完成,在贴每个人负责的部件时发现很多问题,很多网页布局的运用不熟练,一部分的div会跑位置~ ...
- “吃神么,买神么”的第一个Sprint计划(第六天)
“吃神么,买神么”项目Sprint计划 ——5.26 星期二(第六天)立会内容与进度 摘要:logo最终出来了,,背景也出来了,可以开始将完成的部分放到同一个文件中,决定剩下的时间把昨晚的部分贴上去 ...
随机推荐
- 在linux服务器上自动备份数据库
脚本如下,没有任何问题: # !/usr/bin/pythonimport osimport timeimport datetimeimport pipesimport glob DB_HOST = ...
- Discrete Mathematics and Its Applications | 1 CHAPTER The Foundations: Logic and Proofs | 1.4 Predicates and Quantifiers
The statements that describe valid input are known as preconditions and the conditions that the outp ...
- 爬虫三之beautifulsoup
基本使用 from bs4 import BeautifulSoup soup = BeautifulSoup(html#,'lxml','xml','html5lib') soup.prettify ...
- Linux搜索文件
1.7.1 使用which 查找可执行文件的绝对路径 ·只能用来查找PATH环境变量中出现的路径下的可执行文件 1.7.2 使用whereis 查找文件 ·通过预先生成的一个文件列表库查找与给出文件名 ...
- 杭州集训Day4
别问我为什么没有前三天,有时间再补~ 60+60+50=170. T1 . 坐等 memset0 ( 1s 256MB )( 原题:洛谷CF1151E Number of Components ) 树 ...
- AcWing 92. 递归实现指数型枚举
题目链接:https://www.acwing.com/problem/content/description/94/ 题意:从 n 个数中选取数字,输出所有的选取可能 idea:枚举所有取数可能,就 ...
- Projection Pursuit Regression----读书笔记
The central idea is to extract linear combinations of the inputs as derived features, and then model ...
- 用nopcomerce3.8版本的同行注意了,前2天发布3.8正式版后,作者收到一些BuG,作者修复后重新提供了一个源代码包下载.
用nopcomerce3.8版本的同行注意了,前2天发布3.8正式版后,作者收到一些BuG,作者修复后重新提供了一个源代码包下载地址,不是github上的那个链接.去作者官网论坛我那个链接地址,或关注 ...
- 数据库设计时,每个表要不要都设置自增主键ID!(转)
逻辑数据库设计 - 需要ID(谈主键Id) 本文的目标就是要确认那些使用了主键,却混淆了主键的本质而造成的一种反模式. 一.确立主键规范 每个了解数据库设计的人都知道,主键对于一张表来说是一个很重要, ...
- windows 下mysql5.7设置密码
学习Springboot时用到mysql数据库,以前用的mysql5.6版本 基本百度一个教程即可,听说5.7有新改动,突然想试试于是找到解压版mysql5.7照常安装, 以前用的mysql5.6版本 ...