0
0
mirror of https://github.com/vim/vim.git synced 2025-07-04 23:07:33 -04:00

updated for version 7.0003

This commit is contained in:
Bram Moolenaar 2004-06-30 16:16:41 +00:00
parent f4b8e57ffd
commit 843ee41eb8
72 changed files with 15746 additions and 1079 deletions

View File

@ -130,6 +130,7 @@ SRC_UNIX = \
pixmaps/gen-inline-pixbufs.sh \
pixmaps/stock_icons.h \
src/INSTALL \
src/INSTALLkde.txt \
src/Makefile \
src/auto/configure \
src/config.aap.in \
@ -146,6 +147,11 @@ SRC_UNIX = \
src/gui_gtk_f.c \
src/gui_gtk_f.h \
src/gui_gtk_x11.c \
src/gui_kde.cc \
src/gui_kde_widget.cc \
src/gui_kde_widget.h \
src/gui_kde_x11.cc \
src/kvim_iface.h \
src/gui_motif.c \
src/gui_x11.c \
src/hangulin.c \
@ -164,6 +170,8 @@ SRC_UNIX = \
src/proto/gui_athena.pro \
src/proto/gui_gtk.pro \
src/proto/gui_gtk_x11.pro \
src/proto/gui_kde.pro \
src/proto/gui_kde_x11.pro \
src/proto/gui_motif.pro \
src/proto/gui_x11.pro \
src/proto/hangulin.pro \
@ -504,6 +512,13 @@ RT_SCRIPTS = \
# Unix runtime
RT_UNIX = \
README_unix.txt \
runtime/KVim.desktop \
runtime/hi16-action-make.png \
runtime/hi22-action-make.png \
runtime/kde-tips \
runtime/kvim32x32.png \
runtime/kvim48x48.png \
runtime/kvim64x64.png \
runtime/vim16x16.png \
runtime/vim16x16.xpm \
runtime/vim32x32.png \
@ -630,8 +645,6 @@ EXTRA = \
src/tee/Makefile* \
src/tee/tee.c \
csdpmi4b.zip \
emx.dll \
emxlibcs.dll \
# generic language files
LANG_GEN = \

BIN
emx.dll

Binary file not shown.

Binary file not shown.

44
runtime/KVim.desktop Normal file
View File

@ -0,0 +1,44 @@
# KDE Config File
[Desktop Entry]
Type=Application
Exec=kvim -f %F
Icon=kvim
MiniIcon=kvim
DocPath=kvim/index.html
Comment=
Comment[xx]=xx
Terminal=0
Name=KVim
Name[eo]=VIM-fasado
Name[sv]=Kvim
Name[xx]=xx
Comment=Text Editor
Comment[ar]=محرر نصوص
Comment[bg]=Текст Редактор
Comment[de]=Texteditor
Comment[el]=Διορθωτής Κειμένου
Comment[eo]=Tekstredaktilo
Comment[et]=Tekstiredaktor
Comment[eu]=Testu Editorea
Comment[fi]=Tekstieditori
Comment[he]=עורך טקסט
Comment[is]=Textaritill
Comment[ja]=
Comment[lt]=Teksto redaktorius
Comment[mt]=Editur tat-test
Comment[pt_BR]=Editor de Texto
Comment[ro]=Editor de text
Comment[ru]=редактор
Comment[sk]=Textový editor
Comment[sl]=Urejevalnik besedil
Comment[ta]=¯¨Ã ¦¾¡ÌôÀ¡Ç÷
Comment[tr]=Metin Düzenleyici
Comment[uk]=Редактор текстів
Comment[vi]=Trình son văn bn
Comment[xx]=xx
Comment[zh_CN]=
Comment[zh_TW]=
MimeType=application/mathml+xml;application/xhtml+xml;application/x-perl;application/x-python;application/x-shellscript;audio/x-mpegurl;audio/x-scpls;image/svg+xml;message/news;message/rfc822;text/calendar;text/css;text/english;text/html;text/mrml;text/plain;text/rdf;text/rss;text/rtf;text/sgml;text/vnd.wap.wml;text/x-adasrc;text/x-bibtex;text/x-chdr;text/x-c++hdr;text/x-csrc;text/x-c++src;text/x-csv;text/x-diff;text/x-java;text/x-katefilelist;text/x-latex;text/x-log;text/x-lyx;text/x-makefile;text/xmcd;text/xml;text/x-moc;text/x-mswinurl;text/x-objcsrc;text/x-pascal;text/x-perl;text/x-python;text/x-tcl;text/x-tex;text/x-vcalendar;text/x-vcard;text/x-xslfo;text/x-xslt
X-KDE-StartupNotify=true
X-KDE-AuthorizeAction=shell access

View File

@ -1,4 +1,4 @@
*autocmd.txt* For Vim version 7.0aa. Last change: 2004 Apr 20
*autocmd.txt* For Vim version 7.0aa. Last change: 2004 Jun 30
VIM REFERENCE MANUAL by Bram Moolenaar
@ -304,7 +304,8 @@ FocusGained When Vim got input focus. Only for the GUI
*FocusLost*
FocusLost When Vim lost input focus. Only for the GUI
version and a few console versions where this
can be detected.
can be detected. May also happen when a
dialog pops up.
*FuncUndefined*
FuncUndefined When a user function is used but it isn't
defined. Useful for defining a function only
@ -467,6 +468,21 @@ VimLeave Before exiting Vim, just after writing the
*EncodingChanged*
EncodingChanged Fires off when the 'encoding' option is
changed. Useful to set up fonts, for example.
*InsertEnter*
InsertEnter When starting Insert mode. Also for Replace
mode and Virtual Replace mode. The
|v:insertmode| variable indicates the mode.
Be careful not to move the cursor or do
anything else that the user does not expect.
*InsertChange*
InsertChange When typing <Insert> while in Insert or
Replace mode. The |v:insertmode| variable
indicates the new mode.
Be careful not to move the cursor or do
anything else that the user does not expect.
*InsertLeave*
InsertLeave When leaving Insert mode. Also when using
CTRL-O |i_CTRL-O|.
*FileEncoding*
FileEncoding Obsolete. It still works and is equivalent
to |EncodingChanged|.

View File

@ -1,4 +1,4 @@
*eval.txt* For Vim version 7.0aa. Last change: 2004 Jun 22
*eval.txt* For Vim version 7.0aa. Last change: 2004 Jun 30
VIM REFERENCE MANUAL by Bram Moolenaar
@ -679,6 +679,13 @@ v:foldend Used for 'foldtext': last line of closed fold.
v:foldstart Used for 'foldtext': first line of closed fold.
Read-only. |fold-foldtext|
*v:insertmode* *insertmode-variable*
v:insertmode Used for the |InsertEnter| and |InsertChange| autocommand
events. Values:
i Insert mode
r Replace mode
v Virtual Replace mode
*v:lang* *lang-variable*
v:lang The current locale setting for messages of the runtime
environment. This allows Vim scripts to be aware of the
@ -2765,6 +2772,7 @@ gui_athena Compiled with Athena GUI.
gui_beos Compiled with BeOS GUI.
gui_gtk Compiled with GTK+ GUI (any version).
gui_gtk2 Compiled with GTK+ 2 GUI (gui_gtk is also defined).
gui_kde Compiled with KDE GUI |KVim|
gui_mac Compiled with Macintosh GUI.
gui_motif Compiled with Motif GUI.
gui_photon Compiled with Photon GUI.

View File

@ -25,8 +25,8 @@ Other GUI documentation:
First you must make sure you actually have a version of Vim with the GUI code
included. You can check this with the ":version" command, it should include
"+GUI_Athena", "+GUI_BeOS", "+GUI_GTK", "+GUI_Motif" or "MS-Windows ... bit
GUI version".
"+GUI_Athena", "+GUI_BeOS", "+GUI_GTK", "+GUI_KDE", "+GUI_Motif" or
"MS-Windows ... bit GUI version".
How to start the GUI depends on the system used. Mostly you can run the
GUI version of Vim with:
@ -94,8 +94,8 @@ There are a number of options which only have meaning in the GUI version of
Vim. These are 'guicursor', 'guifont', 'guipty' and 'guioptions'. They are
documented in |options.txt| with all the other options.
If using the Motif or Athena version of the GUI (but not for the GTK+ or Win32
version), a number of X resources are available. See |gui-resources|.
If using the Motif or Athena version of the GUI (but not for the KDE, GTK+ or
Win32 version), a number of X resources are available. See |gui-resources|.
Another way to set the colors for different occasions is with highlight
groups. The "Normal" group is used to set the background and foreground
@ -479,7 +479,7 @@ a menu entry. Hit <Enter> to execute it. Hit <Esc> if you want to cancel.
This does require the |+menu| feature enabled at compile time.
*tear-off-menus*
GTK+ and Motif support Tear-off menus. These are sort of sticky menus or
KDE, GTK+ and Motif support Tear-off menus. These are sort of sticky menus or
pop-up menus that are present all the time. If the resizing does not work
correctly, this may be caused by using something like "Vim*geometry" in the
defaults. Use "Vim.geometry" instead.
@ -646,8 +646,8 @@ because the item will never be selected. Use a single colon to keep it
simple.
*gui-toolbar*
The toolbar is currently available in the Win32, Athena, Motif, GTK+ (X11) and
Photon GUI. It should turn up in other GUIs in due course. The default
The toolbar is currently available in the Win32, Athena, Motif, GTK+ (X11),
KDE and Photon GUI. It should turn up in other GUIs in due course. The default
toolbar is setup in menu.vim.
The display of the toolbar is controlled by the 'guioptions' letter 'T'. You
can thus have menu & toolbar together, or either on its own, or neither.
@ -735,7 +735,7 @@ from the main menu bar. You must then use the |:popup| or |:tearoff| command
to display it.
*popup-menu*
In the Win32, GTK+, Motif, Athena and Photon GUI, you can define the special
In the Win32, KDE, GTK+, Motif, Athena and Photon GUI, you can define the special
menu "PopUp". This is the menu that is displayed when the right mouse button
is pressed, if 'mousemodel' is set to popup or popup_setpos.

View File

@ -12,8 +12,9 @@ Vim's Graphical User Interface *gui-x11* *GUI-X11*
4. Various |gui-x11-various|
5. GTK version |gui-gtk|
6. GNOME version |gui-gnome|
7. Compiling |gui-x11-compiling|
8. X11 selection mechanism |x11-selection|
7. KDE version |gui-kde|
8. Compiling |gui-x11-compiling|
9. X11 selection mechanism |x11-selection|
Other relevant documentation:
|gui.txt| For generic items of the GUI.
@ -59,7 +60,7 @@ flag in 'guioptions'. |-f|.
==============================================================================
2. GUI Resources *gui-resources* *.Xdefaults*
If using the Motif or Athena version of the GUI (not for the GTK+ or Win32
If using the Motif or Athena version of the GUI (not for the KDE, GTK+ or Win32
version), a number of X resources are available. You should use Vim's class
"Vim" when setting these. They are as follows:
@ -434,7 +435,61 @@ the WM to identify the window by restoring the window role (using the |--role|
command line argument).
==============================================================================
7. Compiling *gui-x11-compiling*
7. KDE version *gui-kde* *KDE* *KVim*
The KDE version of Vim works with KDE 2.x and KDE 3.x.
KVim (name code for gui-kde) does not use traditional X settings for its
configuration.
Most important difference is the font handling, KVim uses QFont to display the
text. To set your font use the following syntax :
>
:set guifont=Fixed\ [Misc]/10/-1/5/50/0/0/0/1/0
<
the '10' value is the font size, other settings concerns more specific Qt
options which you should not need to care with.
The suggested way to choose your font is through the font selection dialog
available with the command :
:set guifont=*
Note: X Font names are not supported any more, so if you use GVim too, you'll
have to set something like this in your ~/.gvimrc : >
if has("gui_kde")
:set guifont=Fixed\ [Misc]/10/-1/5/50/0/0/0/1/0
else if has("gui_gtk")
:set guifont=-misc-fixed-medium-r-normal-*-*-100-*-*-c-*-iso10646-1
endif
<
*antialias*
KVim uses antialias for its font, so that the text looks better, to disable
this you have to refer to Qt's documentation (export QT_XFT=0 for QT 2.x).
KDE provides some other features, like being able to move the menubar and the
toolbar wherever you want around the text area.
*kde-toolbar*
KVim can be used with a KDE-look toolbar instead of Vim's default toolbar. To
enable this feature you have to run the configure script with the
--enable-kde-toolbar switch. It may be moved to a runtime option in the
future.
*DCOP*
Since Vim 6.0, the new ClientServer feature has been added, it works fine in
KVim too. KVim also provides its own communication scheme based on DCOP. This
is mainly used by the |vimpart| but can freely be used by other applications
or manually through KDE's DCOP tools. The DCOP servername is synchronized with
the X11 servername so that it's easier to identify the same KVim through the
two communication systems.
*vimpart* *vim-kpart*
KVim developers are also working on a component to allow embedding of Vim into
KDE's applications. As of this writing, the component is working and can be
used in different KDE applications. New KDE applications should support it
soon. To get more information about this component, refer to
http://freehackers.org/kvim or to the KDE project.
==============================================================================
8. Compiling *gui-x11-compiling*
If using X11, Vim's Makefile will by default first try to find the necessary
GTK+ files on your system. If the GTK+ files cannot be found, then the Motif
@ -489,6 +544,12 @@ menus look a bit better. Edit the Makefile and look for "XAW_LIB". The
scrollbars will remain the same, because Vim has its own, which are already
3D (in fact, they look more like Motif).
*gui-x11-kde*
For Vim-KDE, you need at least Qt(>=2.x) and the corresponding kdelibs.
To compile, you must use the --with-qt-dir configure flag because QTDIR is not
automatically detected yet. Giving KDE's directories to the configure script
may also help in some cases.
*gui-x11-neXtaw*
The neXtaw version is mostly like Athena, but uses different widgets.
@ -499,7 +560,7 @@ X11R5 with a library for X11R6 probably doesn't work (although the linking
won't give an error message, Vim will crash later).
==============================================================================
8. X11 selection mechanism *x11-selection*
9. X11 selection mechanism *x11-selection*
If using X11, in either the GUI or an xterm with an X11-aware Vim, then Vim
provides varied access to the X11 selection and clipboard. These are accessed

View File

@ -1,4 +1,4 @@
*options.txt* For Vim version 7.0aa. Last change: 2004 Jun 21
*options.txt* For Vim version 7.0aa. Last change: 2004 Jun 28
VIM REFERENCE MANUAL by Bram Moolenaar
@ -468,10 +468,10 @@ short for "example:").
*modeline-local*
The options are set like with ":setlocal": The new value only applies to the
buffer that contains the window. Although it's possible to set global options
from a modeline, this is unusual. If you have two windows open and the files
in it set the same global option to a different value, the result depends on
which one was opened last.
buffer and window that contain the file. Although it's possible to set global
options from a modeline, this is unusual. If you have two windows open and
the files in it set the same global option to a different value, the result
depends on which one was opened last.
*modeline-version*
If the modeline is only to be used for some versions of Vim, the version
@ -5436,7 +5436,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|shift-left-right|.
What gets inserted (a Tab or spaces) depends on the 'expandtab'
option. Also see |ins-expandtab|. When 'expandtab' is not set, the
number of spaces minimized by using <Tab>s.
number of spaces is minimized by using <Tab>s.
NOTE: This option is reset when 'compatible' is set.
*'softtabstop'* *'sts'*
@ -5480,9 +5480,9 @@ A jump table for the options with a short description can be found at |Q_op|.
global
{not in Vi}
When "on" the commands listed below move the cursor to the first
blank of the line. When off the cursor is kept in the same column
non-blank of the line. When off the cursor is kept in the same column
(if possible). This applies to the commands: CTRL-D, CTRL-U, CTRL-B,
CTRL-F, "G", "H", "M", "L", , and to the commands "d", "<<" and ">>"
CTRL-F, "G", "H", "M", "L", gg, and to the commands "d", "<<" and ">>"
with a linewise operator, with "%" with a count and to buffer changing
commands (CTRL-^, :bnext, :bNext, etc.). Also for an Ex command that
only has a line number, e.g., ":25" or ":+".

View File

@ -1,4 +1,4 @@
*os_amiga.txt* For Vim version 7.0aa. Last change: 2004 Apr 25
*os_amiga.txt* For Vim version 7.0aa. Last change: 2004 Jun 28
VIM REFERENCE MANUAL by Bram Moolenaar
@ -30,6 +30,12 @@ the |+digraphs| feature. If you want to use Vim with other terminals you can
recompile with the TERMCAP option. Vim compiles with Manx 5.x and SAS 6.x.
See the makefiles and feature.h.
If you notice Vim crashes on some files when syntax highlighting is on, or
when using a search pattern with nested wildcards, it might be that the stack
is too small. Try increasing the stack size. In a shell use the Stack
command before launching Vim. On the Workbench, select the Vim icon, use the
workbench "Info" menu and change the Stack field in the form.
If you want to use different colors set the termcap codes:
t_mr (for inverted text)
t_md (for bold text)

View File

@ -1,4 +1,4 @@
*pi_netrw.txt* For Vim version 6.2. Last change: Jun 15, 2004
*pi_netrw.txt For Vim version 6.2. Last change: Jun 25, 2004
VIM REFERENCE MANUAL by Charles E. Campbell, Jr.
@ -16,7 +16,7 @@
4. Transparent File Transfer...........................|netrw-transparent|
5. Ex Commands.........................................|netrw-ex|
6. Variables and Options...............................|netrw-var|
7. Remote Directory Listing............................|netrw-dir|
7. Remote Directory Browser............................|netrw-browse|
8. Debugging...........................................|netrw-debug|
9. History.............................................|netrw-history|
10. Credits.............................................|netrw-credits|
@ -493,28 +493,116 @@ from <netrw.vim> itself:
>
==============================================================================
7. Remote Directory Listing *netrw-dir* *netrw-list*
7. Remote Directory Browser *netrw-browse* *netrw-dir* *netrw-list*
>
------- -----------
Command Explanation
------- -----------
<cr> Netrw will enter the directory or read the file
<del> Netrw will attempt to remove the file/directory
D Netrw will attempt to remove the file(s)/directory(ies)
R Netrw will attempt to rename the file(s)/directory(ies)
- Makes Netrw go up one directory
a Show all of a directory (temporarily ignore g:netrw_list_hide)
o Enter the file/directory under the cursor in a new browser
window. A horizontal split is used.
v Enter the file/directory under the cursor in a new browser
window. A vertical split is used.
x Apply a function to a file.
<c-l> Causes Netrw to refresh the directory listing
? Causes Netrw to issue help
<
*netrw-browse-var*
>
--- -----------
Var Explanation
--- -----------
g:netrw_list_cmd supports listing
g:netrw_rm_cmd supports removing files
g:netrw_rmf_cmd supports removing softlinks to directories
g:netrw_rmdir_cmd supports removing directories
g:netrw_winsize specify initial size of new o/v windows
g:netrw_list_hide comma separated list of patterns for
hiding files
<
Netrw supports the browsing of directories on remote hosts, including
generating listing directories, entering directories, editing files
therein, deleting files/directories, and moving (renaming) files and
directories.
Netrw supports listing (browsing) directories on remote hosts; simply attempt
to read a "file" with a trailing slash and it will be interpreted as a
request to browse a directory:
To enter the netrw directory browser, simply attempt to read a "file" with a
trailing slash and it will be interpreted as a request to list a directory:
vim [protocol]://[user@]hostname/path/
Netrw will modify the command in g:netrw_list to perform the directory listing
operation. By default the command is:
Netrw will modify the command in g:netrw_list_cmd to perform the directory
listing operation. By default the command is:
ssh HOSTNAME ls -Fa
ssh HOSTNAME ls -FLa
where the HOSTNAME becomes the hostname as requested by the attempted
read. Naturally, the user may override this command with whatever is
where the HOSTNAME becomes the [user@]hostname as requested by the attempt
to read. Naturally, the user may override this command with whatever is
preferred. The NetList function which implements remote directory
browsing expects that directories will be flagged by a trailing slash.
Browsing is simple: move the cursor onto a file or directory of interest.
Hitting the <cr> (the return key) will select the file or directory. Directories
will themselves be listed, and files will be opened using the protocol given
in the original read request.
Hitting the <cr> (the return key) will select the file or directory.
Directories will themselves be listed, and files will be opened using the
protocol given in the original read request.
*netrw-delete* *netrw-remove*
Deleting/removing files and directories involves moving the cursor to the
file/directory to be deleted and pressing "D". Directories must be empty
first before they can be successfully removed. If the directory is a softlink
to a directory, then netrw will make two requests to remove the directory
before succeeding. Netrw will ask for confirmation before doing the
removal(s). You may select a range of lines with the "V" command (visual
selection), and then pressing "D".
The g:netrw_rm_cmd, g:netrw_rmf_cmd, and g:netrw_rmdir_cmd variables are
used to control the attempts to remove files and directories. The
g:netrw_rm_cmd is used with files, and its default value is:
g:netrw_rm_cmd: ssh HOSTNAME rm
The g:netrw_rmdir_cmd is used with directories. Its default value is:
g:netrw_rmdir_cmd: ssh HOSTNAME rmdir
If removing a directory fails with g:netrw_rmdir_cmd, netrw then will attempt
to remove it again using the g:netrw_rmf_cmd. Its default value is:
g:netrw_rmf_cmd: ssh HOSTNAME rm -f
*netrw-x*
The Netrw executor applies a user-defined function to a file, based on its
extension. Of course, the handler function must exist for it to be called.
>
Ex. mypgm.html x -> NetrwFileHandler_html("scp://user@host/some/path/mypgm.html")
<
See the <NetrwFileHandlers.vim>
*netrw-move* *netrw-rename*
Renaming/moving files and directories involves moving the cursor to the
file/directory to be moved (renamed) and pressing "R". You will then be
queried for where you want the file/directory to be moved. You may select a
range of lines with the "V" command (visual selection), and then pressing "R".
The g:netrw_rename_cmd is used to implement renaming. By default its
value is:
ssh HOSTNAME mv
*netrw-list-hack*
For Linux/Unix systems, I suggest looking into
http://hacks.oreilly.com/pub/h/66
It gives a tip for setting up password-less use of ssh and scp, and discusses
the associated security issues.
==============================================================================
@ -551,6 +639,7 @@ which is loaded automatically at startup (assuming :set nocp).
==============================================================================
9. History *netrw-history*
v47: *
v46: * now handles remote directory browsing
* g:netrw_silent (if 1) will cause all transfers to be silent'd
v45: * made the [user@]hostname:path form a bit more restrictive

