vim打造简易C语言编辑器(在用2016.7.10)

时间:2024-01-18 10:04:14

vim和C语言都需要长期的学习,才能够精通,我制作了这个简单的笔记,主要的作用是,不要在重复的,反复的找同一样东西了,积累是成功的关键。

1. 安装pathogen插件管理器。

官网下载pathogen.vim拷贝到~/.vim/autoload/pathogen.vim

在`~/.vimrc文件的首行添加如下代码:

set nocp
execute pathogen#infect()
syntax on
filetype plugin indent on

2. 配置一个简单.vimrc文件

set nocp
execute pathogen#infect()
syntax on
filetype plugin indent on
set nobackup
set number
set shiftwidth=4
set tabstop=4
set softtabstop=4
set autoindent
set smartindent
set cindent
set showcmd

highlight Comment ctermfg=green

3. 安装代码补全/代码模板(snipMate/snippet

cd ~/.vim/bundle
git clone https://github.com/tomtom/tlib_vim.git
git clone https://github.com/MarcWeber/vim-addon-mw-utils.git
git clone https://github.com/garbas/vim-snipmate.git
git clone https://github.com/honza/vim-snippets.git