Friday, February 5, 2016

Re: Pathogen doesn't seem to work

Op vrijdag 5 februari 2016 13:00:07 UTC+1 schreef Christian Brabandt:
> Hi Hashjie!
>
> On Fr, 05 Feb 2016, Hashjie wrote:
>
> > Op vrijdag 5 februari 2016 12:31:24 UTC+1 schreef Christian Brabandt:
> > > On Fr, 05 Feb 2016, Hashjie wrote:
> > > > I'm not exactly sure what I have to check in the contents of my
> > > > pathogen.vim I've used curl -L to download it from github into my
> > > > autoload directory so I suspect it to be valid. I'll try to find out
> > > > if anything is wrong with the file.
> > > >
> > > > I've done a vim -u NONE and after that :source
> > > > ~/.vim/autoload/pathogen.vim after that I've typed :scriptnames and
> > > > the second entry showed me that pathogen.vim was loaded. I ran
> > > > :execute pathogen#infect() and it didn't show me any errors. However,
> > > > I still couldn't use NERDTreeFind it said not an editor command. Seems
> > > > like the errors have dissapeared after sourcing pathogen.vim but it
> > > > still doesn't seem to recognize any plugins.
> > >
> > > You probably have to source the file that lives in
> > > nerdtree/plugin/<nerdtree>.vim (or whatever it is called).
> > >
> > > If you do NOT use -u NONE check, that your 'rtp' settings include the
> > > nerdtree folder and your :scriptnames command shows that pathogen is
> > > run. That should work and make sure, that all plugin folders from within
> > > the runtimepath setting are sourced on startup.
> >
> > Something like: set rtp+=$HOME/.vim/bundle/*
>
> You should not have to do this manually.
>
> > is this the way to make sure it has all plugins in the runtimepath?
> > Sorry for being such a newb...
>
> Yes, that is what pathogen is supposed to do.
>
> > If I run vim regularly then :set runtimepath? doesn't display the nerdtree folder.
> > Should I also do something like source $HOME/.vim/bundle/* in my vimrc?
>
> No, that's why you have pathogen. Can you show your .vimrc file please?
>
> Best,
> Christian
>
>
> --
> Vollkommenheit kann mit Disproportion bestehen, Schönheit
> allein mit Proportion.
> -- Goethe, Maximen und Reflektionen, Nr. 1198

The first two lines I recently added, and :NERDTreeFind seems to work. However it doesn't respond to any input now. I guess this has something to do with my runtimepath not having nerdtree in it.

My vimrc looks as followed:

set rtp+=$HOME/.vim/bundle/nerdtree
so $HOME/.vim/bundle/nerdtree/plugin/NERD_tree.vim

" execute pathogen
execute pathogen#infect()

" enable syntax
syntax on

" enable filetype plugin
filetype plugin indent on

" enable line numbers
set number

" Use 256 colours
set t_Co=256

" Splitting screens
nnoremap ,h <C-w>s
nnoremap ,v <C-w>v
nnoremap ,, <C-w><C-w>

" Mouse support
set mouse=a

" Some other configs
set tabstop=4
set autoindent
set shiftwidth=4
set shiftround
set showmatch
set ignorecase
set smartcase
set encoding=utf-8
set smarttab
set hlsearch
set incsearch
set history=1000
set undolevels=1000
set visualbell
set noerrorbells
set backspace=indent,eol,start
set background=dark
autocmd InsertEnter * set cul
autocmd InsertLeave * set nocul

" Nerdtree toggling
nmap <C-p> :NERDTreeToggle<CR>
map <F3> :NERDTreeFind<CR>
let g:NERDTreeMapActivateNode="<F3>"
let g:NERDTreeMapPreview="<F4>"
let g:NERDTreeShowHidden=1
" All system-wide defaults are set in $VIMRUNTIME/debian.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/vim/vimrc), since debian.vim
" will be overwritten everytime an upgrade of the vim packages is performed.
" It is recommended to make changes after sourcing debian.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 available in Debian.
runtime! debian.vim

" Uncomment the next line to make Vim more Vi-compatible
" NOTE: debian.vim sets 'nocompatible'. Setting 'compatible' changes numerous
" options, so any other options should be set AFTER setting 'compatible'.
"set compatible

" Vim5 and later versions support syntax highlighting. Uncommenting the next
" line enables syntax highlighting by default.
if has("syntax")
syntax on
endif

" If using a dark background within the editing area and syntax highlighting
" turn on this option as well
"set background=dark

" Uncomment the following to have Vim jump to the last position when
" reopening a file
"if has("autocmd")
" au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
"endif

" Uncomment the following to have Vim load indentation rules and plugins
" according to the detected filetype.
"if has("autocmd")
" filetype plugin indent on
"endif

" The following are commented out as they cause vim to behave a lot
" differently from regular Vi. They are highly recommended though.
"set showcmd " Show (partial) command in status line.
"set showmatch " Show matching brackets.
"set ignorecase " Do case insensitive matching
"set smartcase " Do smart case matching
"set incsearch " Incremental search
"set autowrite " Automatically save before commands like :next and :make
"set hidden " Hide buffers when they are abandoned
"set mouse=a " Enable mouse usage (all modes)

" Source a global configuration file if available
if filereadable("/etc/vim/vimrc.local")
source /etc/vim/vimrc.local
endif

:set rtp? shows me the following:

runtimepath=~/.vim,/var/lib/vim/addons,/usr/share/vim/vimfiles,/usr/share/vim/vim74,/usr/share/vim/vimfiles/after,/var/lib/vi
m/addons/after,~/.vim/after

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments: