2

I am relatively new to vim. I made my .vimrc file watching different tutorial in order to use vim mainly as a python IDE. I am using pathogen as plugin manager and I have recently installed python-mode. However when typying :Helptags pymode or :Helptags NerdTree I get:

E488: Trailing characters

I suspect something is not right with my .vimrc..Here is what I am using:

 1 " Enable syntax highlight
 0 syntax on
 1 let python_highlight_all=1
 2 " Highlight your search
 3 set hlsearch
 4 set number relativenumber
 5 " Rebind <Leader> Key
 6 let mapleader = ","
 7 
 8 noremap <Leader>l :nohl<CR>
 9 
 10 " Quicksave command
 11 noremap <Leader>m :update<CR>
 12 
 13 " Quickquit command
 14 noremap <Leader>e :quit<CR> "Quit current wind
 15 noremap <Leader>E :qa!<CR> "Quit all wind
 16 nnoremap <leader>b :ls<cr>:b<space>
 17 
 18 
 19 execute pathogen#infect()
 20 call pathogen#helptags()
 21 
 22 filetype plugin indent on
 23 set number
 24 
 25 " Setting vim-colors-solarized
 26 " cd ~/.vim/bundle
 27 " git clone git://github.com/altercation/vim-colors-solarized.git
 28 " It worked with this: cp .vim/bundle/solarized/vim-colors-solarized  /colors/solarized.vim ~/.vim/colors/
 29 let g:solarized_termcolors=256
 30 set t_Co=256
 31 set background=dark
 32 " Highlight useless white spaces
 33 autocmd ColorScheme * highlight ExtraWhitespace ctermbg=red guibg=red
 34 au InsertLeave * match ExtraWhitespace /\s\+$/
 35 colorscheme solarized
 36 
 37 let g:pymode_python='python3'
 38 
 39 " Setting for NERDTree
 40 " cd ~/.vim/bundle
 41 " git clone https://github.com/scrooloose/nerdtree.git
 42 " toggle NERDtree
 43 map <Leader>n :NERDTreeToggle<CR>

Can somebody help me out? Thanks

1 Answer 1

1

UPDATE: It looks like you were trying to get help on plug-ins.

For that, you can simply call :help. Vim will look for help files in the plug-in directories, so something like :help pymode will work.

If you build the help tags for plug-ins (for instance, with the :Helptags command of pathogen, or :helptags ALL if you're simply using packages), then the commands and bindings of plug-ins will be available through the help system as well.

For instance, you'll be able to use :help :NERDTreeToggle to get help on that specific command of the NERDTree plug-in.


You should call :Helptags on its own, without any additional arguments.

The point of :Helptags in vim-pathogen is that it will figure out which plugins have doc/ directories that need help tags generated, and generate them for all of those.

From the README:

Normally to generate documentation, Vim expects you to run :helptags on each directory with documentation (e.g., :helptags ~/.vim/doc). Provided with pathogen.vim is a :Helptags command that does this on every directory in your 'runtimepath'.


Also consider just using packages instead of pathogen, if you're using Vim 8 or later, or NeoVim. Packages are built-in to Vim and work very similarly to how pathogen does.

If you use native packages, then you can use :helptags ALL to create tags for all your plug-ins (so you don't need pathogen's :Helptags either.)

Pathogen itself recommends using packages instead. From the README:

For new users, I recommend using Vim's built-in package management instead. :help packages

4
  • Thanks for your help. Yes, :Helptags alone actually does not give errors. But how can I get help on a particular plugin so?
    – diegus
    Aug 28, 2019 at 11:26
  • Ah! Just use :help directly, such as :help pymode or on a specific command :help :NERDTreeToggle.
    – filbranden
    Aug 28, 2019 at 11:29
  • 1
    You can usually also use :helptags ALL, which is handy since I got rid of pathogen
    – D. Ben Knoble
    Aug 28, 2019 at 12:22
  • @D.BenKnoble Added info on :helptags ALL and more recommendation towards using packages!
    – filbranden
    Aug 28, 2019 at 13:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.