ubuntu下vim配置(刷題和比賽兩套)

來源:互聯網
上載者:User

標籤:style   blog   io   os   ar   使用   sp   on   2014   

1. 平時刷題練習使用

"mswin.vim 外掛程式提供windows下的編輯快速鍵功能source $VIMRUNTIME/mswin.vimbehave mswinset nuset history=1000000set tabstop=4 set shiftwidth=4set smarttabset cindentset nobackupset noswapfileset mouse=acolo torte"設定字型set guifont=DejaVuSans\Mono\ 12"F6編譯運行map <F6> :call CR()<CR>func! CR()exec "w"exec "! g++ % -o %<"exec "! ./%<"endfuncimap <c-]> {<cr>}<c-o>O<left><right>"F2插入必要代碼map <F2> :call SetTitle()<CR>func SetTitle()let l = 0let l = l + 1 | call setline(l, '/*')let l = l + 1 | call setline(l, ' * Author: yew1eb')let l = l + 1 | call setline(l, ' * Created Time:  '.strftime('%c'))let l = l + 1 | call setline(l, ' * File Name: '.expand('%'))let l = l + 1 | call setline(l, ' */')let l = l + 1 | call setline(l, '#include <ctime>')let l = l + 1 | call setline(l, '#include <cmath>')let l = l + 1 | call setline(l, '#include <cstdio>')let l = l + 1 | call setline(l, '#include <cstdlib>')let l = l + 1 | call setline(l, '#include <cstring>')let l = l + 1 | call setline(l, '#include <algorithm>')let l = l + 1 | call setline(l, '#include <iostream>')let l = l + 1 | call setline(l, '#include <string>')let l = l + 1 | call setline(l, '#include <vector>')let l = l + 1 | call setline(l, '#include <stack>')let l = l + 1 | call setline(l, '#include <queue>')let l = l + 1 | call setline(l, '#include <set>')let l = l + 1 | call setline(l, '#include <map>')let l = l + 1 | call setline(l, 'using namespace std;')let l = l + 1 | call setline(l, 'typedef long long ll;')let l = l + 1 | call setline(l, 'const int inf = 0x7fffffff;')let l = l + 1 | call setline(l, 'const ll  INF = 1e18;')let l = l + 1 | call setline(l, 'const double eps = 1e-8;')let l = l + 1 | call setline(l, 'const double pi = acos(-1.0);')let l = l + 1 | call setline(l, '')let l = l + 1 | call setline(l, 'int main() {')let l = l + 1 | call setline(l, '    return 0;')let l = l + 1 | call setline(l, '}')let l = l + 1 | call setline(l, '')endfunc


2. 比賽現場使用

syntax onset nu ts=4 sw=4 mouse=a cincolo evening




ubuntu下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.