立神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最终出来了,,背景也出来了,可以开始将完成的部分放到同一个文件中,决定剩下的时间把昨晚的部分贴上去 ...
随机推荐
- [19/09/08-星期日] Python的几个概念和语法
一.表达式.语句.程序.函数 1.表达式 就是一个类似于数学公式的东西 ,比如:10 + 5 8 - 4:表达式一般仅仅用了计算一些结果,不会对程序产生实质性的影响 如果在交互模式中输入一个表达式,解 ...
- java中的继承关系
1.定义 java中的继承是单一的,一个子类只能拥有一个父类:java中所有类的父类是java.lang.Object,除了这个类之外,每个类只能有一个父类: 而一个父类可以有多个子类,可以被多个子类 ...
- Springcloud 2.x 版本 分布式配置中心
一.什么是分布式配置中心? 就是为微服务架构中的微服务提供集中化的外部配置支持,配置中心为各个微服务应用的所有环境提供了中心化的外部配置(可能比较难理解,想知道是什么意思就要知道为什么这么配置:这么配 ...
- JS中创建10个a标签,点击弹出对应的序号
<script type="text/javascript"> for(var i=0;i<10;i++){ (function(i){ var a=docume ...
- RabbitMq学习6-安装php-amqplib(RabbitMQ的phpAPI)
一.使用composer安装php-amqplib 1.在你的项目中添加一个 composer.json文件: { "require": { "php-amqplib/p ...
- PHP 堆 栈 数据段 代码段 存储的理解
对象在PHP里面和整型.浮点型一样,也是一种数据类,都是存储不同类型数据用的, 在运行的时候都要加载到内存中去用,那么对象在内存里面是怎么体现的呢? 内存从逻辑上说大体上是分为4段,栈空间段.堆空间段 ...
- CQRS框架(nodejs的DDD开发落地框架)初识感想
CQRS是啥?DDD又是啥? 这两个概念其实没什么神秘的,当然此文章中的这两个概念以曾老师的课程为准(关于CQRS和DDD的标准概念,google上已经很多了,不再赘述.) DDD(Domain Dr ...
- Spark-Streaming获取kafka数据的两种方式:Receiver与Direct的方式
简单理解为:Receiver方式是通过zookeeper来连接kafka队列,Direct方式是直接连接到kafka的节点上获取数据 Receiver 使用Kafka的高层次Consumer API来 ...
- 牛客练习赛33 B tokitsukaze and RPG (类埃筛)
链接:https://ac.nowcoder.com/acm/contest/308/B 来源:牛客网 tokitsukaze and RPG 时间限制:C/C++ 1秒,其他语言2秒 空间限制:C/ ...
- CTF各种资源:题目、工具、资料
目录 题目汇总 Reverse 签到题 Web Web中等难度 Crypto 基础网站 各类工具 综合 Web Payloads 逆向 Pwn 取证 题目汇总 这里收集了我做过的CTF题目 Rever ...