zoukankan      html  css  js  c++  java
  • _vimrc(VimScript脚本语言学习)

    Windows下

    syntax on "高亮
    
    "缩进
    set cindent "set cin
    set smartindent "set si
    set autoindent "set ai
    set tabstop=4 "set ts=4
    set shiftwidth=4 "set sw=4
    set softtabstop=4 "set sts=4
    
    set mouse=a "Linux鼠标使用
    
    "行号
    set number "set nu
    
    set backspace=2 "set bs=2
    
    "共享剪切板
    set clipboard=unnamed
    
    set go= "把Win上Vim上部的一行很丑的去掉
    behave mswin
    set cursorline
    set ruler
    set autoread
    set nobackup
    color solarized
    set guifont=Courier_New:b:h14
    map<F7> <Esc>:w<CR>:vsp %<.out <CR>:sp %<.in <CR>
    imap<F7> <Esc>:w<CR>:vsp %<.out <CR>:sp %<.in <CR>
    function! Compile()
    	exec "w"
    	exec "!g++ % -o %<"
    endfunction
    
    function! Run()
    	exec "!%<"
    endfunction
    
    map<F9> :call Compile() <CR>
    map<F10> :call Run() <CR>
    map<F11> <F9><F10>
    map<F12> :w<CR>ggVGy
    
    imap<F9> <Esc>:call Compile() <CR>
    imap<F10> <Esc>:call Run() <CR>
    imap<F11> <Esc><F9><F10>
    imap<F12> <Esc> :w<CR>ggVGy
    
    set guioptions=
    set lines=46 columns=113
    au GUIEnter * call libcallnr("vimtweak.dll", "SetAlpha", 220)   "数字越小越透明
    

    NOI Linux 下

    set ai
    set cin
    set si
    set ts=4
    set sts=4
    set sw=4
    set nu
    set autoread
    set nobackup
    set cursorline
    set mouse=a
    set ruler
    color evening
    map <F9> <Esc>:w<CR> :!g++ % -o %< && ./%< <CR>
    imap <F9> <Esc>:w<CR> :!g++ % -o %< && ./%< <CR>
    
    map<F7> <Esc>:w<CR>:vsp %<.out <CR>:sp %<.in <CR>
    imap<F7> <Esc>:w<CR>:vsp %<.out <CR>:sp %<.in <CR>
    

    VimScript脚本学习

    最好教程网站!!!
    转载自:https://blog.csdn.net/smstong ; https://blog.csdn.net/u012450329
    1、

    2、条件、循环

    3、

  • 相关阅读:
    day74作业
    day072作业
    Serializer类
    day067作业
    day066作业
    day065作业
    django
    jQuery
    JavaScript
    mediaplayer state
  • 原文地址:https://www.cnblogs.com/chinhhh/p/8760468.html
Copyright © 2011-2022 走看看