May 17, 2011

equalsraf equalsraf
Lab Rat
11 posts

vim Qt GUI

 

Scratching my own curiosity and trying to avoid some of gVIM’s annoying glitches, I implemented a Qt GUI for VIM. It is still rough around the edges, but it is good enough to write its own code :D. Lots of bugs to fix(mostly graphical glitches), so feel free to poke me if you find some.

Repository and build instructions:

And here is a peek:
Screenshot

11 replies

May 17, 2011

leon.anavi leon.anavi
Mad Scientist
1200 posts

Well done :) curiosity moves things ahead :)

 Signature 

http://anavi.org/

June 20, 2011

rajitsingh rajitsingh
Lab Rat
4 posts

Been using it for a few days, and it’s become my primary text editor. A few questions, though:
1) Does it not support colored synatx highligting for QML and javascript?
2) Does it have the .vimrc file? I tried looking for it to permanently change the color scheme, but couldn’t find it in my home dir.
3) Is that color scheme you are using in the screen shot ‘slate’?

 Signature 

Chakra GNU/Linux x86_64 | KDE 4.6.4

June 20, 2011

equalsraf equalsraf
Lab Rat
11 posts

I’ll answer in reverse order, since the first question is the hardest:

3) The color scheme is called slate2 https://vimcolorschemetest.googlecode.com/svn/colors/slate2.vim
2) You need to create a new .vimrc, it won’t be created by default
1) It should support coloured syntax (the same as regular Vim). It may be having problems loading the correct syntax. Have you tried syntax manually in the “Syntax” menu?

Concerning 1) Vim tries to load the colour definitions from the Vim shared folders. Its ability to find them depends on the flags given to ./configure. In what system are you running this? Do you have another version of Vim installed?

June 20, 2011

rajitsingh rajitsingh
Lab Rat
4 posts

@equalsraf
I’m running it on Chakra. GVim was installed earlier, but installing QVim removed it as it was conflicting. Will try the tricks you mentioned. Thanks man!

 Signature 

Chakra GNU/Linux x86_64 | KDE 4.6.4

June 20, 2011

rajitsingh rajitsingh
Lab Rat
4 posts

@equalsraf
Also, I can add the tabs bar, but when I try to drag it and reposition it just above the editor area, it just disappears and gets disabled.

 Signature 

Chakra GNU/Linux x86_64 | KDE 4.6.4

June 20, 2011

equalsraf equalsraf
Lab Rat
11 posts

@rajitsingh
If are building from source, you can keep GVim, and use only the compiled executable. As long they were both compiled with the same configure options, they will share the configuration files.

./configure …<options must match the gvim package —prefix etc>
make
./vim -g

The tabbar is another issue, I’ll fix it later.

June 20, 2011

giddie giddie
Lab Rat
1 posts

Awww; thank you! This is a really exciting project. I find that the QVim window responds to resizing much better than GVim, apart from anything else. It feel significantly more responsive.

I’d love to see this merged into Vim proper. I’m hoping the ball is already rolling for this? Are there any big bugs that still need ironing out?

June 20, 2011

equalsraf equalsraf
Lab Rat
11 posts

@giddie

The resizing handling is actually one the main reasons I got started with this :D.

No ball rolling yet. I need to get this stabilised first.

I’m still filling up bug reports :D. https://code.google.com/p/vim-qt/issues/list The most serious issue right now is in autoconf, this thing sort of builds by miracle. In more esoteric systems it has issues detecting the Qt libraries

June 20, 2011

rajitsingh rajitsingh
Lab Rat
4 posts

Just submitted 2 new issues to that list. Thanks for your great work!

 Signature 

Chakra GNU/Linux x86_64 | KDE 4.6.4

April 6, 2013

trusktr trusktr
Lab Rat
69 posts

Hi! I too am interested in doing something similar. Where can I find coumentation on how to connect a GUI to vim?

April 6, 2013

equalsraf equalsraf
Lab Rat
11 posts

There isn’t a lot of written docs about it, other than the Vim source code itself.
There are a few places you have a look at:

  • The best place to start looking at code is inside the gui_* files (gui_gtk_x11.c and gui_mac.c) you would have to create a file replacing those functions
  • http://www.freehackers.org/VimIntegration
  • If you do a search on Github there are a number of unofficial GUIs around – the iOS one is probably the latest
  • There is vim-qt at https://bitbucket.org/equalsraf/vim-qt/wiki/Home
  • Feel free to ask away, you can also find me at ##vim_qt in freenode
 
  ‹‹ Qt Prints Generator - Business Cards      [Qt Ambassador] QxOrm 1.1.6 released ››

You must log in to post a reply. Not a member yet? Register here!