当前时区为 UTC + 8 小时



发表新帖 回复这个主题  [ 2 篇帖子 ] 
作者 内容
1 楼 
 文章标题 : pathogen装插件无效
帖子发表于 : 2015-09-17 19:40 
头像

注册: 2009-05-31 17:54
帖子: 47
送出感谢: 2
接收感谢: 0 次
装好gvim后,按照官方文档安装了pathogen
代码:
mkdir -p ~/.vim/autoload ~/.vim/bundle && \
curl -LSso ~/.vim/autoload/pathogen.vim https://tpo.pe/pathogen.vim

在/etc/vim/vimrc中添加
代码:
execute pathogen#infect()


然后使用pathogen安装了nerdtree和emmet插件
代码:
cd ~/.vim/bundle
git clone https://github.com/scrooloose/nerdtree

代码:
cd ~/.vim/bundle
git clone https://github.com/mattn/emmet-vim


然而这2个插件完全无效,这是为什么?

以下是我完整的vimrc,我还装了syntastic等插件
代码:
" All system-wide defaults are set in $VIMRUNTIME/archlinux.vim (usually just
" /usr/share/vim/vimfiles/archlinux.vim) and sourced by the call to :runtime
" you can find below.  If you wish to change any of those settings, you should
" do it in this file (/etc/vimrc), since archlinux.vim will be overwritten
" everytime an upgrade of the vim packages is performed.  It is recommended to
" make changes after sourcing archlinux.vim since it alters the value of the
" 'compatible' option.

" This line should not be removed as it ensures that various options are
" properly set to work with the Vim-related packages.
runtime! archlinux.vim

" If you prefer the old-style vim functionalty, add 'runtime! vimrc_example.vim'
" Or better yet, read /usr/share/vim/vim74/vimrc_example.vim or the vim manual
" and configure vim to your own liking!

"##### auto fcitx  ###########
let g:input_toggle = 1
function! Fcitx2en()
   let s:input_status = system("fcitx-remote")
   if s:input_status == 2
      let g:input_toggle = 1
      let l:a = system("fcitx-remote -c")
   endif
endfunction

function! Fcitx2zh()
   let s:input_status = system("fcitx-remote")
   if s:input_status != 2 && g:input_toggle == 1
      let l:a = system("fcitx-remote -o")
      let g:input_toggle = 0
   endif
endfunction

set ttimeoutlen=150
"退出插入模式
autocmd InsertLeave * call Fcitx2en()
"进入插入模式
autocmd InsertEnter * call Fcitx2zh()
"##### auto fcitx end ######

" general setting
"php
autocmd FileType php setlocal makeprg=zca\ %<.php
autocmd FileType php setlocal errorformat=%f(line\ %l):\ %m
" .vimrc
" See: http://vimdoc.sourceforge.net/htmldoc/options.html for details

" For vim display multi-byte character support (CJK support, for example):
set fileencodings=ucs-bom,utf-8,cp936,big5,euc-jp,euc-kr,gb18030,latin1
"set fileencodings=ucs-bom,utf-8,cp936,big5,euc-jp,euc-kr,gb18030,latin1

" For output (web browser, for example)
set encoding=utf-8

"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" 
"vim7.1在windows下的编码设置。 
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" 
 
set encoding=utf-8 
 
set fileencodings=utf-8,chinese,latin-1 
 
if has("win32") 
 
 set fileencoding=chinese 
 
else 
 
 set fileencoding=utf-8 
 
endif 
 
"解决菜单乱码 
 
source $VIMRUNTIME/delmenu.vim 
 
source $VIMRUNTIME/menu.vim 
 
"解决consle输出乱码 
 
"language messages zh_CN.utf-8 

" Independent folder for backup
if has("win32")
    let $VIMFILES = $VIM.'/vimfiles'
else
   let $VIMFILES = $HOME.'/.vim'
endif

" to use Backspace
set backspace=2

" runtime path manipulation
"set nocp
execute pathogen#infect()

" to cross
set whichwrap+=<,>,h,l

" to use clipboard from win to vim by shift+insert
" and from vim to win by "+y
map <c-c> "+y
map <c-v> "+p


" Visual{

" set font (Uses Monaco on Windows and Inconsolata everywhere else)
if has("gui_running")
  if has("gui_gtk2")
    set guifont=Inconsolata\ 18
  elseif has("gui_macvim")
    set guifont=Menlo\ Regular:h14
  elseif has("gui_win32")
    set guifont=Consolas:h14:cANSI
  elseif has("gui_win64")
    set guifont=Consolas:h14:cANSI
  endif
endif

set 囗囗囗=YouYuan\ 18

" show line number
set number

" highlight syntax
syntax on

" tab weight
set tabstop=4

" auto indent
set autoindent

" Number of spaces to use for each step of (auto)indent
set shiftwidth=4

" Use the appropriate number of spaces to insert a <Tab>.
set expandtab

" jump to the matching one
set showmatch

" highlight all its matches
set hlsearch

" show immediately where the so far typed pattern matches
set incsearch

" ignore case
set ignorecase

" override the 'ignorecase' option if the search pattern contains upper case characters
set smartcase

" to use colors that look good on a dark background
set background=dark

" color theme
colorscheme darkblue

" full screen only for windows os
"au GUIEnter * simalt ~x

" nerdcommender
filetype plugin on

" syntastic
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
let g:syntastic_quiet_messages = { "level": "warnings" }

" html5
let g:syntastic_html_checkers = ['tidy']

" }



页首
 用户资料  
 
2 楼 
 文章标题 : Re: pathogen装插件无效
帖子发表于 : 2015-10-12 22:44 
头像

注册: 2007-03-15 16:58
帖子: 2802
地址: 湖北武汉
送出感谢: 2
接收感谢: 4
一直nano


_________________
引用:


页首
 用户资料  
 
显示帖子 :  排序  
发表新帖 回复这个主题  [ 2 篇帖子 ] 

当前时区为 UTC + 8 小时


在线用户

正在浏览此版面的用户:没有注册用户 和 3 位游客


不能 在这个版面发表主题
不能 在这个版面回复主题
不能 在这个版面编辑帖子
不能 在这个版面删除帖子
不能 在这个版面提交附件

前往 :  
本站点为公益性站点,用于推广开源自由软件,由 DiaHosting VPSBudgetVM VPS 提供服务。
我们认为:软件应可免费取得,软件工具在各种语言环境下皆可使用,且不会有任何功能上的差异;
人们应有定制和修改软件的自由,且方式不受限制,只要他们自认为合适。

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
简体中文语系由 王笑宇 翻译