zoukankan      html  css  js  c++  java
  • vim 配置

    "
    " Author: Tianql
    " System: Ubuntu15.x
    " Date: 2015/4/24
    "
    
    set fileencoding=utf-8
    set encoding=utf-8
    
    "filetype on
    "filetype plugin on
    "filetype indent on
    filetype plugin indent on
    
    syn match cFunctions "<[a-zA-Z_][a-zA-Z_0-9]*>[^()]*)("me=e-2
    syn match cFunctions "<[a-zA-Z_][a-zA-Z_0-9]*>s*("me=e-1
    hi cFunctions gui=NONE cterm=bold  ctermfg=blue
    
    color desert
    set guifont=DejaVu Sans Mono 11
    set hlsearch
    set number
    
    set backspace=indent,eol,start
    set mouse=a
    
    set autoindent
    set cin
    set ai
    
    set tabstop=4
    set shiftwidth=4
    
    function! MySaveFile()
        if &fileencoding != 'utf-8'
            fileencoding = utf-8
        endif
        execute ":w"
    endfunction
    
    
    function! MyGnomeCompile()
        :call MySaveFile()
        if &filetype == 'c'
            :!gnome-terminal -e "bash -c 'gcc "%:p" -o "%:p:r" -g -Wall; echo "Please Kit Enter to continue..."; read'"&
        elseif &filetype == 'cpp'
            :!gnome-terminal -e "bash -c 'g++ "%:p" -o "%:p:r" -g -Wall; echo "Please Kit Enter to continue..."; read'"&
        endif
    endfunction
    
    
    function! MyGnomeRun()
        if &filetype == 'c' || &filetype == 'cpp'
            :!gnome-terminal -e "bash -c '"%:p:r"; echo "Please Kit Enter to continue..."; read'"&
    endfunction
    
    
    :map cp ggv$G$"+y
    :map <F5> :call MyGnomeCompile() <CR>
    :map <F6> :call MyGnomeRun() <CR>
    :imap <F5> :call MyGnomeCompile() <CR>
    :imap <F6> :call MyGnomeRun() <CR>
  • 相关阅读:
    java实现万年历
    java中关于Calendar
    java中各种类型的输入输出
    java(向上向下转型)
    MyEclipse还原默认窗口
    Hibernate映射问题之OneToOne【自己整理】
    Neither BindingResult nor plain target object for bean
    剑宗与气宗
    分治算法
    spring处理线程并发
  • 原文地址:https://www.cnblogs.com/khan724/p/4454804.html
Copyright © 2011-2022 走看看