我的vim設定檔

來源:互聯網
上載者:User

標籤:vim

syntax on                               "高亮"colo torte                      "配色set guifont=Microsoft_YaHei_Mono:h11    "字型set lines=26 columns=93                 "gvim視窗大小"set nu"行號開關set history=100000                      "最大歷史set autoindent                          "自動縮排set tabstop=4                           "一個TAB長度set softtabstop=4 "退格鍵的時候退回縮排的長度set shiftwidth=4 "每一級縮排的長度set smarttab  "自動縮排set cindent  "C風格自動縮排set nobackup "不產生備份檔案set noswapfile  "不產生swap檔案set mouse=a "游標定位到滑鼠位置"C,C++,Java 按F5編譯運行map <F5> :call CompileRun()<CR>func! CompileRun()    exec "w"    if &filetype == 'c'        exec "!g++ -o run %""        exec "!run"    elseif &filetype == 'cpp'        exec "!g++ -o run %""        exec "!run"    elseif &filetype == 'java'         exec "!javac -d .\\bin %"         exec "!java -cp .\\bin %<"    elseif &filetype == 'sh'        :!./%    endifendfunc"imap <c-]> {<cr>}<c-o>O<left><right> map <F2> :call SetTitle()<CR> func SetTitle() let l = 0 let l = l + 1 | call setline(l,'#include <bits/stdc++.h>') let l = l + 1 | call setline(l,'using namespace std;') let l = l + 1 | call setline(l,'') let l = l + 1 | call setline(l,'int main()') let l = l + 1 | call setline(l,'{') " let l = l + 1 | call setline(l,'    //freopen("in.txt","r",stdin);') " let l = l + 1 | call setline(l,'    //freopen("out.txt","w",stdout);') let l = l + 1 | call setline(l,'    ') let l = l + 1 | call setline(l,'    return 0;') let l = l + 1 | call setline(l,'}') let l = l + 1 | call setline(l,'//Last modified :   '.strftime("%Y-%m-%d %H:%M"))endfunc  

我的vim設定檔

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.