View File

@ -483,13 +483,14 @@ if the pattern starts with "^" and ends in "$"). A "*" matches any sequence
of characters. 'ignorecase' is not used, but "\c" can be used in the pattern
to ignore case |/\c|. Don't include the () for the function name!
The match for sourced scripts is done against the full file name. Examples: >
breakadd file explorer
won't match, the path is missing. >
The match for sourced scripts is done against the full file name. If no path
is specified the current directory is used. Examples: >
breakadd file explorer.vim
matches "explorer.vim" in the current directory. >
breakadd file *explorer.vim
matches ".../plugin/explorer.vim" and ".../plugin/iexplorer.vim". >
matches ".../plugin/explorer.vim", ".../plugin/iexplorer.vim", etc. >
breakadd file */explorer.vim
matches ".../plugin/explorer.vim" only.
matches ".../plugin/explorer.vim" and "explorer.vim" in any other directory.
The match for functions is done against the name as it's shown in the output
of ":function". For local functions this means that something like "<SNR>99_"

View File

@ -2874,6 +2874,7 @@ CursorHold autocmd.txt /*CursorHold*
CursorHold-example windows.txt /*CursorHold-example*
CursorIM mbyte.txt /*CursorIM*
D change.txt /*D*
DCOP gui_x11.txt /*DCOP*
DOS os_dos.txt /*DOS*
DOS-format editing.txt /*DOS-format*
DOS-format-write editing.txt /*DOS-format-write*
@ -3583,9 +3584,14 @@ IM-server mbyte.txt /*IM-server*
IME mbyte.txt /*IME*
Insert insert.txt /*Insert*
Insert-mode insert.txt /*Insert-mode*
InsertChange autocmd.txt /*InsertChange*
InsertEnter autocmd.txt /*InsertEnter*
InsertLeave autocmd.txt /*InsertLeave*
J change.txt /*J*
Japanese mbyte.txt /*Japanese*
K various.txt /*K*
KDE gui_x11.txt /*KDE*
KVim gui_x11.txt /*KVim*
Korean mbyte.txt /*Korean*
L motion.txt /*L*
Linux-backspace options.txt /*Linux-backspace*
@ -3634,6 +3640,7 @@ Operator-pending intro.txt /*Operator-pending*
Operator-pending-mode intro.txt /*Operator-pending-mode*
OverTheSpot mbyte.txt /*OverTheSpot*
P change.txt /*P*
PATHEXT eval.txt /*PATHEXT*
Pattern pattern.txt /*Pattern*
Perl if_perl.txt /*Perl*
Posix intro.txt /*Posix*
@ -3908,6 +3915,7 @@ alternate-file editing.txt /*alternate-file*
amiga-window starting.txt /*amiga-window*
ant-syntax syntax.txt /*ant-syntax*
ant.vim syntax.txt /*ant.vim*
antialias gui_x11.txt /*antialias*
ap motion.txt /*ap*
apache-syntax syntax.txt /*apache-syntax*
apache.vim syntax.txt /*apache.vim*
@ -4213,6 +4221,7 @@ cpo-C options.txt /*cpo-C*
cpo-D options.txt /*cpo-D*
cpo-E options.txt /*cpo-E*
cpo-F options.txt /*cpo-F*
cpo-I options.txt /*cpo-I*
cpo-J options.txt /*cpo-J*
cpo-K options.txt /*cpo-K*
cpo-L options.txt /*cpo-L*
@ -4780,6 +4789,7 @@ gui-gtk gui_x11.txt /*gui-gtk*
gui-gtk-socketid gui_x11.txt /*gui-gtk-socketid*
gui-horiz-scroll gui.txt /*gui-horiz-scroll*
gui-init gui.txt /*gui-init*
gui-kde gui_x11.txt /*gui-kde*
gui-mouse gui.txt /*gui-mouse*
gui-mouse-focus gui.txt /*gui-mouse-focus*
gui-mouse-mapping gui.txt /*gui-mouse-mapping*
@ -4811,6 +4821,7 @@ gui-x11 gui_x11.txt /*gui-x11*
gui-x11-athena gui_x11.txt /*gui-x11-athena*
gui-x11-compiling gui_x11.txt /*gui-x11-compiling*
gui-x11-gtk gui_x11.txt /*gui-x11-gtk*
gui-x11-kde gui_x11.txt /*gui-x11-kde*
gui-x11-misc gui_x11.txt /*gui-x11-misc*
gui-x11-motif gui_x11.txt /*gui-x11-motif*
gui-x11-neXtaw gui_x11.txt /*gui-x11-neXtaw*
@ -4830,6 +4841,8 @@ gvim starting.txt /*gvim*
gvimdiff diff.txt /*gvimdiff*
gvimrc gui.txt /*gvimrc*
gw change.txt /*gw*
gwgw change.txt /*gwgw*
gww change.txt /*gww*
gzip pi_gzip.txt /*gzip*
gzip-autocmd pi_gzip.txt /*gzip-autocmd*
gzip-example autocmd.txt /*gzip-example*
@ -5097,6 +5110,7 @@ insert_expand insert.txt /*insert_expand*
inserting insert.txt /*inserting*
inserting-ex insert.txt /*inserting-ex*
inserting-file insert.txt /*inserting-file*
insertmode-variable eval.txt /*insertmode-variable*
install usr_90.txt /*install*
install-home usr_90.txt /*install-home*
install-registry gui_w32.txt /*install-registry*
@ -5125,6 +5139,7 @@ jumplist motion.txt /*jumplist*
jumpto-diffs diff.txt /*jumpto-diffs*
k motion.txt /*k*
kcc uganda.txt /*kcc*
kde-toolbar gui_x11.txt /*kde-toolbar*
key-codes intro.txt /*key-codes*
key-codes-changed version4.txt /*key-codes-changed*
key-mapping map.txt /*key-mapping*
@ -5360,23 +5375,32 @@ netbeans-support netbeans.txt /*netbeans-support*
netbeans.txt netbeans.txt /*netbeans.txt*
netrw pi_netrw.txt /*netrw*
netrw-activate pi_netrw.txt /*netrw-activate*
netrw-browse pi_netrw.txt /*netrw-browse*
netrw-browse-var pi_netrw.txt /*netrw-browse-var*
netrw-contents pi_netrw.txt /*netrw-contents*
netrw-credits pi_netrw.txt /*netrw-credits*
netrw-debug pi_netrw.txt /*netrw-debug*
netrw-delete pi_netrw.txt /*netrw-delete*
netrw-dir pi_netrw.txt /*netrw-dir*
netrw-ex pi_netrw.txt /*netrw-ex*
netrw-file pi_netrw.txt /*netrw-file*
netrw-fixup pi_netrw.txt /*netrw-fixup*
netrw-history pi_netrw.txt /*netrw-history*
netrw-list pi_netrw.txt /*netrw-list*
netrw-list-hack pi_netrw.txt /*netrw-list-hack*
netrw-move pi_netrw.txt /*netrw-move*
netrw-netrc pi_netrw.txt /*netrw-netrc*
netrw-new pi_netrw.txt /*netrw-new*
netrw-newstuff pi_netrw.txt /*netrw-newstuff*
netrw-options pi_netrw.txt /*netrw-options*
netrw-passwd pi_netrw.txt /*netrw-passwd*
netrw-protocol pi_netrw.txt /*netrw-protocol*
netrw-ref pi_netrw.txt /*netrw-ref*
netrw-remove pi_netrw.txt /*netrw-remove*
netrw-rename pi_netrw.txt /*netrw-rename*
netrw-transparent pi_netrw.txt /*netrw-transparent*
netrw-uidpass pi_netrw.txt /*netrw-uidpass*
netrw-urls pi_netrw.txt /*netrw-urls*
netrw-var pi_netrw.txt /*netrw-var*
netrw-x pi_netrw.txt /*netrw-x*
netrw-xfer pi_netrw.txt /*netrw-xfer*
netrw.vim pi_netrw.txt /*netrw.vim*
netterm-mouse options.txt /*netterm-mouse*
@ -5545,7 +5569,6 @@ phtml-syntax syntax.txt /*phtml-syntax*
phtml.vim syntax.txt /*phtml.vim*
pi_expl.txt pi_expl.txt /*pi_expl.txt*
pi_gzip.txt pi_gzip.txt /*pi_gzip.txt*
pi_netrw.txt pi_netrw.txt /*pi_netrw.txt*
pi_spec.txt pi_spec.txt /*pi_spec.txt*
plugin usr_05.txt /*plugin*
plugin-details filetype.txt /*plugin-details*
@ -6265,6 +6288,7 @@ v:folddashes eval.txt /*v:folddashes*
v:foldend eval.txt /*v:foldend*
v:foldlevel eval.txt /*v:foldlevel*
v:foldstart eval.txt /*v:foldstart*
v:insertmode eval.txt /*v:insertmode*
v:lang eval.txt /*v:lang*
v:lc_time eval.txt /*v:lc_time*
v:lnum eval.txt /*v:lnum*
@ -6348,6 +6372,7 @@ v_g_CTRL-] tagsrch.txt /*v_g_CTRL-]*
v_gf editing.txt /*v_gf*
v_gq change.txt /*v_gq*
v_gv visual.txt /*v_gv*
v_gw change.txt /*v_gw*
v_i motion.txt /*v_i*
v_i( motion.txt /*v_i(*
v_i) motion.txt /*v_i)*
@ -6409,6 +6434,7 @@ vim-announce intro.txt /*vim-announce*
vim-arguments starting.txt /*vim-arguments*
vim-default-editor gui_w32.txt /*vim-default-editor*
vim-dev intro.txt /*vim-dev*
vim-kpart gui_x11.txt /*vim-kpart*
vim-mac intro.txt /*vim-mac*
vim-modes intro.txt /*vim-modes*
vim-modes-intro intro.txt /*vim-modes-intro*
@ -6429,6 +6455,7 @@ viminfo-file-marks starting.txt /*viminfo-file-marks*
viminfo-file-name starting.txt /*viminfo-file-name*
viminfo-read starting.txt /*viminfo-read*
viminfo-write starting.txt /*viminfo-write*
vimpart gui_x11.txt /*vimpart*
vimrc starting.txt /*vimrc*
vimrc-filetype usr_05.txt /*vimrc-filetype*
vimrc-intro usr_05.txt /*vimrc-intro*

View File

@ -1,4 +1,4 @@
*todo.txt* For Vim version 7.0aa. Last change: 2004 Jun 24
*todo.txt* For Vim version 7.0aa. Last change: 2004 Jun 30
VIM REFERENCE MANUAL by Bram Moolenaar
@ -30,35 +30,8 @@ be worked on, but only if you sponsor Vim development. See |sponsor|.
*known-bugs*
-------------------- Known bugs and current work -----------------------
Change for fsync() error in Vim 6 as patch?
For version 7.0:
- Include many PATCHES:
9 Merge in ideas from tutor.txt (Gabriel Zachmann)
New version 2004 June 16.
8 ":winpos" doesn't work. Patch from Vipin Aravind.
8 Add GTK 2.3 file dialog support. Patch by Grahame Bowland, 2004 Mar 15,
but it doesn't use "initdir" or "dflt". (will update patch)
8 On Sinix SYS_NMLN isn't defined. Include patch from Cristiano De
Michele. He no longer has such a machine.
8 Add file locking. Lock a file when starting to edit it with flock() or
fcntl(). This patch has advisory file locking while reading/writing
the file: ~/vim/patches/kahn_file_locking .
Do we still want this? Andy doesn't have time to work on it.
8 Add buffer-local autocommands? Reduces overhead for autocommands that
trigger often (inserting a character, switching mode).
:au Event <buffer> do-something
E.g.:
:au BufEnter <buffer> menu enable ...
:au BufLeave <buffer> menu disable ...
Patch from Yakov Lerner, including test (2004 Jan 7).
He'll send updated patch.
Autocommands:
VimResized - When the Vim window has been resized (SIGWINCH)
patch from Yakov Lerner, 2003 July 24.
He'll write documentation and send updated patch.
InsmodEnter
InsmodLeave Taro Muraoka, 2004 Jun 16
- Include the kvim patch. http://freenux.org/vim/ (Mickael Marchand)
Do not add Qtopia yet, it doesn't work very well.
update from Mickael 2004 Jun 20.
@ -130,6 +103,20 @@ For version 7.0:
'isfname'. E.g. ":set flipcase=a-zA-Z,xX,23-33:143-153". The colon to
separate the from and to part is optional.
Resp: no time now.
8 Add GTK 2.3 file dialog support. Patch by Grahame Bowland, 2004 Mar 15,
but it doesn't use "initdir" or "dflt". (will update patch)
8 Add buffer-local autocommands? Reduces overhead for autocommands that
trigger often (inserting a character, switching mode).
:au Event <buffer> do-something
E.g.:
:au BufEnter <buffer> menu enable ...
:au BufLeave <buffer> menu disable ...
Patch from Yakov Lerner, including test (2004 Jan 7).
He'll send updated patch.
Autocommands:
VimResized - When the Vim window has been resized (SIGWINCH)
patch from Yakov Lerner, 2003 July 24.
He'll write documentation and send updated patch.
--- responses above --
7 Make "5dd" on last-but-one-line not delete anything (Vi compatible).
Add flag in 'cpoptions' for this. When not present, "2dd" in the last
@ -247,8 +234,11 @@ For version 7.0:
- findmatch() should be adjusted for Lisp. See remark at
get_lisp_indent(). Esp. \( and \) should be skipped. (Dorai Sitaram,
incomplete patch Mar 18)
- Change ga_room into ga_maxlen, so that it doesn't need to be
incremented/decremented each time.
- For string variables, use length instead of NUL termination.
- new DATA TYPES: lists, dictionaries and function references.
Check old patch from Robert Webb for array support.
Add type checking? See ~/vim/ideas.txt.
@ -311,6 +301,7 @@ For version 7.0:
- FileChangedShellPost autocommand event: after (not) reloading a changed
file. Can be used to update statusline oslt.
- Displaying size of Visual area: use 24-33 column display.
- Mac: Unicode input and display (Eckehard Berns, June 27)
Vi incompatibility:
@ -1577,6 +1568,13 @@ Robustness:
A long line with a " in it can cause a crash when it runs out of stack
space (on systems where this isn't caught). How can we catch this for
more systems?
6 Add file locking. Lock a file when starting to edit it with flock() or
fcntl(). This patch has advisory file locking while reading/writing
the file for Vim 5.4: ~/vim/patches/kahn_file_locking .
The patch is incomplete (needs support for more systems, autoconf).
Andy doesn't have time to work on it.
Disadvantage: Need to find ways to gracefully handle failure to obtain a
lock. When to release a lock: When buffer is unloaded?
Performance:
@ -2016,8 +2014,8 @@ Autocommands:
ReplaceEnter - Entering Replace mode
CmdEnter - Entering Cmdline mode
VisualEnter - Entering Visual mode
*Leave - Leaving a mode (in pair with the above *Enter)
CmdUndefined - Like FuncUndefined but for user commands.
*Leave - Leaving the mode
SearchPost - After doing a search command (e.g. to do "M")
PreDirChanged/PostDirChanged
- Before/after ":cd" has been used (for changing the

View File

@ -1,4 +1,4 @@
*usr_27.txt* For Vim version 7.0aa. Last change: 2003 Oct 28
*usr_27.txt* For Vim version 7.0aa. Last change: 2004 Jun 26
VIM USER MANUAL - by Bram Moolenaar
@ -304,9 +304,9 @@ Will match "ab" in "abbb". Actually, it will never match more than one b,
because there is no reason to match more. It requires something else to force
it to match more than the lower limit.
The same rules apply to removing "n" and "m". It's even possible to remove
both of the, resulting in "\{-}". This matches the item before it zero or
more times, as few as possible. The item by itself always match zero times.
It is useful when combined with something else. Example: >
both of the numbes, resulting in "\{-}". This matches the item before it zero
or more times, as few as possible. The item by itself always matches zero
times. It is useful when combined with something else. Example: >
/a.\{-}b

View File

@ -1,4 +1,4 @@
*version7.txt* For Vim version 7.0aa. Last change: 2004 Jun 24
*version7.txt* For Vim version 7.0aa. Last change: 2004 Jun 30
VIM REFERENCE MANUAL by Bram Moolenaar
@ -61,6 +61,15 @@ In Vim scripts the following types have been added:
Many functions and commands have been added to support the new types.
NOT IMPLEMENTED YET!
KDE support *new-kde*
-----------
Kvim is the KDE version of Vim. It uses the Qt toolkit. See |KVim|.
(Thomas Capricelli, Philippe Fremy, Mickael Marchand, Mark Westcott, et al.)
Various new items *new-items-7*
-----------------
@ -73,12 +82,18 @@ Options: ~
Ex commands: ~
Win32: The ":winpos" command now also works in the console. (Vipin Aravind)
New functions: ~
New autocommand events: ~
InsertEnter starting Insert or Replace mode
InsertChange going from Insert to Replace mode or back
InsertLeave leaving Insert or Replace mode
New Syntax files: ~
@ -89,6 +104,9 @@ character selections can be used between two Vims. (Eckehard Berns)
Also fixes the problem that setting 'clipboard' to "unnamed" breaks using
"yyp".
The netrw plugin now also supports viewing a directory, when "scp://" is used.
Deleting and renaming files is possible. (Charles Campbell)
==============================================================================
IMPROVEMENTS *improvements-7*
@ -97,6 +115,8 @@ IMPROVEMENTS *improvements-7*
":breakadd here" and ":breakdel here" can be used to set or delete a
breakpoint at the cursor.
The tutor was updated to make it simpler to use and added text to explain a
few more important commands. Used ideas from Gabriel Zachmann.
==============================================================================
COMPILE TIME CHANGES *compile-changes-7*
@ -152,4 +172,7 @@ After using cursor(line, col) moving up/down doesn't keep the same column.
Win32: Borland C before 5.5 requires using ".u." for LowPart and HighPart
fields. (Walter Briscoe)
On Sinix SYS_NMLN isn't always defined. Define it ourselves. (Cristiano De
Michele)
vim:tw=78:ts=8:ft=help:norl:

View File

@ -1,7 +1,7 @@
" Vim support file to detect file types
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2004 Jun 10
" Last Change: 2004 Jun 27
" Listen very carefully, I will say this only once
if exists("did_load_filetypes")
@ -956,6 +956,7 @@ if has("fname_case")
else
au BufNewFile,BufRead *.pl call FTCheck_pl()
endif
au BufNewFile,BufRead *.plx setf perl
fun! FTCheck_pl()
if exists("g:filetype_pl")

View File

@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: aspvbs
" Maintainer: Dan Sharp <dwsharp at hotmail dot com>
" Last Changed: 2003 Sep 29
" Last Changed: 2004 Jun 28
" URL: http://mywebpage.netscape.com/sharppeople/vim/ftplugin
if exists("b:did_ftplugin") | finish | endif
@ -35,15 +35,16 @@ endif
" thanks to Gontran BAERTS
if exists("loaded_matchit")
let s:notend = '\%(\<end\s\+\)\@<!'
let b:match_ignorecase = 1
let b:match_words =
\ s:notend . '\<If\>:^\s\+\<Else\>:\<ElseIf\>:\<end\s\+\<if\>,' .
\ s:notend . '\<Select\s\+\<Case\>:\<Case\>:\<Case\s\+\<Else\>:\<End\s\+\<Select\>,' .
\ '^\s*\<Sub\>:\<End\s\+\<Sub\>,' .
\ '^\s*\<Function\>:\<End\s\+\<Function\>,' .
\ '\<Class\>:\<End\s\+\<Class\>,' .
\ '^\s*\<Do\>:\<Loop\>,' .
\ '^\s*\<For\>:\<Next\>,' .
\ '\<While\>:\<Wend\>,' .
\ s:notend . '\<if\>\%(.\{-}then\s\+\w\)\@!:\<elseif\>:^\s*\<else\>:\<end\s\+\<if\>,' .
\ s:notend . '\<select\s\+case\>:\<case\>:\<case\s\+else\>:\<end\s\+select\>,' .
\ '^\s*\<sub\>:\<end\s\+sub\>,' .
\ '^\s*\<function\>:\<end\s\+function\>,' .
\ '\<class\>:\<end\s\+class\>,' .
\ '^\s*\<do\>:\<loop\>,' .
\ '^\s*\<for\>:\<next\>,' .
\ '\<while\>:\<wend\>,' .
\ s:match_words
endif
@ -52,7 +53,7 @@ if has("gui_win32")
let b:browsefilter="ASP Files (*.asp)\t*.asp\n" . s:browsefilter
endif
let b:undo_ftplugin = "unlet! b:match_words b:browsefilter | " . s:undo_ftplugin
let b:undo_ftplugin = "unlet! b:match_words b:match_ignorecase b:browsefilter | " . s:undo_ftplugin
" Restore the saved compatibility options.
let &cpo = s:save_cpo

Binary file not shown.

After

Width:  |  Height:  |  Size: 454 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 425 B

9314
runtime/kde-tips Normal file

File diff suppressed because it is too large Load Diff

BIN
runtime/kvim32x32.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

BIN
runtime/kvim48x48.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

BIN
runtime/kvim64x64.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

View File

@ -193,7 +193,7 @@ inoremenu <script> <silent> 20.400 &Edit.&Select\ All<Tab>ggVG <C-O>:call <SID>S
cnoremenu <script> <silent> 20.400 &Edit.&Select\ All<Tab>ggVG <C-U>call <SID>SelectAll()<CR>
an 20.405 &Edit.-SEP2- <Nop>
if has("win32") || has("win16") || has("gui_gtk") || has("gui_motif")
if has("win32") || has("win16") || has("gui_gtk") || has("gui_kde") || has("gui_motif")
an 20.410 &Edit.&Find\.\.\. :promptfind<CR>
vunmenu &Edit.&Find\.\.\.
vnoremenu &Edit.&Find\.\.\. y:promptfind <C-R>"<CR>
@ -382,7 +382,7 @@ if has("keymap")
endif
unlet s:n
endif
if has("win32") || has("win16") || has("gui_gtk") || has("gui_photon")
if has("win32") || has("win16") || has("gui_gtk") || has("gui_kde") || has("gui_photon")
an 20.470 &Edit.Select\ Fo&nt\.\.\. :set guifont=*<CR>
endif

View File

@ -0,0 +1,26 @@
" NetrwFileHandlers: contains various extension-based file handlers for
" netrw's browser
" Author: Charles E. Campbell, Jr.
" Date: Jun 25, 2004
" Version: 1
" ---------------------------------------------------------------------
" NetrwFileHandler_html: handles html
fun! NetrwFileHandler_html(webpage)
" call Dfunc("NetrwFileHandler_html(".a:webpage.")")
let host= substitute(a:webpage,'^\w\+://\%(\w*@\)\=\(\w\+\)/.*$','\1','e')
" call Decho("host<".host.">")
if host == hostname() || host == substitute(hostname(),'\..*$','','e')
let page= substitute(a:webpage,'^\w\+://\%(\w*@\)\=\(\w\+\)/','file://\1/'.expand("$HOME").'/','e')
else
let page= substitute(a:webpage,'^\w\+://\%(\w*@\)\=\(\w\+\)/','http://\1/','e')
endif
" call Decho("executing !mozilla ".page)
exe "!mozilla ".page
" call Dret("NetrwFileHandler_html")
endfun
" ---------------------------------------------------------------------

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,7 @@
" Language : Netrw Remote-Directory Listing Syntax
" Maintainer : Charles E. Campbell, Jr.
" Last change: Jun 10, 2004
" Version : 1
" Last change: Jun 25, 2004
" Version : 2
" Syntax Clearing: {{{1
if version < 600
@ -11,17 +11,24 @@ elseif exists("b:current_syntax")
endif
" Directory List Syntax Highlighting: {{{1
syn match netrwDir "^.*/$" contains=netrwSpecial
syn match netrwSpecial "[*=@|/]$"
syn match netrwSlash contained "/"
syn match netrwComment '".*$'
syn match netrwDir "^.*/$" contains=netrwClassify
syn match netrwClassify "[*=|@/]$"
syn match netrwSlash contained "/"
syn match netrwSymLink "^.*@$" contains=netrwClassify
syn match netrwComment '".*$' contains=netrwHide
syn match netrwHide '^"\s*Hiding:' skipwhite nextgroup=netrwHidePat
syn match netrwHidePat contained "[^,]\+" skipwhite nextgroup=netrwHideSep
syn match netrwHideSep contained transparent "," skipwhite nextgroup=netrwHidePat
" Highlighting Links: {{{1
if !exists("did_drchip_dbg_syntax")
let did_drchip_netrwlist_syntax= 1
hi link netrwClassify Function
hi link netrwComment Comment
hi link netrwHide netrwComment
hi link netrwHidePat String
hi link netrwDir Directory
hi link netrwSpecial Function
hi link netrwSymLink Special
endif
" Current Syntax: {{{1

File diff suppressed because it is too large Load Diff

View File

@ -88,7 +88,7 @@ that "make shadow" creates won't work.]
Unix: COMPILING WITH/WITHOUT GUI
These configure arguments can be used to select which GUI to use:
--enable-gui= gtk, motif, athena or auto
--enable-gui= gtk, kde, motif, athena or auto
--disable-gtk-check
--disable-motif-check
--disable-athena-check
@ -98,19 +98,19 @@ the order of GTK, Motif, then Athena). If one is found, then is uses it and
does not proceed to check any of the remaining ones. Otherwise, it moves on
to the next one.
--enable-{gtk,motif,athena}-check all default to "yes", such that if
--enable-{gtk,kde,motif,athena}-check all default to "yes", such that if
--enable-gui is "auto" (which it is by default), GTK, Motif, and Athena will
be checked for. If you want to *exclude* a certain check, then you use
--disable-{gtk,motif,athena}-check.
--disable-{gtk,kde,motif,athena}-check.
For example, if --enable-gui is set to "auto", but you don't want it look for
Motif, you then also specify --disable-motif-check. This results in only
checking for GTK and Athena.
Lastly, if you know which one you want to use, then you can just do
--enable-gui={gtk,motif,athena}. So if you wanted to only use Motif, then
--enable-gui={gtk,kde,motif,athena}. So if you wanted to only use Motif, then
you'd specify --enable-gui=motif. Once you specify what you want, the
--enable-{gtk,motif,athena}-check options are ignored.
--enable-{gtk,kde,motif,athena}-check options are ignored.
For compiling with the GTK+ GUI, you need a recent version of glib and gtk+.
Configure checks for at least version 1.1.16, but below 2.0. An older versions
@ -124,6 +124,9 @@ do not, you may have left-over header files and/or library files from an older
auto/config.log for any error messages that may give you a hint as to what's
happening.
For KDE see INSTALLkde.txt.
Unix: COMPILING WITH MULTI-BYTE
When you want to compile with the multi-byte features enabled, make sure you

101
src/INSTALLkde.txt Normal file
View File

@ -0,0 +1,101 @@
Vim with KDE: kvim
ON THE INTERNET
===============
The homepage is http://www.freehackers.org/kvim/
The core is build around the official vim-6.x releases and patches
KVim CVS is full and does not need extra package. Just download and compile it.
INSTALL :
=========
We now use Vim's configure to configure, compile and install KVim.
Don't forget, that you need to have QT and KDE headers and tools installed, otherwise it won't
work ! (these can commonly be found in kde-devel/qt-devel packages)
Enter the 'src' directory and configure it your way (you need to add at least these flags to the configure command line : --enable-gui=kde --with-qt-dir=$QTDIR ) then make and make install as root.
We added to configure some options for KDE / QT detection, it will for example, find whether you use KDE 2.x or KDE 3.x automatically. For now, QT is _not_ autodetected. I hope to fix this soon.
From KVim 6.1, you can now use a KDE toolbar instead of Vim's Toolbar, to enable it, use the --enable-kde-toolbar configure flag.
=> If it fails : (yes it still can, the configure script i wrote is still experimental and probably not
perfect ;p)
or 'how to make a bug report' :
In some cases, I can imagine it will fail, if this happens then send to marchand@kde.org :
->auto/config.mk (important one)
->your configure command line with your options
->your paths : where KDE is (which version ?), where QT is (version ?), and find where your
libs are (your kdelibs, your QT libs and QT headers)
->the output of 'kde-config --version'
->your OS / Linux Distribution version
->in case of a compilation error : the full error output.
->the compiler used (gcc 2.95, 2.96, 3.1 ...)
->any stuff you think could be usefull to me :)
Thanks for giving KVim a try, we hope you'll enjoy it !
DEVELOPMENT STATE AND KNOWN BUGS:
=================================
Most Vim GUI features are now implemented, only multibyte support is incomplete.
We are working on this and this is our primary goal after KVim 6.1 release.
We hope to get it to work before we include KVim into the core Vim which we want to
do before the end of the year 2002 if possible.
We would be happy to hear from you if you've tried kvim. Tell us
what is missing, what you like and don't like, and what you want.
As people have wished it for a while, Philippe developped a component for Vim.
The component is now fully usable with GVim and KVim and can be found on KDE's CVS
in the kdeextragear-1 module.
SOURCE ACCESS:
==============
Releases and maybe snapshots are/will be found on http://freehackers.org/kvim/
The CVS is CVSROOT=:pserver:anonymous@cvs.tuxfamily.org:/cvsroot/kvim
(with no password)
You'll find there a full vim 6.x package (with runtime files included).
MAILING LIST:
=============
As we released KVim 6.0, we created a public mailing list, for feedback,
user help and development related discussions : "kvim-dev@freenux.org",
to subscribe send a mail to "kvim-dev-subscribe@freenux.org" with
"subscribe" as the subject and just reply to the mail you will receive.
(sorry the admin messages are in french, but the list discussions are in
english)
THANKS :
========
To all the guys on #kde@opn (Neil, Malte and many other) and to all the people who
tried, debugged, compiled and recompiled again KVim to bring now a much more robust KVim
and of course to all of you who send patchs and comments :)
And of course to Vim Authors :)
CURRENT MAINTAINER:
===================
Mickael Marchand <marchand@kde.org>
DEVELOPERS (CVS accounts):
==========
Mickael Marchand <marchand@kde.org> (marchand)
Mark Westcott <mark@houseoffish.org> Qtopia GUI (mark)
Thomas Capricelli <orzel@kde.org> Initial KVim author (orzel)
Philippe Fremy <pfremy@chez.com> Initial KVim author (pfremy)
AUTHORS
=========
Thomas Capricelli <orzel@kde.org> Initial KVim author
Philippe Fremy <pfremy@chez.com> Initial KVim author
CONTRIBUTORS
============
David Spencer Tyree <celer@scrypt.net>
Vince Negri <vince@bulbous.freeserve.co.uk> AntiAliasing support
Kailash Sethuraman (hsaliak, #netbsd@opn) NetBSD configuration/compilation fixes
Some other, see the About KVim dialog box in KVim...

View File

@ -336,6 +336,7 @@ CClink = $(CC)
# use it (e.g., want a GTK-only version), then use --enable-gui=gtk.
#
# If the selected GUI isn't found, the GUI is disabled automatically
#CONF_OPT_GUI = --enable-gui=kde
#CONF_OPT_GUI = --enable-gui=gtk
#CONF_OPT_GUI = --enable-gui=gtk --disable-gtktest
#CONF_OPT_GUI = --enable-gui=gtk2
@ -1041,6 +1042,35 @@ LINKIT = @echo >/dev/null
# Without a GUI install the normal way.
NONE_INSTALL = install_normal
### KDE GUI interface.
KDE_DIR = $(KDE_PREFIX)
KDE_INCL = gui.h
KDE_SRC = gui.c pty.c gui_kde.cc gui_kde_x11.cc gui_kde_widget.cc gui_kde_widget_moc.cc kvim_iface_skel.cc
KDE_OBJ = objects/gui.o objects/pty.o objects/gui_kde.o objects/gui_kde_x11.o \
objects/gui_kde_widget.o objects/gui_kde_widget_moc.o \
objects/kvim_iface_skel.o
KDE_DEFS = -DFEAT_GUI_KDE $(NARROW_PROTO)
KDE_IPATH = $(GUI_INC_LOC)
KDE_LIBS_DIR = $(GUI_LIB_LOC)
KDE_LIBS1 =
KDE_LIBS2 = $(KDE_LIBNAME)
KDE_INSTALL = install_normal
KDE_TARGETS = installklinks installkdeicons
KDE_MAN_TARGETS =
KDE_TESTTARGET = gui
#for KDE rename files to avoid confusion with gvim for GTK
KVIMNAME = k$(VIMNAME)
KVIMTARGET = $(KVIMNAME)$(LNKEXT)
KVIEWNAME = k$(VIEWNAME)
KVIEWTARGET = $(KVIEWNAME)$(LNKEXT)
RKVIMNAME = r$(KVIMNAME)
RKVIMTARGET = $(RKVIMNAME)$(LNKEXT)
RKVIEWNAME = r$(KVIEWNAME)
RKVIEWTARGET = $(RKVIEWNAME)$(LNKEXT)
KVIMDIFFNAME = k$(VIMDIFFNAME)
KVIMDIFFTARGET = $(KVIMDIFFNAME)$(LNKEXT)
### GTK GUI
GTK_SRC = gui.c gui_gtk.c gui_gtk_x11.c pty.c gui_gtk_f.c \
gui_beval.c
@ -1170,8 +1200,8 @@ CARBONGUI_MAN_TARGETS =
CARBONGUI_TESTTARGET =
# All GUI files
ALL_GUI_SRC = gui.c gui_gtk.c gui_gtk_f.c gui_motif.c gui_athena.c gui_gtk_x11.c gui_x11.c gui_at_sb.c gui_at_fs.c pty.c
ALL_GUI_PRO = gui.pro gui_gtk.pro gui_motif.pro gui_athena.pro gui_gtk_x11.pro gui_x11.pro gui_w16.pro gui_w32.pro gui_amiga.pro gui_photon.pro
ALL_GUI_SRC = gui.c gui_gtk.c gui_gtk_f.c gui_motif.c gui_athena.c gui_gtk_x11.c gui_x11.c gui_at_sb.c gui_at_fs.c pty.c gui_kde.cc gui_kde_widget.cc gui_kde_x11.cc gui_kde_widget_moc.cc
ALL_GUI_PRO = gui.pro gui_gtk.pro gui_motif.pro gui_athena.pro gui_gtk_x11.pro gui_x11.pro gui_w16.pro gui_w32.pro gui_amiga.pro gui_photon.pro gui_kde.pro gui_kde_x11.pro
# }}}
@ -1307,7 +1337,7 @@ BASIC_SRC = \
SRC = $(BASIC_SRC) $(GUI_SRC) $(HANGULIN_SRC) $(PERL_SRC) $(PYTHON_SRC) \
$(TCL_SRC) $(RUBY_SRC) $(SNIFF_SRC) $(WORKSHOP_SRC) $(WSDEBUG_SRC)
TAGS_SRC = *.c *.cpp if_perl.xs
TAGS_SRC = *.c *.cpp *.cc if_perl.xs
EXTRA_SRC = hangulin.c auto/if_perl.c if_perlsfio.c if_python.c if_tcl.c \
if_ruby.c if_sniff.c gui_beval.c \
@ -1800,6 +1830,23 @@ install-languages: languages $(DEST_LANG) $(DEST_KMAP)
fi
# install the icons for KDE, if the directory exists and the icon doesn't.
# doesn't.<=looks strange to install icons to user's directory ;), i add my
# own install procedure, mikmak
installkdeicons:
mkdir -p $(DESTDIR)$(KDE_DIR)/share/applnk/Editors/
mkdir -p $(DESTDIR)$(KDE_DIR)/share/icons/hicolor/32x32/apps/
mkdir -p $(DESTDIR)$(KDE_DIR)/share/icons/hicolor/48x48/apps/
mkdir -p $(DESTDIR)$(KDE_DIR)/share/icons/hicolor/22x22/actions/
mkdir -p $(DESTDIR)$(KDE_DIR)/share/icons/hicolor/16x16/actions/
mkdir -p $(DESTDIR)$(KDE_DIR)/share/apps/kvim
cp ../runtime/KVim.desktop $(DESTDIR)$(KDE_DIR)/share/applnk/Editors/ && chmod 644 $(DESTDIR)$(KDE_DIR)/share/applnk/Editors/KVim.desktop
cp ../runtime/kvim32x32.png $(DESTDIR)$(KDE_DIR)/share/icons/hicolor/32x32/apps/kvim.png && chmod 644 $(DESTDIR)$(KDE_DIR)/share/icons/hicolor/32x32/apps/kvim.png
cp ../runtime/kvim48x48.png $(DESTDIR)$(KDE_DIR)/share/icons/hicolor/48x48/apps/kvim.png && chmod 644 $(DESTDIR)$(KDE_DIR)/share/icons/hicolor/48x48/apps/kvim.png
cp ../runtime/hi16-action-make.png $(DESTDIR)$(KDE_DIR)/share/icons/hicolor/16x16/actions/hi16-action-make.png
cp ../runtime/hi22-action-make.png $(DESTDIR)$(KDE_DIR)/share/icons/hicolor/22x22/actions/hi22-action-make.png
cp ../runtime/kde-tips $(DESTDIR)$(KDE_DIR)/share/apps/kvim/tips && chmod 644 $(DESTDIR)$(KDE_DIR)/share/apps/kvim/tips
ICON48PATH = $(DESTDIR)$(DATADIR)/icons/hicolor/48x48/apps
ICON32PATH = $(DESTDIR)$(DATADIR)/icons/locolor/32x32/apps
ICON16PATH = $(DESTDIR)$(DATADIR)/icons/locolor/16x16/apps
@ -1848,8 +1895,17 @@ installglinks: $(DEST_BIN)/$(GVIMTARGET) \
$(DEST_BIN)/$(EVIEWTARGET) \
$(INSTALLGVIMDIFF)
installklinks: $(DEST_BIN)/$(KVIMTARGET) \
$(DEST_BIN)/$(KVIEWTARGET) \
$(DEST_BIN)/$(RKVIMTARGET) \
$(DEST_BIN)/$(RKVIEWTARGET) \
$(DEST_BIN)/$(EVIMTARGET) \
$(DEST_BIN)/$(EVIEWTARGET) \
installkvimdiff
installvimdiff: $(DEST_BIN)/$(VIMDIFFTARGET)
installgvimdiff: $(DEST_BIN)/$(GVIMDIFFTARGET)
installkvimdiff: $(DEST_BIN)/$(KVIMDIFFTARGET)
$(DEST_BIN)/$(EXTARGET):
cd $(DEST_BIN); ln -s $(VIMTARGET) $(EXTARGET)
@ -1863,6 +1919,12 @@ $(DEST_BIN)/$(GVIMTARGET):
$(DEST_BIN)/$(GVIEWTARGET):
cd $(DEST_BIN); ln -s $(VIMTARGET) $(GVIEWTARGET)
$(DEST_BIN)/$(KVIMTARGET):
cd $(DEST_BIN); ln -s $(VIMTARGET) $(KVIMTARGET)
$(DEST_BIN)/$(KVIEWTARGET):
cd $(DEST_BIN); ln -s $(VIMTARGET) $(KVIEWTARGET)
$(DEST_BIN)/$(RVIMTARGET):
cd $(DEST_BIN); ln -s $(VIMTARGET) $(RVIMTARGET)
@ -1875,12 +1937,21 @@ $(DEST_BIN)/$(RGVIMTARGET):
$(DEST_BIN)/$(RGVIEWTARGET):
cd $(DEST_BIN); ln -s $(VIMTARGET) $(RGVIEWTARGET)
$(DEST_BIN)/$(RKVIMTARGET):
cd $(DEST_BIN); ln -s $(VIMTARGET) $(RKVIMTARGET)
$(DEST_BIN)/$(RKVIEWTARGET):
cd $(DEST_BIN); ln -s $(VIMTARGET) $(RKVIEWTARGET)
$(DEST_BIN)/$(VIMDIFFTARGET):
cd $(DEST_BIN); ln -s $(VIMTARGET) $(VIMDIFFTARGET)
$(DEST_BIN)/$(GVIMDIFFTARGET):
cd $(DEST_BIN); ln -s $(VIMTARGET) $(GVIMDIFFTARGET)
$(DEST_BIN)/$(KVIMDIFFTARGET):
cd $(DEST_BIN); ln -s $(VIMTARGET) $(KVIMDIFFTARGET)
$(DEST_BIN)/$(EVIMTARGET):
cd $(DEST_BIN); ln -s $(VIMTARGET) $(EVIMTARGET)
@ -1895,7 +1966,7 @@ installhelplinks: $(GUI_MAN_TARGETS) \
$(DEST_MAN)/$(RVIMNAME).1 \
$(DEST_MAN)/$(RVIEWNAME).1
installghelplinks: $(DEST_MAN)/$(GVIMNAME).1 \
installghelplinks installkhelplinks : $(DEST_MAN)/$(GVIMNAME).1 \
$(DEST_MAN)/$(GVIEWNAME).1 \
$(DEST_MAN)/$(RGVIMNAME).1 \
$(DEST_MAN)/$(RGVIEWNAME).1 \
@ -1939,9 +2010,12 @@ uninstall: uninstall_runtime
-rm -f $(DEST_BIN)/xxd$(EXEEXT) $(DEST_MAN)/xxd.1
-rm -f $(DEST_BIN)/$(EXTARGET) $(DEST_BIN)/$(VIEWTARGET)
-rm -f $(DEST_BIN)/$(GVIMTARGET) $(DEST_BIN)/$(GVIEWTARGET)
-rm -f $(DEST_BIN)/$(KVIMTARGET) $(DEST_BIN)/$(KVIEWTARGET)
-rm -f $(DEST_BIN)/$(RVIMTARGET) $(DEST_BIN)/$(RVIEWTARGET)
-rm -f $(DEST_BIN)/$(RGVIMTARGET) $(DEST_BIN)/$(RGVIEWTARGET)
-rm -f $(DEST_BIN)/$(RKVIMTARGET) $(DEST_BIN)/$(RKVIEWTARGET)
-rm -f $(DEST_BIN)/$(VIMDIFFTARGET) $(DEST_BIN)/$(GVIMDIFFTARGET)
-rm -f $(DEST_BIN)/$(VIMDIFFTARGET) $(DEST_BIN)/$(KVIMDIFFTARGET)
-rm -f $(DEST_BIN)/$(EVIMTARGET) $(DEST_BIN)/$(EVIEWTARGET)
-rm -f $(DEST_MAN)/$(EXNAME).1 $(DEST_MAN)/$(VIEWNAME).1
-rm -f $(DEST_MAN)/$(GVIMNAME).1 $(DEST_MAN)/$(GVIEWNAME).1
@ -1984,6 +2058,7 @@ clean celan: testclean
-rm -f *.o objects/* core $(VIMTARGET).core $(VIMTARGET) xxd/*.o
-rm -f $(TOOLS) auto/osdef.h auto/pathdef.c auto/if_perl.c
-rm -f conftest* *~ auto/link.sed
-rm -f gui_kde_widget_moc.cc kvim_iface_skel.cc *.kidl
if test -d $(PODIR); then \
cd $(PODIR); $(MAKE) prefix=$(DESTDIR)$(prefix) clean; \
fi
@ -2326,6 +2401,24 @@ objects/workshop.o: workshop.c
objects/wsdebug.o: wsdebug.c
$(CCC) -o $@ wsdebug.c
objects/gui_kde.o: gui_kde.cc
$(CCC) -o $@ gui_kde.cc
objects/gui_kde_x11.o: gui_kde_x11.cc
$(CCC) -o $@ gui_kde_x11.cc
objects/gui_kde_widget.o: gui_kde_widget.cc
$(MOC) -o gui_kde_widget_moc.cc gui_kde_widget.h
$(KDE_DIR)/bin/dcopidl kvim_iface.h > kvim_iface.kidl || ( rm -f kvim_iface.kidl ; /bin/false )
$(KDE_DIR)/bin/dcopidl2cpp --c++-suffix cc --no-stub kvim_iface.kidl
$(CCC) -o $@ gui_kde_widget.cc
objects/gui_kde_widget_moc.o: gui_kde_widget_moc.cc
$(CCC) -o $@ gui_kde_widget_moc.cc
objects/kvim_iface_skel.o: kvim_iface_skel.cc
$(CCC) -o $@ kvim_iface_skel.cc
objects/netbeans.o: netbeans.c
$(CCC) -o $@ netbeans.c
@ -2637,6 +2730,24 @@ objects/pty.o: pty.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
ascii.h keymap.h term.h macros.h structs.h regexp.h gui.h gui_beval.h \
proto/gui_beval.pro option.h ex_cmds.h proto.h globals.h farsi.h \
arabic.h
objects/gui_kde.o: gui_kde.cc gui_kde_widget.h kvim_iface.h vim.h \
auto/config.h feature.h os_unix.h auto/osdef.h ascii.h keymap.h \
term.h macros.h structs.h regexp.h gui.h option.h ex_cmds.h proto.h \
globals.h farsi.h
objects/gui_kde_widget.o: gui_kde_widget.cc gui_kde_widget.h kvim_iface.h \
vim.h auto/config.h feature.h os_unix.h auto/osdef.h ascii.h keymap.h \
term.h macros.h structs.h regexp.h gui.h option.h ex_cmds.h proto.h \
globals.h farsi.h proto/../../pixmaps/alert.xpm proto/../../pixmaps/error.xpm \
proto/../../pixmaps/generic.xpm proto/../../pixmaps/info.xpm \
proto/../../pixmaps/quest.xpm
objects/gui_kde_x11.o: gui_kde_x11.cc gui_kde_widget.h kvim_iface.h vim.h \
auto/config.h feature.h os_unix.h auto/osdef.h ascii.h keymap.h \
term.h macros.h structs.h regexp.h gui.h option.h ex_cmds.h proto.h \
globals.h farsi.h version.h ../runtime/vim32x32.xpm
objects/gui_kde_widget_moc.o: gui_kde_widget_moc.cc gui_kde_widget.h \
kvim_iface.h vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
ascii.h keymap.h term.h macros.h structs.h regexp.h gui.h option.h \
ex_cmds.h proto.h globals.h
objects/hangulin.o: hangulin.c vim.h auto/config.h feature.h os_unix.h \
auto/osdef.h ascii.h keymap.h term.h macros.h structs.h regexp.h \
gui.h gui_beval.h proto/gui_beval.pro option.h ex_cmds.h proto.h \

1327
src/auto/configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -312,6 +312,9 @@
/* Define if you use GTK and want GNOME support. */
#undef FEAT_GUI_GNOME
/* Define if you use KDE and want KDE Toolbar support. */
#undef FEAT_KDETOOLBAR
/* Define if GTK+ 2 is available. */
#undef HAVE_GTK2

View File

@ -124,6 +124,8 @@ NARROW_PROTO = @NARROW_PROTO@
GUI_X_LIBS = @GUI_X_LIBS@
MOTIF_LIBNAME = @MOTIF_LIBNAME@
GTK_LIBNAME = @GTK_LIBNAME@
KDE_PREFIX = @KDE_PREFIX@
MOC = @MOC@
### Any OS dependent extra source and object file
OS_EXTRA_SRC = @OS_EXTRA_SRC@

View File

@ -982,7 +982,7 @@ test "x$with_x" = xno -a "x$BEOS" != "xyes" -a "x$MACOSX" != "xyes" -a "x$QNX" !
AC_MSG_CHECKING(--enable-gui argument)
AC_ARG_ENABLE(gui,
[ --enable-gui[=OPTS] X11 GUI [default=auto] [OPTS=auto/no/gtk/gtk2/gnome/gnome2/motif/athena/neXtaw/beos/photon/carbon]], , enable_gui="auto")
[ --enable-gui[=OPTS] X11 GUI [default=auto] [OPTS=auto/no/gtk/gtk2/gnome/gnome2/kde/motif/athena/neXtaw/beos/photon/carbon]], , enable_gui="auto")
dnl Canonicalize the --enable-gui= argument so that it can be easily compared.
dnl Do not use character classes for portability with old tools.
@ -1039,7 +1039,6 @@ elif test "x$MACOSX" = "xyes" -a "x$with_x" = "xno" ; then
else
case "$enable_gui_canon" in
no|none) AC_MSG_RESULT(no GUI support) ;;
yes|""|auto) AC_MSG_RESULT(yes/auto - automatic GUI support)
@ -1050,6 +1049,8 @@ else
SKIP_ATHENA=
SKIP_NEXTAW=
SKIP_CARBON=;;
kde|Kde|KDE) AC_MSG_RESULT(KDE 2.x or 3.x GUI support)
SKIP_KDE=;;
gtk) AC_MSG_RESULT(GTK+ 1.x GUI support)
SKIP_GTK=;;
gtk2) AC_MSG_RESULT(GTK+ 2.x GUI support)
@ -1073,6 +1074,17 @@ else
fi
if test "x$SKIP_KDE" != "xYES" -a "$enable_gui_canon" != "kde"; then
AC_MSG_CHECKING(whether or not to look for KDE)
AC_ARG_ENABLE(kde-check,
[ --enable-kde-check If auto-select GUI, check for KDE [default=no]],
,enable_kde_check="no")
AC_MSG_RESULT($enable_kde_check);
if test "x$enable_kde_check" = "xno"; then
SKIP_KDE=YES
fi
fi
if test "x$SKIP_GTK" != "xYES" -a "$enable_gui_canon" != "gtk" -a "$enable_gui_canon" != "gtk2"; then
AC_MSG_CHECKING(whether or not to look for GTK)
AC_ARG_ENABLE(gtk-check,
@ -1153,6 +1165,247 @@ if test "x$SKIP_CARBON" != "xYES" -a "$enable_gui_canon" != "carbon"; then
fi
fi
dnl ---------------------------------------------------------------------------
dnl we use the kde-config script included in KDE since 2.x to check which
dnl version of KDE, we'll use. We'll use additional args in configure to
dnl obtain the QT directory (includes and libs) as qt does not give any
dnl config script ! (shame on the trolls ! ;p)
dnl ---------------------------------------------------------------------------
if test -z "$SKIP_KDE"; then
dnl ------------------
dnl now, take care of QT
dnl -----------------
AC_ARG_WITH(qt-dir,
[ --with-qt-dir=DIR Specify prefix of QT files],
[
ROOTQT="$withval"
MOC="$withval"/bin/moc
QT_INCLUDES="$withval"/include
QT_LIBS="$withval"/lib
])
if test "x$ROOTQT" = "x"; then
if test -z "$QTDIR"; then
dnl Find the Qt directory by looking for the "moc" program.
dnl It's better than nothing.
AC_PATH_PROG(MOC, moc, no)
if text"x$MOC" = "x"; then
AC_MSG_ERROR(could not find Qt directory)
else
ROOTQT=`echo $MOC | sed 's+/bin/moc++'`
fi
else
ROOTQT="$QTDIR"
fi
fi
MOC="$ROOTQT"/bin/moc
QT_INCLUDES="$ROOTQT"/include
QT_LIBS="$ROOTQT"/lib
AC_ARG_WITH(qt-includes,
[ --with-qt-includes=DIR Specify location of Qt headers],
[QT_INCLUDES="$withval"]
)
AC_ARG_WITH(qt-libraries,
[ --with-qt-libs=DIR Specify location of Qt libraries],
[QT_LIBS="$withval"]
)
if test "x$QT_LIBS" = "x" ; then
QT_LIBS="$ROOTQT"/lib
fi
if test "x$QT_INCLUDES" = "x" ; then
QT_INCLUDES="$ROOTQT"/include
fi
dnl we should get QT's version from here and compare with what kde-config
dnl says
AC_MSG_CHECKING(whether or not to use a KDE Toolbar in KVim)
AC_ARG_ENABLE(kde-toolbar,
[ --enable-kde-toolbar if KDE GUI is selected, enable a KDE-look toolbar [default=no]],
, enable_kde_toolbar="no")
if test "x$enable_kde_toolbar" != "xno"; then
AC_DEFINE(FEAT_KDETOOLBAR)
fi
AC_MSG_RESULT($enable_kde_toolbar);
fi
dnl -------------------
dnl so, first, look up at the kde-config script
dnl ------------------
if test -z "$SKIP_KDE"; then
AC_DEFUN(AM_PATH_KDE,
[
if test "X$KDE_CONFIG" != "X"; then
min_kde_version=ifelse([$1], ,2.0,[$1])
AC_MSG_CHECKING(for KDE version >= $min_kde_version)
no_kde=""
if test "$KDE_CONFIG" = "no" ; then
no_kde=yes
else
KDE_PREFIX=`$KDE_CONFIG $kde_config_args --prefix`
if test "x$KDE_LIBS" = "x"; then
KDE_LIBS="$KDE_PREFIX/lib"
fi
if test "x$KDE_INCLUDES" = "x"; then
KDE_INCLUDES="$KDE_PREFIX/include"
fi
kde_major_version=`$KDE_CONFIG --version | grep KDE | \
sed 's/KDE:\ //' | sed 's/\([[0-9]]*\).\([[0-9]]*.*\)/\1/'`
kde_minor_version=`$KDE_CONFIG --version | grep KDE | \
sed 's/KDE:\ //' | sed 's/\([[0-9]]*\).\([[0-9]]*.*\)/\2/'`
qt_major_version=`$KDE_CONFIG --version | grep Qt | sed -e \
's/Qt:\ //' | sed 's/\([[0-9]]*\).\([[0-9]]*.*\)/\1/'`
qt_minor_version=`$KDE_CONFIG --version | grep Qt | sed -e \
's/Qt:\ //' | sed 's/\([[0-9]]*\).\([[0-9]]*.*\)/\2/'`
dnl maybe in a near future we'll get these ones : QT_PREFIX, QT_LIBS,
dnl QT_INCLUDES
dnl but for now we need configure options to get them ...
if test "x$enable-kdetest" = "xyes" ; then
ac_save_LIBS="$LIBS"
LIBS="$LIBS $KDE_LIBS"
dnl fake test
AC_TRY_RUN([
#include <stdio.h>
int
main()
{ return 0; }
],, no_kde=yes,[echo $ac_n "cross compiling KDE ? ? how can i remove that ? :)"])
LIBS="$ac_save_LIBS"
fi
fi
if test "x$no_kde" = x ; then
AC_MSG_RESULT(found KDE $kde_major_version.$kde_minor_version)
ifelse([$2], , :, [$2])
else
AC_MSG_RESULT(no)
KDE_LIBS=""
ifelse([$3], , :, [$3])
fi
else
AC_MSG_RESULT(no)
KDE_LIBS=""
ifelse([$3], , :, [$3])
fi
AC_SUBST(KDE_LIBS)
AC_SUBST(KDE_INCLUDES)
AC_SUBST(KDE_PREFIX)
])
dnl Check all the KDE stuff
AC_MSG_CHECKING(--disable-rpath argument)
AC_ARG_ENABLE(rpath,
[ --disable-rpath Disable rpath.],
, enable_rpath="yes")
if test "$enable_rpath" = "yes"; then
AC_MSG_RESULT(no)
else
AC_MSG_RESULT(yes)
fi
AC_MSG_CHECKING(--with-kde-prefix argument)
AC_ARG_WITH(kde-prefix,[ --with-kde-prefix=PFX Prefix where KDE is installed (optional)],kde_config_prefix="$withval";
AC_MSG_RESULT($kde_config_prefix), kde_config_prefix="";AC_MSG_RESULT(no))
AC_ARG_WITH(kde-includes,
[ --with-kde-includes=DIR Specify location of KDE headers],
[KDE_INCLUDES="$withval"]
)
AC_ARG_WITH(kde-libraries,
[ --with-kde-libs=DIR Specify location of KDE libraries],
[KDE_LIBS="$withval"]
)
AC_MSG_CHECKING(--disable-kdetest argument)
AC_ARG_ENABLE(kdetest,
[ --disable-kdetest Do not try to compile and run a test KDE program],
enable_kdetest=yes)
if test "x$enable_kdetest" = "xyes" ; then
AC_MSG_RESULT(kde test enabled)
else
AC_MSG_RESULT(kde test disabled)
fi
if test "x$kde_config_prefix" != "x" ; then
kde_config_args=""
KDE_CONFIG=$kde_config_prefix/bin/kde-config
fi
if test "X$KDE_CONFIG" = "X"; then
AC_PATH_PROG(KDE_CONFIG, kde-config, no)
else
AC_MSG_RESULT(Using KDE configuration program $KDE_CONFIG)
fi
if test "X$KDE_CONFIG" != "X" ; then
AM_PATH_KDE(2.0.0,
[GUI_LIB_LOC="-L$KDE_LIBS -lkdeui -lkdecore -lDCOP"
GUI_INC_LOC="-I$KDE_INCLUDES"
KDEDIR="$KDE_PREFIX"], )
if test "x$KDE_PREFIX" != "x"; then
AC_MSG_CHECKING(for QT version $qt_major_version.x)
if test "x$ROOTQT" != "x" ; then
GUI_INC_LOC="-I$QT_INCLUDES $GUI_INC_LOC"
if test $qt_major_version -lt 2; then
AC_MSG_ERROR(Your QT version is prior to 2.0; KDE 2.x and 3.x require at least QT 2)
fi
dnl hack for FreeBSD
if test "`(uname) 2>/dev/null`" = "FreeBSD"; then
CFLAGS="$CFLAGS -D_THREAD_SAFE"
CXXFLAGS="$CXXFLAGS -D_THREAD_SAFE"
GUI_LIB_LOC="$GUI_LIB_LOC -pthread"
LIBS="$LIBS -pthread"
fi
dnl check the version
if test "x$enable_rpath" = "xyes"; then
if test $qt_major_version = 2; then
GUI_LIB_LOC="-L$KDE_LIBS -lkfile -L$QT_LIBS -lqt $GUI_LIB_LOC \
-Wl,--rpath -Wl,$KDE_LIBS -Wl,--rpath -Wl,$QT_LIBS"
else
GUI_LIB_LOC="-L$KDE_LIBS -lkio -L$QT_LIBS -lqt-mt $GUI_LIB_LOC \
-Wl,--rpath -Wl,$KDE_LIBS -Wl,--rpath -Wl,$QT_LIBS"
fi
else
if test $qt_major_version = 2; then
GUI_LIB_LOC="-L$KDE_LIBS -lkfile -L$QT_LIBS -lqt $GUI_LIB_LOC"
else
GUI_LIB_LOC="-L$KDE_LIBS -lkio -L$QT_LIBS -lqt-mt $GUI_LIB_LOC"
fi
fi
dnl Remove "-I/usr/include " from GUI_*
GUI_INC_LOC="`echo $GUI_INC_LOC\ | sed 's%-I/usr/include %%'`"
dnl GUI_LIB_LOC="`echo $GUI_LIB_LOC\ | sed 's% -L/usr/lib%%'`"
AC_MSG_RESULT(found $qt_major_version.$qt_minor_version in $ROOTQT)
SKIP_GTK=YES
SKIP_ATHENA=YES
SKIP_MOTIF=YES
GUITYPE=KDE
AC_SUBST(KDE_PREFIX)
AC_SUBST(QT_LIBS)
AC_SUBST(QT_INCLUDES)
AC_SUBST(ROOTQT)
AC_SUBST(MOC)
AC_DEFINE(FEAT_GUI_KDE)
else
AC_MSG_ERROR(Detected QT version mismatched)
fi
else
AC_MSG_ERROR(Could not find KDE installation prefix)
fi
fi
fi
if test "x$MACOSX" = "xyes" -a -z "$SKIP_CARBON" -a "x$CARBON" = "xyes"; then
AC_MSG_CHECKING(for Carbon GUI)
dnl already did this
@ -1170,7 +1423,6 @@ if test "x$MACOSX" = "xyes" -a -z "$SKIP_CARBON" -a "x$CARBON" = "xyes"; then
SKIP_CARBON=YES
fi
dnl
dnl Get the cflags and libraries from the gtk-config script
dnl

View File

@ -270,6 +270,23 @@ edit(cmdchar, startln, count)
ins_compl_clear(); /* clear stuff for CTRL-X mode */
#endif
#ifdef FEAT_AUTOCMD
/*
* Trigger InsertEnter autocommands. Do not do this for "r<CR>" or "grx".
*/
if (cmdchar != 'r' && cmdchar != 'v')
{
if (cmdchar == 'R')
ptr = (char_u *)"r";
else if (cmdchar == 'V')
ptr = (char_u *)"v";
else
ptr = (char_u *)"i";
set_vim_var_string(VV_INSERTMODE, ptr, 1);
apply_autocmds(EVENT_INSERTENTER, NULL, NULL, FALSE, curbuf);
}
#endif
#ifdef FEAT_MOUSE
/*
* When doing a paste with the middle mouse button, Insstart is set to
@ -724,6 +741,12 @@ edit(cmdchar, startln, count)
EMSG(farsi_text_3); /* encoded in Farsi */
break;
}
#endif
#ifdef FEAT_AUTOCMD
set_vim_var_string(VV_INSERTMODE,
(char_u *)((State & REPLACE_FLAG) ? "i" :
replaceState == VREPLACE ? "v" : "r"), 1);
apply_autocmds(EVENT_INSERTCHANGE, NULL, NULL, FALSE, curbuf);
#endif
if (State & REPLACE_FLAG)
State = INSERT | (State & LANGMAP);
@ -859,7 +882,14 @@ doESCkey:
o_lnum = curwin->w_cursor.lnum;
if (ins_esc(&count, cmdchar))
{
#ifdef FEAT_AUTOCMD
if (cmdchar != 'r' && cmdchar != 'v')
apply_autocmds(EVENT_INSERTLEAVE, NULL, NULL,
FALSE, curbuf);
#endif
return (c == Ctrl_O);
}
continue;
/*

View File

@ -231,6 +231,7 @@ struct vimvar
{"throwpoint", sizeof("throwpoint") - 1, NULL, VAR_STRING, VV_RO},
{"register", sizeof("register") - 1, NULL, VAR_STRING, VV_RO},
{"cmdbang", sizeof("cmdbang") - 1, NULL, VAR_NUMBER, VV_RO},
{"insertmode", sizeof("insertmode") - 1, NULL, VAR_STRING, VV_RO},
};
static int eval0 __ARGS((char_u *arg, VAR retvar, char_u **nextcmd, int evaluate));
@ -4877,6 +4878,9 @@ f_has(argvars, retvar)
#ifdef FEAT_GUI_BEOS
"gui_beos",
#endif
#ifdef FEAT_GUI_KDE
"gui_kde",
#endif
#ifdef FEAT_GUI_GTK
"gui_gtk",
# ifdef HAVE_GTK2

View File

@ -447,7 +447,13 @@ dbg_parsearg(arg)
vim_free(q);
if (p == NULL)
return FAIL;
bp->dbg_name = p;
if (*p != '*')
{
bp->dbg_name = fix_fname(p);
vim_free(p);
}
else
bp->dbg_name = p;
#ifdef MACOS_CLASSIC
if (bp->dbg_name != NULL)
slash_n_colon_adjust(bp->dbg_name);

View File

@ -197,7 +197,7 @@ static void ex_tearoff __ARGS((exarg_T *eap));
#else
# define ex_tearoff ex_ni
#endif
#if (defined(FEAT_GUI_MSWIN) || defined(FEAT_GUI_GTK)) && defined(FEAT_MENU)
#if (defined(FEAT_GUI_MSWIN) || defined(FEAT_GUI_KDE) || defined(FEAT_GUI_GTK)) && defined(FEAT_MENU)
static void ex_popup __ARGS((exarg_T *eap));
#else
# define ex_popup ex_ni
@ -205,11 +205,11 @@ static void ex_popup __ARGS((exarg_T *eap));
#ifndef FEAT_GUI_MSWIN
# define ex_simalt ex_ni
#endif
#if !defined(FEAT_GUI_MSWIN) && !defined(FEAT_GUI_GTK) && !defined(FEAT_GUI_MOTIF)
#if !defined(FEAT_GUI_MSWIN) && !defined(FEAT_GUI_GTK) && !defined(FEAT_GUI_MOTIF) && !defined(FEAT_GUI_KDE)
# define gui_mch_find_dialog ex_ni
# define gui_mch_replace_dialog ex_ni
#endif
#ifndef FEAT_GUI_GTK
#if !defined(FEAT_GUI_GTK) && !defined(FEAT_GUI_KDE)
# define ex_helpfind ex_ni
#endif
#ifndef FEAT_CSCOPE
@ -258,7 +258,7 @@ static void ex_wincmd __ARGS((exarg_T *eap));
#else
# define ex_wincmd ex_ni
#endif
#if defined(FEAT_GUI) || defined(UNIX) || defined(VMS)
#if defined(FEAT_GUI) || defined(UNIX) || defined(VMS) || defined(MSWIN)
static void ex_winpos __ARGS((exarg_T *eap));
#else
# define ex_winpos ex_ni
@ -6719,7 +6719,7 @@ ex_tearoff(eap)
}
#endif
#if (defined(FEAT_GUI_MSWIN) || defined(FEAT_GUI_GTK)) && defined(FEAT_MENU)
#if (defined(FEAT_GUI_MSWIN) || defined(FEAT_GUI_KDE) || defined(FEAT_GUI_GTK)) && defined(FEAT_MENU)
static void
ex_popup(eap)
exarg_T *eap;
@ -7108,7 +7108,7 @@ ex_wincmd(eap)
}
#endif
#if defined(FEAT_GUI) || defined(UNIX) || defined(VMS)
#if defined(FEAT_GUI) || defined(UNIX) || defined(VMS) || defined(MSWIN)
/*
* ":winpos".
*/
@ -7122,8 +7122,12 @@ ex_winpos(eap)
if (*arg == NUL)
{
# ifdef FEAT_GUI
# if defined(FEAT_GUI) || defined(MSWIN)
# ifdef FEAT_GUI
if (gui.in_use && gui_mch_get_winpos(&x, &y) != FAIL)
# else
if (mch_get_winpos(&x, &y) != FAIL)
# endif
{
sprintf((char *)IObuff, _("Window position: X %d, Y %d"), x, y);
msg(IObuff);
@ -7155,6 +7159,10 @@ ex_winpos(eap)
# ifdef HAVE_TGETENT
else
# endif
# else
# ifdef MSWIN
mch_set_winpos(x, y);
# endif
# endif
# ifdef HAVE_TGETENT
if (*T_CWP)

View File

@ -689,13 +689,16 @@
* always has it). But only if menus are enabled.
*/
#if defined(FEAT_NORMAL) && defined(FEAT_MENU) \
&& (defined(FEAT_GUI_GTK) \
&& (defined(FEAT_GUI_KDE) \
|| defined(FEAT_GUI_GTK) \
|| defined(FEAT_GUI_MSWIN) \
|| ((defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA)) \
&& defined(HAVE_XPM)) \
|| defined(FEAT_GUI_PHOTON))
# define FEAT_TOOLBAR
#endif
#if defined(FEAT_TOOLBAR) && !defined(FEAT_MENU)
# define FEAT_MENU
#endif
@ -706,7 +709,7 @@
* BROWSE_CURRBUF Open file browser in the directory of the current
* buffer, instead of the current directory.
*/
#if defined(FEAT_NORMAL) && (defined(FEAT_GUI_MSWIN) || defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA) || defined(FEAT_GUI_GTK) || defined(FEAT_GUI_PHOTON) || defined(FEAT_GUI_MAC))
#if defined(FEAT_NORMAL) && (defined(FEAT_GUI_MSWIN) || defined(FEAT_GUI_KDE) || defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA) || defined(FEAT_GUI_GTK) || defined(FEAT_GUI_PHOTON) || defined(FEAT_GUI_MAC))
# define FEAT_BROWSE
#endif
#if defined(FEAT_NORMAL) && defined(FEAT_GUI_MSWIN)
@ -724,7 +727,8 @@
|| defined(FEAT_GUI_GTK) \
|| defined(FEAT_GUI_PHOTON) \
|| defined(FEAT_GUI_MSWIN) \
|| defined(FEAT_GUI_MAC)
|| defined(FEAT_GUI_MAC) \
|| defined(FEAT_GUI_KDE)
# define FEAT_CON_DIALOG
# define FEAT_GUI_DIALOG
# else
@ -732,13 +736,13 @@
# endif
#endif
#if !defined(FEAT_GUI_DIALOG) && (defined(FEAT_GUI_MOTIF) \
|| defined(FEAT_GUI_ATHENA) || defined(FEAT_GUI_GTK))
|| defined(FEAT_GUI_ATHENA) || defined(FEAT_GUI_GTK) || defined(FEAT_GUI_KDE))
/* need a dialog to show error messages when starting from the desktop */
# define FEAT_GUI_DIALOG
#endif
#if defined(FEAT_GUI_DIALOG) && \
(defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA) \
|| defined(FEAT_GUI_GTK) || defined(FEAT_GUI_MSWIN) \
|| defined(FEAT_GUI_GTK) || defined(FEAT_GUI_KDE)|| defined(FEAT_GUI_MSWIN) \
|| defined(FEAT_GUI_PHOTON) || defined(FEAT_GUI_MAC))
# define FEAT_GUI_TEXTDIALOG
#endif
@ -931,7 +935,7 @@
* +X11 Unix only. Include code for xterm title saving and X
* clipboard. Only works if HAVE_X11 is also defined.
*/
#if defined(FEAT_NORMAL) || defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA)
#if (defined(FEAT_NORMAL) || defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA))
# define WANT_X11
#endif
@ -1057,7 +1061,7 @@
# define MCH_CURSOR_SHAPE
# endif
# if defined(FEAT_GUI_W32) || defined(FEAT_GUI_W16) || defined(FEAT_GUI_MOTIF) \
|| defined(FEAT_GUI_ATHENA) || defined(FEAT_GUI_GTK) \
|| defined(FEAT_GUI_ATHENA) || defined(FEAT_GUI_GTK) || defined(FEAT_GUI_KDE)\
|| defined(FEAT_GUI_PHOTON)
# define FEAT_MOUSESHAPE
# endif

