Friday, 20 September 2013

GDB inside Vim using clewn

I finally got around trying gdb inside vim and after a bit of tweaking it works.

Basic instructions are easy enough except for a few things. First, the readline mentioned is a package called libreadline-dev. Secondly, at least in Ubuntu 12.04 I needed to upgrade gdb to version 7.5 with

tar xvfz gdb-7.5.tar.gz
cd gdb-7.5
cp gdb/gdb /usr/local/bin

Because without this I got errors about some terminal issues. But after this running "clewn -va " and then "file
Having said that, for some reason command output is still only printed inside gdb, such as variable values. The buffer mentioned in the clewn documentation seems to be missing.

Friday, 13 September 2013

Copying from GVim

I had this annoying and weird problem with copying stuff from GVim to other apps. I just couldn't get it to work, no matter how many instructions I followed. I verified with xclip that none of the choices worked ("*y, "+y or painting with mouse). Funnily enough copying to GVim did work.

I still don't know what the full problem is, but I noticed I had been using vim-athena which does have xterm clipboard enabled (every instruction tells to check this first and most also end there) but not mouse. I don't know what that mouse option does since the mouse did work.

In any case, I installed vim-gtk2 and I got this to a working condition. Well, mostly. I can use the X clipboard ("*y) and I can use the mouse, as long as I click directly to the correct window with the middle mouse button. So I can't first activate the other window with the LMB or this doesn't work. Also system clipboard ("+y) still doesn't work.

But I can live with this, this was by far the most annoying problem I have had with vim so far. This is a deviation from other apps, since I can select other windows before copying the X clipboard.

So if you have the same issue with GVim in Linux, try the other versions of graphical vim and see if it helps.