热门关键字:  ubuntu  分区  linux系统进程  函数  Fedora

当前位置 :| 主页>Linux教程>软件应用>

VIM设置

来源: 作者: 时间:2008-06-26 Tag: 点击:
一些常用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\""

上一篇:修改vsftpd端口
下一篇:fcitx的设置
最新评论共有 0 位网友发表了评论
发表评论
评论内容:不能超过250字,需审核,请自觉遵守互联网相关政策法规。
用户名: 密码:
匿名?
注册