projects
/
pygdb.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
127bb50
)
only load python in vimrc when opening c,cpp files
author
Stefan Huber <shuber2@gmail.com>
Mon, 23 Jun 2008 13:33:24 +0000
(14:33 +0100)
committer
Stefan Huber <shuber2@gmail.com>
Mon, 23 Jun 2008 13:33:24 +0000
(14:33 +0100)
INSTALL.txt
patch
|
blob
|
history
pygdb.vim
patch
|
blob
|
history
diff --git
a/INSTALL.txt
b/INSTALL.txt
index b48a265a59f70cdbaf4561e1cf88153467499926..a7dd531b2174e1126917b4afe90c0393ce5d5bfb 100644
(file)
--- a/
INSTALL.txt
+++ b/
INSTALL.txt
@@
-2,19
+2,18
@@
1. Put the pygdb directory to somewhere, lets call it <dir> in this help file.
2. Add the following lines into your ~/.vimrc:
1. Put the pygdb directory to somewhere, lets call it <dir> in this help file.
2. Add the following lines into your ~/.vimrc:
- python << >>
- import sys
+ """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
+ " pygdb
+ """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
+
+ autocmd Filetype c,cpp :python import sys
+ autocmd Filetype c,cpp :python sys.path.append("<dir>")
+ autocmd Filetype c,cpp source <dir>/pygdb.vim
+ autocmd Filetype c,cpp call GDBMapDefaults()
- #Do not use a ~ for home directory
- pygdbdir = "<dir>"
- sys.path.append(pygdbdir)
- >>
-
- autocmd Filetype c,cpp source <dir>/pygdb.vim
- autocmd Filetype c,cpp call GDBMapDefaults()
where you replace <dir> by the corresponding path of pygdb. You may want to
where you replace <dir> by the corresponding path of pygdb. You may want to
- add <dir> to the environment variable PATH such that you c
ou c
an call pygdb
+ add <dir> to the environment variable PATH such that you can call pygdb
from console directly.
If you like, you can add the following line. It leads to a configuration file
from console directly.
If you like, you can add the following line. It leads to a configuration file
diff --git
a/pygdb.vim
b/pygdb.vim
index 7a8b89f45901be31ed691ac53b268cb84ef0022d..642b327f7c5d545bc5c1d431d395d88ce1967f50 100644
(file)
--- a/
pygdb.vim
+++ b/
pygdb.vim
@@
-1,4
+1,11
@@
-"shuber, 2008-06-08
+"pygdb.vim - pygtk interface to gdb in connection with (g)vim
+" Maintainer: Stefan Huber <shuber@cosy.sbg.ac.at>
+
+
+if !has('python')
+ echo "Error: Required vim compiled with +python"
+ finish
+endif
if ! exists("g:pygdb")
if ! exists("g:pygdb")