View File

@ -6651,6 +6651,9 @@ static struct event_name
{"FocusLost", EVENT_FOCUSLOST},
{"FuncUndefined", EVENT_FUNCUNDEFINED},
{"GUIEnter", EVENT_GUIENTER},
{"InsertChange", EVENT_INSERTCHANGE},
{"InsertEnter", EVENT_INSERTENTER},
{"InsertLeave", EVENT_INSERTLEAVE},
{"RemoteReply", EVENT_REMOTEREPLY},
{"StdinReadPost", EVENT_STDINREADPOST},
{"StdinReadPre", EVENT_STDINREADPRE},

View File

@ -722,6 +722,10 @@ EXTERN int* (*iconv_errno) (void);
#endif /* FEAT_MBYTE */
#ifdef FEAT_XIM
# ifdef FEAT_GUI_KDE
EXTERN colnr_T preedit_start_col INIT(= MAXCOL);
EXTERN char *draw_feedback INIT(= NULL);
# endif
# ifdef FEAT_GUI_GTK
# ifdef HAVE_GTK2
EXTERN GtkIMContext *xic INIT(= NULL);
@ -1112,6 +1116,10 @@ EXTERN guint32 gtk_socket_id INIT(= 0);
EXTERN int echo_wid_arg INIT(= FALSE); /* --echo-wid argument */
#endif
#ifdef FEAT_GUI_KDE
EXTERN int echo_wid_arg INIT(= FALSE);
# endif
#ifdef FEAT_CLIENTSERVER
EXTERN char_u *serverName INIT(= NULL); /* name of the server */
EXTERN int received_from_client INIT(= FALSE); /* received text from
@ -1321,7 +1329,7 @@ EXTERN char_u e_sandbox[] INIT(=N_("E48: Not allowed in sandbox"));
#endif
EXTERN char_u e_secure[] INIT(=N_("E523: Not allowed here"));
#if defined(AMIGA) || defined(MACOS) || defined(MSWIN) || defined(RISCOS) \
|| defined(UNIX) || defined(VMS)
|| defined(UNIX) || defined(VMS) || defined(OS2)
EXTERN char_u e_screenmode[] INIT(=N_("E359: Screen mode setting not supported"));
#endif
EXTERN char_u e_scroll[] INIT(=N_("E49: Invalid scroll size"));

View File

@ -97,7 +97,7 @@ gui_start()
vim_free(old_term);
#if defined(FEAT_GUI_GTK) || defined(FEAT_GUI_X11)
#if defined(FEAT_GUI_GTK) || defined(FEAT_GUI_X11) || defined(FEAT_GUI_KDE)
if (gui.in_use)
/* Display error messages in a dialog now. */
display_errors();
@ -531,7 +531,7 @@ gui_init()
/* Our GUI can't do bidi. */
p_tbidi = FALSE;
#endif
#ifdef FEAT_GUI_GTK
#if defined FEAT_GUI_GTK || defined FEAT_GUI_KDE
/* Give GTK+ a chance to put all widget's into place. */
gui_mch_update();
/* Now make sure the shell fits on the screen. */
@ -575,7 +575,7 @@ gui_exit(rc)
gui_mch_exit(rc);
}
#if defined(FEAT_GUI_GTK) || defined(FEAT_GUI_X11) || defined(FEAT_GUI_MSWIN) \
#if defined(FEAT_GUI_KDE) || defined(FEAT_GUI_GTK) || defined(FEAT_GUI_X11) || defined(FEAT_GUI_MSWIN) \
|| defined(FEAT_GUI_PHOTON) || defined(FEAT_GUI_MAC) || defined(PROTO)
/*
* Called when the GUI shell is closed by the user. If there are no changed
@ -1058,7 +1058,7 @@ gui_update_cursor(force, clear_selection)
void
gui_position_menu()
{
# if !defined(FEAT_GUI_GTK) && !defined(FEAT_GUI_MOTIF)
# if !defined(FEAT_GUI_KDE) && !defined(FEAT_GUI_GTK) && !defined(FEAT_GUI_MOTIF)
if (gui.menu_is_active && gui.in_use)
gui_mch_set_menu_pos(0, 0, gui.menu_width, gui.menu_height);
# endif
@ -1164,6 +1164,7 @@ gui_get_base_height()
if (gui.menu_is_active)
base_height += gui.menu_height;
# endif
#ifndef FEAT_GUI_KDE
# ifdef FEAT_TOOLBAR
if (vim_strchr(p_go, GO_TOOLBAR) != NULL)
# if defined(FEAT_GUI_MSWIN) && defined(FEAT_TOOLBAR)
@ -1172,6 +1173,7 @@ gui_get_base_height()
base_height += gui.toolbar_height;
# endif
# endif
#endif
# ifdef FEAT_FOOTER
if (vim_strchr(p_go, GO_FOOTER) != NULL)
base_height += gui.footer_height;
@ -1680,7 +1682,7 @@ gui_write(s, len)
* We need to make sure this is cleared since Athena doesn't tell us when
* he is done dragging. Do the same for GTK.
*/
#if defined(FEAT_GUI_ATHENA) || defined(FEAT_GUI_GTK)
#if defined(FEAT_GUI_ATHENA) || defined(FEAT_GUI_GTK) || defined(FEAT_GUI_KDE)
gui.dragged_sb = SBAR_NONE;
#endif
@ -2071,7 +2073,7 @@ gui_outstr_nowrap(s, len, flags, fg, bg, back)
if (back != 0 && ((draw_flags & DRAW_BOLD) || (highlight_mask & HL_ITALIC)))
return FAIL;
#if defined(RISCOS) || defined(HAVE_GTK2)
#if defined(RISCOS) || defined(HAVE_GTK2) || defined(FEAT_GUI_KDE)
/* If there's no italic font, then fake it.
* For GTK2, we don't need a different font for italic style. */
if (hl_mask_todo & HL_ITALIC)
@ -2141,7 +2143,7 @@ gui_outstr_nowrap(s, len, flags, fg, bg, back)
/* print the string so far if it's the last character or there is
* a composing character. */
if (i + cl >= len || (comping && i > start) || dowide
# if defined(FEAT_GUI_X11) || defined(FEAT_GUI_GTK)
# if defined(FEAT_GUI_X11) || defined(FEAT_GUI_GTK) || defined (FEAT_GUI_KDE)
|| (cn > 1
# ifdef FEAT_XFONTSET
/* No fontset: At least draw char after wide char at
@ -2173,8 +2175,9 @@ gui_outstr_nowrap(s, len, flags, fg, bg, back)
start += cl;
}
# if defined(FEAT_GUI_X11) || defined(FEAT_GUI_GTK)
/* No fontset: draw a space to fill the gap after a wide char */
# if defined(FEAT_GUI_X11) || defined(FEAT_GUI_GTK) || defined(FEAT_GUI_KDE)
/* No fontset: draw a space to fill the gap after a wide char
* */
if (cn > 1 && (draw_flags & DRAW_TRANSP) == 0
# ifdef FEAT_XFONTSET
&& fontset == NOFONTSET
@ -4056,8 +4059,9 @@ gui_get_color(name)
if (*name == NUL)
return INVALCOLOR;
t = gui_mch_get_color(name);
if (t == INVALCOLOR
#if defined(FEAT_GUI_X11) || defined(FEAT_GUI_GTK)
#if defined(FEAT_GUI_X11) || defined(FEAT_GUI_GTK) || defined(FEAT_GUI_KDE)
&& gui.in_use
#endif
)
@ -4183,7 +4187,6 @@ gui_mouse_moved(x, y)
add_to_input_buf(st, 8);
st[3] = (char_u)MOUSE_RELEASE;
add_to_input_buf(st, 8);
#ifdef FEAT_GUI_GTK
/* Need to wake up the main loop */
if (gtk_main_level() > 0)
@ -4301,7 +4304,7 @@ ex_gui(eap)
}
#if ((defined(FEAT_GUI_X11) || defined(FEAT_GUI_GTK) || defined(FEAT_GUI_W32) \
|| defined(FEAT_GUI_PHOTON)) && defined(FEAT_TOOLBAR)) || defined(PROTO)
|| defined(FEAT_GUI_PHOTON) || defined(FEAT_GUI_KDE)) && defined(FEAT_TOOLBAR)) || defined(PROTO)
/*
* This is shared between Athena, Motif and GTK.
*/
@ -4364,7 +4367,7 @@ gui_find_iconfile(name, buffer, ext)
# endif
#endif
#if defined(FEAT_GUI_GTK) || defined(FEAT_GUI_X11) || defined(PROTO)
#if defined(FEAT_GUI_GTK) || defined(FEAT_GUI_KDE) || defined(FEAT_GUI_X11) || defined(PROTO)
void
display_errors()
{
@ -4410,7 +4413,7 @@ no_console_input()
#if defined(FEAT_GUI_GTK) || defined(FEAT_GUI_MOTIF) \
|| defined(MSWIN_FIND_REPLACE) || defined(FEAT_SUN_WORKSHOP) \
|| defined(PROTO)
|| defined(PROTO) || defined(FEAT_GUI_KDE)
/*
* Update the current window and the screen.
*/
@ -4428,7 +4431,7 @@ gui_update_screen()
#endif
#if defined(FEAT_GUI_GTK) || defined(FEAT_GUI_MOTIF) \
|| defined(MSWIN_FIND_REPLACE) || defined(PROTO)
|| defined(MSWIN_FIND_REPLACE) || defined(PROTO) || defined(FEAT_GUI_KDE)
static void concat_esc __ARGS((garray_T *gap, char_u *text, int what));
/*

View File

@ -30,6 +30,23 @@
# include "gui_beval.h"
#endif
#ifdef FEAT_GUI_KDE
# include <X11/Intrinsic.h>
/* used only as pointer to, so casting to int is ok */
# ifdef __cplusplus
class QScrollBar;
class QPopupMenu;
class QFont;
class VimWidget;
# else
# define QScrollBar int
# define QPopupMenu int
# define QFont int
# define VimWidget int
# endif
#endif
#ifdef FEAT_GUI_GTK
# include <X11/Intrinsic.h>
# include <gtk/gtk.h>
@ -85,7 +102,7 @@
* GUIs that support dropping files on a running Vim.
*/
#if defined(FEAT_GUI_MSWIN) || defined(FEAT_GUI_MAC) \
|| defined(FEAT_GUI_BEOS) || defined(FEAT_GUI_GTK)
|| defined(FEAT_GUI_BEOS) || defined(FEAT_GUI_GTK) || defined(FEAT_GUI_KDE)
# define HAVE_DROP_FILE
#endif
@ -152,7 +169,7 @@
#define DRAW_TRANSP 0x01 /* draw with transparant bg */
#define DRAW_BOLD 0x02 /* draw bold text */
#define DRAW_UNDERL 0x04 /* draw underline text */
#if defined(RISCOS) || defined(HAVE_GTK2)
#if defined(RISCOS) || defined(HAVE_GTK2) || defined (FEAT_GUI_KDE)
# define DRAW_ITALIC 0x08 /* draw italic text */
#endif
#define DRAW_CURSOR 0x10 /* drawing block cursor (win32) */
@ -171,7 +188,7 @@
#endif
#define TOOLBAR_BORDER_HEIGHT 12 /* room above+below buttons for MSWindows */
#if defined(NO_CONSOLE) || defined(FEAT_GUI_GTK) || defined(FEAT_GUI_X11)
#if defined(NO_CONSOLE) || defined(FEAT_GUI_GTK) || defined(FEAT_GUI_KDE) || defined(FEAT_GUI_X11)
# define NO_CONSOLE_INPUT /* use no_console_input() to check if there
is no console input possible */
#endif
@ -195,6 +212,9 @@ typedef struct GuiScrollbar
int width; /* Current width of scroll bar in cols */
#endif
int status_height; /* Height of status line */
#ifdef FEAT_GUI_KDE
QScrollBar *w;
#endif
#ifdef FEAT_GUI_X11
Widget id; /* Id of real scroll bar */
#endif
@ -231,6 +251,12 @@ typedef long guicolor_T; /* handle for a GUI color; for X11 this should
displays there is a tiny chance this is an
actual color */
#ifdef FEAT_GUI_KDE
typedef QFont *GuiFont;
typedef QFont *GuiFontset;
# define NOFONT (GuiFont)NULL
# define NOFONTSET (GuiFontset)NULL
#endif
#ifdef FEAT_GUI_GTK
# ifdef HAVE_GTK2
typedef PangoFontDescription *GuiFont; /* handle for a GUI font */
@ -254,10 +280,12 @@ typedef long guicolor_T; /* handle for a GUI color; for X11 this should
# define NOFONT (GuiFont)0
# define NOFONTSET (GuiFontset)0
# else
# if !defined(FEAT_GUI_KDE)
typedef long_u GuiFont; /* handle for a GUI font */
typedef long_u GuiFontset; /* handle for a GUI fontset */
# define NOFONT (GuiFont)0
# define NOFONTSET (GuiFontset)0
# endif
# endif
# endif
#endif
@ -375,6 +403,13 @@ typedef struct Gui
Bool color_approx; /* Some color was approximated */
#endif
#ifdef FEAT_GUI_KDE
VimWidget *w; /* Vim widget */
Display *dpy; /* X display */
QFont *current_font;
char_u *fontname; /* font name from font selection dialog */
#endif
#ifdef FEAT_GUI_GTK
int visibility; /* Is shell partially/fully obscured? */
GdkCursor *blank_pointer; /* Blank pointer */
@ -507,7 +542,7 @@ typedef enum
}
gui_win_pos_T;
#if defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_GTK) \
#if defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_GTK) || defined(FEAT_GUI_KDE) \
|| defined(MSWIN_FIND_REPLACE)
/*
* Flags used to distinguish the different contexts in which the

587
src/gui_kde.cc Normal file
View File

@ -0,0 +1,587 @@
/* vi:set ts=8 sts=0 sw=8:
*
* VIM - Vi IMproved by Bram Moolenaar
*
* Do ":help uganda" in Vim to read copying and usage conditions.
* Do ":help credits" in Vim to see a list of people who contributed.
*/
/*
* Porting to KDE(2) was done by
*
* (C) 2000 by Thomas Capricelli <orzel@freehackers.org>
*
* Please visit http://freehackers.org/kvim for other vim- or
* kde-related coding.
*
* $Id$
*
*/
#include <assert.h>
#include <errno.h>
#include <string.h>
#include <kmenubar.h>
#include <kfiledialog.h>
#include <kiconloader.h>
#include <qscrollbar.h>
#include <qcursor.h>
#include <qmessagebox.h>
#include <qiconset.h>
#include <qtextcodec.h>
#include "gui_kde_widget.h"
extern "C" {
#include "vim.h"
}
#undef dbf
#undef db
#undef mputs
#if 1
#define dbf( format, args... ) { printf( "%s" " : " format "\n" , __FUNCTION__ , ## args ); fflush(stdout); }
#define db() { printf( "%s\n", __FUNCTION__ );fflush(stdout); }
#else
#define dbf(format, args... )
#define db()
#endif
#ifdef FEAT_TOOLBAR
#ifndef FEAT_KDETOOLBAR
/*
* Icons used by the toolbar code.
*///{{{
#include "../pixmaps/tb_new.xpm"
#include "../pixmaps/tb_open.xpm"
#include "../pixmaps/tb_close.xpm"
#include "../pixmaps/tb_save.xpm"
#include "../pixmaps/tb_print.xpm"
#include "../pixmaps/tb_cut.xpm"
#include "../pixmaps/tb_copy.xpm"
#include "../pixmaps/tb_paste.xpm"
#include "../pixmaps/tb_find.xpm"
#include "../pixmaps/tb_find_next.xpm"
#include "../pixmaps/tb_find_prev.xpm"
#include "../pixmaps/tb_find_help.xpm"
#include "../pixmaps/tb_exit.xpm"
#include "../pixmaps/tb_undo.xpm"
#include "../pixmaps/tb_redo.xpm"
#include "../pixmaps/tb_help.xpm"
#include "../pixmaps/tb_macro.xpm"
#include "../pixmaps/tb_make.xpm"
#include "../pixmaps/tb_save_all.xpm"
#include "../pixmaps/tb_jump.xpm"
#include "../pixmaps/tb_ctags.xpm"
#include "../pixmaps/tb_load_session.xpm"
#include "../pixmaps/tb_save_session.xpm"
#include "../pixmaps/tb_new_session.xpm"
#include "../pixmaps/tb_blank.xpm"
#include "../pixmaps/tb_maximize.xpm"
#include "../pixmaps/tb_split.xpm"
#include "../pixmaps/tb_minimize.xpm"
#include "../pixmaps/tb_shell.xpm"
#include "../pixmaps/tb_replace.xpm"
#include "../pixmaps/tb_vsplit.xpm"
#include "../pixmaps/tb_maxwidth.xpm"
#include "../pixmaps/tb_minwidth.xpm"
//}}}
/*
* These are the pixmaps used for the default buttons.
* Order must exactly match toolbar_names[] in menu.c!
*///{{{
static char **(built_in_pixmaps[]) =
{
tb_new_xpm,
tb_open_xpm,
tb_save_xpm,
tb_undo_xpm,
tb_redo_xpm,
tb_cut_xpm,
tb_copy_xpm,
tb_paste_xpm,
tb_print_xpm,
tb_help_xpm,
tb_find_xpm,
tb_save_all_xpm,
tb_save_session_xpm,
tb_new_session_xpm,
tb_load_session_xpm,
tb_macro_xpm,
tb_replace_xpm,
tb_close_xpm,
tb_maximize_xpm,
tb_minimize_xpm,
tb_split_xpm,
tb_shell_xpm,
tb_find_prev_xpm,
tb_find_next_xpm,
tb_find_help_xpm,
tb_make_xpm,
tb_jump_xpm,
tb_ctags_xpm,
tb_vsplit_xpm,
tb_maxwidth_xpm,
tb_minwidth_xpm,
tb_exit_xpm
};//}}}
#else
const char *kdeicons[] = {
"filenew",
"fileopen",
"filesave",
"undo",
"redo",
"editcut",
"editcopy",
"editpaste",
"fileprint",
"contents2",
"filefind",
"save_all",
"fileexport",
"filenew",
"fileimport",
"run",
"edit",
"fileclose",
"",
"",
"split",
"openterm",
"previous",
"next",
"help",
"make",
"goto",
"run",
"vsplit",
"maxwidth",
"minwidth",
"quit"
};
#endif
/*
* creates a blank pixmap using tb_blank
*/
QPixmap
pixmap_create_from_xpm(char **xpm)//{{{
{
return(QPixmap((const char **)xpm));
}//}}}
/*
* creates a pixmap by using a built-in number
*/
QPixmap
pixmap_create_by_num(int pixmap_num)//{{{
{
#ifdef FEAT_KDETOOLBAR
if (pixmap_num >= 0 && (unsigned)pixmap_num < (sizeof(kdeicons)
/ sizeof(kdeicons[0])) - 1) {
KIconLoader *il = kapp->iconLoader(); //new KIconLoader();
QString icon;
icon=QString(kdeicons[pixmap_num]);
return il->loadIcon(icon,KIcon::MainToolbar);
}
return QPixmap();
#else
if (pixmap_num >= 0 && (unsigned)pixmap_num < (sizeof(built_in_pixmaps)
/ sizeof(built_in_pixmaps[0])) - 1)
return pixmap_create_from_xpm(built_in_pixmaps[pixmap_num]);
else return QPixmap();
#endif
}//}}}
/*
* Creates a pixmap by using the pixmap "name" found in 'runtimepath'/bitmaps/
*/
QPixmap
pixmap_create_by_dir(char_u *name)//{{{
{
char_u full_pathname[MAXPATHL + 1];
if (gui_find_bitmap(name, full_pathname, "xpm") == OK) {
return QPixmap((const char *)full_pathname);
}
else return QPixmap();
}//}}}
QPixmap
pixmap_create_from_file(char_u *file)
{
return QPixmap((const char*)file);
}
#endif
void
gui_mch_add_menu(vimmenu_T * menu, int idx)//{{{
{
#ifdef FEAT_MENU
QPopupMenu *me;
vimmenu_T *parent = menu->parent;
if (menu_is_popup(menu->name)) {
menu->widget = new QPopupMenu(vmw , (const char *) menu->name);
QObject::connect( menu->widget, SIGNAL(activated(int)), vmw, SLOT(menu_activated(int)) );
return;
}
if (!menu_is_menubar(menu->name))
return;
if (parent) {
idx++; // for tearoffs to be first in menus
me = new QPopupMenu(parent->widget, (const char *) menu->name);
parent->widget->insertItem( QString((const char *)menu->name), me, (int)me, idx);
} else {
me = new QPopupMenu(vmw->menuBar() , (const char *) menu->name);
vmw->menuBar()->insertItem( QString((const char *)menu->name), me , (int) me, idx);
}
me->setCaption((const char*)( menu->dname ));
if (vmw->have_tearoff) me->insertTearOffHandle(0,0);
QObject::connect( me, SIGNAL(activated(int)), vmw, SLOT(menu_activated(int)) );
menu->widget = me;
#endif
}//}}}
void
gui_mch_add_menu_item(vimmenu_T * menu, int idx)//{{{
{
#ifdef FEAT_MENU
vimmenu_T *parent = menu->parent;
#ifdef FEAT_TOOLBAR
if (menu_is_toolbar(parent->name)) {
QPixmap pix;
if ( menu_is_separator(menu->name) )
{
vmw->toolBar()->insertSeparator();
return;
}
if (menu->iconfile != NULL) {
pix = pixmap_create_from_file(menu->iconfile);
}
if (!menu->icon_builtin) {
pix = pixmap_create_by_dir(menu->name);
}
if (pix.isNull() && menu->iconidx >= 0) {
pix = pixmap_create_by_num(menu->iconidx);
}
#ifndef FEAT_KDETOOLBAR
if (pix.isNull()) {
pix = pixmap_create_from_xpm(tb_blank_xpm);
}
#endif
if (pix.isNull()) return; // failed
vmw->toolBar()->insertButton (
pix,
(int) menu , // id
true,
(char *) (menu->strings[MENU_INDEX_TIP]) , // tooltip or text
idx
);
menu->parent=parent;
return;
}
#endif // FEAT_TOOLBAR
idx++;
if ( menu_is_separator(menu->name) ) {
parent->widget->insertSeparator();
return;
}
parent->widget->insertItem(QString((const char *)menu->name), (int)menu, idx );
#endif
}//}}}
void
gui_mch_set_text_area_pos(int x, int y, int w, int h)//{{{
{
int X = 0;
int Y = 0;
if (vmw->menuBar()->isVisible() && vmw->menuBar()->isEnabled()
#if QT_VERSION>=300
&& !vmw->menuBar()->isTopLevelMenu()
#endif
)
Y += vmw->menuBar()->height();
#ifdef FEAT_TOOLBAR
if (vmw->toolBar()->isVisible() && vmw->toolBar()->isEnabled() &&
vmw->toolBar()->barPos()==KToolBar::Top)
Y += vmw->toolBar()->height();
if (vmw->toolBar()->isVisible() && vmw->toolBar()->isEnabled() &&
vmw->toolBar()->barPos()==KToolBar::Left)
X += vmw->toolBar()->width();
#endif // FEAT_TOOLBAR
gui.w->setGeometry(x+X,y+Y,w,h);
}//}}}
#if defined(FEAT_MENU) || defined(PROTO)
/*
* Enable or disable mnemonics for the toplevel menus.
*/
void
gui_gtk_set_mnemonics(int enable)//{{{ // TO BE REMOVED
{
}//}}}
void
toggle_tearoffs(vimmenu_T *menu, int enable)//{{{
{
while (menu != NULL) {
if (!menu_is_popup(menu->name)) {
if (menu->widget != 0) {
if (enable) menu->widget->insertTearOffHandle(0,0);
else menu->widget->removeItem(0);
}
toggle_tearoffs(menu->children, enable);
}
menu = menu->next;
}
}//}}}
void
gui_mch_toggle_tearoffs(int enable)//{{{
{
vmw->have_tearoff=enable;
toggle_tearoffs(root_menu, enable);
}//}}}
#endif
#if defined(FEAT_MENU) || defined(PROTO)
/*
* Destroy the machine specific menu widget.
*/
void
gui_mch_destroy_menu(vimmenu_T * menu)//{{{
{
#ifdef FEAT_TOOLBAR
if (menu->parent && menu_is_toolbar(menu->parent->name)) {
vmw->toolBar()->removeItem( (int) menu );
return;
}
#endif
if(menu->parent){
menu->parent->widget->removeItem((int)menu );
}
if (menu->widget){
delete menu->widget;
}
menu->widget = 0;
}//}}}
#endif /* FEAT_MENU */
/*
* Scrollbar stuff.
*/
void
gui_mch_set_scrollbar_thumb(scrollbar_T * sb, long val, long size, long max)//{{{
{
if (!sb->w) return;
sb->w->setRange(0, max+1-size);
sb->w->setValue(val);
sb->w->setLineStep(1);
sb->w->setPageStep(size);
}//}}}
void
gui_mch_set_scrollbar_pos(scrollbar_T * sb, int x, int y, int w, int h)//{{{
{
if (!sb->w) return;
//we add the menubar and toolbar height/width
int X = 0;
int Y = 0;
if (vmw->menuBar()->isVisible() && vmw->menuBar()->isEnabled()
#if QT_VERSION>=300
&& !vmw->menuBar()->isTopLevelMenu()
#endif
)
Y += vmw->menuBar()->height();
#ifdef FEAT_TOOLBAR
if (vmw->toolBar()->isVisible() && vmw->toolBar()->isEnabled() &&
vmw->toolBar()->barPos()==KToolBar::Top)
Y += vmw->toolBar()->height();
if (vmw->toolBar()->isVisible() && vmw->toolBar()->isEnabled() &&
vmw->toolBar()->barPos()==KToolBar::Left)
X += vmw->toolBar()->width();
#endif //FEAT_TOOLBAR
if (sb->w->orientation() == Qt::Vertical) {
bool leftscroll=gui.which_scrollbars[SBAR_LEFT];
bool rightscroll=gui.which_scrollbars[SBAR_RIGHT];
if (x<20) leftscroll=true;
else rightscroll=true;
if (x<20) sb->w->setGeometry(X,y+Y,w,h);
else sb->w->setGeometry(vmw->width()-w-1+X, y+Y,w,h);
} else {
sb->w->setGeometry(x+X,y+Y,w,h);
}
}//}}}
/* SBAR_VERT or SBAR_HORIZ */
void
gui_mch_create_scrollbar(scrollbar_T * sb, int orient)//{{{
{
sbpool->create(sb,orient);
if (orient==SBAR_VERT)
gui.scrollbar_width = sb->w->sizeHint().width();
else
gui.scrollbar_height = sb->w->sizeHint().height();
}//}}}
void
gui_mch_destroy_scrollbar(scrollbar_T * sb)//{{{
{
sbpool->destroy(sb);
}//}}}
#if defined(FEAT_BROWSE) || defined(PROTO)
/*
* Implementation of the file selector related stuff
*/
/*
* Put up a file requester.
* Returns the selected name in allocated memory, or NULL for Cancel.
* saving, select file to write
* title title for the window
* dflt default name
* ext not used (extension added)
* initdir initial directory, NULL for current dir
* filter not used (file name filter)
*/
/*ARGSUSED*/
char_u *
gui_mch_browse(int saving,//{{{
char_u * title,
char_u * dflt,
char_u * ext,
char_u * initdir,
char_u * filter)
{
char * filt_glob;
if (filter != (char_u *) 0x0 ) {
filter = vim_strsave(filter);
strtok((char *) filter, "(");
filt_glob = strtok(0L, ")");
} else
filt_glob = (char *) filter;
gui_mch_mousehide(FALSE);
QString s;
if (! saving)
s = KFileDialog::getOpenFileName( (char *) initdir, (char *) filt_glob, vmw, (char *) title );
else
s = KFileDialog::getSaveFileName( );
if (filter)
vim_free(filter);
if (s.isNull())
return NULL;
QCString unistring = vmw->codec->fromUnicode(s);
char_u * s2 = (char_u *)(const char*)unistring;
if (s2)
s2 = vim_strsave( s2 );
return s2;
}//}}}
#endif /* FEAT_BROWSE */
#ifdef FEAT_GUI_DIALOG
/* ARGSUSED */
int
gui_mch_dialog(int type, /* type of dialog *///{{{
char_u * title, /* title of dialog */
char_u * message, /* message text */
char_u * buttons, /* names of buttons */
int def_but, /* default button */
char_u *textfield)
{
gui_mch_mousehide(FALSE);
VimDialog vd(type, title, message, buttons, def_but,textfield);
int ret = vd.exec();
return ret;
}//}}}
#endif /* FEAT_GUI_DIALOG */
#if defined(FEAT_MENU) || defined(PROTO)
void
gui_mch_show_popupmenu(vimmenu_T * menu)//{{{
{
menu->widget->popup(QCursor::pos());
}//}}}
void
gui_make_popup (char_u *pathname) {//{{{
vimmenu_T *menu = gui_find_menu(pathname);
if (menu != NULL) {
menu->widget->popup(QCursor::pos());
}
}//}}}
#endif
/* Find and Replace implementations */
void
gui_mch_find_dialog(exarg_T * eap)//{{{
{
// char_u* entry_text;
//int exact_word=FALSE;
// entry_text = get_find_dialog_text(eap->arg,&exact_word);
vmw->finddlg->setCaseSensitive(true);
/* if(entry_text!=NULL) {
vmw->finddlg->setText(QString((char*)entry_text));
// exact match should go there, hopefully KDE old KEdFind/KEdReplace will be replaced in KDE 4 as pple wanted KDE 3's Find/Replace to be kept
}*/ // Don't use it, KDE keeps old search in memory and vim give \\Csearch, which is difficult to handle
// vim_free(entry_text);
vmw->finddlg->show();
}//}}}
void
gui_mch_replace_dialog(exarg_T * eap)//{{{
{
// char_u* entry_text;
//int exact_word=FALSE;
// entry_text = get_find_dialog_text(eap->arg,&exact_word);
/* if(entry_text!=NULL) {
vmw->repldlg->setText(QString((char*)entry_text));
// exact match should go there, hopefully KDE old KEdFind/KEdReplace will be replaced in KDE 4 as pple wanted KDE 3's Find/Replace to be kept
}*/
//vim_free(entry_text);
vmw->repldlg->show();
}//}}}
void
ex_helpfind(exarg_T *eap)//{{{
{
do_cmdline_cmd((char_u *)"emenu ToolBar.FindHelp");
}//}}}

