Vim Tips Wiki
(Format.)
Tag: sourceedit
(20 intermediate revisions by 8 users not shown)
Line 4: Line 4:
 
Vim compiled with static python support + python included in gdb.
 
Vim compiled with static python support + python included in gdb.
   
When running this command inside vim: ConqueGdb test
+
When running this command inside Vim: ConqueGdb test
 
* new window is created
 
* new window is created
 
* this is launched: <code>gdb -f -x /home/user/.vim/bundle/Conque-GDB/autoload/conque_gdb/conque_gdb_gdb.py -x /home/user/.vim/bundle/Conque-GDB/autoload/conque_gdb/gdbinit_confirm.gdb test - 1 [FORMAT=unix] [TYPE=] [100%][POS=0:0/1]</code>
 
* this is launched: <code>gdb -f -x /home/user/.vim/bundle/Conque-GDB/autoload/conque_gdb/conque_gdb_gdb.py -x /home/user/.vim/bundle/Conque-GDB/autoload/conque_gdb/gdbinit_confirm.gdb test - 1 [FORMAT=unix] [TYPE=] [100%][POS=0:0/1]</code>
 
* nothing in window pop ups (window is empty). --May 12, 2014
 
* nothing in window pop ups (window is empty). --May 12, 2014
   
  +
==Installation problem==
==Comments==
 
 
Conque GDB does not support installation through Vim bundle.
 
Conque GDB does not support installation through Vim bundle.
  +
----
 
Download the latest conque_gdb.vmb file and install using the installation instructions given at the scripts page in the link at the top. --May 17, 2014
  +
----
  +
'''not bundle installation''' I did as you said. I've deleted ~/.vim/bundle/Conque-GDB* and installed from conque_gdb.vmb.
   
  +
When I run Vim I get following:
Download the latest conque_gdb.vmb file and install using the installation instructions given:
 
  +
<pre>
http://www.vim.org/scripts/script.php?script_id=4582
 
  +
Error detected while processing function conque_gdb#load_python..<SNR>27_get_gdb_command..<SNR>27_get_unix_gdb:
  +
line 10:
  +
E484: Cannot open file /tmp/vosS3EQ/0
  +
</pre>
  +
  +
In Vim when I type <code>:ConqueGdb</code> I get the same result as described in "Problem".
  +
  +
I can get rid of this message when I change escaping to:
  +
<pre>
  +
conque_gdb.vim:315 let l:gdb_py_support = system(l:gdb_exe . ' -q -batch -ex ''python print("PYYES")'' ')
  +
</pre>
  +
--May 19, 2014
  +
----
  +
'''Question''' Can you give me the output of "gdb -v" and output of "vim --version"?
  +
What happens if you install conque gdb and no other plugins, e.g. with an empty .vim folder?
  +
----
  +
'''Answer''' Empting ~/.vim folder helped. While I still get this message
  +
<pre>
  +
Error detected while processing function conque_gdb#load_python..<SNR>13_get_gdb_command..<SNR>13_get_unix_gdb:
  +
</pre>
  +
when starting vim I get a gdb console in separate window when I type :ConqueGdb.
  +
--August 28, 2014
  +
----
  +
'''Suggestion''' What if you add the following line in your .vimrc ?
  +
<pre>
  +
set shell=/bin/sh
  +
</pre>
  +
----
  +
  +
==Problem when running mvim==
  +
macVim provides python support. Python installed from port
  +
When running mvim -v main.cpp :
  +
* new window is created
  +
* this is launched:
  +
<pre>
  +
File "<string>", line 1, in <module>File "/Users/UserName/.vim/autoload/conque_term/conque_subprocess.py", line 48, in <module>import pty
  +
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/pty.py", line 9, in <module> from select import select
  +
ImportError: dlopen(/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/select.so,
  +
2): Symbol not found: __PyInt_AsInt
  +
Referenced from: /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/select.so
  +
Expected in: flat namespace in /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/select.so
  +
Press ENTER or type command to continue
  +
</pre>
  +
then the command :ConqueGdb is recognized but nothing happens. --April 21, 2015
  +
  +
==Patch for handling spaces in name of .vim directory==
  +
I have my ~.vim directory linked to a folder in my Dropbox. When I got a business Dropbox account, the name of my personal Dropbox folder changed from ~/Dropbox to "~/Dropbox (Personal)". This broke ConqueGDB and ConqueTerm. I found if I quoted the spaces in a couple of places that I would no longer have this brokenness.
  +
  +
Here is a patch against version 0.15:
  +
<pre>
  +
diff -Naur conquegdb/autoload/conque_gdb.vim conquegdb-new/autoload/conque_gdb.vim
  +
--- conquegdb/autoload/conque_gdb.vim 2016-04-26 07:15:38.000000000 -0700
  +
+++ conquegdb-new/autoload/conque_gdb.vim 2016-04-26 07:13:46.000000000 -0700
  +
@@ -11,7 +11,7 @@
  +
let g:autoload_conque_gdb_loaded = 1
  +
  +
" Path to gdb python scripts
  +
-let s:SCRIPT_DIR = expand("<sfile>:h") . '/conque_gdb/'
  +
+let s:SCRIPT_DIR = substitute(expand("<sfile>:h") . '/conque_gdb/', ' ', '\\ ', 'g')
  +
  +
" Conque term terminal object
  +
let s:gdb = {'idx': 1, 'active': 0, 'buffer_number': -1}
  +
diff -Naur conquegdb/autoload/conque_term.vim conquegdb-new/autoload/conque_term.vim
  +
--- conquegdb/autoload/conque_term.vim 2016-04-26 07:15:38.000000000 -0700
  +
