_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、

转载于:https://www.cnblogs.com/chinhhh/p/8760468.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值