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

    vim大法好,远离cb保平安,分享一下我的vim配置文件,正在下载vim只能简单的编辑,没有一些简单的快捷方式

    额外又添加了一键生成模板的配置

    设置的快捷键F2,一键生成模板van,

    加上O2编译

    set nu
    set history=1000000
    set tabstop=4
    set shiftwidth=4
    
    set smarttab
    
    
    set cindent
    
    colo evening
    
    set showcmd
    
    set nobackup
    set noswapfile
    
    set mouse=a
    
    
    map <F6> :call CR()<CR>
    func! CR()
    exec "w"
    exec "!g++ -O2 -g  % -o %<"
    exec "! %<"
    endfunc
    
    imap <c-]> {<cr>}<c-o>O<left><right>
    
    map <C-A> ggVG"+y
    
    
    "inoremap ( ()<LEFT>
    "inoremap [ []<LEFT>
    "inoremap { {}<LEFT>
    "inoremap " ""<LEFT>
    "inoremap ' ''<LEFT>
    
    
    map <F2> :call SetTitle()<CR>
    func SetTitle()
    let l = 0
    let 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 <stdio.h>')
    let l = l + 1 | call setline(l,'#include <string.h>')
    let l = l + 1 | call setline(l,'#include <iostream>')
    let l = l + 1 | call setline(l,'#include <algorithm>')
    let l = l + 1 | call setline(l,'#include <vector>')
    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,'#include <string>')
    let l = l + 1 | call setline(l,'#include <math.h>')
    let l = l + 1 | call setline(l,'#include <stdlib.h>')
    let l = l + 1 | call setline(l,'#include <time.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,'}')
    endfunc
  • 相关阅读:
    用css3实现一个带缺口的圆圈(图)
    markdown语法练习
    Android SDK + Appium 环境搭建
    Python + Robot Framework 环境搭建
    javascript动画效果之透明度
    javascript动画效果之匀速运动
    JS中offsetTop、clientTop、scrollTop、offsetTop各属性介绍(转载)
    javascript焦点图自动播放
    js中的随机数
    javascript焦点图(根据图片下方的小框自动播放)
  • 原文地址:https://www.cnblogs.com/13224ACMer/p/5356582.html
Copyright © 2011-2022 走看看