+++ conquegdb-new/autoload/conque_term.vim 2016-04-26 07:14:23.000000000 -0700
  +
@@ -47,7 +47,7 @@
  +
  +
" path to conque install directories
  +
let s:scriptdir = expand("<sfile>:h") . '/'
  +
-let s:scriptdirpy = expand("<sfile>:h") . '/conque_term/'
  +
+let s:scriptdirpy = substitute(expand("<sfile>:h") . '/conque_term/', ' ', '\\ ', 'g')
  +
  +
" global list of terminal instances
  +
let s:term_obj = {'idx': 1, 'var': '', 'is_buffer': 1, 'active': 1, 'buffer_name': '', 'buffer_number' : -1, 'command': ''}
  +
</pre>
  +
 
==Comments==

Revision as of 21:50, 26 April 2016

Use this page to discuss script 4582 Conque GDB: GDB command line interface and terminal emulator

  • Add constructive comments, bug reports, or discuss improvements (see the guideline).
  • Do not document the script here (the author should do that on vim.org).
  • This page may be out of date: check the script's vim.org page above, and its release notes.

Problem

Vim compiled with static python support + python included in gdb.

When running this command inside Vim: ConqueGdb test

  • new window is created
  • this is launched: gdb -f -x /home/user/.vim/bundle/Conque-GDB/autoload/conque_gdb/conque_gdb_gdb.py -x /home/user/.vim/bundle/Conque-GDB/autoload/conque_gdb/gdbinit_confirm.gdb test - 1 [FORMAT=unix] [TYPE=] [100%][POS=0:0/1]
  • nothing in window pop ups (window is empty). --May 12, 2014

Installation problem

Conque GDB does not support installation through Vim bundle.


Download the latest conque_gdb.vmb file and install using the installation instructions given at the scripts page in the link at the top. --May 17, 2014


not bundle installation I did as you said. I've deleted ~/.vim/bundle/Conque-GDB* and installed from conque_gdb.vmb.

When I run Vim I get following:

Error detected while processing function conque_gdb#load_python..<SNR>27_get_gdb_command..<SNR>27_get_unix_gdb:
line   10:
E484: Cannot open file /tmp/vosS3EQ/0

In Vim when I type :ConqueGdb I get the same result as described in "Problem".

I can get rid of this message when I change escaping to:

conque_gdb.vim:315    let l:gdb_py_support = system(l:gdb_exe . ' -q -batch -ex ''python print("PYYES")'' ')

--May 19, 2014


Question Can you give me the output of "gdb -v" and output of "vim --version"? What happens if you install conque gdb and no other plugins, e.g. with an empty .vim folder?


Answer Empting ~/.vim folder helped. While I still get this message

Error detected while processing function conque_gdb#load_python..<SNR>13_get_gdb_command..<SNR>13_get_unix_gdb:

when starting vim I get a gdb console in separate window when I type :ConqueGdb. --August 28, 2014


Suggestion What if you add the following line in your .vimrc ?

set shell=/bin/sh

Problem when running mvim

macVim provides python support. Python installed from port When running mvim -v main.cpp :

  • new window is created
  • this is launched:
File "<string>", line 1, in <module>File "/Users/UserName/.vim/autoload/conque_term/conque_subprocess.py", line 48, in <module>import pty
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/pty.py", line 9, in <module> from select import select
ImportError: dlopen(/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/select.so,
2): Symbol not found: __PyInt_AsInt
Referenced from: /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/select.so
Expected in: flat namespace in /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/select.so
Press ENTER or type command to continue

then the command :ConqueGdb is recognized but nothing happens. --April 21, 2015

Patch for handling spaces in name of .vim directory

I have my ~.vim directory linked to a folder in my Dropbox. When I got a business Dropbox account, the name of my personal Dropbox folder changed from ~/Dropbox to "~/Dropbox (Personal)". This broke ConqueGDB and ConqueTerm. I found if I quoted the spaces in a couple of places that I would no longer have this brokenness.

Here is a patch against version 0.15:

diff -Naur conquegdb/autoload/conque_gdb.vim conquegdb-new/autoload/conque_gdb.vim
--- conquegdb/autoload/conque_gdb.vim	2016-04-26 07:15:38.000000000 -0700
+++ conquegdb-new/autoload/conque_gdb.vim	2016-04-26 07:13:46.000000000 -0700
@@ -11,7 +11,7 @@
 let g:autoload_conque_gdb_loaded = 1

 " Path to gdb python scripts
-let s:SCRIPT_DIR = expand("<sfile>:h") . '/conque_gdb/'
+let s:SCRIPT_DIR = substitute(expand("<sfile>:h") . '/conque_gdb/', ' ', '\\ ', 'g')

 " Conque term terminal object
 let s:gdb = {'idx': 1, 'active': 0, 'buffer_number': -1}
diff -Naur conquegdb/autoload/conque_term.vim conquegdb-new/autoload/conque_term.vim
--- conquegdb/autoload/conque_term.vim	2016-04-26 07:15:38.000000000 -0700
+++ conquegdb-new/autoload/conque_term.vim	2016-04-26 07:14:23.000000000 -0700
@@ -47,7 +47,7 @@

 " path to conque install directories
 let s:scriptdir = expand("<sfile>:h") . '/'
-let s:scriptdirpy = expand("<sfile>:h") . '/conque_term/'
+let s:scriptdirpy = substitute(expand("<sfile>:h") . '/conque_term/', ' ', '\\ ', 'g')

 " global list of terminal instances
 let s:term_obj = {'idx': 1, 'var': '', 'is_buffer': 1, 'active': 1, 'buffer_name': '', 'buffer_number' : -1, 'command': ''}

Comments