免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1433 | 回复: 0
打印 上一主题 下一主题

VIM设置 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-06-26 15:10 |只看该作者 |倒序浏览

                一些常用VIM语法,高亮和函数查找设置,说明也在脚本里面
下载包后解压,在包的目录下执行./SETUP就可以自动安装了,注意安装提示
http://blogimg.chinaunix.net/blog/upfile2/080626151117.tar
#!/bin/sh
# This script is used to set vi ide enviment
# by Asland
# wl2000zy@hotmail.com
# Print the message of this sript
echo "================================================================"
echo " There are the steps this script will do: "
echo " 1. Create dirctory for VIM in user directioy. "
echo " 2. Create personal colors scheme. "
echo " 3. Setup Taglist."
echo " 4. Setup Cscope."
echo " 5. Setup Visio mark."
echo "================================================================"
echo "This script will cover your VIM rc in user directory!!!"
echo "Pls press any key to continue or press \"N\" to exit:"
read name
if [ $name = "N" ]; then
    echo "Bye!"
else
# if the vimrc is in the user's home dir
# Create personal vim dir
mkdir -pv ~/.vim
mkdir -pv ~/.vim/{plugin,doc,syntax,colors}
# Create personal color
cp -v ./evening.vim ~/.vim/colors/my_color.vim
# copy from the system's vimrc
cp -vf /etc/vimrc ~/.vim_org
sed -e '1i\set syntax=on\nset cscopequickfix=s-,c-,d-,i-,t-,e-\nset
nocompatible\ncolorscheme my_color\nset tabstop=4\nset
shiftwidth=4\nset backspace=2\nset wrap\nset number\nset sm' ~/.vim_org
> ~/.vimrc
# Setup Taglist, The web link: http://www.vim.org/scripts/script.php?script_id=273
# Usage: type ":Tlist" in command line in VIM
unzip -d ~/.vim/ ./taglist_45.zip
# Setup cscope The web link: http://cscope.sourceforge.net
# Tips for using cscope:
# 1. Entry the root directory of code,Command "cscope -Rbq" will create cscope.in.out,
#    cscope.out, cscope.po.out.
# 2. Vim code file, and entry command ":cs add /home/wooin/vim71/cscope.out code_root_dir".
# 3. Find define of a function, type ":cs find g function_name".
# 4. See where use this function, type ":cs find c function_name".
# 5. Command ":cw"
tar xvf ./cscope-15.5.tar.gz
./cscope-15.5/configure
make
sudo make install
# Setup Visual Mark, the web link:http://www.vim.org/scripts/script.php?script_id=1026
# Usage: type ":mm" in vim command line.
cp ./visualmark.vim ~/.vim/plugin/
fi
echo "The setup is success!"
echo "Type ":Tlist" in vim command line will open function list."
echo "If you firstly go to a new project, pls run ./set_tags.sh in the project's root dirctory"
echo "Then in VIM command line, try \":cs add \\project's root dir\\cscope.out \\project's root dir\""
               
               
               
               
               

本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u2/65850/showart_1011796.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP