vim大法好,远离cb保平安,分享一下我的vim配置文件,正在下载vim只能简单的编辑,没有一些简单的快捷方式
额外又添加了一键生成模板的配置
设置的快捷键F2,一键生成模板van,
加上O2编译
set nuset history=1000000set tabstop=4set shiftwidth=4set smarttabset cindentcolo eveningset showcmdset nobackupset noswapfileset mouse=amap:call CR() func! CR()exec "w"exec "!g++ -O2 -g % -o %<"exec "! %<"endfuncimap { } O map ggVG"+y"inoremap ( () "inoremap [ [] "inoremap { {} "inoremap " "" "inoremap ' '' map :call SetTitle() func SetTitle()let l = 0let l = l + 1 | call setline(l,'/* ***********************************************')let l = l + 1 | call setline(l,'Author :mubaixu')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,'')let l = l + 1 | call setline(l,'#include ')let l = l + 1 | call setline(l,'#include ')let l = l + 1 | call setline(l,'#include ')let l = l + 1 | call setline(l,'#include ')let l = l + 1 | call setline(l,'#include ')let l = l + 1 | call setline(l,'#include ')let l = l + 1 | call setline(l,'#include ')let l = l + 1 | call setline(l,'#include