only load python in vimrc when opening c,cpp files
[pygdb.git] / INSTALL.txt
1
2 1. Put the pygdb directory to somewhere, lets call it <dir> in this help file.
3 2. Add the following lines into your ~/.vimrc:
4
5 """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
6 " pygdb
7 """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
8
9 autocmd Filetype c,cpp :python import sys
10 autocmd Filetype c,cpp :python sys.path.append("<dir>")
11 autocmd Filetype c,cpp source <dir>/pygdb.vim
12 autocmd Filetype c,cpp call GDBMapDefaults()
13
14
15 where you replace <dir> by the corresponding path of pygdb. You may want to
16 add <dir> to the environment variable PATH such that you can call pygdb
17 from console directly.
18
19 If you like, you can add the following line. It leads to a configuration file
20 loading when opening a source file
21 autocmd BufRead *.c* :GDBLoadConfig<CR>
22