1396
src/gui_kde_widget.cc Normal file

File diff suppressed because it is too large Load Diff

234
src/gui_kde_widget.h Normal file
View File

@ -0,0 +1,234 @@
/* vi:set ts=8 sts=0 sw=8:
*
* VIM - Vi IMproved by Bram Moolenaar
*
* Do ":help uganda" in Vim to read copying and usage conditions.
* Do ":help credits" in Vim to see a list of people who contributed.
*/
/*
* Porting to KDE(2) was done by
*
* (C) 2000 by Thomas Capricelli <orzel@freehackers.org>
*
* Please visit http://freehackers.org/kvim for other vim- or
* kde-related coding.
*
* $Id$
*
*/
#ifndef GUI_KDE_WIDGET
#define GUI_KDE_WIDGET
#if 1
#define dbf( format, args... ) { printf( "%s" " : " format "\n" , __FUNCTION__ , ## args ); fflush(stdout); }
#define db() { printf( "%s\n", __FUNCTION__ );fflush(stdout); }
#else
#define dbf(format, args... )
#define db()
#endif
#define UNIX // prevent a warning : a symbol is defined twice in X and Qt
#include <qdialog.h>
#include <qlabel.h>
#include <qsignalmapper.h>
#include <qtimer.h>
#include <qmainwindow.h>
#include <qapplication.h>
#include <qevent.h>
#include <qlineedit.h>
#include <qpainter.h>
#include <qwidget.h>
#include <qpopupmenu.h>
#include <klocale.h>
#include <kapp.h>
#include <kcmdlineargs.h>
#include <kaboutdata.h>
#include <keditcl.h>
#include <kaboutdata.h>
#if (KDE_VERSION>=290)
#include <kmainwindow.h>
#else
#include <ktmainwindow.h>
#endif
#include <kparts/part.h>
#include <kurl.h>
#include "kvim_iface.h"
#undef UNIX // prevent a warning
extern "C" {
#include "vim.h"
}
class QPushButton;
class QDialog;
class QLineEdit;
class QSignalMapper;
class QPaintEvent;
enum BlinkState {
BLINK_NONE,
BLINK_ON,
BLINK_OFF
};
class VimWidget : public QWidget, virtual public KVim
{
Q_OBJECT
public:
VimWidget( QWidget *parent=0, const char *name=0, WFlags f=0 );
virtual void paintEvent( QPaintEvent *);
void draw_string(int x, int y, QString s, int len, int flags);
/** Init the blinking time */
void set_blink_time( long, long, long );
void start_cursor_blinking();
void stop_cursor_blinking();
void wait(long);
#ifdef FEAT_CLIENTSERVER
void serverActivate(WId id);
#endif
void flash();
/** DCOP */
void execNormal(QString command);
void execInsert(QString command);
void execRaw(QString command);
void execCmd(QString command);
QString eval(QString expr);
bool wait_done;
BlinkState blink_state;
QPainter *painter;
QPopupMenu *menu;
protected:
virtual void keyPressEvent( QKeyEvent * );
virtual void mousePressEvent( QMouseEvent *);
virtual void mouseDoubleClickEvent( QMouseEvent *);
virtual void mouseReleaseEvent( QMouseEvent *);
virtual void mouseMoveEvent( QMouseEvent *);
virtual void focusInEvent( QFocusEvent * );
virtual void focusOutEvent( QFocusEvent * );
virtual void dragEnterEvent (QDragEnterEvent *);
virtual void dropEvent (QDropEvent *);
#ifdef FEAT_XIM
virtual void imStartEvent ( QIMEvent * );
virtual void imEndEvent ( QIMEvent * );
virtual void imComposeEvent ( QIMEvent * );
#endif
/* cursor blinking stuff */
QTimer blink_timer;
long blink_wait_time, blink_on_time, blink_off_time;
/* wait for input */
QTimer wait_timer;
public slots:
void blink_cursor();
void wait_timeout();
};
class VimMainWindow : public KMainWindow
{
Q_OBJECT
public:
VimMainWindow ( const char *name = 0L, WFlags f = WDestructiveClose );
/** called when the widget closes */
// bool close(bool alsoDelete);
VimWidget *w;
KEdFind *finddlg;
KEdReplace *repldlg;
int have_tearoff;
QTextCodec *codec;
public slots:
void menu_activated(int dx);
void clipboard_selection_update();
void clipboard_data_update();
void slotSearch();
void slotFind();
void slotReplace();
void slotReplaceAll();
void showAboutApplication();
void showAboutKDE();
void showBugReport();
void showTipOfTheDay();
void buffersToolbar();
bool isLocked();
void lock();
void unlock();
protected:
virtual void wheelEvent (QWheelEvent *);
virtual void resizeEvent ( QResizeEvent *e );
#if defined(FEAT_SESSION)
void saveGlobalProperties (KConfig *conf);
void readGlobalProperties (KConfig *conf);
#endif
bool queryClose();
bool queryExit();
bool locked;
};
class VimDialog : public QDialog
{
Q_OBJECT
public:
VimDialog (int type, /* type of dialog */
unsigned char * title, /* title of dialog */
unsigned char * message, /* message text */
unsigned char * buttons, /* names of buttons */
int def_but, /* default button */
char_u *textfield); /* input text */
private:
QSignalMapper mapper;
QLineEdit *entry;
char_u *ret;
int butNb;
protected slots:
void done(int);
};
/*
* QScrollBar pool
*/
struct GuiScrollbar;
class SBPool : public QObject
{
Q_OBJECT
public:
SBPool(void);
void create(GuiScrollbar * sb, int orient);
void destroy(GuiScrollbar * sb);
public slots:
void sbUsed(int who);
private:
QSignalMapper mapper;
};
class KVimUtils {
public:
static QString convertEncodingName(QString);
#if QT_VERSION<300
static bool fromString(QFont*,QString);
static QString toString(QFont*);
#endif
};
extern VimMainWindow *vmw;
extern SBPool *sbpool;
extern QString *argServerName;
#endif // GUI_KDE_WIDGET

