<acronym id="xonnx"></acronym>
      <td id="xonnx"></td>
    1. <pre id="xonnx"></pre>

      1. 專注電子技術學習與研究
        當前位置:單片機教程網 >> MCU設計實例 >> 瀏覽文章

        VIM配置文件.vimrc

        作者:中華小饅頭   來源:中華小饅頭的空間   點擊數:  更新時間:2014年06月08日   【字體:

         貼出自己使用的VIM的配置文件.vimrc,以供參考:

         
         
        runtime! debian.vim
         
        " Uncomment the next line to make Vim more Vi-compatible
        " NOTE: debian.vim sets 'nocompatible'.  Setting 'compatible' changes numerous
        " options, so any other options should be set AFTER setting 'compatible'.
        "set compatible
         
        " Vim5 and later versions support syntax highlighting. Uncommenting the
        " following enables syntax highlighting by default.
        if has("syntax")
          syntax on
        endif
         
        " If using a dark background within the editing area and syntax highlighting
        " turn on this option as well
        "set background=dark
         
        " Uncomment the following to have Vim jump to the last position when
        " reopening a file
        "if has("autocmd")
        "  au BufReadPost * if line("'"") > 1 && line("'"") <= line("$") | exe "normal! g'"" | endif
        "endif
         
        " Uncomment the following to have Vim load indentation rules and plugins
        " according to the detected filetype.
        "if has("autocmd")
        "  filetype plugin indent on
        "endif
         
        " The following are commented out as they cause vim to behave a lot
        " differently from regular Vi. They are highly recommended though.
        "set showcmd " Show (partial) command in status line.
        "set showmatch " Show matching brackets.
        "set ignorecase " Do case insensitive matching
        "set smartcase " Do smart case matching
        "set incsearch " Incremental search
        "set autowrite " Automatically save before commands like :next and :make
        "set hidden             " Hide buffers when they are abandoned
        "set mouse=a " Enable mouse usage (all modes)
         
        " Source a global configuration file if available
        if filereadable("/etc/vim/vimrc.local")
          source /etc/vim/vimrc.local
        endif
         
         
        set nocompatible "非兼容模式
        set ruler "設置標尺
        set number "設置顯示行號
        "set vb t_vb = "消除響鈴
        set nobackup "無備份
        "set cursorline "高亮顯示當前行
        set guifont=Consolas:h14:cANSI "設置英文字體
        "set guifont=Arial_monospaced_for_SAP:h14:cANSI
        set guifontwide=SimHei:h14:cGB2312 "設置雙字節字體,也就是我們的中文字體
        "查找字體可以使用fc-list>font.txt命令,將字體列表輸出到font.txt里面
        "set paste "設置粘貼,設置之后自動換行無效
        "set nopaste
        "set autoindent cindent cinoptions=g0
        "set backspace=indent,eo1,start
        set display=lastline
        "set incsearch
        "set tabstop=4
        set showmatch
        set showcmd "一個完整的命令結束前,在右下角顯示這個命令
        set hls "高亮顯示所有與最后一次搜索目標串相匹配的文本
        set autowrite "自動保存,特別是在如next或者make命令之前
        set whichwrap=b,s,<,>,[,] "消除vim畏首畏尾的特性
        "set list "查看制表符
        "set listchars=tab:>-,trail:- "設置制表符顯示格式
         
        "set lines=30 "初始化時行數
        "set columns=88 "初始化是列數
        set shiftwidth=4 "設置自動縮進為4個字符
        set tabstop=4 "設置tab鍵為四個字符
        "幾種我喜歡的配色方案
        "colorscheme murphy
        colorscheme koehler
        "colorscheme torte
        "colorscheme ron
        "colorscheme evening
         
        "另外一個關于文件編碼的設置,從網上抄下來的
        "基本完美解決問題了,其他問題尚未發現
        set encoding=utf-8
        set termencoding=utf-8
        set fileencoding=chinese
        set fileencodings=ucs-bom,utf-8,chinese,cp936
        "set langmenu=zh_CN.utf-8
        source $VIMRUNTIME/delmenu.vim
        source $VIMRUNTIME/menu.vim
        "language messages zh_cn.utf-8
        "language messages zh_cn.utf-8
         
        "set spell "設置拼寫檢查,會在錯誤單詞下游波浪線,將光標放到單詞下
        "z=就可以得到建議拼寫,]s下一個。僅對英文有效。
         
         
        "關閉時,自動保存圖示,保存折疊
        "au BufWinLeave * mkview
        "關閉時,自動打開圖示,保存折疊
        "au BufWinEnter * silent loadview
         
        filetype plugin indent on "打開自動識別文件類型,使用文件類型plugin以及使用縮進定義文本三項智能
         
        "+ normal模式下,上下翻緩沖塊
        :nmap + :wn
        "visual模式下,選中一片區域,批量注釋(c語言)
        :vmap // "zdi
        ",eg在normal模式下編輯gvimrc
        :nmap ,eg :tabe /etc/vim/gvimrc
        ",ev在normal模式下編輯vimrc
        :nmap ,ev :tabe /etc/vim/vimrc
        "firefox
        :nmap ,ff :!firefox
        "chrome
        :nmap ,ch :!chrome
        "w3m www.baidu.com
        :nmap ,wm :!w3m www.baidu.com
         
        "taglist配置文件
        let Tlist_Show_One_File=1
        let Tlist_Exit_OnlyWindow=1
         
        "WinManager
        let g:winManagerWindowLayout='FileExplorer|TagList'
        "nmap wm :WMToggle
        map :WMToggle
         
        "多文檔編輯器minbufexpl
        let g:miniBufExplMapCTabSwitchBufs=1
        let g:miniBufExplMapWindowsNavVim=1
        let g:miniBufExplMapWindowNavArrows=1
         
         
        "set tag=/root/works/openbts-uhd/tags
        set tag=/home/hezhonghua/work_usrp/work_fpga/tags
        set tag=/home/hezhonghua/LTE_resource_estimate/emb_cpu/tags
        set tag=/home/hezhonghua/LTE_resource_estimate/hzh_workspace/tags
        set tag=/home/hezhonghua/fmcomm_rf_board/no-OS-master/fmcomms1/tags
        "cscope add /home/hezhonghua/work_usrp/work_fpga/cscope.out
        :nmap s :cs find s =expand("")
        :nmap g :cs find g =expand("")
        :nmap c :cs find c =expand("")
        :nmap t :cs find t =expand("")
        :nmap e :cs find e =expand("")
        :nmap f :cs find f =expand("")
        :nmap i :cs find i ^=expand("")$
        :nmap d :cs find d =expand("")
         
        :nmap :cs find c =expand("")
        :nmap :cs find s =expand("")
        :nmap :ts =expand("")
        :nmap :sts =expand("")
        關閉窗口

        相關文章

        欧美性色欧美精品视频,99热这里只有精品mp4,日韩高清亚洲日韩精品一区二区,2020国自产拍精品高潮