gvim

set nu!
set shiftwidth=4
set tabstop=4
set softtabstop=4
set expandtab
set guioptions-=m " 隐藏菜单栏
set guioptions-=T " 隐藏工具栏
set guioptions-=L " 隐藏左侧滚动条
set guioptions-=r " 隐藏右侧滚动条
set guioptions-=b " 隐藏底部滚动条
colorscheme dusk
set guifont=Courier\ New\ 12  
set encoding=utf-8
set fileencodings=ucs-bom,utf-8,cp936
set fileencoding=gb2312
set termencoding=utf-8
set laststatus=2
set list lcs=tab:\|\
inoremap ( ()<ESC>i
inoremap [ []<ESC>i
inoremap " ""<ESC>i
inoremap ' ''<ESC>i
inoremap ;; <ESC>o
inoremap <C-a> <esc>ggVG
inoremap <C-s> <esc>:w<CR>i
inoremap <C-v> <esc>"+Pi
inoremap <C-c> <esc>"+Yi
inoremap <C-z> <esc>ui
inoremap { {}<ESC>i<CR><ESC>O
inoremap < <<Esc>a
autocmd filetype php inoremap { {}<Esc>i
autocmd filetype html inoremap < <><Esc>i
let mapleader = ","

map <C-s> :w<CR>
map <C-a> ggVG
map <C-c> "+Y
map <C-v> "+P
map <C-z> u
map <C-n> :NERDTreeToggle<CR>
inoremap <C-n> <esc>:NERDTreeToggle<CR><C-w><C-W>i
map <F9> :call Do_OneFileMake()<CR>
inoremap <F9> <esc>:call Do_OneFileMake()<CR>
function Do_OneFileMake()

    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


filetype plugin indent on
filetype on
filetype plugin on
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
Bundle 'Shougo/neocomplete'
Bundle 'scrooloose/nerdtree'
Bundle 'scrooloose/nerdcommenter'  
"注释,cs   取消,cu
Bundle 'Lokaltog/vim-powerline'
Bundle 'Yggdroot/indentLine'
Bundle 'Raimondi/delimitMate'
" 括号补全yss+'一行  ysiw+‘ 一个单词 ,"{[  删除ds+'
Bundle 'tpope/vim-surround'
Bundle 'css.vim'
Bundle 'mattn/emmet-vim'
Bundle 'tpope/vim-ragtag'
Bundle 'MatchTag'
"html标签高亮"
Bundle 'maksimr/vim-jsbeautify'
"html css js 代码格式化"
let g:neocomplete#enable_at_startup = 1
let g:neocomplete#enable_smart_case = 1
let g:neocomplete#sources#syntax#min_keyword_length = 3

转载于:https://www.cnblogs.com/Duskcl/p/4077495.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值