1307
src/gui_kde_x11.cc Normal file

File diff suppressed because it is too large Load Diff

19
src/kvim_iface.h Normal file
View File

@ -0,0 +1,19 @@
#ifndef KVIM_IFACE
#define KVIM_IFACE
#include <dcopobject.h>
class KVim : virtual public DCOPObject
{
K_DCOP
public:
k_dcop:
virtual void execInsert(QString command)=0;
virtual void execNormal(QString command)=0;
virtual void execRaw(QString command)=0;
virtual void execCmd(QString command)=0;
virtual QString eval(QString expr)=0;
};
#endif

View File

@ -259,7 +259,7 @@ main
break;
# ifdef FEAT_XCLIPBOARD
else if (STRICMP(argv[i], "-display") == 0
# ifdef FEAT_GUI_GTK
# if defined(FEAT_GUI_GTK) || defined(FEAT_GUI_KDE)
|| STRICMP(argv[i], "--display") == 0
# endif
)
@ -442,7 +442,7 @@ main
++initstr;
}
if (TOLOWER_ASC(initstr[0]) == 'g')
if (TOLOWER_ASC(initstr[0]) == 'g' || initstr[0] == 'k')
{
main_start_gui();
#ifdef FEAT_GUI
@ -1087,7 +1087,7 @@ scripterror:
#ifdef ALWAYS_USE_GUI
gui.starting = TRUE;
#else
# if defined(FEAT_GUI_X11) || defined(FEAT_GUI_GTK)
# if defined(FEAT_GUI_X11) || defined(FEAT_GUI_GTK) || defined(FEAT_GUI_KDE)
/*
* Check if the GUI can be started. Reset gui.starting if not.
* Don't know about other systems, stay on the safe side and don't check.
@ -1170,7 +1170,7 @@ scripterror:
* For GTK we can't be sure, but when started from the desktop it doesn't
* make sense to try using a terminal.
*/
#if defined(ALWAYS_USE_GUI) || defined(FEAT_GUI_X11) || defined(FEAT_GUI_GTK)
#if defined(ALWAYS_USE_GUI) || defined(FEAT_GUI_X11) || defined(FEAT_GUI_GTK) || defined(FEAT_GUI_KDE)
if (gui.starting
# ifdef FEAT_GUI_GTK
&& !isatty(2)
@ -2614,6 +2614,17 @@ usage()
# endif
main_msg(_("--socketid <xid>\tOpen Vim inside another GTK widget"));
#endif
#ifdef FEAT_GUI_KDE
mch_msg(_("\nArguments recognised by kvim (KDE version):\n"));
main_msg(_("-black\t\tUse reverse video"));
#if QT_VERSION>=300
main_msg(_("-tip\t\t\tDisplay the tip dialog on startup"));
main_msg(_("-notip\t\tDisable the tip dialog"));
#endif
main_msg(_("-font <font>\t\tUse <font> for normal text (also: -fn)"));
main_msg(_("-geometry <geom>\tUse <geom> for initial geometry (also: -geom)"));
main_msg(_("--display <display>\tRun vim on <display>"));
#endif
#ifdef FEAT_GUI_W32
main_msg(_("-P <parent title>\tOpen Vim inside parent application"));
#endif

View File

@ -690,6 +690,11 @@ codepage_invalid:
apply_autocmds(EVENT_ENCODINGCHANGED, NULL, (char_u *)"", FALSE, curbuf);
#endif
#ifdef FEAT_GUI_KDE
if (gui.in_use)
gui_mch_update_codec();
#endif
return NULL;
}
@ -3976,7 +3981,7 @@ static int status_area_enabled = TRUE;
# endif
#endif
#if defined(FEAT_GUI_GTK) || defined(PROTO)
#if defined(FEAT_GUI_GTK) || defined(PROTO) || defined(FEAT_GUI_KDE)
static int preedit_buf_len = 0;
static int xim_can_preediting INIT(= FALSE); /* XIM in showmode() */
static int xim_input_style;
@ -4112,7 +4117,7 @@ im_set_active(active)
/* If 'imdisable' is set, XIM is never active. */
if (p_imdisable)
active = FALSE;
#ifndef FEAT_GUI_GTK
#if !defined (FEAT_GUI_GTK) && !defined (FEAT_GUI_KDE)
else if (input_style & XIMPreeditPosition)
/* There is a problem in switching XIM off when preediting is used,
* and it is not clear how this can be solved. For now, keep XIM on
@ -4386,6 +4391,8 @@ xim_set_preedit()
gdk_ic_set_attr(xic, attr, (GdkICAttributesType)attrmask);
}
#else /* FEAT_GUI_GTK */
# ifdef FEAT_GUI_KDE
# else
{
XVaNestedList attr_list;
XRectangle spot_area;
@ -4432,6 +4439,7 @@ xim_set_preedit()
XFree(attr_list);
}
}
# endif /* FEAT_GUI_KDE */
#endif /* FEAT_GUI_GTK */
}
@ -4485,6 +4493,8 @@ xim_set_status_area()
}
# endif
#else
# ifdef FEAT_GUI_KDE
# else
{
XVaNestedList preedit_list = 0, status_list = 0, list = 0;
XRectangle pre_area, status_area;
@ -4576,6 +4586,7 @@ xim_set_status_area()
if (preedit_list)
XFree(preedit_list);
}
# endif /* FEAT_GUI_KDE */
#endif
}
@ -5350,6 +5361,8 @@ xim_get_status_area_height()
#ifdef FEAT_GUI_GTK
if (xim_input_style & (int)GDK_IM_STATUS_AREA)
return gui.char_height;
#elif defined FEAT_GUI_KDE
#warning FIXME
#else
if (status_area_enabled)
return gui.char_height;

View File

@ -96,7 +96,7 @@ ex_menu(eap)
char_u *arg;
char_u *p;
int i;
#if defined(FEAT_GUI) && !defined(FEAT_GUI_GTK)
#if defined(FEAT_GUI) && !defined(FEAT_GUI_GTK) && !defined(FEAT_GUI_KDE)
int old_menu_height;
# if defined(FEAT_TOOLBAR) && !defined(FEAT_GUI_W32) && !defined(FEAT_GUI_W16)
int old_toolbar_height;
@ -320,7 +320,7 @@ ex_menu(eap)
EMSG(_(e_trailing));
goto theend;
}
#if defined(FEAT_GUI) && !(defined(FEAT_GUI_GTK) || defined(FEAT_GUI_PHOTON))
#if defined(FEAT_GUI) && !(defined(FEAT_GUI_GTK) || defined(FEAT_GUI_KDE) || defined(FEAT_GUI_PHOTON))
old_menu_height = gui.menu_height;
# if defined(FEAT_TOOLBAR) && !defined(FEAT_GUI_W32) && !defined(FEAT_GUI_W16)
old_toolbar_height = gui.toolbar_height;
@ -437,7 +437,7 @@ ex_menu(eap)
vim_free(map_buf);
}
#if defined(FEAT_GUI) && !defined(FEAT_GUI_GTK)
#if defined(FEAT_GUI) && !(defined(FEAT_GUI_GTK) || defined(FEAT_GUI_KDE))
/* If the menubar height changed, resize the window */
if (gui.in_use
&& (gui.menu_height != old_menu_height
@ -1843,7 +1843,7 @@ gui_update_menus(modes)
}
}
#if defined(FEAT_GUI_MSWIN) || defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_GTK) \
#if defined(FEAT_GUI_MSWIN) || defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_GTK) || defined(FEAT_GUI_KDE) \
|| defined(FEAT_GUI_PHOTON) || defined(PROTO)
/*
* Check if a key is used as a mnemonic for a toplevel menu.
@ -2174,6 +2174,7 @@ ex_emenu(eap)
}
#if defined(FEAT_GUI_MSWIN) \
|| (defined(FEAT_GUI_KDE) && defined(FEAT_MENU)) \
|| (defined(FEAT_GUI_GTK) && defined(FEAT_MENU)) \
|| defined(FEAT_BEVAL_TIP) || defined(PROTO)
/*

View File

@ -4055,7 +4055,7 @@ getnextcomp(fname)
#if defined(FEAT_MODIFY_FNAME) || defined(FEAT_EVAL) \
|| defined(FEAT_SESSION) || defined(MSWIN) \
|| (defined(FEAT_GUI_GTK) \
|| ((defined(FEAT_GUI_GTK) || defined(FEAT_GUI_KDE)) \
&& (defined(FEAT_WINDOWS) || defined(FEAT_DND))) \
|| defined(FEAT_SUN_WORKSHOP) || defined(FEAT_NETBEANS_INTG) \
|| defined(PROTO)

View File

@ -2668,8 +2668,8 @@ get_real_state()
}
#if defined(FEAT_SESSION) || defined(MSWIN) || defined(FEAT_GUI_MAC) \
|| (defined(FEAT_GUI_GTK) \
&& (defined(FEAT_WINDOWS) || defined(FEAT_DND))) \
|| ((defined(FEAT_GUI_GTK) || defined(FEAT_GUI_KDE)) \
&& ( defined(FEAT_WINDOWS) || defined(FEAT_DND)) ) \
|| defined(FEAT_SUN_WORKSHOP) || defined(FEAT_NETBEANS_INTG) \
|| defined(PROTO)
/*

View File

@ -2357,7 +2357,7 @@ do_mouse(oap, c, dir, count, fixindent)
* NOTE: Ignore right button down and drag mouse events.
* Windows only shows the popup menu on the button up event.
*/
#if defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_GTK) || defined(FEAT_GUI_PHOTON)
#if defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_GTK) || defined(FEAT_GUI_PHOTON) || defined(FEAT_GUI_KDE)
if (!is_click)
return FALSE;
#endif
@ -2365,7 +2365,7 @@ do_mouse(oap, c, dir, count, fixindent)
if (is_click || is_drag)
return FALSE;
#endif
#if defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_GTK) \
#if defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_GTK) || defined(FEAT_GUI_KDE) \
|| defined(FEAT_GUI_ATHENA) || defined(FEAT_GUI_MSWIN) \
|| defined(FEAT_GUI_MAC) || defined(FEAT_GUI_PHOTON)
if (gui.in_use)

View File

