Vim 文件配置
2023-12-09 06:00:26
cat ~/.vimrc
syntax on
set nu
set encoding=utf-8
set ts=4
set fileencodings=ucs-bom,utf-8,cp936
set fileencoding=gb2312
set termencoding=utf-8 """""""""""""""""""""" "Quickly Run """"""""""""""""""""""
map <F5> :call CompileRunGcc()<CR>
func! CompileRunGcc()
exec "w"
if &filetype == 'c'
exec "!g++ % -o %<"
exec "!time ./%<"
elseif &filetype == 'cpp'
exec "!g++ % -o %<"
exec "!time ./%<"
elseif &filetype == 'java'
exec "!javac %"
exec "!time java %<"
elseif &filetype == 'sh'
:!time bash %
elseif &filetype == 'python'
exec "!time python2.7 %"
elseif &filetype == 'html'
exec "!firefox % &"
elseif &filetype == 'go'
" exec "!go build %<"
exec "!time go run %"
elseif &filetype == 'mkd'
exec "!~/.vim/markdown.pl % > %.html &"
exec "!firefox %.html &"
endif
endfunc
"""""""""""syntastic""""""""""""""""
execute pathogen#infect()
set statusline+=%#warningmsg#
set statusline+=%{SyntasticStatuslineFlag()}
set statusline+=%* let g:syntastic_always_populate_loc_list = 1
let g:syntastic_auto_loc_list = 1
let g:syntastic_check_on_open = 1
let g:syntastic_check_on_wq = 0
最新文章
- Axure原型制作规范
- 解决Entity Framework中DateTime类型字段异常
- Upload files to aliyunOSS with bootstrap-fileinput
- Zabbix监控解决方案
- Swift--基础(二)元组 断言 错误处理
- Tomcat集群+Nginx+Redis服务搭建
- CodeVS1344 线型网络
- 使用shutdown命令实现局域网内远程关机、重启整蛊他人
- 爬虫(scrapy--豆瓣TOP250)
- 深入理解Java NIO
- zabbix3.0 agent安装配置
- 4.4清北学堂Day1 主要内容:数论,数学
- PCA和PCoA
- 使用 Kafka 和 Spark Streaming 构建实时数据处理系统
- Java读取并下载网络文件
- HTML5拖动
- php7 引用成为一种类型
- ksh函数
- matlab转python
- DEP脚本