把vim插件放在用户目录下无法识别。
发表于 : 2010-09-08 16:21
我在用户目录下面建立了.vim目录,.vim目录下面有colors doc plugin syntax四个目录,我将插件放到plugin目录下面,但是启动gvim以后无法使用这个插件。
ubuntu版本是10.04.1 LTS amd64
插件是csExplorer.vim
gvim版本是7.2.330,是源里面安装的。
.gvimrc文件内容:
ubuntu版本是10.04.1 LTS amd64
插件是csExplorer.vim
gvim版本是7.2.330,是源里面安装的。
.gvimrc文件内容:
代码: 全选
" With a map leader it's possible to do extra key combinations
" like <leader>w saves the current file
let mapleader = ","
let g:mapleader = ","
" Fast saving
nmap <leader>w :w!<cr>
" Fast editing of the .vimrc
map <leader>e :e! ~/.gvimrc<cr>
" When vimrc is edited, reload it
autocmd! bufwritepost vimrc source ~/.gvimrc
" 不要vim模仿vi模式,建议设置,否则会有很多不兼容的问题
set nocompatible
" 打开高亮
syntax on
" 让一个tab等于4个空格
set tabstop=4
" 自动换行
set nu!
" 自动换行
"set nowrap
" 高亮显示结果
set hlsearch
" 在输入要搜索的文字时,vim会实时匹配
set incsearch
" 允许退格键的使用
set backspace=indent,eol,start whichwrap+=<,>,[,]
if has("autocmd")
filetype plugin indent on "根据文件进行缩进
augroup vimrcEx
au!
autocmd FileType text setlocal textwidth=78
autocmd BufReadPost *
\ if line("'\"") > 1 && line("'\"") <= line("$") | "实现打开同一文件时,vim能够自动记住上一次的位置
\ exe "normal! g`\"" |
\ endif
augroup END
else
set autoindent " always set autoindenting on "智能缩进,相应的有cindent,官方说autoindent可以支持各种文件的缩进,但是效果会比只支持C/C++的cindent效果会差一点,但笔者并没有看出来
endif
"允许鼠标的使用
if has('mouse')
set mouse=a
endif
" 中文支持
if has("multi_byte")
set encoding=utf-8
"set fileencoding=chinese
set fileencodings=utf-8,GB18030,chinese,ucs-bom
endif
set langmenu=zh_CN.UTF-8
source $VIMRUNTIME/delmenu.vim
source $VIMRUNTIME/menu.vim
" 字体的设置
set guifont=DejaVu\ Sans\ Mono\ 12 "就是不知道怎么设置中文字体