@ -1019,14 +1019,14 @@ static struct vimoption
#endif
},
{"guiheadroom", "ghr", P_NUM|P_VI_DEF,
#if defined(FEAT_GUI_GTK) || defined(FEAT_GUI_X11)
#if defined(FEAT_GUI_GTK) || defined(FEAT_GUI_X11) || defined(FEAT_GUI_KDE)
(char_u *)&p_ghr, PV_NONE,
#else
(char_u *)NULL, PV_NONE,
#endif
{(char_u *)50L, (char_u *)0L}},
{"guioptions", "go", P_STRING|P_VI_DEF|P_RALL|P_FLAGLIST,
#if defined(FEAT_GUI)
#if defined(FEAT_GUI) || defined(FEAT_GUI_KDE)
(char_u *)&p_go, PV_NONE,
# if defined(UNIX) && !defined(MACOS)
{(char_u *)"agimrLtT", (char_u *)0L}
@ -1112,7 +1112,7 @@ static struct vimoption
(char_u *)&p_ic, PV_NONE,
{(char_u *)FALSE, (char_u *)0L}},
{"imactivatekey","imak",P_STRING|P_VI_DEF,
#if defined(FEAT_XIM) && defined(FEAT_GUI_GTK)
#if defined(FEAT_XIM) && (defined(FEAT_GUI_GTK) || defined(FEAT_GUI_KDE))
(char_u *)&p_imak, PV_NONE,
#else
(char_u *)NULL, PV_NONE,
@ -4906,7 +4906,7 @@ did_set_string_option(opt_idx, varp, new_value_alloced, oldval, errbuf,
}
#endif
#if defined(FEAT_XIM) && defined(FEAT_GUI_GTK)
#if defined(FEAT_XIM) && ( defined(FEAT_GUI_GTK) || defined(FEAT_GUI_KDE) )
else if (varp == &p_imak)
{
if (gui.in_use && !im_xim_isvalid_imactivate())
@ -5163,7 +5163,7 @@ did_set_string_option(opt_idx, varp, new_value_alloced, oldval, errbuf,
if (gui.in_use)
{
p = p_guifont;
# ifdef FEAT_GUI_GTK
# if defined(FEAT_GUI_GTK) || defined(FEAT_GUI_KDE)
/*
* Put up a font dialog and let the user select a new value.
* If this is cancelled go back to the old value but don't

View File

@ -466,7 +466,7 @@ EXTERN char_u *p_guifontwide; /* 'guifontwide' */
# endif
EXTERN int p_guipty; /* 'guipty' */
#endif
#if defined(FEAT_GUI_GTK) || defined(FEAT_GUI_X11)
#if defined(FEAT_GUI_GTK) || defined(FEAT_GUI_X11) || defined(FEAT_GUI_KDE)
EXTERN long p_ghr; /* 'guiheadroom' */
#endif
#ifdef CURSOR_SHAPE
@ -512,7 +512,7 @@ EXTERN int p_icon; /* 'icon' */
EXTERN char_u *p_iconstring; /* 'iconstring' */
#endif
EXTERN int p_ic; /* 'ignorecase' */
#if defined(FEAT_XIM) && defined(FEAT_GUI_GTK)
#if defined(FEAT_XIM) && (defined(FEAT_GUI_GTK) || defined(FEAT_GUI_KDE))
EXTERN char_u *p_imak; /* 'imactivatekey' */
#endif
#ifdef USE_IM_CONTROL
@ -773,7 +773,7 @@ static char *(p_ve_values[]) = {"block", "insert", "all", NULL};
EXTERN long p_verbose; /* 'verbose' */
EXTERN int p_warn; /* 'warn' */
#if defined(FEAT_GUI_MSWIN) || defined(FEAT_GUI_MOTIF) || defined(LINT) \
|| defined (FEAT_GUI_GTK) || defined(FEAT_GUI_PHOTON)
|| defined (FEAT_GUI_GTK) || defined(FEAT_GUI_PHOTON) || defined(FEAT_GUI_KDE)
#define FEAT_WAK
EXTERN char_u *p_wak; /* 'winaltkeys' */
#endif

View File

@ -155,12 +155,7 @@ extern char g_szOrigTitle[];
#ifdef FEAT_GUI
extern HWND s_hwnd;
#else
# if (defined(FEAT_PRINTER) && !defined(FEAT_POSTSCRIPT)) \
|| defined(FEAT_CLIENTSERVER) \
|| (defined(FEAT_EVAL) && !defined(FEAT_GUI))
# define HAVE_GETCONSOLEHWND
static HWND s_hwnd = 0; /* console window handle, set by GetConsoleHwnd() */
# endif
#endif
extern int WSInitialized;
@ -1537,7 +1532,7 @@ Trace(
#endif //_DEBUG
#ifdef HAVE_GETCONSOLEHWND
#if !defined(FEAT_GUI) || defined(PROTO)
# if defined(FEAT_TITLE) && defined(WIN3264)
extern HWND g_hWnd; /* This is in os_win32.c. */
# endif
@ -1580,6 +1575,32 @@ GetConsoleHwnd(void)
SetConsoleTitle(pszOldWindowTitle);
}
/*
* Console implementation of ":winpos".
*/
int
mch_get_winpos(int *x, int *y)
{
RECT rect;
GetConsoleHwnd();
GetWindowRect(s_hwnd, &rect);
*x = rect.left;
*y = rect.top;
return OK;
}
/*
* Console implementation of ":winpos x y".
*/
void
mch_set_winpos(int x, int y)
{
GetConsoleHwnd();
SetWindowPos(s_hwnd, NULL, x, y, 0, 0,
SWP_NOZORDER | SWP_NOSIZE | SWP_NOACTIVATE);
}
#endif
#if (defined(FEAT_PRINTER) && !defined(FEAT_POSTSCRIPT)) || defined(PROTO)

View File

@ -1222,6 +1222,13 @@ x_error_handler(dpy, error_event)
Display *dpy;
XErrorEvent *error_event;
{
/* KDE sometimes produces X error that we want to ignore */
#if defined(FEAT_GUI_KDE)
XGetErrorText(dpy, error_event->error_code, (char *)IObuff, IOSIZE);
STRCAT(IObuff, "\nVim: Got X error but we continue...\n");
fprintf(stderr, IObuff);
return 0;
#else
XGetErrorText(dpy, error_event->error_code, (char *)IObuff, IOSIZE);
STRCAT(IObuff, _("\nVim: Got X error\n"));
@ -1231,6 +1238,7 @@ x_error_handler(dpy, error_event)
preserve_exit(); /* preserve files and exit */
return 0; /* NOTREACHED */
#endif
}
/*
@ -1371,7 +1379,7 @@ get_x11_windis()
did_set_error_handler = TRUE;
}
#if defined(FEAT_GUI_X11) || defined(FEAT_GUI_GTK)
#if defined(FEAT_GUI_X11) || defined(FEAT_GUI_GTK) || defined(FEAT_GUI_KDE)
if (gui.in_use)
{
/*
@ -1798,7 +1806,10 @@ mch_settitle(title, icon)
* Note: if "t_TS" is set, title is set with escape sequence rather
* than x11 calls, because the x11 calls don't always work
*/
#ifdef FEAT_GUI_KDE
/* dont know why but KDE needs this one as we don't go through the next function... */
gui_mch_settitle(title, icon);
#endif
if ((type || *T_TS != NUL) && title != NULL)
{
if (oldtitle == NULL

View File

@ -92,6 +92,12 @@
# if defined(HAVE_LIMITS_H) && !defined(_LIMITS_H)
# include <limits.h> /* for SYS_NMLN (Sinix 5.41 / Unix SysV.4) */
# endif
/* Define SYS_NMLN ourselves if it still isn't defined (for CrayT3E). */
# ifndef SYS_NMLN
# define SYS_NMLN 32
# endif
# include <sys/systeminfo.h> /* for sysinfo */
#endif

View File

@ -20,7 +20,7 @@
* Machine-dependent routines.
*/
/* avoid errors in function prototypes */
# if !defined(FEAT_X11) && !defined(FEAT_GUI_GTK)
# if !defined(FEAT_X11) && !defined(FEAT_GUI_GTK) && !defined(FEAT_GUI_KDE)
# define Display int
# define Widget int
# endif
@ -180,6 +180,10 @@ extern char_u *vimpty_getenv __ARGS((const char_u *string)); /* from pty.c */
# ifdef FEAT_GUI_W32
# include "gui_w32.pro"
# endif
# ifdef FEAT_GUI_KDE
# include "gui_kde.pro"
# include "gui_kde_x11.pro"
# endif
# ifdef FEAT_GUI_GTK
# include "gui_gtk.pro"
# include "gui_gtk_x11.pro"

19
src/proto/gui_kde.pro Normal file
View File

@ -0,0 +1,19 @@
/* gui_kde.c */
void gui_mch_add_menu __ARGS((vimmenu_T *menu, int idx));
void gui_mch_add_menu_item __ARGS((vimmenu_T *menu, int idx));
void gui_mch_set_text_area_pos __ARGS((int x, int y, int w, int h));
void gui_gtk_set_mnemonics __ARGS((int enable));
void gui_mch_toggle_tearoffs __ARGS((int enable));
void gui_mch_destroy_menu __ARGS((vimmenu_T *menu));
void gui_mch_set_scrollbar_thumb __ARGS((scrollbar_T *sb, long val, long size, long max));
void gui_mch_set_scrollbar_pos __ARGS((scrollbar_T *sb, int x, int y, int w, int h));
void gui_mch_create_scrollbar __ARGS((scrollbar_T *sb, int orient));
void gui_mch_destroy_scrollbar __ARGS((scrollbar_T *sb));
char_u *gui_mch_browse __ARGS((int saving, char_u *title, char_u *dflt, char_u *ext, char_u *initdir, char_u *filter));
int gui_mch_dialog __ARGS((int type, char_u *title, char_u *message, char_u *buttons, int def_but, char_u *textfield));
void gui_mch_show_popupmenu __ARGS((vimmenu_T *menu));
void gui_mch_find_dialog __ARGS((exarg_T *eap));
void gui_mch_replace_dialog __ARGS((exarg_T *eap));
void ex_helpfind __ARGS((exarg_T *eap));
void gui_make_popup __ARGS((char_u *path_name));
/* vim: set ft=c : */

62
src/proto/gui_kde_x11.pro Normal file
View File

@ -0,0 +1,62 @@
/* gui_kde_x11.c */
void gui_mch_prepare __ARGS((int *argc, char **argv));
void gui_mch_set_blinking __ARGS((long waittime, long on, long off));
void gui_mch_stop_blink __ARGS((void));
void gui_mch_start_blink __ARGS((void));
int gui_mch_init_check __ARGS((void));
int gui_mch_init __ARGS((void));
void gui_mch_new_colors __ARGS((void));
int gui_mch_open __ARGS((void));
void gui_mch_exit __ARGS((int rc));
int gui_mch_get_winpos __ARGS((int *x, int *y));
void gui_mch_set_winpos __ARGS((int x, int y));
void gui_mch_set_shellsize __ARGS((int width, int height, int min_width, int min_height, int base_width, int base_height));
void gui_mch_get_screen_dimensions __ARGS((int *screen_w, int *screen_h));
void gui_mch_enable_menu __ARGS((int flag));
void gui_mch_show_toolbar __ARGS((int showit));
int gui_mch_adjust_charsize __ARGS((void));
GuiFontset gui_mch_get_fontset __ARGS((char_u *name, int report_error, int fixed_width));
int gui_mch_init_font __ARGS((char_u *font_name, int fontset));
GuiFont gui_mch_get_font __ARGS((char_u *name, int report_error));
void gui_mch_set_font __ARGS((GuiFont font));
void gui_mch_set_fontset __ARGS((GuiFontset fontset));
void gui_mch_free_font __ARGS((GuiFont font));
void gui_mch_free_fontset __ARGS((GuiFontset fontset));
guicolor_T gui_mch_get_color __ARGS((char_u *name));
void gui_mch_set_fg_color __ARGS((guicolor_T color));
void gui_mch_set_bg_color __ARGS((guicolor_T color));
void gui_mch_draw_string __ARGS((int row, int col, char_u *s, int len, int flags));
int gui_mch_haskey __ARGS((char_u *name));
int gui_get_x11_windis __ARGS((Window *win, Display **dis));
void gui_mch_beep __ARGS((void));
void gui_mch_flash __ARGS((int msec));
void gui_mch_invert_rectangle __ARGS((int r, int c, int nr, int nc));
void gui_mch_iconify __ARGS((void));
void gui_mch_set_foreground __ARGS((void));
void gui_mch_draw_hollow_cursor __ARGS((guicolor_T color));
void gui_mch_draw_part_cursor __ARGS((int w, int h, guicolor_T color));
void gui_mch_update __ARGS((void));
int gui_mch_wait_for_chars __ARGS((long wtime));
void gui_mch_flush __ARGS((void));
void gui_mch_clear_block __ARGS((int row1, int col1, int row2, int col2));
void gui_mch_clear_all __ARGS((void));
void gui_mch_delete_lines __ARGS((int row, int num_lines));
void gui_mch_insert_lines __ARGS((int row, int num_lines));
void clip_mch_request_selection __ARGS((VimClipboard *cbd));
void clip_mch_lose_selection __ARGS((VimClipboard *cbd));
int clip_mch_own_selection __ARGS((VimClipboard *cbd));
void clip_mch_set_selection __ARGS((VimClipboard *cbd));
void gui_mch_menu_grey __ARGS((vimmenu_T *menu, int grey));
void gui_mch_menu_hidden __ARGS((vimmenu_T *menu, int hidden));
void gui_mch_draw_menubar __ARGS((void));
void gui_mch_enable_scrollbar __ARGS((scrollbar_T *sb, int flag));
long_u gui_mch_get_rgb __ARGS((guicolor_T pixel));
int gui_mch_get_mouse_x __ARGS((void));
int gui_mch_get_mouse_y __ARGS((void));
void gui_mch_setmouse __ARGS((int x, int y));
void gui_mch_mousehide __ARGS((int hide));
void mch_set_mouse_shape __ARGS((int shape));
char_u *gui_mch_font_dialog __ARGS((char_u *oldval));
void gui_mch_settitle __ARGS((char_u *title,char_u *icon));
void gui_mch_update_codec __ARGS((void));
/* vim: set ft=c : */

View File

@ -17,7 +17,9 @@ void check_cursor __ARGS((void));
void adjust_cursor_col __ARGS((void));
int leftcol_changed __ARGS((void));
void vim_mem_profile_dump __ARGS((void));
#ifndef __cplusplus
char_u *alloc __ARGS((unsigned size));
#endif
char_u *alloc_clear __ARGS((unsigned size));
char_u *alloc_check __ARGS((unsigned size));
char_u *lalloc_clear __ARGS((long_u size, int message));

View File

@ -33,6 +33,8 @@ char_u *ucs2_to_enc __ARGS((short_u *str, int *lenp));
void clip_mch_request_selection __ARGS((VimClipboard *cbd));
void clip_mch_set_selection __ARGS((VimClipboard *cbd));
void DumpPutS __ARGS((const char *psz));
int mch_get_winpos __ARGS((int *x, int *y));
void mch_set_winpos __ARGS((int x, int y));
void mch_print_cleanup __ARGS((void));
int mch_print_init __ARGS((prt_settings_T *psettings, char_u *jobname, int forceit));
int mch_print_begin __ARGS((prt_settings_T *psettings));

View File

@ -2594,7 +2594,7 @@ win_line(wp, lnum, startrow, endrow)
#endif
#define WL_LINE WL_SBR + 1 /* text in the line */
int draw_state = WL_START; /* what to draw next */
#if defined(FEAT_XIM) && defined(FEAT_GUI_GTK)
#if defined(FEAT_XIM) && (defined(FEAT_GUI_GTK) || defined(FEAT_GUI_KDE))
int feedback_col = 0;
int feedback_old_attr = -1;
#endif
@ -3785,7 +3785,7 @@ win_line(wp, lnum, startrow, endrow)
&& (search_attr == 0 || char_attr != search_attr))
char_attr = extra_attr;
#if defined(FEAT_XIM) && defined(FEAT_GUI_GTK)
#if defined(FEAT_XIM) && (defined(FEAT_GUI_GTK) || defined(FEAT_GUI_KDE))
/* XIM don't send preedit_start and preedit_end, but they send
* preedit_changed and commit. Thus Vim can't set "im_is_active", use
* im_is_preediting() here. */

View File

@ -1751,6 +1751,9 @@ struct VimMenu
Widget id; /* Manage this to enable item */
Widget submenu_id; /* If this is submenu, add children here */
#endif
#ifdef FEAT_GUI_KDE
QPopupMenu *widget;
#endif
#ifdef FEAT_GUI_GTK
GtkWidget *id; /* Manage this to enable item */
GtkWidget *submenu_id; /* If this is submenu, add children here */

View File

@ -1511,7 +1511,7 @@ vim_free_in_input_buf()
}
#endif
#if defined(FEAT_GUI_GTK) || defined(PROTO)
#if defined(FEAT_GUI_GTK) || defined(FEAT_GUI_KDE) || defined(PROTO)
int
vim_used_in_input_buf()
{
@ -1593,7 +1593,7 @@ add_to_input_buf(s, len)
}
#endif
#if (defined(FEAT_XIM) && defined(FEAT_GUI_GTK)) \
#if (defined(FEAT_XIM) && (defined(FEAT_GUI_GTK) || defined(FEAT_GUI_KDE))) \
|| (defined(FEAT_MBYTE) && defined(FEAT_MBYTE_IME)) \
|| defined(PROTO)
/*
@ -2876,7 +2876,7 @@ mouse_find_win(rowp, colp)
}
#endif
#if defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_GTK) || defined (FEAT_GUI_MAC) \
#if defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_GTK) || defined (FEAT_GUI_MAC) || defined (FEAT_GUI_KDE) \
|| defined(FEAT_GUI_ATHENA) || defined(FEAT_GUI_MSWIN) \
|| defined(FEAT_GUI_PHOTON) || defined(PROTO)
/*

View File

@ -859,6 +859,10 @@ list_version()
# else
# if defined (MACOS)
MSG_PUTS(_("with (classic) GUI."));
# else
# ifdef FEAT_GUI_KDE
MSG_PUTS(_("with KDE GUI."));
# endif
# endif
# endif
# endif

View File

@ -36,5 +36,5 @@
#define VIM_VERSION_NODOT "vim70aa"
#define VIM_VERSION_SHORT "7.0aa"
#define VIM_VERSION_MEDIUM "7.0aa ALPHA"
#define VIM_VERSION_LONG "VIM - Vi IMproved 7.0aa ALPHA (2004 June 7)"
#define VIM_VERSION_LONG_DATE "VIM - Vi IMproved 7.0aa ALPHA (2004 June 7, compiled "
#define VIM_VERSION_LONG "VIM - Vi IMproved 7.0aa ALPHA (2004 June 30)"
#define VIM_VERSION_LONG_DATE "VIM - Vi IMproved 7.0aa ALPHA (2004 June 30, compiled "

View File

@ -88,7 +88,8 @@
|| defined(FEAT_GUI_W16) \
|| defined(FEAT_GUI_BEOS) \
|| defined(FEAT_GUI_AMIGA) \
|| defined(FEAT_GUI_PHOTON)
|| defined(FEAT_GUI_PHOTON) \
|| defined(FEAT_GUI_KDE)
# ifndef FEAT_GUI
# define FEAT_GUI
# endif
@ -212,7 +213,15 @@
# define __PARMS(x) __ARGS(x)
#endif
#if defined(UNIX) && !defined(MACOS_X) /* MACOS_X doesn't yet support osdef.h */
/* if we're compiling in C++ (currently only KVim), the system
* headers must have the correct prototypes or nothing will build.
* conversely, our prototypes might clash due to throw() specifiers and
* cause compilation failures even though the headers are correct. for
* a concrete example, gcc-3.2 enforces exception specifications, and
* glibc-2.2.5 has them in their system headers.
*/
#if !defined(__cplusplus) && defined(UNIX) \
&& !defined(MACOS_X) /* MACOS_X doesn't yet support osdef.h */
# include "auto/osdef.h" /* bring missing declarations in */
#endif
@ -1022,6 +1031,9 @@ enum auto_event
EVENT_FOCUSGAINED, /* got the focus */
EVENT_FOCUSLOST, /* lost the focus to another app */
EVENT_GUIENTER, /* after starting the GUI */
EVENT_INSERTCHANGE, /* when changing Insert/Replace mode */
EVENT_INSERTENTER, /* when entering Insert mode */
EVENT_INSERTLEAVE, /* when leaving Insert mode */
EVENT_STDINREADPOST, /* after reading from stdin */
EVENT_STDINREADPRE, /* before reading from stdin */
EVENT_SYNTAX, /* syntax selected */
@ -1473,7 +1485,8 @@ int vim_memcmp __ARGS((void *, void *, size_t));
#define VV_THROWPOINT 30
#define VV_REG 31
#define VV_CMDBANG 32
#define VV_LEN 33 /* number of v: vars */
#define VV_INSERTMODE 33
#define VV_LEN 34 /* number of v: vars */
#ifdef FEAT_CLIPBOARD
@ -1572,7 +1585,7 @@ typedef int VimClipboard; /* This is required for the prototypes. */
* been seen at that stage. But it must be before globals.h, where error_ga
* is declared. */
#if !defined(FEAT_GUI_W32) && !defined(FEAT_GUI_X11) \
&& !defined(FEAT_GUI_GTK) && !defined(FEAT_GUI_MAC)
&& !defined(FEAT_GUI_GTK) && !defined(FEAT_GUI_KDE) && !defined(FEAT_GUI_MAC)
# define mch_errmsg(str) fprintf(stderr, "%s", (str))
# define display_errors() fflush(stderr)
# define mch_msg(str) printf("%s", (str))