vimpathogen

marvim.vim doesn't load via pathogen


I have a few plugins that load via pathogen just fine. But marvim.vim doesn't load. However, if I move marvim to ~/.vim/plugin from ~/.vim/bundle, marvim loads and works well. Is it possible to get marvim to load via pathogen?

Here's my .vimrc

set shiftwidth=4
set tabstop=4
set expandtab
set autoindent


" The default yellow for Search highlight sucks 
hi Search ctermbg=Grey
hi Visual ctermbg=Grey

" Move Backup Files to ~/.vim/sessions
set backupdir=~/.vim/sessions
set dir=~/.vim/sessions

" Split line. Opposite of join. Join -> J. Split -> S
map S i<CR><ESC>
" Insert \\ at the end of the line
map -I A\\
" Insert \textbf{\small{}} \par 
map -M 0i\textbf{\small{}} \par<ESC>
" Function to strip trailing whitespaces
" Based on http://vimcasts.org/episodes/tidying-whitespace/
function! <SID>StripTrailingWhitespaces()
    " Preparation: save last search, and cursor position.
    let _s=@/
    let l = line(".")
    let c = col(".")
    " Do the business:
    %s/\s\+$//e
    " Clean up: restore previous search history, and cursor position
    let @/=_s
    call cursor(l, c)
endfunction

nnoremap <silent> <F5> :call <SID>StripTrailingWhitespaces()<CR>

"pylint
let g:PyLintDissabledMessages = 'C0103,C0111,C0301,W0141,W0142,W0212,W0221,W0223,W0232,W0401,W0613,W0631,E1101,E1120,R0903,R0904,R0913'
let g:PyLintCWindow = 1

"let g:PyLintDissabledMessages = 'R0914'
" Pathogen load
"filetype off
"call pathogen#infect()
"call pathogen#helptags()
"execute pathogen#infect()

"filetype plugin indent on
"syntax on
set nocp
call pathogen#infect()
syntax on
filetype plugin indent on
call pathogen#infect()

set wrap linebreak nolist
let g:ycm_filetype_blacklist = { 'python': 1, 'yaml': 1 }

" Remove trailing whitespace
autocmd BufWritePre *.py %s/\s\+$//e

Here's the output of :scriptnames

  1: /etc/vimrc
  2: /usr/share/vim/vim80/syntax/syntax.vim
  3: /usr/share/vim/vim80/syntax/synload.vim
  4: /usr/share/vim/vim80/syntax/syncolor.vim
  5: /usr/share/vim/vim80/filetype.vim
  6: /usr/share/vim/vimfiles/ftdetect/nginx.vim
  7: /usr/share/vim/vimfiles/ftdetect/stp.vim
  8: /usr/share/vim/vim80/ftplugin.vim
  9: ~/.vimrc
 10: ~/.vim/autoload/pathogen.vim
 11: /usr/share/vim/vim80/ftoff.vim
 12: ~/.vim/bundle/tern_for_vim/ftdetect/tern.vim
 13: ~/.vim/bundle/vim-javascript/ftdetect/javascript.vim
 14: /usr/share/vim/vim80/syntax/nosyntax.vim
 15: /usr/share/vim/vim80/indent.vim
 16: ~/.vim/bundle/YouCompleteMe/plugin/youcompleteme.vim
 17: ~/.vim/bundle/jedi-vim/plugin/jedi.vim
 18: ~/.vim/bundle/vim-surround/plugin/surround.vim
 19: /usr/share/vim/vimfiles/plugin/cctree.vim
 20: /usr/share/vim/vim80/plugin/getscriptPlugin.vim
 21: /usr/share/vim/vim80/plugin/gzip.vim
 22: /usr/share/vim/vim80/plugin/logiPat.vim
 23: /usr/share/vim/vim80/plugin/manpager.vim
 24: /usr/share/vim/vim80/plugin/matchparen.vim
 25: /usr/share/vim/vim80/plugin/netrwPlugin.vim
 26: /usr/share/vim/vim80/plugin/rrhelper.vim
 27: /usr/share/vim/vim80/plugin/spellfile.vim
 28: /usr/share/vim/vim80/plugin/tarPlugin.vim
 29: /usr/share/vim/vim80/plugin/tohtml.vim
 30: /usr/share/vim/vim80/plugin/vimballPlugin.vim
 31: /usr/share/vim/vim80/plugin/zipPlugin.vim
 32: ~/.vim/bundle/YouCompleteMe/autoload/youcompleteme.vim

Solution

  • That file can only be sourced by Vim if it's in a plugin/ directory under any of the directories listed in the 'runtimepath' option.

    Since you are using Pathogen, simply putting marvim.vim in ~/.vim/bundle/ will never work.

    What you need to do is put that file in a proper plugin/ directory, itself in a proper pluginname/ directory, under ~/.vim/bundle/:

    ~/.vim/bundle/marvim/plugin/marvim.vim