蒟蒻麦蒙的vim设置

刚开始用vim

感谢Rorschach-XR提供的基础模板!

然后我补了一个主题,一个删除.swp文件的配置

Update:20190728

增加了F4返回终端,使用Ctrl+Alt+C快速提取(其实就是复制)

Update:20190729

 去掉了set cursorline(光标行高亮)

Update:20190803

增加一个tab外显

Update:20190804

增加Ctrl+T 打开新的终端

 Update:20190806

颓了一手颜色,自动换行取消。

Update:20190828

颓了一个右边界(其实也没啥用)

Upd:20191017

全改成缩写,××我白背了。

"主题
color koehler
set t_Co=256
"符号填充,用于分屏时的分隔
set fcs=vert:\ ,stl:\=,stlnc:\-
"显示行号
set nu
"禁止自动换行
set nowrap
"tab宽度
set ts=4
set sw=4
set sts=4
"自动文件目录
set acd
"启用鼠标
set mouse=a
"缩进
set ai
set si
set cin
"tab显示
set list
set lcs=tab:\|\ ,trail:.,extends:>,precedes:<,eol:\
"右边界线
set cc=66
hi ColorColumn ctermbg=255
"粘贴模式快捷键(防止自动缩进和括号补全毁灭代码)
set pt=<F3>
"隐藏交换文件
set bh=hide
setl noswf
"括号补全
ino ( ()<ESC>i
ino [ []<ESC>i
ino " ""<ESC>i
ino ' ''<ESC>i
ino { {<CR>}<ESC>kA<CR>
"快捷键
"Ctrl+t 启动终端
map <C-t> <ESC>:!gnome-terminal <CR>
"Ctrl+c 启动计算器
map <C-c> <ESC>:!gnome-calculator <CR>
"F5 编译&运行
map <F5> <ESC> :w <CR> :!g++ -std=c++11 -O2 % -o %< && ./%< <CR>
"F4 读取代码(在vim里仿佛是粘不出来的)
map <F4> <ESC> :w <CR> :!gedit %<CR>

 我现在用的:

"color pablo
set nu
set t_Co=256
set ai
set cin
set si
set ar
set aw
set ts=4
set sts=4
set sw=4
set acd
set mouse=a
set title
set pt=<F3>
ino [ []<ESC>i
ino ( ()<ESC>i
ino ' ''<ESC>i
ino " ""<ESC>i
ino { {<CR>}<ESC>kA<CR>
map <F4> :w <CR> :!gedit % <CR>
map <F5> :w <CR> :!g++ -O2 -std=c++11 % -o %< &&./%< <CR>

这里再说个考试的板子(能背下来的):括号映射不写也行;

set nu
set ts=4
set sw=4
set sts=4
set mouse=a
set ai    
ino ( ()<ESC>i
ino [ []<ESC>i
ino " ""<ESC>i
ino ' ''<ESC>i
ino { {<CR>}<ESC>kA<CR>
map <F5> <ESC> :w <CR> :!g++ -g % -o %< && ./%< <CR>

 然后就是主题大全,祝大家编程愉快! (自己写主题的话我不管)(下面选一个就好啦)

color blue
color dessert
color darkblue
color default
color delek
color elflord
color evening
color koehler
color morning
color murphy
color pablo
color peachpuff
color ron
color shine
color slate
color torte
color zellner

我觉的有的主题很像,也许可以试试。

大家可以在终端里输: vimtutor 来入门。

或者使用 vimdiff 来更美好的对比。

posted @ 2019-07-26 08:58  Miemeng_麦蒙  阅读(382)  评论(2编辑  收藏  举报

小麦在雨中,蒙蒙的雾气

麦蒙不想有人骚扰他,如果有必要 联系 QQ:1755601414

如果你嫌广告大,那就喷我吧,不是博客园的锅。