Compare commits
112 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d5337efece | ||
|
|
49660f5139 | ||
|
|
d0fab10ed2 | ||
|
|
cdef1cefa2 | ||
|
|
43625762a9 | ||
|
|
4c36678ffd | ||
|
|
7609c88eed | ||
|
|
d505c8220d | ||
|
|
d0fbb41eaa | ||
|
|
3c708c4390 | ||
|
|
df63f05c3a | ||
|
|
060b838488 | ||
|
|
11df3aeee5 | ||
|
|
9f62ea01a0 | ||
|
|
605d02a9b7 | ||
|
|
bf72e0c67f | ||
|
|
a353282c13 | ||
|
|
53c5c9f50c | ||
|
|
8f3c3c6cd0 | ||
|
|
61c4b04799 | ||
|
|
9298a996fc | ||
|
|
208567e9d7 | ||
|
|
9652249a2d | ||
|
|
b99e6e6c5f | ||
|
|
8107a2a8af | ||
|
|
4bf67ec52e | ||
|
|
e6a16e9950 | ||
|
|
a1a46da87d | ||
|
|
4ac8e7948c | ||
|
|
4913d420e8 | ||
|
|
3f0092c141 | ||
|
|
9d8620b519 | ||
|
|
2a46f81ec7 | ||
|
|
6a12d26f34 | ||
|
|
d094e580b0 | ||
|
|
501e77766c | ||
|
|
3c053a1a5a | ||
|
|
bd053f894b | ||
|
|
d8cd6f7427 | ||
|
|
db4c94788a | ||
|
|
5b148ef262 | ||
|
|
c4860bdd28 | ||
|
|
0e9bdad545 | ||
|
|
36343ae0fb | ||
|
|
c8b6735573 | ||
|
|
a2e4e0fc3b | ||
|
|
4b082c4bd0 | ||
|
|
49846fb1a3 | ||
|
|
297164cb79 | ||
|
|
fa7bb1d937 | ||
|
|
13cdde3952 | ||
|
|
eb4de62931 | ||
|
|
4ccaedfcd7 | ||
|
|
d988ef3a55 | ||
|
|
a79b35b578 | ||
|
|
b77bdce120 | ||
|
|
7e120ffccb | ||
|
|
c9121f798f | ||
|
|
0abd6cf62d | ||
|
|
975a665d48 | ||
|
|
b9c09c118e | ||
|
|
ba43e76fcd | ||
|
|
856c5d2bc7 | ||
|
|
4b6172e108 | ||
|
|
6c4d4a6444 | ||
|
|
66b8d2a89e | ||
|
|
3558afe9e9 | ||
|
|
d93009eb35 | ||
|
|
4997f2a605 | ||
|
|
17822c507c | ||
|
|
91ccbad5de | ||
|
|
d26c5805bc | ||
|
|
f8412c9d7c | ||
|
|
e42033e735 | ||
|
|
2fbabd238a | ||
|
|
84d14ccdb5 | ||
|
|
d987642626 | ||
|
|
af40f9af33 | ||
|
|
9ce7915d06 | ||
|
|
ae906c8b1b | ||
|
|
a4962cd7ba | ||
|
|
7c6cd44375 | ||
|
|
159b2d5bfc | ||
|
|
7e017461e2 | ||
|
|
a275f2cdcc | ||
|
|
a9a364872e | ||
|
|
877151b3d8 | ||
|
|
9466fb8001 | ||
|
|
0c502d2e70 | ||
|
|
56564964e6 | ||
|
|
ccf2837a05 | ||
|
|
d3283fba25 | ||
|
|
cd105417a5 | ||
|
|
801cd35e7e | ||
|
|
1206c163db | ||
|
|
c601d988b6 | ||
|
|
79f234499b | ||
|
|
084f2620ec | ||
|
|
4282633ba6 | ||
|
|
f167c7b424 | ||
|
|
15b314ffbb | ||
|
|
118c235112 | ||
|
|
28f7e701b7 | ||
|
|
13845c48d8 | ||
|
|
b7af5a0445 | ||
|
|
330d64d32c | ||
|
|
30c0c467d6 | ||
|
|
8cf3459878 | ||
|
|
25f3a146a0 | ||
|
|
bf499c0e6f | ||
|
|
251c1e2ed8 | ||
|
|
16dab41537 |
7
.github/CODEOWNERS
vendored
7
.github/CODEOWNERS
vendored
@@ -171,6 +171,7 @@ runtime/ftplugin/pbtxt.vim @lakshayg
|
||||
runtime/ftplugin/pdf.vim @tpope
|
||||
runtime/ftplugin/perl.vim @petdance @dkearns
|
||||
runtime/ftplugin/pod.vim @petdance @dkearns
|
||||
runtime/ftplugin/poefilter.vim @ObserverOfTime
|
||||
runtime/ftplugin/postscr.vim @mrdubya
|
||||
runtime/ftplugin/ps1.vim @heaths
|
||||
runtime/ftplugin/ps1xml.vim @heaths
|
||||
@@ -192,6 +193,7 @@ runtime/ftplugin/sdoc.vim @gpanders
|
||||
runtime/ftplugin/sh.vim @dkearns
|
||||
runtime/ftplugin/solution.vim @dkearns
|
||||
runtime/ftplugin/spec.vim @ignatenkobrain
|
||||
runtime/ftplugin/ssa.vim @ObserverOfTime
|
||||
runtime/ftplugin/swayconfig.vim @jamespeapen
|
||||
runtime/ftplugin/systemverilog.vim @Kocha
|
||||
runtime/ftplugin/tap.vim @petdance
|
||||
@@ -397,6 +399,7 @@ runtime/syntax/perl.vim @petdance
|
||||
runtime/syntax/php.vim @TysonAndre
|
||||
runtime/syntax/plsql.vim @lee-lindley
|
||||
runtime/syntax/pod.vim @petdance
|
||||
runtime/syntax/poefilter.vim @ObserverOfTime
|
||||
runtime/syntax/postscr.vim @mrdubya
|
||||
runtime/syntax/privoxy.vim @dkearns
|
||||
runtime/syntax/prolog.vim @XVilka
|
||||
@@ -424,12 +427,14 @@ runtime/syntax/sass.vim @tpope
|
||||
runtime/syntax/scala.vim @derekwyatt
|
||||
runtime/syntax/scss.vim @tpope
|
||||
runtime/syntax/sdoc.vim @gpanders
|
||||
runtime/syntax/sed.vim @dkearns
|
||||
runtime/syntax/sh.vim @cecamp
|
||||
runtime/syntax/sm.vim @cecamp
|
||||
runtime/syntax/spec.vim @ignatenkobrain
|
||||
runtime/syntax/srt.vim @ObserverOfTime
|
||||
runtime/syntax/sqloracle.vim @chrisbra
|
||||
runtime/syntax/squirrel.vim @zenmatic
|
||||
runtime/syntax/srt.vim @ObserverOfTime
|
||||
runtime/syntax/ssa.vim @ObserverOfTime
|
||||
runtime/syntax/sshconfig.vim @Jakuje
|
||||
runtime/syntax/sshdconfig.vim @Jakuje
|
||||
runtime/syntax/sudoers.vim @e-kwsm
|
||||
|
||||
5
.github/workflows/ci.yml
vendored
5
.github/workflows/ci.yml
vendored
@@ -33,7 +33,7 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
features: [tiny, small, normal, huge]
|
||||
features: [tiny, normal, huge]
|
||||
compiler: [clang, gcc]
|
||||
extra: [none]
|
||||
include:
|
||||
@@ -125,7 +125,7 @@ jobs:
|
||||
echo "TMPDIR=${{ runner.temp }}"
|
||||
|
||||
case "${{ matrix.features }}" in
|
||||
tiny|small)
|
||||
tiny)
|
||||
echo "TEST=testtiny"
|
||||
if ${{ contains(matrix.extra, 'nogui') }}; then
|
||||
echo "CONFOPT=--disable-gui"
|
||||
@@ -304,6 +304,7 @@ jobs:
|
||||
run: |
|
||||
brew install lua
|
||||
echo "LUA_PREFIX=/usr/local" >> $GITHUB_ENV
|
||||
brew uninstall perl
|
||||
|
||||
- name: Set up environment
|
||||
run: |
|
||||
|
||||
3
.gitignore
vendored
3
.gitignore
vendored
@@ -44,6 +44,8 @@ gvimext.lib
|
||||
gvim.lib
|
||||
runtime/doc/uganda.nsis.txt
|
||||
nsis/icons/*
|
||||
/vim90/
|
||||
.vscode/
|
||||
|
||||
# NetBeans
|
||||
nbproject/*
|
||||
@@ -83,6 +85,7 @@ src/testdir/messages
|
||||
src/testdir/viminfo
|
||||
src/testdir/opt_test.vim
|
||||
src/testdir/failed
|
||||
src/testdir/starttime
|
||||
runtime/indent/testdir/*.out
|
||||
runtime/indent/testdir/*.fail
|
||||
src/memfile_test
|
||||
|
||||
22
Filelist
22
Filelist
@@ -590,30 +590,9 @@ SRC_DOS = \
|
||||
nsis/README.txt \
|
||||
nsis/lang/*.nsi \
|
||||
uninstall.txt \
|
||||
src/VisVim/Commands.cpp \
|
||||
src/VisVim/Commands.h \
|
||||
src/VisVim/DSAddIn.cpp \
|
||||
src/VisVim/DSAddIn.h \
|
||||
src/VisVim/OleAut.cpp \
|
||||
src/VisVim/OleAut.h \
|
||||
src/VisVim/README_VisVim.txt \
|
||||
src/VisVim/Reg.cpp \
|
||||
src/VisVim/Register.bat \
|
||||
src/VisVim/Resource.h \
|
||||
src/VisVim/StdAfx.cpp \
|
||||
src/VisVim/StdAfx.h \
|
||||
src/VisVim/UnRegist.bat \
|
||||
src/VisVim/VisVim.cpp \
|
||||
src/VisVim/VisVim.def \
|
||||
src/VisVim/VisVim.mak \
|
||||
src/VisVim/VisVim.h \
|
||||
src/VisVim/VisVim.odl \
|
||||
src/VisVim/VisVim.rc \
|
||||
src/VisVim/VsReadMe.txt \
|
||||
|
||||
# source files for DOS without CR/LF translation (also in the extra archive)
|
||||
SRC_DOS_BIN = \
|
||||
src/VisVim/Res/*.bmp \
|
||||
src/tearoff.bmp \
|
||||
src/tools.bmp \
|
||||
src/vim*.ico \
|
||||
@@ -945,7 +924,6 @@ EXTRA = \
|
||||
$(RT_EXTRA) \
|
||||
$(SRC_EXTRA) \
|
||||
README_extra.txt \
|
||||
src/VisVim/VisVim.dll \
|
||||
runtime/vimlogo.xpm \
|
||||
|
||||
# files in READMEdir that are included from the top dir
|
||||
|
||||
4
Makefile
4
Makefile
@@ -198,8 +198,6 @@ MINOR = 0
|
||||
# - copy these files (get them from a binary archive or build them):
|
||||
# gvimext.dll in src/GvimExt
|
||||
# gvimext64.dll in src/GvimExt
|
||||
# VisVim.dll in src/VisVim
|
||||
# Note: VisVim needs to be build with MSVC 5, newer versions don't work.
|
||||
# gvimext64.dll can be obtained from:
|
||||
# https://github.com/vim/vim-win32-installer/releases
|
||||
# It is part of gvim_9.0.*_x64.zip as vim/vim90/GvimExt/gvimext64.dll.
|
||||
@@ -554,8 +552,6 @@ dosbin_ole: dist no_title.vim dist/$(COMMENT_OLE)
|
||||
cp uninstallw32.exe dist/vim/$(VIMRTDIR)/uninstall.exe
|
||||
cp gvimext.dll dist/vim/$(VIMRTDIR)/gvimext.dll
|
||||
cp README_ole.txt dist/vim/$(VIMRTDIR)
|
||||
cp src/VisVim/VisVim.dll dist/vim/$(VIMRTDIR)/VisVim.dll
|
||||
cp src/VisVim/README_VisVim.txt dist/vim/$(VIMRTDIR)
|
||||
cd dist && zip -9 -rD -z gvim$(VERSION)ole.zip vim <$(COMMENT_OLE)
|
||||
cp gvim_ole.pdb dist/gvim$(VERSION)ole.pdb
|
||||
|
||||
|
||||
@@ -29,9 +29,6 @@ src/Make_mvc.mak MS Visual C++ makefile for the Win32 GUI.
|
||||
|
||||
src/if_ole.* OLE automation interface, for MS Windows 95 and NT.
|
||||
|
||||
src/VisVim/* Integration of Win32 GUI with MS Visual Developer
|
||||
Studio.
|
||||
|
||||
src/GvimExt/* DLL for the "Edit with Vim" context menu entry
|
||||
|
||||
nsis/* NSIS script to build the self-installing MS-Windows exe
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
README_ole.txt for version 9.0 of Vim: Vi IMproved.
|
||||
|
||||
This archive contains gvim.exe with OLE interface and VisVim.
|
||||
This archive contains gvim.exe with OLE interface.
|
||||
This version of gvim.exe can also load a number of interface dynamically (you
|
||||
can optionally install the .dll files for each interface).
|
||||
It is only for MS-Windows 95/98/ME/NT/2000/XP.
|
||||
@@ -15,6 +15,3 @@ Win32 with OLE - "MS-Windows 32 bit GUI version with OLE support"
|
||||
|
||||
For further information, type this inside Vim:
|
||||
:help if_ole
|
||||
|
||||
Furthermore, this archive contains VISVIM.DLL. It can be used to integrate
|
||||
the OLE gvim with Microsoft Visual Developer Studio. See VisVim/README.txt.
|
||||
|
||||
@@ -6,7 +6,6 @@ These files are in the runtime archive (vim90rt.zip).
|
||||
|
||||
|
||||
The DOS source archive contains the files needed to compile Vim on MS-Windows.
|
||||
It is packed for MS-Windows systems, with CR-LF. It also includes the VisVim
|
||||
sources.
|
||||
It is packed for MS-Windows systems, with CR-LF.
|
||||
|
||||
See "src/INSTALLpc.txt" for instructions on how to compile Vim on the PC.
|
||||
|
||||
@@ -27,23 +27,20 @@ To build the installable .exe:
|
||||
64-bit: src/GvimExt/gvimext64.dll
|
||||
32-bit: src/GvimExt/gvimext.dll
|
||||
|
||||
4. Go to the VisVim directory and build VisVim.dll (or get it from a binary
|
||||
archive).
|
||||
|
||||
5. Get a "diff.exe" program. If you skip this the built-in diff will always
|
||||
4. Get a "diff.exe" program. If you skip this the built-in diff will always
|
||||
be used (which is fine for most users). If you do have your own
|
||||
"diff.exe" put it in the "../.." directory (above the "vim82" directory,
|
||||
it's the same for all Vim versions).
|
||||
You can find one in previous Vim versions or in this archive:
|
||||
http://www.mossbayeng.com/~ron/vim/diffutils.tar.gz
|
||||
|
||||
6 Also put winpty32.dll and winpty-agent.exe in "../.." (above the "vim82"
|
||||
5 Also put winpty32.dll and winpty-agent.exe in "../.." (above the "vim82"
|
||||
directory). This is required for the terminal window.
|
||||
|
||||
7. Do "make uganda.nsis.txt" in runtime/doc. This requires sed, you may have
|
||||
6. Do "make uganda.nsis.txt" in runtime/doc. This requires sed, you may have
|
||||
to do this on Unix. Make sure the file is in DOS file format!
|
||||
|
||||
8. Get gettext and iconv DLLs from the following site:
|
||||
7. Get gettext and iconv DLLs from the following site:
|
||||
https://github.com/mlocati/gettext-iconv-windows/releases
|
||||
Both 64- and 32-bit versions are needed.
|
||||
Download the files gettextX.X.X.X-iconvX.XX-shared-{32,64}.zip, extract
|
||||
|
||||
@@ -36,9 +36,6 @@ Unicode true
|
||||
# Comment the next line if you do not want to add Native Language Support
|
||||
!define HAVE_NLS
|
||||
|
||||
# Uncomment the next line if you want to include VisVim extension:
|
||||
#!define HAVE_VIS_VIM
|
||||
|
||||
# Comment the following line to create an English-only installer:
|
||||
!define HAVE_MULTI_LANG
|
||||
|
||||
@@ -55,9 +52,6 @@ Unicode true
|
||||
# ----------- No configurable settings below this line -----------
|
||||
|
||||
!include "Library.nsh" # For DLL install
|
||||
!ifdef HAVE_VIS_VIM
|
||||
!include "UpgradeDLL.nsh" # for VisVim.dll
|
||||
!endif
|
||||
!include "LogicLib.nsh"
|
||||
!include "MUI2.nsh"
|
||||
!include "nsDialogs.nsh"
|
||||
@@ -536,17 +530,6 @@ SectionGroup $(str_group_plugin) id_group_plugin
|
||||
SectionEnd
|
||||
SectionGroupEnd
|
||||
|
||||
##########################################################
|
||||
!ifdef HAVE_VIS_VIM
|
||||
Section "$(str_section_vis_vim)" id_section_visvim
|
||||
SectionIn 3
|
||||
|
||||
SetOutPath $0
|
||||
!insertmacro UpgradeDLL "${VIMSRC}\VisVim\VisVim.dll" "$0\VisVim.dll" "$0"
|
||||
File ${VIMSRC}\VisVim\README_VisVim.txt
|
||||
SectionEnd
|
||||
!endif
|
||||
|
||||
##########################################################
|
||||
!ifdef HAVE_NLS
|
||||
Section "$(str_section_nls)" id_section_nls
|
||||
@@ -634,12 +617,6 @@ Section -post
|
||||
SectionGetSize ${id_section_editwith} $4
|
||||
IntOp $3 $3 + $4
|
||||
${EndIf}
|
||||
!ifdef HAVE_VIS_VIM
|
||||
${If} ${SectionIsSelected} ${id_section_visvim}
|
||||
SectionGetSize ${id_section_visvim} $4
|
||||
IntOp $3 $3 + $4
|
||||
${EndIf}
|
||||
!endif
|
||||
!ifdef HAVE_NLS
|
||||
${If} ${SectionIsSelected} ${id_section_nls}
|
||||
SectionGetSize ${id_section_nls} $4
|
||||
@@ -670,9 +647,6 @@ Section -post
|
||||
!insertmacro SaveSectionSelection ${id_section_vimrc} "select_vimrc"
|
||||
!insertmacro SaveSectionSelection ${id_section_pluginhome} "select_pluginhome"
|
||||
!insertmacro SaveSectionSelection ${id_section_pluginvim} "select_pluginvim"
|
||||
!ifdef HAVE_VIS_VIM
|
||||
!insertmacro SaveSectionSelection ${id_section_visvim} "select_visvim"
|
||||
!endif
|
||||
!ifdef HAVE_NLS
|
||||
!insertmacro SaveSectionSelection ${id_section_nls} "select_nls"
|
||||
!endif
|
||||
@@ -744,9 +718,6 @@ Function .onInit
|
||||
!insertmacro LoadSectionSelection ${id_section_vimrc} "select_vimrc"
|
||||
!insertmacro LoadSectionSelection ${id_section_pluginhome} "select_pluginhome"
|
||||
!insertmacro LoadSectionSelection ${id_section_pluginvim} "select_pluginvim"
|
||||
!ifdef HAVE_VIS_VIM
|
||||
!insertmacro LoadSectionSelection ${id_section_visvim} "select_visvim"
|
||||
!endif
|
||||
!ifdef HAVE_NLS
|
||||
!insertmacro LoadSectionSelection ${id_section_nls} "select_nls"
|
||||
!endif
|
||||
@@ -921,9 +892,6 @@ FunctionEnd
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${id_group_plugin} $(str_desc_plugin)
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${id_section_pluginhome} $(str_desc_plugin_home)
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${id_section_pluginvim} $(str_desc_plugin_vim)
|
||||
!ifdef HAVE_VIS_VIM
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${id_section_visvim} $(str_desc_vis_vim)
|
||||
!endif
|
||||
!ifdef HAVE_NLS
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${id_section_nls} $(str_desc_nls)
|
||||
!endif
|
||||
@@ -947,13 +915,6 @@ Section "un.$(str_unsection_register)" id_unsection_register
|
||||
# created. Thus the "vim61" directory is included in it.
|
||||
StrCpy $0 "$INSTDIR"
|
||||
|
||||
!ifdef HAVE_VIS_VIM
|
||||
# If VisVim was installed, unregister the DLL.
|
||||
${If} ${FileExists} "$0\VisVim.dll"
|
||||
ExecWait "regsvr32.exe /u /s $0\VisVim.dll"
|
||||
${EndIf}
|
||||
!endif
|
||||
|
||||
# delete the context menu entry and batch files
|
||||
DetailPrint "$(str_msg_unregistering)"
|
||||
nsExec::Exec "$0\uninstall.exe -nsis"
|
||||
@@ -1046,9 +1007,6 @@ Section "un.$(str_unsection_exe)" id_unsection_exe
|
||||
RMDir /r $0\syntax
|
||||
RMDir /r $0\tools
|
||||
RMDir /r $0\tutor
|
||||
!ifdef HAVE_VIS_VIM
|
||||
RMDir /r $0\VisVim
|
||||
!endif
|
||||
RMDir /r $0\lang
|
||||
RMDir /r $0\keymap
|
||||
Delete $0\*.exe
|
||||
|
||||
@@ -79,9 +79,6 @@ LangString str_desc_plugin_home ${LANG_DANISH} "Opret plugin-mapper i HO
|
||||
LangString str_section_plugin_vim ${LANG_DANISH} "Delte"
|
||||
LangString str_desc_plugin_vim ${LANG_DANISH} "Opret plugin-mapper i Vim-installationsmappe, det bruges af alle på systemet."
|
||||
|
||||
LangString str_section_vis_vim ${LANG_DANISH} "VisVim-udvidelser"
|
||||
LangString str_desc_vis_vim ${LANG_DANISH} "VisVim-udvidelser til integrering i Microsoft Visual Studio."
|
||||
|
||||
LangString str_section_nls ${LANG_DANISH} "Understøttelse af modersmål"
|
||||
LangString str_desc_nls ${LANG_DANISH} "Installer filer til understøttelse af modersmål."
|
||||
|
||||
|
||||
@@ -123,11 +123,6 @@ LangString str_desc_plugin_vim ${LANG_DUTCH} \
|
||||
"Creëer plugin mappen in Vim installatie map, deze worden gebruikt \
|
||||
voor iedereen op het systeem."
|
||||
|
||||
LangString str_section_vis_vim ${LANG_DUTCH} \
|
||||
"VisVim extensie"
|
||||
LangString str_desc_vis_vim ${LANG_DUTCH} \
|
||||
"VisVim extensie voor Microsoft Visual Studio integratie."
|
||||
|
||||
LangString str_section_nls ${LANG_DUTCH} \
|
||||
"Ondersteuning voor andere talen"
|
||||
LangString str_desc_nls ${LANG_DUTCH} \
|
||||
|
||||
@@ -121,11 +121,6 @@ LangString str_desc_plugin_vim ${LANG_ENGLISH} \
|
||||
"Create plugin directories in Vim install directory, it is used for \
|
||||
everybody on the system."
|
||||
|
||||
LangString str_section_vis_vim ${LANG_ENGLISH} \
|
||||
"VisVim Extension"
|
||||
LangString str_desc_vis_vim ${LANG_ENGLISH} \
|
||||
"VisVim Extension for Microsoft Visual Studio integration."
|
||||
|
||||
LangString str_section_nls ${LANG_ENGLISH} \
|
||||
"Native Language Support"
|
||||
LangString str_desc_nls ${LANG_ENGLISH} \
|
||||
|
||||
@@ -122,11 +122,6 @@ LangString str_desc_plugin_vim ${LANG_GERMAN} \
|
||||
"Plugin-Verzeichnisse im Vim-Installationsverzeichnis erstellen. Diese werden \
|
||||
für alle Benutzer dieses Systems genutzt."
|
||||
|
||||
LangString str_section_vis_vim ${LANG_GERMAN} \
|
||||
"VisVim-Erweiterung"
|
||||
LangString str_desc_vis_vim ${LANG_GERMAN} \
|
||||
"VisVim-Erweiterung zur Integration in Microsoft Visual Studio."
|
||||
|
||||
LangString str_section_nls ${LANG_GERMAN} \
|
||||
"Unterstützung für andere Sprachen"
|
||||
LangString str_desc_nls ${LANG_GERMAN} \
|
||||
|
||||
@@ -123,11 +123,6 @@ LangString str_desc_plugin_vim ${LANG_ITALIAN} \
|
||||
"Crea directory per plugin nella directory di installazione di Vim \
|
||||
per uso da parte di tutti gli utenti di questo sistema."
|
||||
|
||||
LangString str_section_vis_vim ${LANG_ITALIAN} \
|
||||
"Estensione VisVim"
|
||||
LangString str_desc_vis_vim ${LANG_ITALIAN} \
|
||||
"Estensione VisVim per integrazione con Microsoft Visual Studio."
|
||||
|
||||
LangString str_section_nls ${LANG_ITALIAN} \
|
||||
"Supporto Multilingue (NLS)"
|
||||
LangString str_desc_nls ${LANG_ITALIAN} \
|
||||
|
||||
@@ -128,11 +128,6 @@ LangString str_section_plugin_vim ${LANG_JAPANESE} \
|
||||
LangString str_desc_plugin_vim ${LANG_JAPANESE} \
|
||||
"プラグインディレクトリを Vim のインストールディレクトリに作成します。システムの全員で共有されます。"
|
||||
|
||||
LangString str_section_vis_vim ${LANG_JAPANESE} \
|
||||
"VisVim 拡張"
|
||||
LangString str_desc_vis_vim ${LANG_JAPANESE} \
|
||||
"Microsoft Visual Studio 統合用の VisVim 拡張。"
|
||||
|
||||
LangString str_section_nls ${LANG_JAPANESE} \
|
||||
"多言語サポート"
|
||||
LangString str_desc_nls ${LANG_JAPANESE} \
|
||||
|
||||
@@ -125,11 +125,6 @@ LangString str_desc_plugin_vim ${LANG_RUSSIAN} \
|
||||
Модули в этом каталоге будут доступны для любого пользователя \
|
||||
зарегистрировавшегося в системе"
|
||||
|
||||
LangString str_section_vis_vim ${LANG_RUSSIAN} \
|
||||
"Подключаемый модуль VisVim"
|
||||
LangString str_desc_vis_vim ${LANG_RUSSIAN} \
|
||||
"Подключаемый модуль VisVim используется для интеграции с Microsoft Visual Studio"
|
||||
|
||||
LangString str_section_nls ${LANG_RUSSIAN} \
|
||||
"Поддержка региональных языков"
|
||||
LangString str_desc_nls ${LANG_RUSSIAN} \
|
||||
|
||||
@@ -121,11 +121,6 @@ LangString str_desc_plugin_vim ${LANG_SERBIAN} \
|
||||
"Креира директоријуме додатака у Vim инсталационом директоријуму, користе их сви \
|
||||
на систему."
|
||||
|
||||
LangString str_section_vis_vim ${LANG_SERBIAN} \
|
||||
"VisVim проширење"
|
||||
LangString str_desc_vis_vim ${LANG_SERBIAN} \
|
||||
"VisVim проширење за Microsoft Visual Studio интеграцију."
|
||||
|
||||
LangString str_section_nls ${LANG_SERBIAN} \
|
||||
"Подршка за домаћи језик"
|
||||
LangString str_desc_nls ${LANG_SERBIAN} \
|
||||
|
||||
@@ -120,11 +120,6 @@ LangString str_desc_plugin_vim ${LANG_SIMPCHINESE} \
|
||||
"在 Vim 安装目录下创建(空的)插件目录结构,系统上所有用户都能使用安装在\
|
||||
该目录下的扩展插件。"
|
||||
|
||||
LangString str_section_vis_vim ${LANG_SIMPCHINESE} \
|
||||
"VisVim 插件"
|
||||
LangString str_desc_vis_vim ${LANG_SIMPCHINESE} \
|
||||
"安装与 Visual Studio 集成的 VisVim 插件。"
|
||||
|
||||
LangString str_section_nls ${LANG_SIMPCHINESE} \
|
||||
"安装多语言支持"
|
||||
LangString str_desc_nls ${LANG_SIMPCHINESE} \
|
||||
|
||||
@@ -121,11 +121,6 @@ LangString str_desc_plugin_vim ${LANG_TRADCHINESE} \
|
||||
"在 Vim 安裝資料夾下建立(空的)插件資料夾結構,電腦上所有用戶都能使用安裝\
|
||||
在該資料夾里的擴展插件。"
|
||||
|
||||
LangString str_section_vis_vim ${LANG_TRADCHINESE} \
|
||||
"安裝 VisVim 插件"
|
||||
LangString str_desc_vis_vim ${LANG_TRADCHINESE} \
|
||||
"VisVim 是用于與微軟 Microsoft Visual Studio 軟體進行整合的插件。"
|
||||
|
||||
LangString str_section_nls ${LANG_TRADCHINESE} \
|
||||
"安裝本地語言支持"
|
||||
LangString str_desc_nls ${LANG_TRADCHINESE} \
|
||||
|
||||
@@ -90,11 +90,6 @@ LangString str_desc_plugin_vim ${LANG_TURKISH} \
|
||||
"Eklenti dizinlerini Vim yükleme dizininde oluşturur. Bu eklentilerden \
|
||||
bilgisayarın tüm kullanıcıları yararlanabilir."
|
||||
|
||||
LangString str_section_vis_vim ${LANG_TURKISH} \
|
||||
"VisVim eklentisi"
|
||||
LangString str_desc_vis_vim ${LANG_TURKISH} \
|
||||
"Microsoft Visual Studio entegrasyonu için VisVim eklentisi"
|
||||
|
||||
LangString str_section_nls ${LANG_TURKISH} \
|
||||
"Ek dil desteği"
|
||||
LangString str_desc_nls ${LANG_TURKISH} \
|
||||
|
||||
15
runtime/autoload/dist/ft.vim
vendored
15
runtime/autoload/dist/ft.vim
vendored
@@ -145,7 +145,7 @@ export def FTcls()
|
||||
return
|
||||
endif
|
||||
|
||||
if getline(1) =~ '^%'
|
||||
if getline(1) =~ '^\v%(\%|\\)'
|
||||
setf tex
|
||||
elseif getline(1)[0] == '#' && getline(1) =~ 'rexx'
|
||||
setf rexx
|
||||
@@ -1087,5 +1087,18 @@ export def FTdat()
|
||||
endif
|
||||
enddef
|
||||
|
||||
export def FTlsl()
|
||||
if exists("g:filetype_lsl")
|
||||
exe "setf " .. g:filetype_lsl
|
||||
endif
|
||||
|
||||
var line = getline(nextnonblank(1))
|
||||
if line =~ '^\s*%' || line =~# ':\s*trait\s*$'
|
||||
setf larch
|
||||
else
|
||||
setf lsl
|
||||
endif
|
||||
enddef
|
||||
|
||||
# Uncomment this line to check for compilation errors early
|
||||
# defcompile
|
||||
|
||||
21
runtime/autoload/dist/vimindent.vim
vendored
21
runtime/autoload/dist/vimindent.vim
vendored
@@ -2,7 +2,7 @@ vim9script
|
||||
|
||||
# Language: Vim script
|
||||
# Maintainer: github user lacygoill
|
||||
# Last Change: 2022 Sep 24
|
||||
# Last Change: 2022 Oct 15
|
||||
|
||||
# NOTE: Whenever you change the code, make sure the tests are still passing:
|
||||
#
|
||||
@@ -156,7 +156,7 @@ const ASSIGNS_HEREDOC: string = $'^\%({COMMENT}\)\@!.*\%({HEREDOC_OPERATOR}\)\s\
|
||||
|
||||
# CD_COMMAND {{{3
|
||||
|
||||
const CD_COMMAND: string = $'[lt]\=cd!\=\s\+-{END_OF_COMMAND}'
|
||||
const CD_COMMAND: string = $'\<[lt]\=cd!\=\s\+-{END_OF_COMMAND}'
|
||||
|
||||
# HIGHER_ORDER_COMMAND {{{3
|
||||
|
||||
@@ -178,7 +178,7 @@ const HIGHER_ORDER_COMMAND: string = $'\%(^\|{BAR_SEPARATION}\)\s*\<\%(' .. patt
|
||||
|
||||
# MAPPING_COMMAND {{{3
|
||||
|
||||
const MAPPING_COMMAND: string = '\%(\<sil\%[ent]!\=\s\+\)\=[nvxsoilct]\=\%(nore\|un\)map!\=\s'
|
||||
const MAPPING_COMMAND: string = '\%(\<sil\%[ent]!\=\s\+\)\=\<[nvxsoilct]\=\%(nore\|un\)map!\=\s'
|
||||
|
||||
# NORMAL_COMMAND {{{3
|
||||
|
||||
@@ -222,7 +222,7 @@ END
|
||||
|
||||
const ENDS_BLOCK_OR_CLAUSE: string = '^\s*\%(' .. patterns->join('\|') .. $'\){END_OF_COMMAND}'
|
||||
.. $'\|^\s*cat\%[ch]\%(\s\+\({PATTERN_DELIMITER}\).*\1\)\={END_OF_COMMAND}'
|
||||
.. $'\|^\s*elseif\=\s\+\%({OPERATOR}\)\@!'
|
||||
.. $'\|^\s*elseif\=\>\%({OPERATOR}\)\@!'
|
||||
|
||||
# STARTS_CURLY_BLOCK {{{3
|
||||
|
||||
@@ -354,7 +354,7 @@ const LINE_CONTINUATION_AT_SOL: string = '^\s*\%('
|
||||
const RANGE_AT_SOL: string = '^\s*:\S'
|
||||
# }}}1
|
||||
# Interface {{{1
|
||||
export def Expr(lnum: number): number # {{{2
|
||||
export def Expr(lnum = v:lnum): number # {{{2
|
||||
# line which is indented
|
||||
var line_A: dict<any> = {text: getline(lnum), lnum: lnum}
|
||||
# line above, on which we'll base the indent of line A
|
||||
@@ -409,6 +409,7 @@ export def Expr(lnum: number): number # {{{2
|
||||
line_A->CacheBracketBlock()
|
||||
endif
|
||||
if line_A.lnum->IsInside('BracketBlock')
|
||||
var is_in_curly_block: bool = IsInCurlyBlock()
|
||||
for block: dict<any> in b:vimindent.block_stack
|
||||
if line_A.lnum <= block.startlnum
|
||||
continue
|
||||
@@ -416,8 +417,7 @@ export def Expr(lnum: number): number # {{{2
|
||||
if !block->has_key('startindent')
|
||||
block.startindent = Indent(block.startlnum)
|
||||
endif
|
||||
if !block.is_curly_block
|
||||
&& !b:vimindent.block_stack[0].is_curly_block
|
||||
if !is_in_curly_block
|
||||
return BracketBlockIndent(line_A, block)
|
||||
endif
|
||||
endfor
|
||||
@@ -520,7 +520,7 @@ enddef
|
||||
|
||||
def g:GetVimIndent(): number # {{{2
|
||||
# for backward compatibility
|
||||
return Expr(v:lnum)
|
||||
return Expr()
|
||||
enddef
|
||||
# }}}1
|
||||
# Core {{{1
|
||||
@@ -997,6 +997,11 @@ def IsRightBelow(lnum: number, syntax: string): bool # {{{3
|
||||
&& lnum > b:vimindent.endlnum
|
||||
enddef
|
||||
|
||||
def IsInCurlyBlock(): bool # {{{3
|
||||
return b:vimindent.block_stack
|
||||
->indexof((_, block: dict<any>): bool => block.is_curly_block) >= 0
|
||||
enddef
|
||||
|
||||
def IsInThisBlock(line_A: dict<any>, lnum: number): bool # {{{3
|
||||
var pos: list<number> = getcurpos()
|
||||
cursor(lnum, [lnum, '$']->col())
|
||||
|
||||
@@ -1791,8 +1791,10 @@ fun! s:NetrwOptionsRestore(vt)
|
||||
" call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo." a:vt=".a:vt,'~'.expand("<slnum>"))
|
||||
if !exists("{a:vt}netrw_optionsave")
|
||||
" call Decho("case ".a:vt."netrw_optionsave : doesn't exist",'~'.expand("<slnum>"))
|
||||
" call Decho("..doing filetype detect anyway")
|
||||
filetype detect
|
||||
if !isdirectory(expand('%'))
|
||||
" call Decho("..doing filetype detect anyway")
|
||||
filetype detect
|
||||
endif
|
||||
" call Decho("..settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo." a:vt=".a:vt,'~'.expand("<slnum>"))
|
||||
" call Decho("..ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)",'~'.expand("<slnum>"))
|
||||
" call Dret("s:NetrwOptionsRestore : ".a:vt."netrw_optionsave doesn't exist")
|
||||
@@ -1904,9 +1906,11 @@ fun! s:NetrwOptionsRestore(vt)
|
||||
" were having their filetype detect-generated settings overwritten by
|
||||
" NetrwOptionRestore.
|
||||
if &ft != "netrw"
|
||||
" call Decho("before: filetype detect (ft=".&ft.")",'~'.expand("<slnum>"))
|
||||
filetype detect
|
||||
" call Decho("after : filetype detect (ft=".&ft.")",'~'.expand("<slnum>"))
|
||||
if !isdirectory(expand('%'))
|
||||
" call Decho("before: filetype detect (ft=".&ft.")",'~'.expand("<slnum>"))
|
||||
filetype detect
|
||||
" call Decho("after : filetype detect (ft=".&ft.")",'~'.expand("<slnum>"))
|
||||
endif
|
||||
endif
|
||||
" call Decho("(s:NetrwOptionsRestore) lines=".&lines)
|
||||
" call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo." a:vt=".a:vt,'~'.expand("<slnum>"))
|
||||
|
||||
@@ -409,6 +409,7 @@ Name triggered by ~
|
||||
when popup menu is not visible
|
||||
|TextChangedP| after a change was made to the text in Insert mode
|
||||
when popup menu visible
|
||||
|TextChangedT| after a change was made to the text in Terminal mode
|
||||
|TextYankPost| after text has been yanked or deleted
|
||||
|
||||
|SafeState| nothing pending, going to wait for the user to type a
|
||||
@@ -1237,6 +1238,10 @@ TextChangedP After a change was made to the text in the
|
||||
current buffer in Insert mode, only when the
|
||||
popup menu is visible. Otherwise the same as
|
||||
TextChanged.
|
||||
*TextChangedT*
|
||||
TextChangedT After a change was made to the text in the
|
||||
current buffer in Terminal mode.
|
||||
Otherwise the same as TextChanged.
|
||||
*TextYankPost*
|
||||
TextYankPost After text has been yanked or deleted in the
|
||||
current buffer. The following values of
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*builtin.txt* For Vim version 9.0. Last change: 2022 Sep 30
|
||||
*builtin.txt* For Vim version 9.0. Last change: 2022 Oct 14
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -445,7 +445,8 @@ pyxeval({expr}) any evaluate |python_x| expression
|
||||
rand([{expr}]) Number get pseudo-random number
|
||||
range({expr} [, {max} [, {stride}]])
|
||||
List items from {expr} to {max}
|
||||
readblob({fname}) Blob read a |Blob| from {fname}
|
||||
readblob({fname} [, {offset} [, {size}]])
|
||||
Blob read a |Blob| from {fname}
|
||||
readdir({dir} [, {expr} [, {dict}]])
|
||||
List file names in {dir} selected by {expr}
|
||||
readdirex({dir} [, {expr} [, {dict}]])
|
||||
@@ -1882,10 +1883,10 @@ cursor({list})
|
||||
|setcursorcharpos()|.
|
||||
|
||||
Does not change the jumplist.
|
||||
{lnum} is used like with |getline()|.
|
||||
{lnum} is used like with |getline()|, except that if {lnum} is
|
||||
zero, the cursor will stay in the current line.
|
||||
If {lnum} is greater than the number of lines in the buffer,
|
||||
the cursor will be positioned at the last line in the buffer.
|
||||
If {lnum} is zero, the cursor will stay in the current line.
|
||||
If {col} is greater than the number of bytes in the line,
|
||||
the cursor will be positioned at the last character in the
|
||||
line.
|
||||
@@ -5404,7 +5405,8 @@ listener_add({callback} [, {buf}]) *listener_add()*
|
||||
the change; one if unknown or the whole line
|
||||
was affected; this is a byte index, first
|
||||
character has a value of one.
|
||||
When lines are inserted the values are:
|
||||
When lines are inserted (not when a line is split, e.g. by
|
||||
typing CR in Insert mode) the values are:
|
||||
lnum line above which the new line is added
|
||||
end equal to "lnum"
|
||||
added number of lines inserted
|
||||
@@ -6846,10 +6848,26 @@ range({expr} [, {max} [, {stride}]]) *range()*
|
||||
GetExpr()->range()
|
||||
<
|
||||
|
||||
readblob({fname}) *readblob()*
|
||||
readblob({fname} [, {offset} [, {size}]]) *readblob()*
|
||||
Read file {fname} in binary mode and return a |Blob|.
|
||||
When the file can't be opened an error message is given and
|
||||
If {offset} is specified, read the file from the specified
|
||||
offset. If it is a negative value, it is used as an offset
|
||||
from the end of the file. E.g., to read the last 12 bytes: >
|
||||
readblob('file.bin', -12)
|
||||
< If {size} is specified, only the specified size will be read.
|
||||
E.g. to read the first 100 bytes of a file: >
|
||||
readblob('file.bin', 0, 100)
|
||||
< If {size} is -1 or omitted, the whole data starting from
|
||||
{offset} will be read.
|
||||
This can be also used to read the data from a character device
|
||||
on Unix when {size} is explicitly set. Only if the device
|
||||
supports seeking {offset} can be used. Otherwise it should be
|
||||
zero. E.g. to read 10 bytes from a serial console: >
|
||||
readblob('/dev/ttyS0', 0, 10)
|
||||
< When the file can't be opened an error message is given and
|
||||
the result is an empty |Blob|.
|
||||
When trying to read bytes beyond the end of the file the
|
||||
result is an empty blob.
|
||||
Also see |readfile()| and |writefile()|.
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*eval.txt* For Vim version 9.0. Last change: 2022 Sep 17
|
||||
*eval.txt* For Vim version 9.0. Last change: 2022 Oct 07
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
|
||||
@@ -150,6 +150,7 @@ variables can be used to overrule the filetype used for certain extensions:
|
||||
*.fs g:filetype_fs |ft-forth-syntax|
|
||||
*.i g:filetype_i |ft-progress-syntax|
|
||||
*.inc g:filetype_inc
|
||||
*.lsl g:filetype_lsl
|
||||
*.m g:filetype_m |ft-mathematica-syntax|
|
||||
*.mod g:filetype_mod
|
||||
*.p g:filetype_p |ft-pascal-syntax|
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*if_ole.txt* For Vim version 9.0. Last change: 2019 Dec 07
|
||||
*if_ole.txt* For Vim version 9.0. Last change: 2022 Oct 08
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Paul Moore
|
||||
@@ -156,18 +156,14 @@ To avoid the message box that pops up to report the result, prepend "-silent":
|
||||
gvim -silent -unregister
|
||||
|
||||
==============================================================================
|
||||
5. MS Visual Studio integration *MSVisualStudio* *VisVim*
|
||||
5. MS Visual Studio integration *MSVisualStudio*
|
||||
|
||||
The OLE version can be used to run Vim as the editor in Microsoft Visual
|
||||
Studio. This is called "VisVim". It is included in the archive that contains
|
||||
the OLE version. The documentation can be found in the runtime directory, the
|
||||
README_VisVim.txt file.
|
||||
The old "VisVim" integration was removed from Vim in patch 9.0.0698.
|
||||
|
||||
|
||||
Using Vim with Visual Studio .Net~
|
||||
|
||||
With .Net you no longer really need VisVim, since .Net studio has support for
|
||||
external editors. Follow these directions:
|
||||
.Net studio has support for external editors. Follow these directions:
|
||||
|
||||
In .Net Studio choose from the menu Tools->External Tools...
|
||||
Add
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*indent.txt* For Vim version 9.0. Last change: 2022 May 21
|
||||
*indent.txt* For Vim version 9.0. Last change: 2022 Oct 10
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -982,9 +982,12 @@ indentation: >
|
||||
|
||||
PYTHON *ft-python-indent*
|
||||
|
||||
The amount of indent can be set for the following situations. The examples
|
||||
given are the defaults. Note that the dictionary values are set to an
|
||||
expression, so that you can change the value of 'shiftwidth' later.
|
||||
The amount of indent can be set with the `g:python_indent` |Dictionary|, which
|
||||
needs to be created before adding the items: >
|
||||
let g:python_indent = {}
|
||||
The examples given are the defaults. Note that the dictionary values are set
|
||||
to an expression, so that you can change the value of 'shiftwidth' later
|
||||
without having to update these values.
|
||||
|
||||
Indent after an open paren: >
|
||||
let g:python_indent.open_paren = 'shiftwidth() * 2'
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*index.txt* For Vim version 9.0. Last change: 2022 Jun 11
|
||||
*index.txt* For Vim version 9.0. Last change: 2022 Oct 15
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -1150,7 +1150,7 @@ tag command action ~
|
||||
|:!!| :!! repeat last ":!" command
|
||||
|:#| :# same as ":number"
|
||||
|:&| :& repeat last ":substitute"
|
||||
|:star| :* execute contents of a register
|
||||
|:star| :* use the last Visual area, like :'<,'>
|
||||
|:<| :< shift lines one 'shiftwidth' left
|
||||
|:=| := print the last line number
|
||||
|:>| :> shift lines one 'shiftwidth' right
|
||||
@@ -1277,6 +1277,7 @@ tag command action ~
|
||||
|:debuggreedy| :debugg[reedy] read debug mode commands from normal input
|
||||
|:def| :def define a Vim9 user function
|
||||
|:defcompile| :defc[ompile] compile Vim9 user functions in current script
|
||||
|:defer| :defer call function when current function is done
|
||||
|:delcommand| :delc[ommand] delete user-defined command
|
||||
|:delfunction| :delf[unction] delete a user function
|
||||
|:delmarks| :delm[arks] delete marks
|
||||
@@ -1308,6 +1309,7 @@ tag command action ~
|
||||
|:echohl| :echoh[l] set highlighting for echo commands
|
||||
|:echomsg| :echom[sg] same as :echo, put message in history
|
||||
|:echon| :echon same as :echo, but without <EOL>
|
||||
|:echowindow| :echow[indow] same as :echomsg, but use a popup window
|
||||
|:else| :el[se] part of an :if command
|
||||
|:elseif| :elsei[f] part of an :if command
|
||||
|:emenu| :em[enu] execute a menu by name
|
||||
@@ -1356,6 +1358,7 @@ tag command action ~
|
||||
|:highlight| :hi[ghlight] specify highlighting methods
|
||||
|:hide| :hid[e] hide current buffer for a command
|
||||
|:history| :his[tory] print a history list
|
||||
|:horizontal| :hor[izontal] following window command work horizontally
|
||||
|:insert| :i[nsert] insert text
|
||||
|:iabbrev| :ia[bbrev] like ":abbrev" but for Insert mode
|
||||
|:iabclear| :iabc[lear] like ":abclear" but for Insert mode
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*intro.txt* For Vim version 9.0. Last change: 2022 Sep 12
|
||||
*intro.txt* For Vim version 9.0. Last change: 2022 Oct 12
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -122,10 +122,10 @@ http://www.vim.org/maillist.php
|
||||
Bug reports: *bugs* *bug-reports* *bugreport.vim*
|
||||
|
||||
There are three ways to report bugs:
|
||||
1. Open an issue on GitHub: https://github.com/vim/vim/issues
|
||||
The text will be forwarded to the vim-dev maillist.
|
||||
2. For issues with runtime files, look in the header for an email address or
|
||||
1. For issues with runtime files, look in the header for an email address or
|
||||
any other way to report it to the maintainer.
|
||||
2. Open an issue on GitHub: https://github.com/vim/vim/issues
|
||||
The text will be forwarded to the vim-dev maillist.
|
||||
3. Send bug reports to: Vim Developers <vim-dev@vim.org>
|
||||
This is a maillist, you need to become a member first and many people will
|
||||
see the message. If you don't want that, e.g. because it is a security
|
||||
|
||||
@@ -989,6 +989,11 @@ mapping, see |map-bar|.
|
||||
WARNING: if you map <C-[> you may very well break any key codes that start
|
||||
with Esc. Make sure it comes AFTER other mappings.
|
||||
|
||||
Vim automatically detects if the modifyOtherKeys mode was enabled when it
|
||||
spots an escape sequence that must have been created by it. To see if Vim
|
||||
detected such an escape sequence use `:verbose map`, the first line will then
|
||||
show "Seen modifyOtherKeys: true" (possibly translated).
|
||||
|
||||
A known side effect is that in Insert mode the raw escape sequence is inserted
|
||||
after the CTRL-V key. This can be used to check whether modifyOtherKeys is
|
||||
enabled: In Insert mode type CTRL-SHIFT-V CTRL-V, if you get one byte then
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*options.txt* For Vim version 9.0. Last change: 2022 Oct 03
|
||||
*options.txt* For Vim version 9.0. Last change: 2022 Oct 15
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -4621,7 +4621,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
in Insert mode as specified with the 'indentkeys' option.
|
||||
When this option is not empty, it overrules the 'cindent' and
|
||||
'smartindent' indenting. When 'lisp' is set, this option is
|
||||
overridden by the Lisp indentation algorithm.
|
||||
is only used when 'lispoptions' contains "expr:1".
|
||||
When 'paste' is set this option is not used for indenting.
|
||||
The expression is evaluated with |v:lnum| set to the line number for
|
||||
which the indent is to be computed. The cursor is also in this line
|
||||
@@ -5063,6 +5063,17 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
calling an external program if 'equalprg' is empty.
|
||||
This option is not used when 'paste' is set.
|
||||
|
||||
*'lispoptions'* *'lop'*
|
||||
'lispoptions' 'lop' string (default "")
|
||||
local to buffer
|
||||
Comma-separated list of items that influence the Lisp indenting when
|
||||
enabled with the |'lisp'| option. Currently only one item is
|
||||
supported:
|
||||
expr:1 use 'indentexpr' for Lisp indenting when it is set
|
||||
expr:0 do not use 'indentexpr' for Lisp indenting (default)
|
||||
Note that when using 'indentexpr' the `=` operator indents all the
|
||||
lines, otherwise the first line is not indented (Vi-compatible).
|
||||
|
||||
*'lispwords'* *'lw'*
|
||||
'lispwords' 'lw' string (default is very long)
|
||||
global or local to buffer |global-local|
|
||||
@@ -6476,8 +6487,6 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
*'ruler'* *'ru'* *'noruler'* *'noru'*
|
||||
'ruler' 'ru' boolean (default off, set in |defaults.vim|)
|
||||
global
|
||||
{not available when compiled without the
|
||||
|+cmdline_info| feature}
|
||||
Show the line and column number of the cursor position, separated by a
|
||||
comma. When there is room, the relative position of the displayed
|
||||
text in the file is shown on the far right:
|
||||
@@ -7079,6 +7088,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
c don't give |ins-completion-menu| messages. For example,
|
||||
"-- XXX completion (YYY)", "match 1 of 2", "The only match",
|
||||
"Pattern not found", "Back at original", etc.
|
||||
C don't give messages while scanning for ins-completion items,
|
||||
for instance "scanning tags"
|
||||
q use "recording" instead of "recording @a"
|
||||
F don't give the file info when editing a file, like `:silent`
|
||||
was used for the command; note that this also affects messages
|
||||
@@ -7135,8 +7146,6 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
'showcmd' 'sc' boolean (Vim default: on, off for Unix,
|
||||
Vi default: off, set in |defaults.vim|)
|
||||
global
|
||||
{not available when compiled without the
|
||||
|+cmdline_info| feature}
|
||||
Show (partial) command in the last line of the screen. Set this
|
||||
option off if your terminal is slow.
|
||||
In Visual mode the size of the selected area is shown:
|
||||
@@ -7525,7 +7534,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
When on, splitting a window will put the new window below the current
|
||||
one. |:split|
|
||||
|
||||
*'splitkeep'* *'spk'
|
||||
*'splitkeep'* *'spk'*
|
||||
'splitkeep' 'spk' string (default "cursor")
|
||||
global
|
||||
The value of this option determines the scroll behavior when opening,
|
||||
@@ -7539,7 +7548,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
For the "screen" and "topline" values, the cursor position will be
|
||||
changed when necessary. In this case, the jumplist will be populated
|
||||
with the previous cursor position. For "screen", the text cannot always
|
||||
be kept on the same screen line when 'wrap' is enabled.
|
||||
be kept on the same screen line when 'wrap' is enabled.
|
||||
|
||||
*'splitright'* *'spr'* *'nosplitright'* *'nospr'*
|
||||
'splitright' 'spr' boolean (default off)
|
||||
|
||||
@@ -47,7 +47,7 @@ features you can enable/disable.
|
||||
|
||||
Haiku uses "ncurses6" as its terminal library, therefore you need to have
|
||||
"ncurses6_devel" package installed from HaikuDepot in order to configure
|
||||
the Haiku build. Just append "--with-tlib=ncurses6" to ./configure command
|
||||
the Haiku build. Just append "--with-tlib=ncurses" to ./configure command.
|
||||
|
||||
Now you should use "make" to compile Vim, then "make install" to install it.
|
||||
For seamless integration into Haiku, the GUI-less vim binary should be
|
||||
@@ -56,12 +56,14 @@ additionally installed over the GUI version. Typical build commands are:
|
||||
./configure --prefix=`finddir B_SYSTEM_NONPACKAGED_DIRECTORY` \
|
||||
--datarootdir=`finddir B_SYSTEM_NONPACKAGED_DATA_DIRECTORY` \
|
||||
--mandir=`finddir B_SYSTEM_NONPACKAGED_DIRECTORY`/documentation/man \
|
||||
--with-tlib=ncurses \
|
||||
make clean
|
||||
make install
|
||||
|
||||
./configure --prefix=`finddir B_SYSTEM_NONPACKAGED_DIRECTORY` \
|
||||
--datarootdir=`finddir B_SYSTEM_NONPACKAGED_DATA_DIRECTORY` \
|
||||
--mandir=`finddir B_SYSTEM_NONPACKAGED_DIRECTORY`/documentation/man \
|
||||
--with-tlib=ncurses \
|
||||
--disable-gui
|
||||
make clean
|
||||
make install
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*popup.txt* For Vim version 9.0. Last change: 2022 Jun 16
|
||||
*popup.txt* For Vim version 9.0. Last change: 2022 Oct 07
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -366,7 +366,6 @@ popup_findpreview() *popup_findpreview()*
|
||||
Get the |window-ID| for the popup preview window.
|
||||
Return zero if there is none.
|
||||
|
||||
|
||||
popup_getoptions({id}) *popup_getoptions()*
|
||||
Return the {options} for popup {id} in a Dict.
|
||||
A zero value means the option was not set. For "zindex" the
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*quickref.txt* For Vim version 9.0. Last change: 2022 Oct 02
|
||||
*quickref.txt* For Vim version 9.0. Last change: 2022 Oct 15
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -785,6 +785,7 @@ Short explanation of each option: *option-list*
|
||||
'lines' number of lines in the display
|
||||
'linespace' 'lsp' number of pixel lines to use between characters
|
||||
'lisp' automatic indenting for Lisp
|
||||
'lispoptions' 'lop' changes how Lisp indenting is done
|
||||
'lispwords' 'lw' words that change how lisp indenting works
|
||||
'list' show <Tab> and <EOL>
|
||||
'listchars' 'lcs' characters for displaying in list mode
|
||||
|
||||
@@ -628,6 +628,11 @@ When Vim starts up, after processing your .vimrc, it scans all directories in
|
||||
directories are added to 'runtimepath'. Then all the plugins are loaded.
|
||||
See |packload-two-steps| for how these two steps can be useful.
|
||||
|
||||
To allow for calling into package functionality while parsing your .vimrc,
|
||||
|:colorscheme| and |autoload| will both automatically search under 'packpath'
|
||||
as well in addition to 'runtimepath'. See the documentation for each for
|
||||
details.
|
||||
|
||||
In the example Vim will find "pack/foo/start/foobar/plugin/foo.vim" and adds
|
||||
"~/.vim/pack/foo/start/foobar" to 'runtimepath'.
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*rileft.txt* For Vim version 9.0. Last change: 2022 Apr 03
|
||||
*rileft.txt* For Vim version 9.0. Last change: 2022 Oct 12
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Avner Lottem
|
||||
@@ -35,6 +35,11 @@ encoded for every character (or group of characters) are not supported either
|
||||
as this kind of support is out of the scope of a simple addition to an
|
||||
existing editor (and it's not sanctioned by Unicode either).
|
||||
|
||||
As many people working on the code do not use the right-to-left mode, this
|
||||
feature may not work in some situations. If you can describe what is wrong
|
||||
and how it would work when fixed, please create an issue on github, see
|
||||
|bug-reports|.
|
||||
|
||||
|
||||
Highlights
|
||||
----------
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*syntax.txt* For Vim version 9.0. Last change: 2022 Oct 03
|
||||
*syntax.txt* For Vim version 9.0. Last change: 2022 Oct 14
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -3021,16 +3021,25 @@ satisfied with it for my own projects.
|
||||
SED *sed.vim* *ft-sed-syntax*
|
||||
|
||||
To make tabs stand out from regular blanks (accomplished by using Todo
|
||||
highlighting on the tabs), define "highlight_sedtabs" by putting >
|
||||
|
||||
:let highlight_sedtabs = 1
|
||||
highlighting on the tabs), define "g:sed_highlight_tabs" by putting >
|
||||
|
||||
:let g:sed_highlight_tabs = 1
|
||||
<
|
||||
in the vimrc file. (This special highlighting only applies for tabs
|
||||
inside search patterns, replacement texts, addresses or text included
|
||||
by an Append/Change/Insert command.) If you enable this option, it is
|
||||
also a good idea to set the tab width to one character; by doing that,
|
||||
you can easily count the number of tabs in a string.
|
||||
|
||||
GNU sed allows comments after text on the same line. BSD sed only allows
|
||||
comments where "#" is the first character of the line. To enforce BSD-style
|
||||
comments, i.e. mark end-of-line comments as errors, use: >
|
||||
|
||||
:let g:sed_dialect = "bsd"
|
||||
<
|
||||
Note that there are other differences between GNU sed and BSD sed which are
|
||||
not (yet) affected by this setting.
|
||||
|
||||
Bugs:
|
||||
|
||||
The transform command (y) is treated exactly like the substitute
|
||||
|
||||
@@ -451,6 +451,7 @@ $quote eval.txt /*$quote*
|
||||
'lines' options.txt /*'lines'*
|
||||
'linespace' options.txt /*'linespace'*
|
||||
'lisp' options.txt /*'lisp'*
|
||||
'lispoptions' options.txt /*'lispoptions'*
|
||||
'lispwords' options.txt /*'lispwords'*
|
||||
'list' options.txt /*'list'*
|
||||
'listchars' options.txt /*'listchars'*
|
||||
@@ -458,6 +459,7 @@ $quote eval.txt /*$quote*
|
||||
'lmap' options.txt /*'lmap'*
|
||||
'lnr' options.txt /*'lnr'*
|
||||
'loadplugins' options.txt /*'loadplugins'*
|
||||
'lop' options.txt /*'lop'*
|
||||
'lpl' options.txt /*'lpl'*
|
||||
'lrm' options.txt /*'lrm'*
|
||||
'ls' options.txt /*'ls'*
|
||||
@@ -954,6 +956,7 @@ $quote eval.txt /*$quote*
|
||||
'spelloptions' options.txt /*'spelloptions'*
|
||||
'spellsuggest' options.txt /*'spellsuggest'*
|
||||
'spf' options.txt /*'spf'*
|
||||
'spk' options.txt /*'spk'*
|
||||
'spl' options.txt /*'spl'*
|
||||
'splitbelow' options.txt /*'splitbelow'*
|
||||
'splitkeep' options.txt /*'splitkeep'*
|
||||
@@ -5547,6 +5550,7 @@ TerminalWinOpen autocmd.txt /*TerminalWinOpen*
|
||||
TextChanged autocmd.txt /*TextChanged*
|
||||
TextChangedI autocmd.txt /*TextChangedI*
|
||||
TextChangedP autocmd.txt /*TextChangedP*
|
||||
TextChangedT autocmd.txt /*TextChangedT*
|
||||
TextYankPost autocmd.txt /*TextYankPost*
|
||||
Transact-SQL ft_sql.txt /*Transact-SQL*
|
||||
U undo.txt /*U*
|
||||
@@ -5574,7 +5578,6 @@ VimResume autocmd.txt /*VimResume*
|
||||
VimSuspend autocmd.txt /*VimSuspend*
|
||||
Vimball-copyright pi_vimball.txt /*Vimball-copyright*
|
||||
Virtual-Replace-mode insert.txt /*Virtual-Replace-mode*
|
||||
VisVim if_ole.txt /*VisVim*
|
||||
Visual visual.txt /*Visual*
|
||||
Visual-mode visual.txt /*Visual-mode*
|
||||
W motion.txt /*W*
|
||||
@@ -9034,6 +9037,7 @@ popup_dialog() popup.txt /*popup_dialog()*
|
||||
popup_dialog-example popup.txt /*popup_dialog-example*
|
||||
popup_filter_menu() popup.txt /*popup_filter_menu()*
|
||||
popup_filter_yesno() popup.txt /*popup_filter_yesno()*
|
||||
popup_findecho() popup.txt /*popup_findecho()*
|
||||
popup_findinfo() popup.txt /*popup_findinfo()*
|
||||
popup_findpreview() popup.txt /*popup_findpreview()*
|
||||
popup_getoptions() popup.txt /*popup_getoptions()*
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*terminal.txt* For Vim version 9.0. Last change: 2022 Jun 09
|
||||
*terminal.txt* For Vim version 9.0. Last change: 2022 Oct 10
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -288,9 +288,8 @@ way to kill or interrupt the job. For example: >
|
||||
|
||||
So long as the job is running the window behaves like it contains a modified
|
||||
buffer. Trying to close the window with `CTRL-W :quit` fails. When using
|
||||
`CTRL-W :quit!` the job is ended. The text in the window is lost. The buffer
|
||||
still exists, but getting it in a window with `:buffer` will show an empty
|
||||
buffer.
|
||||
`CTRL-W :quit!` the job is ended. The text in the window is lost, the buffer
|
||||
is deleted. With `CTRL-W :bunload!` the buffer remains but will be empty.
|
||||
|
||||
Trying to close the window with `CTRL-W :close` also fails. Using
|
||||
`CTRL-W :close!` will close the window and make the buffer hidden.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*textprop.txt* For Vim version 9.0. Last change: 2022 Sep 21
|
||||
*textprop.txt* For Vim version 9.0. Last change: 2022 Oct 13
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -172,6 +172,9 @@ prop_add({lnum}, {col}, {props})
|
||||
wrap wrap the text to the next line
|
||||
truncate truncate the text to make it fit
|
||||
When omitted "truncate" is used.
|
||||
Note that this applies to the individual text
|
||||
property, the 'wrap' option sets the overall
|
||||
behavior
|
||||
All fields except "type" are optional.
|
||||
|
||||
It is an error when both "length" and "end_lnum" or "end_col"
|
||||
@@ -225,7 +228,7 @@ prop_add({lnum}, {col}, {props})
|
||||
GetLnum()->prop_add(col, props)
|
||||
<
|
||||
*prop_add_list()*
|
||||
prop_add_list({props}, [[{lnum}, {col}, {end-lnum}, {end-col}], ...])
|
||||
prop_add_list({props}, [{item}, ...])
|
||||
Similar to prop_add(), but attaches a text property at
|
||||
multiple positions in a buffer.
|
||||
|
||||
@@ -237,12 +240,18 @@ prop_add_list({props}, [[{lnum}, {col}, {end-lnum}, {end-col}], ...])
|
||||
type name of the text property type
|
||||
All fields except "type" are optional.
|
||||
|
||||
The second argument is a List of Lists where each list
|
||||
specifies the starting and ending position of the text. The
|
||||
first two items {lnum} and {col} specify the starting position
|
||||
of the text where the property will be attached and the last
|
||||
two items {end-lnum} and {end-col} specify the position just
|
||||
after the text.
|
||||
The second argument is a List of items, where each {item} is a
|
||||
list that specifies the starting and ending position of the
|
||||
text: [{lnum}, {col}, {end-lnum}, {end-col}]
|
||||
or: [{lnum}, {col}, {end-lnum}, {end-col}, {id}]
|
||||
|
||||
The first two items {lnum} and {col} specify the starting
|
||||
position of the text where the property will be attached.
|
||||
The next two items {end-lnum} and {end-col} specify the
|
||||
position just after the text.
|
||||
An optional fifth item {id} can be used to give a different ID
|
||||
to a property. When omitted the ID from {props} is used,
|
||||
falling back to zero if none are present.
|
||||
|
||||
It is not possible to add a text property with a "text" field
|
||||
here.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*todo.txt* For Vim version 9.0. Last change: 2022 Oct 03
|
||||
*todo.txt* For Vim version 9.0. Last change: 2022 Oct 16
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -39,22 +39,12 @@ browser use: https://github.com/vim/vim/issues/1234
|
||||
-------------------- Known bugs and current work -----------------------
|
||||
|
||||
'smoothscroll':
|
||||
- CTRL-E and gj in long line with 'scrolloff' 5 not working well yet.
|
||||
- computing 'scrolloff' position row use w_skipcol
|
||||
|
||||
Add a string to the 'display' option ("smoothscroll" ?) to make CTRL-E and
|
||||
CTRL-Y scroll one screen line, also if this means the first line doesn't start
|
||||
with the first character (like what happens with a last line that doesn't
|
||||
fit). Display "<<<" at the start of the first visible line (like "@@@" is
|
||||
displayed in the last line). (Arseny Nasokin, #5154)
|
||||
Neovim PR: https://github.com/neovim/neovim/pull/11014
|
||||
Check textprop right/above/below with 'number' set and "n" in 'cpo'.
|
||||
|
||||
Use :defer command:
|
||||
- Use "D" flag of writefile() and mkdir() in tests.
|
||||
(testdir/test_p*.vim done)
|
||||
|
||||
Fix for powershell: #11257
|
||||
|
||||
Change boolean 'splitscroll' into string 'splitkeep'. #11258
|
||||
Don't do anything for ":!". #11372
|
||||
|
||||
|
||||
Further Vim9 improvements, possibly after launch:
|
||||
@@ -70,7 +60,8 @@ Further Vim9 improvements, possibly after launch:
|
||||
Popup windows:
|
||||
- Add a function to redraw a specific popup window. Esp. to be used when
|
||||
editing the command line, when screen updating doesn't happen. (Shougo)
|
||||
#10210 Probably need to update all popup windows (they may overlap)
|
||||
#10210 Example that shows the need on the issue.
|
||||
Probably need to update all popup windows (they may overlap)
|
||||
If the display is scrolled need to redraw everything later.
|
||||
- Add a flag to make a popup window focusable?
|
||||
CTRL-W P cycle over any preview window or focusable popup, end up back in
|
||||
@@ -174,7 +165,10 @@ Terminal emulator window:
|
||||
conversions.
|
||||
|
||||
Autoconf: must use autoconf 2.69, later version generates lots of warnings
|
||||
- try using autoconf 2.71 and fix all "obsolete" warnings
|
||||
- try using autoconf 2.71 and fix all "obsolete" warnings #11322
|
||||
|
||||
Problem with Visual highlight when 'linebreak' and 'showbreak' are set.
|
||||
#11272
|
||||
|
||||
Can deref_func_name() and deref_function_name() be merged?
|
||||
|
||||
@@ -196,10 +190,17 @@ feature is supported or not. Replaces the xterm mechanism to request each
|
||||
entry separately. #6609
|
||||
Multiplexers (screen, tmux) can request it to the underlying terminal, and
|
||||
pass it on with modifications.
|
||||
How to get all the text quickly (also over ssh)? Can we use a side channel?
|
||||
|
||||
Using "A" and "o" in manually created fold (in empty buffer) does not behave
|
||||
consistenly (James McCoy, #10698)
|
||||
|
||||
In a timer callback, when using ":echo" and then input() the message is
|
||||
overwritten. Could use ":echowin" and call redraw_cmd() in get_user_input().
|
||||
#11299
|
||||
|
||||
Syntax include problem: #11277. Related to Patch 8.2.2761
|
||||
|
||||
To avoid flicker: add an option that when a screen clear is requested, instead
|
||||
of clearing it draws everything and uses "clear to end of line" for every line.
|
||||
Resetting 't_ut' already causes this?
|
||||
@@ -233,11 +234,10 @@ MS-Windows: did path modifier :p:8 stop working? #8600
|
||||
Version of getchar() that does not move the cursor - #10603 Use a separate
|
||||
argument for the new flag.
|
||||
|
||||
Add "lastline" entry to 'fillchars' to specify a character instead of '@'.
|
||||
#10963
|
||||
|
||||
test_arglist func Test_all_not_allowed_from_cmdwin() hangs on MS-Windows.
|
||||
|
||||
Can we add highlighting to ":echowindow"?
|
||||
|
||||
Information for a specific terminal (e.g. gnome, tmux, konsole, alacritty) is
|
||||
spread out. Make a section with copy/paste examples of script and pointers to
|
||||
more information.
|
||||
@@ -450,8 +450,6 @@ find them. (Max Kukartsev, #6218)
|
||||
|
||||
Enable 'termbidi' if $VTE_VERSION >= 5703 ?
|
||||
|
||||
Sound: support on Mac? Or does libcanberra work there?
|
||||
|
||||
Python 3.8 doesn't work. (Antonios Hadjigeorgalis, #5509)
|
||||
|
||||
"--cleanFOO" does not result in an error. (#5537)
|
||||
@@ -601,6 +599,11 @@ negative. (see #4326)
|
||||
tab page. (Ingo Karkat, #4324)
|
||||
:call settabwinvar(1, 1, '&cmdheight', 2) also doesn't work well.
|
||||
|
||||
When opening a file, allow for specifying the initial column position:
|
||||
vim +12:5 file.txt line 12 column 5
|
||||
:edit +12:5 file.txt
|
||||
Should probably use the column as the character index.
|
||||
|
||||
This modeline throws unexpected errors: (#4165)
|
||||
vim: syn=nosyntax
|
||||
|
||||
@@ -3074,9 +3077,6 @@ Macintosh:
|
||||
line is too short. Add a word in 'scrollopt' to allow moving the cursor
|
||||
to longer line that is visible. A similar thing is done for the GUI when
|
||||
using the horizontal scrollbar.
|
||||
7 VisVim can only open one file. Hard to solve: each opened file is passed
|
||||
with a separate invocation, would need to use timestamps to know the
|
||||
invocations belong together.
|
||||
8 When giving a ":bwipeout" command a file-changed dialog may popup for this
|
||||
buffer, which is pointless. (Mike Williams)
|
||||
8 On MS-Windows ":make" doesn't show output while it is working. Use the
|
||||
|
||||
@@ -482,6 +482,10 @@ then define the function like this: >
|
||||
echo "Done!"
|
||||
endfunction
|
||||
|
||||
If the file doesn't exist, Vim will also search in 'packpath' (under "start")
|
||||
to allow calling packages' functions from your .vimrc when the packages have
|
||||
not been added to 'runtimepath' yet (see |packages|).
|
||||
|
||||
The file name and the name used before the # in the function must match
|
||||
exactly, and the defined function must have the name exactly as it will be
|
||||
called. In Vim9 script the "g:" prefix must be used: >
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*usr_41.txt* For Vim version 9.0. Last change: 2022 Jun 23
|
||||
*usr_41.txt* For Vim version 9.0. Last change: 2022 Oct 07
|
||||
|
||||
VIM USER MANUAL - by Bram Moolenaar
|
||||
|
||||
|
||||
@@ -159,6 +159,7 @@ relative path: >
|
||||
|
||||
This will search for the script "monthlib.vim" in the autoload directories of
|
||||
'runtimepath'. With Unix one of the directories often is "~/.vim/autoload".
|
||||
It will also search under 'packpath', under "start".
|
||||
|
||||
The main advantage of this is that this script can be easily shared with other
|
||||
scripts. You do need to make sure that the script name is unique, since Vim
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*various.txt* For Vim version 9.0. Last change: 2022 Sep 19
|
||||
*various.txt* For Vim version 9.0. Last change: 2022 Oct 13
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -249,7 +249,8 @@ g8 Print the hex values of the bytes used in the
|
||||
|
||||
*:!cmd* *:!*
|
||||
:!{cmd} Execute {cmd} with the shell. See also the 'shell'
|
||||
and 'shelltype' option.
|
||||
and 'shelltype' option. `:!` without a {cmd} is a no-op,
|
||||
it does nothing.
|
||||
*E34*
|
||||
Any '!' in {cmd} is replaced with the previous
|
||||
external command (see also 'cpoptions'). But not when
|
||||
@@ -332,8 +333,8 @@ g8 Print the hex values of the bytes used in the
|
||||
*+feature-list*
|
||||
*+acl* |ACL| support included
|
||||
*+ARP* Amiga only: ARP support included
|
||||
B *+arabic* |Arabic| language support
|
||||
B *+autochdir* support 'autochdir' option
|
||||
H *+arabic* |Arabic| language support
|
||||
N *+autochdir* support 'autochdir' option
|
||||
T *+autocmd* |:autocmd|, automatic commands. Always enabled since
|
||||
8.0.1564
|
||||
H *+autoservername* Automatically enable |clientserver|
|
||||
@@ -355,12 +356,13 @@ N *+clientserver* Unix and Win32: Remote invocation |clientserver|
|
||||
*+clipboard_working* |clipboard| support compiled-in and working
|
||||
T *+cmdline_compl* command line completion |cmdline-completion|
|
||||
T *+cmdline_hist* command line history |cmdline-history|
|
||||
N *+cmdline_info* |'showcmd'| and |'ruler'|
|
||||
T *+cmdline_info* |'showcmd'| and |'ruler'|; Always enabled since
|
||||
9.0.0747
|
||||
T *+cmdwin* |cmdline-window| support; Always enabled since 9.0.0657
|
||||
T *+comments* |'comments'| support
|
||||
B *+conceal* "conceal" support, see |conceal| |:syn-conceal| etc.
|
||||
N *+conceal* "conceal" support, see |conceal| |:syn-conceal| etc.
|
||||
N *+cryptv* encryption support |encryption|
|
||||
B *+cscope* |cscope| support
|
||||
H *+cscope* |cscope| support
|
||||
T *+cursorbind* |'cursorbind'| support
|
||||
m *+cursorshape* |termcap-cursor-shape| support
|
||||
m *+debug* Compiled for debugging.
|
||||
@@ -371,7 +373,7 @@ N *+diff* |vimdiff| and 'diff'
|
||||
N *+digraphs* |digraphs| *E196*
|
||||
*+directx* Win32 GUI only: DirectX and |'renderoptions'|
|
||||
*+dnd* Support for DnD into the "~ register |quote_~|.
|
||||
B *+emacs_tags* |emacs-tags| files
|
||||
H *+emacs_tags* |emacs-tags| files
|
||||
N *+eval* expression evaluation |eval.txt|
|
||||
T *+ex_extra* always on now, used to be for Vim's extra Ex commands
|
||||
N *+extra_search* |'hlsearch'| and |'incsearch'| options.
|
||||
@@ -397,12 +399,12 @@ T *+insert_expand* |insert_expand| Insert mode completion
|
||||
m *+ipv6* Support for IPv6 networking |channel|
|
||||
m *+job* starting and stopping jobs |job|
|
||||
T *+jumplist* |jumplist|; Always enabled since 8.2.3795
|
||||
B *+keymap* |'keymap'|
|
||||
H *+keymap* |'keymap'|
|
||||
N *+lambda* |lambda| and |closure|
|
||||
B *+langmap* |'langmap'|
|
||||
H *+langmap* |'langmap'|
|
||||
N *+libcall* |libcall()|
|
||||
N *+linebreak* |'linebreak'|, |'breakat'| and |'showbreak'|
|
||||
t *+lispindent* |'lisp'|
|
||||
T *+lispindent* |'lisp'|
|
||||
T *+listcmds* Vim commands for the list of buffers |buffer-hidden|
|
||||
and argument list |:argdelete|
|
||||
T *+localmap* Support for mappings local to a buffer |:map-local|
|
||||
@@ -413,16 +415,16 @@ N *+mksession* |:mksession|
|
||||
T *+modify_fname* |filename-modifiers|
|
||||
T *+mouse* Mouse handling |mouse-using|
|
||||
N *+mouseshape* |'mouseshape'|
|
||||
B *+mouse_dec* Unix only: Dec terminal mouse handling |dec-mouse|
|
||||
N *+mouse_dec* Unix only: Dec terminal mouse handling |dec-mouse|
|
||||
N *+mouse_gpm* Unix only: Linux console mouse handling |gpm-mouse|
|
||||
m *+mouse_gpm/dyn* Same as |+mouse_gpm| with optional library dependency
|
||||
|/dyn|
|
||||
N *+mouse_jsbterm* JSB mouse handling |jsbterm-mouse|
|
||||
B *+mouse_netterm* Unix only: netterm mouse handling |netterm-mouse|
|
||||
N *+mouse_netterm* Unix only: netterm mouse handling |netterm-mouse|
|
||||
N *+mouse_pterm* QNX only: pterm mouse handling |qnx-terminal|
|
||||
N *+mouse_sysmouse* Unix only: *BSD console mouse handling |sysmouse|
|
||||
B *+mouse_sgr* Unix only: sgr mouse handling |sgr-mouse|
|
||||
B *+mouse_urxvt* Unix only: urxvt mouse handling |urxvt-mouse|
|
||||
N *+mouse_sgr* Unix only: sgr mouse handling |sgr-mouse|
|
||||
N *+mouse_urxvt* Unix only: urxvt mouse handling |urxvt-mouse|
|
||||
N *+mouse_xterm* Unix only: xterm mouse handling |xterm-mouse|
|
||||
T *+multi_byte* Unicode support, 16 and 32 bit characters |multibyte|
|
||||
*+multi_byte_ime* Win32 input method for multibyte chars |multibyte-ime|
|
||||
@@ -451,14 +453,14 @@ m *+python3/dyn* Python 3 interface |python-dynamic| |/dyn|
|
||||
N *+quickfix* |:make| and |quickfix| commands
|
||||
N *+reltime* |reltime()| function, 'hlsearch'/'incsearch' timeout,
|
||||
'redrawtime' option
|
||||
B *+rightleft* Right to left typing |'rightleft'|
|
||||
H *+rightleft* Right to left typing |'rightleft'|
|
||||
m *+ruby* Ruby interface |ruby|
|
||||
m *+ruby/dyn* Ruby interface |ruby-dynamic| |/dyn|
|
||||
T *+scrollbind* |'scrollbind'|
|
||||
B *+signs* |:sign|
|
||||
t *+smartindent* |'smartindent'|
|
||||
B *+sodium* compiled with libsodium for better encryption support
|
||||
B *+sound* |sound_playevent()|, |sound_playfile()| functions, etc.
|
||||
N *+signs* |:sign|
|
||||
T *+smartindent* |'smartindent'|
|
||||
H *+sodium* compiled with libsodium for better encryption support
|
||||
H *+sound* |sound_playevent()|, |sound_playfile()| functions, etc.
|
||||
N *+spell* spell checking support, see |spell|
|
||||
N *+startuptime* |--startuptime| argument
|
||||
N *+statusline* Options 'statusline', 'rulerformat' and special
|
||||
@@ -474,7 +476,7 @@ m *+tcl/dyn* Tcl interface |tcl-dynamic| |/dyn|
|
||||
m *+terminal* Support for terminal window |terminal|
|
||||
*+terminfo* uses |terminfo| instead of termcap
|
||||
N *+termresponse* support for |t_RV| and |v:termresponse|
|
||||
B *+termguicolors* 24-bit color in xterm-compatible terminals support
|
||||
N *+termguicolors* 24-bit color in xterm-compatible terminals support
|
||||
T *+textobjects* |text-objects| selection. Always enabled since 9.0.0222.
|
||||
N *+textprop* |text-properties|
|
||||
*+tgetent* non-Unix only: able to use external termcap
|
||||
@@ -483,7 +485,7 @@ T *+title* Setting the window 'title' and 'icon'; Always enabled
|
||||
N *+toolbar* |gui-toolbar|
|
||||
T *+user_commands* User-defined commands. |user-commands|
|
||||
Always enabled since 8.1.1210.
|
||||
B *+vartabs* Variable-width tabstops. |'vartabstop'|
|
||||
H *+vartabs* Variable-width tabstops. |'vartabstop'|
|
||||
T *+vertsplit* Vertically split windows |:vsplit|; Always enabled
|
||||
since 8.0.1118.
|
||||
T *+vim9script* |Vim9| script
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*vim9.txt* For Vim version 9.0. Last change: 2022 Oct 03
|
||||
*vim9.txt* For Vim version 9.0. Last change: 2022 Oct 11
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -962,6 +962,8 @@ In compiled Vim9 script you get:
|
||||
3
|
||||
Generally, you should not change the list that is iterated over. Make a copy
|
||||
first if needed.
|
||||
When looping over a list of lists, the nested lists can be changed. The loop
|
||||
variable is "final", it cannot be changed but what its value can be changed.
|
||||
*E1306*
|
||||
The depth of loops, :for and :while loops added together, cannot exceed 10.
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim support file to detect file types
|
||||
"
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2022 Sep 27
|
||||
" Last Change: 2022 Oct 12
|
||||
|
||||
" Listen very carefully, I will say this only once
|
||||
if exists("did_load_filetypes")
|
||||
@@ -369,6 +369,12 @@ au BufNewFile,BufRead *.ch call dist#ft#FTchange()
|
||||
" ChordPro
|
||||
au BufNewFile,BufRead *.chopro,*.crd,*.cho,*.crdpro,*.chordpro setf chordpro
|
||||
|
||||
" Clang-format
|
||||
au BufNewFile,BufRead .clang-format setf yaml
|
||||
|
||||
" Clang-tidy
|
||||
au BufNewFile,BufRead .clang-tidy setf yaml
|
||||
|
||||
" Clean
|
||||
au BufNewFile,BufRead *.dcl,*.icl setf clean
|
||||
|
||||
@@ -1029,6 +1035,9 @@ au BufNewFile,BufRead Kconfig,Kconfig.debug setf kconfig
|
||||
" Lace (ISE)
|
||||
au BufNewFile,BufRead *.ace,*.ACE setf lace
|
||||
|
||||
" Larch Shared Language
|
||||
au BufNewFile,BufRead .lsl call dist#ft#FTlsl()
|
||||
|
||||
" Latexmkrc
|
||||
au BufNewFile,BufRead .latexmkrc,latexmkrc setf perl
|
||||
|
||||
@@ -1119,7 +1128,7 @@ au BufNewFile,BufRead .luacheckrc setf lua
|
||||
au BufNewFile,BufRead *.rockspec setf lua
|
||||
|
||||
" Linden Scripting Language (Second Life)
|
||||
au BufNewFile,BufRead *.lsl setf lsl
|
||||
au BufNewFile,BufRead *.lsl call dist#ft#FTlsl()
|
||||
|
||||
" Lynx style file (or LotusScript!)
|
||||
au BufNewFile,BufRead *.lss setf lss
|
||||
@@ -1217,6 +1226,9 @@ au BufNewFile,BufRead *.m2,*.DEF,*.mi setf modula2
|
||||
" Modula-3 (.m3, .i3, .mg, .ig)
|
||||
au BufNewFile,BufRead *.[mi][3g] setf modula3
|
||||
|
||||
" Larch/Modula-3
|
||||
au BufNewFile,BufRead *.lm3 setf modula3
|
||||
|
||||
" Monk
|
||||
au BufNewFile,BufRead *.isc,*.monk,*.ssc,*.tsc setf monk
|
||||
|
||||
@@ -1625,6 +1637,9 @@ else
|
||||
au BufNewFile,BufRead *.rmd,*.smd setf rmd
|
||||
endif
|
||||
|
||||
" R profile file
|
||||
au BufNewFile,BufRead .Rprofile,Rprofile,Rprofile.site setf r
|
||||
|
||||
" RSS looks like XML
|
||||
au BufNewFile,BufRead *.rss setf xml
|
||||
|
||||
@@ -1750,6 +1765,9 @@ au BufNewFile,BufRead *.sed setf sed
|
||||
" SubRip
|
||||
au BufNewFile,BufRead *.srt setf srt
|
||||
|
||||
" SubStation Alpha
|
||||
au BufNewFile,BufRead *.ass,*.ssa setf ssa
|
||||
|
||||
" svelte
|
||||
au BufNewFile,BufRead *.svelte setf svelte
|
||||
|
||||
@@ -1945,6 +1963,10 @@ au BufNewFile,BufRead */etc/ssh/ssh_config.d/*.conf setf sshconfig
|
||||
au BufNewFile,BufRead sshd_config setf sshdconfig
|
||||
au BufNewFile,BufRead */etc/ssh/sshd_config.d/*.conf setf sshdconfig
|
||||
|
||||
" OpenVPN configuration
|
||||
au BufNewFile,BufRead *.ovpn setf openvpn
|
||||
au BufNewFile,BufRead */openvpn/*/*.conf setf openvpn
|
||||
|
||||
" Stata
|
||||
au BufNewFile,BufRead *.ado,*.do,*.imata,*.mata setf stata
|
||||
" Also *.class, but not when it's a Java bytecode file
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: Abaqus finite element input file (www.abaqus.com)
|
||||
" Maintainer: Carl Osterwisch <costerwi@gmail.com>
|
||||
" Last Change: 2022 Aug 03
|
||||
" Last Change: 2022 Oct 08
|
||||
|
||||
" Only do this when not done yet for this buffer
|
||||
if exists("b:did_ftplugin") | finish | endif
|
||||
@@ -66,25 +66,44 @@ if exists("loaded_matchit") && !exists("b:match_words")
|
||||
endif
|
||||
|
||||
if !exists("no_plugin_maps") && !exists("no_abaqus_maps")
|
||||
" Define keys used to move [count] keywords backward or forward.
|
||||
noremap <silent><buffer> [[ ?^\*\a<CR>:nohlsearch<CR>
|
||||
noremap <silent><buffer> ]] /^\*\a<CR>:nohlsearch<CR>
|
||||
" Map [[ and ]] keys to move [count] keywords backward or forward
|
||||
nnoremap <silent><buffer> ]] :call <SID>Abaqus_NextKeyword(1)<CR>
|
||||
nnoremap <silent><buffer> [[ :call <SID>Abaqus_NextKeyword(-1)<CR>
|
||||
function! <SID>Abaqus_NextKeyword(direction)
|
||||
.mark '
|
||||
if a:direction < 0
|
||||
let flags = 'b'
|
||||
else
|
||||
let flags = ''
|
||||
endif
|
||||
let l:count = abs(a:direction) * v:count1
|
||||
while l:count > 0 && search("^\\*\\a", flags)
|
||||
let l:count -= 1
|
||||
endwhile
|
||||
endfunction
|
||||
|
||||
" Define key to toggle commenting of the current line or range
|
||||
" Map \\ to toggle commenting of the current line or range
|
||||
noremap <silent><buffer> <LocalLeader><LocalLeader>
|
||||
\ :call <SID>Abaqus_ToggleComment()<CR>j
|
||||
function! <SID>Abaqus_ToggleComment() range
|
||||
if strpart(getline(a:firstline), 0, 2) == "**"
|
||||
" Un-comment all lines in range
|
||||
silent execute a:firstline . ',' . a:lastline . 's/^\*\*//'
|
||||
else
|
||||
" Comment all lines in range
|
||||
silent execute a:firstline . ',' . a:lastline . 's/^/**/'
|
||||
endif
|
||||
if strpart(getline(a:firstline), 0, 2) == "**"
|
||||
" Un-comment all lines in range
|
||||
silent execute a:firstline . ',' . a:lastline . 's/^\*\*//'
|
||||
else
|
||||
" Comment all lines in range
|
||||
silent execute a:firstline . ',' . a:lastline . 's/^/**/'
|
||||
endif
|
||||
endfunction
|
||||
|
||||
" Map \s to swap first two comma separated fields
|
||||
noremap <silent><buffer> <LocalLeader>s :call <SID>Abaqus_Swap()<CR>
|
||||
function! <SID>Abaqus_Swap() range
|
||||
silent execute a:firstline . ',' . a:lastline . 's/\([^*,]*\),\([^,]*\)/\2,\1/'
|
||||
endfunction
|
||||
|
||||
let b:undo_ftplugin .= "|unmap <buffer> [[|unmap <buffer> ]]"
|
||||
\ . "|unmap <buffer> <LocalLeader><LocalLeader>"
|
||||
\ . "|unmap <buffer> <LocalLeader>s"
|
||||
endif
|
||||
|
||||
" Undo must be done in nocompatible mode for <LocalLeader>.
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
" Maintainer: Doug Kearns <dougkearns@gmail.com>
|
||||
" Previous Maintainer: Max Ischenko <mfi@ukr.net>
|
||||
" Contributor: Dorai Sitaram <ds26@gte.com>
|
||||
" Last Change: 2022 Sep 05
|
||||
" C.D. MacEachern <craig.daniel.maceachern@gmail.com>
|
||||
" Last Change: 2022 Oct 15
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
@@ -19,9 +20,11 @@ setlocal formatoptions-=t formatoptions+=croql
|
||||
|
||||
let &l:define = '\<function\|\<local\%(\s\+function\)\='
|
||||
|
||||
" TODO: handle init.lua
|
||||
setlocal includeexpr=substitute(v:fname,'\\.','/','g')
|
||||
setlocal suffixesadd=.lua
|
||||
|
||||
let b:undo_ftplugin = "setlocal cms< com< def< fo< sua<"
|
||||
let b:undo_ftplugin = "setlocal cms< com< def< fo< inex< sua<"
|
||||
|
||||
if exists("loaded_matchit") && !exists("b:match_words")
|
||||
let b:match_ignorecase = 0
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim filetype plugin
|
||||
" Language: Markdown
|
||||
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
|
||||
" Last Change: 2019 Dec 05
|
||||
" Language: Markdown
|
||||
" Maintainer: Tim Pope <https://github.com/tpope/vim-markdown>
|
||||
" Last Change: 2022 Oct 13
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
@@ -9,18 +9,33 @@ endif
|
||||
|
||||
runtime! ftplugin/html.vim ftplugin/html_*.vim ftplugin/html/*.vim
|
||||
|
||||
let s:keepcpo= &cpo
|
||||
set cpo&vim
|
||||
|
||||
setlocal comments=fb:*,fb:-,fb:+,n:> commentstring=<!--%s-->
|
||||
setlocal formatoptions+=tcqln formatoptions-=r formatoptions-=o
|
||||
setlocal formatlistpat=^\\s*\\d\\+\\.\\s\\+\\\|^[-*+]\\s\\+\\\|^\\[^\\ze[^\\]]\\+\\]:
|
||||
setlocal formatlistpat=^\\s*\\d\\+\\.\\s\\+\\\|^\\s*[-*+]\\s\\+\\\|^\\[^\\ze[^\\]]\\+\\]:\\&^.\\{4\\}
|
||||
|
||||
if exists('b:undo_ftplugin')
|
||||
let b:undo_ftplugin .= "|setl cms< com< fo< flp<"
|
||||
let b:undo_ftplugin .= "|setl cms< com< fo< flp< et< ts< sts< sw<"
|
||||
else
|
||||
let b:undo_ftplugin = "setl cms< com< fo< flp<"
|
||||
let b:undo_ftplugin = "setl cms< com< fo< flp< et< ts< sts< sw<"
|
||||
endif
|
||||
|
||||
if get(g:, 'markdown_recommended_style', 1)
|
||||
setlocal expandtab tabstop=4 softtabstop=4 shiftwidth=4
|
||||
endif
|
||||
|
||||
if !exists("g:no_plugin_maps") && !exists("g:no_markdown_maps")
|
||||
nnoremap <silent><buffer> [[ :<C-U>call search('\%(^#\{1,5\}\s\+\S\\|^\S.*\n^[=-]\+$\)', "bsW")<CR>
|
||||
nnoremap <silent><buffer> ]] :<C-U>call search('\%(^#\{1,5\}\s\+\S\\|^\S.*\n^[=-]\+$\)', "sW")<CR>
|
||||
xnoremap <silent><buffer> [[ :<C-U>exe "normal! gv"<Bar>call search('\%(^#\{1,5\}\s\+\S\\|^\S.*\n^[=-]\+$\)', "bsW")<CR>
|
||||
xnoremap <silent><buffer> ]] :<C-U>exe "normal! gv"<Bar>call search('\%(^#\{1,5\}\s\+\S\\|^\S.*\n^[=-]\+$\)', "sW")<CR>
|
||||
let b:undo_ftplugin .= '|sil! nunmap <buffer> [[|sil! nunmap <buffer> ]]|sil! xunmap <buffer> [[|sil! xunmap <buffer> ]]'
|
||||
endif
|
||||
|
||||
function! s:NotCodeBlock(lnum) abort
|
||||
return synIDattr(synID(v:lnum, 1, 1), 'name') !=# 'markdownCode'
|
||||
return synIDattr(synID(a:lnum, 1, 1), 'name') !=# 'markdownCode'
|
||||
endfunction
|
||||
|
||||
function! MarkdownFold() abort
|
||||
@@ -64,11 +79,14 @@ function! MarkdownFoldText() abort
|
||||
return hash_indent.' '.title.' '.linecount
|
||||
endfunction
|
||||
|
||||
if has("folding") && exists("g:markdown_folding")
|
||||
if has("folding") && get(g:, "markdown_folding", 0)
|
||||
setlocal foldexpr=MarkdownFold()
|
||||
setlocal foldmethod=expr
|
||||
setlocal foldtext=MarkdownFoldText()
|
||||
let b:undo_ftplugin .= " foldexpr< foldmethod< foldtext<"
|
||||
let b:undo_ftplugin .= "|setl foldexpr< foldmethod< foldtext<"
|
||||
endif
|
||||
|
||||
let &cpo = s:keepcpo
|
||||
unlet s:keepcpo
|
||||
|
||||
" vim:set sw=2:
|
||||
|
||||
13
runtime/ftplugin/poefilter.vim
Normal file
13
runtime/ftplugin/poefilter.vim
Normal file
@@ -0,0 +1,13 @@
|
||||
" Vim filetype plugin
|
||||
" Language: PoE item filter
|
||||
" Maintainer: ObserverOfTime <chronobserver@disroot.org>
|
||||
" Last Change: 2022 Oct 07
|
||||
|
||||
if exists('b:did_ftplugin')
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
setlocal comments=:# commentstring=#\ %s
|
||||
|
||||
let b:undo_ftplugin = 'setl com< cms<'
|
||||
13
runtime/ftplugin/ssa.vim
Normal file
13
runtime/ftplugin/ssa.vim
Normal file
@@ -0,0 +1,13 @@
|
||||
" Vim filetype plugin
|
||||
" Language: SubStation Alpha
|
||||
" Maintainer: ObserverOfTime <chronobserver@disroot.org>
|
||||
" Last Change: 2022 Oct 10
|
||||
|
||||
if exists('b:did_ftplugin')
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
setlocal comments=:;,:!: commentstring=;\ %s
|
||||
|
||||
let b:undo_ftplugin = 'setl com< cms<'
|
||||
@@ -869,3 +869,21 @@ echo
|
||||
})
|
||||
enddef
|
||||
" END_INDENT
|
||||
|
||||
" START_INDENT
|
||||
echo {
|
||||
k: () => {
|
||||
if true
|
||||
echo
|
||||
popup_setoptions(id,
|
||||
{title: 'title'})
|
||||
endif
|
||||
}
|
||||
}
|
||||
" END_INDENT
|
||||
|
||||
" START_INDENT
|
||||
if true
|
||||
elseif
|
||||
endif
|
||||
" END_INDENT
|
||||
|
||||
@@ -849,7 +849,7 @@ endfor
|
||||
echo []
|
||||
+ []
|
||||
+ [{a: 1,
|
||||
b: 2}]
|
||||
b: 2}]
|
||||
}
|
||||
" END_INDENT
|
||||
|
||||
@@ -869,3 +869,21 @@ def Foo()
|
||||
})
|
||||
enddef
|
||||
" END_INDENT
|
||||
|
||||
" START_INDENT
|
||||
echo {
|
||||
k: () => {
|
||||
if true
|
||||
echo
|
||||
popup_setoptions(id,
|
||||
{title: 'title'})
|
||||
endif
|
||||
}
|
||||
}
|
||||
" END_INDENT
|
||||
|
||||
" START_INDENT
|
||||
if true
|
||||
elseif
|
||||
endif
|
||||
" END_INDENT
|
||||
|
||||
@@ -3,7 +3,7 @@ vim9script
|
||||
# Vim indent file
|
||||
# Language: Vim script
|
||||
# Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
# Last Change: 2022 Sep 27
|
||||
# Last Change: 2022 Oct 5
|
||||
|
||||
# Only load this indent file when no other was loaded.
|
||||
if exists('b:did_indent')
|
||||
@@ -15,7 +15,7 @@ b:undo_indent = 'setlocal indentkeys< indentexpr<'
|
||||
|
||||
import autoload '../autoload/dist/vimindent.vim'
|
||||
|
||||
setlocal indentexpr=vimindent.Expr(v:lnum)
|
||||
setlocal indentexpr=vimindent.Expr()
|
||||
setlocal indentkeys+==endif,=enddef,=endfu,=endfor,=endwh,=endtry,=},=else,=cat,=finall,=END,0\\
|
||||
execute('setlocal indentkeys+=0=\"\\\ ,0=#\\\ ')
|
||||
setlocal indentkeys-=0#
|
||||
|
||||
@@ -129,6 +129,12 @@ an <silent> 10.330 &File.&Close<Tab>:close
|
||||
\ else <Bar>
|
||||
\ confirm close <Bar>
|
||||
\ endif<CR>
|
||||
tln <silent> 10.330 &File.&Close<Tab>:close
|
||||
\ <C-W>:if winheight(2) < 0 && tabpagewinnr(2) == 0 <Bar>
|
||||
\ confirm enew <Bar>
|
||||
\ else <Bar>
|
||||
\ confirm close <Bar>
|
||||
\ endif<CR>
|
||||
an 10.335 &File.-SEP1- <Nop>
|
||||
an <silent> 10.340 &File.&Save<Tab>:w :if expand("%") == ""<Bar>browse confirm w<Bar>else<Bar>confirm w<Bar>endif<CR>
|
||||
an 10.350 &File.Save\ &As\.\.\.<Tab>:sav :browse confirm saveas<CR>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" These commands create the option window.
|
||||
"
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2022 Oct 02
|
||||
" Last Change: 2022 Oct 15
|
||||
|
||||
" If there already is an option window, jump to that one.
|
||||
let buf = bufnr('option-window')
|
||||
@@ -956,6 +956,8 @@ if has("lispindent")
|
||||
call <SID>BinOptionL("lisp")
|
||||
call <SID>AddOption("lispwords", gettext("words that change how lisp indenting works"))
|
||||
call <SID>OptionL("lw")
|
||||
call <SID>AddOption("lispoptions", gettext("options for Lisp indenting"))
|
||||
call <SID>OptionL("lop")
|
||||
endif
|
||||
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
" This file is normally sourced from menu.vim.
|
||||
"
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2022 Feb 04
|
||||
" Last Change: 2022 Oct 04
|
||||
|
||||
" Define the SetSyn function, used for the Syntax menu entries.
|
||||
" Set 'filetype' and also 'syntax' if it is manually selected.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim syntax file
|
||||
" Language: C
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2022 Apr 24
|
||||
" Last Change: 2022 Oct 05
|
||||
|
||||
" Quit when a (custom) syntax file was already loaded
|
||||
if exists("b:current_syntax")
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
" Vim syntax file
|
||||
" Language: Markdown
|
||||
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
|
||||
" Maintainer: Tim Pope <https://github.com/tpope/vim-markdown>
|
||||
" Filenames: *.markdown
|
||||
" Last Change: 2020 Jan 14
|
||||
" Last Change: 2022 Oct 13
|
||||
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
@@ -12,6 +12,12 @@ if !exists('main_syntax')
|
||||
let main_syntax = 'markdown'
|
||||
endif
|
||||
|
||||
if has('folding')
|
||||
let s:foldmethod = &l:foldmethod
|
||||
let s:foldtext = &l:foldtext
|
||||
endif
|
||||
let s:iskeyword = &l:iskeyword
|
||||
|
||||
runtime! syntax/html.vim
|
||||
unlet! b:current_syntax
|
||||
|
||||
@@ -26,17 +32,33 @@ for s:type in map(copy(g:markdown_fenced_languages),'matchstr(v:val,"[^=]*$")')
|
||||
if s:type =~ '\.'
|
||||
let b:{matchstr(s:type,'[^.]*')}_subtype = matchstr(s:type,'\.\zs.*')
|
||||
endif
|
||||
exe 'syn include @markdownHighlight'.substitute(s:type,'\.','','g').' syntax/'.matchstr(s:type,'[^.]*').'.vim'
|
||||
syn case match
|
||||
exe 'syn include @markdownHighlight_'.tr(s:type,'.','_').' syntax/'.matchstr(s:type,'[^.]*').'.vim'
|
||||
unlet! b:current_syntax
|
||||
let s:done_include[matchstr(s:type,'[^.]*')] = 1
|
||||
endfor
|
||||
unlet! s:type
|
||||
unlet! s:done_include
|
||||
|
||||
syn spell toplevel
|
||||
if exists('s:foldmethod') && s:foldmethod !=# &l:foldmethod
|
||||
let &l:foldmethod = s:foldmethod
|
||||
unlet s:foldmethod
|
||||
endif
|
||||
if exists('s:foldtext') && s:foldtext !=# &l:foldtext
|
||||
let &l:foldtext = s:foldtext
|
||||
unlet s:foldtext
|
||||
endif
|
||||
if s:iskeyword !=# &l:iskeyword
|
||||
let &l:iskeyword = s:iskeyword
|
||||
endif
|
||||
unlet s:iskeyword
|
||||
|
||||
if !exists('g:markdown_minlines')
|
||||
let g:markdown_minlines = 50
|
||||
endif
|
||||
execute 'syn sync minlines=' . g:markdown_minlines
|
||||
syn sync linebreaks=1
|
||||
syn case ignore
|
||||
|
||||
syn match markdownValid '[<>]\c[a-z/$!]\@!' transparent contains=NONE
|
||||
@@ -52,16 +74,16 @@ syn match markdownH2 "^.\+\n-\+$" contained contains=@markdownInline,markdownHea
|
||||
|
||||
syn match markdownHeadingRule "^[=-]\+$" contained
|
||||
|
||||
syn region markdownH1 matchgroup=markdownH1Delimiter start="##\@!" end="#*\s*$" keepend oneline contains=@markdownInline,markdownAutomaticLink contained
|
||||
syn region markdownH2 matchgroup=markdownH2Delimiter start="###\@!" end="#*\s*$" keepend oneline contains=@markdownInline,markdownAutomaticLink contained
|
||||
syn region markdownH3 matchgroup=markdownH3Delimiter start="####\@!" end="#*\s*$" keepend oneline contains=@markdownInline,markdownAutomaticLink contained
|
||||
syn region markdownH4 matchgroup=markdownH4Delimiter start="#####\@!" end="#*\s*$" keepend oneline contains=@markdownInline,markdownAutomaticLink contained
|
||||
syn region markdownH5 matchgroup=markdownH5Delimiter start="######\@!" end="#*\s*$" keepend oneline contains=@markdownInline,markdownAutomaticLink contained
|
||||
syn region markdownH6 matchgroup=markdownH6Delimiter start="#######\@!" end="#*\s*$" keepend oneline contains=@markdownInline,markdownAutomaticLink contained
|
||||
syn region markdownH1 matchgroup=markdownH1Delimiter start=" \{,3}#\s" end="#*\s*$" keepend oneline contains=@markdownInline,markdownAutomaticLink contained
|
||||
syn region markdownH2 matchgroup=markdownH2Delimiter start=" \{,3}##\s" end="#*\s*$" keepend oneline contains=@markdownInline,markdownAutomaticLink contained
|
||||
syn region markdownH3 matchgroup=markdownH3Delimiter start=" \{,3}###\s" end="#*\s*$" keepend oneline contains=@markdownInline,markdownAutomaticLink contained
|
||||
syn region markdownH4 matchgroup=markdownH4Delimiter start=" \{,3}####\s" end="#*\s*$" keepend oneline contains=@markdownInline,markdownAutomaticLink contained
|
||||
syn region markdownH5 matchgroup=markdownH5Delimiter start=" \{,3}#####\s" end="#*\s*$" keepend oneline contains=@markdownInline,markdownAutomaticLink contained
|
||||
syn region markdownH6 matchgroup=markdownH6Delimiter start=" \{,3}######\s" end="#*\s*$" keepend oneline contains=@markdownInline,markdownAutomaticLink contained
|
||||
|
||||
syn match markdownBlockquote ">\%(\s\|$\)" contained nextgroup=@markdownBlock
|
||||
|
||||
syn region markdownCodeBlock start=" \|\t" end="$" contained
|
||||
syn region markdownCodeBlock start="^\n\( \{4,}\|\t\)" end="^\ze \{,3}\S.*$" keepend
|
||||
|
||||
" TODO: real nesting
|
||||
syn match markdownListMarker "\%(\t\| \{0,4\}\)[-*+]\%(\s\+\S\)\@=" contained
|
||||
@@ -79,7 +101,7 @@ syn region markdownUrlTitle matchgroup=markdownUrlTitleDelimiter start=+"+ end=+
|
||||
syn region markdownUrlTitle matchgroup=markdownUrlTitleDelimiter start=+'+ end=+'+ keepend contained
|
||||
syn region markdownUrlTitle matchgroup=markdownUrlTitleDelimiter start=+(+ end=+)+ keepend contained
|
||||
|
||||
syn region markdownLinkText matchgroup=markdownLinkTextDelimiter start="!\=\[\%(\%(\_[^][]\|\[\_[^][]*\]\)*]\%( \=[[(]\)\)\@=" end="\]\%( \=[[(]\)\@=" nextgroup=markdownLink,markdownId skipwhite contains=@markdownInline,markdownLineStart
|
||||
syn region markdownLinkText matchgroup=markdownLinkTextDelimiter start="!\=\[\%(\_[^][]*\%(\[\_[^][]*\]\_[^][]*\)*]\%( \=[[(]\)\)\@=" end="\]\%( \=[[(]\)\@=" nextgroup=markdownLink,markdownId skipwhite contains=@markdownInline,markdownLineStart
|
||||
syn region markdownLink matchgroup=markdownLinkDelimiter start="(" end=")" contains=markdownUrl keepend contained
|
||||
syn region markdownId matchgroup=markdownIdDelimiter start="\[" end="\]" keepend contained
|
||||
syn region markdownAutomaticLink matchgroup=markdownUrlDelimiter start="<\%(\w\+:\|[[:alnum:]_+-]\+@\)\@=" end=">" keepend oneline
|
||||
@@ -88,31 +110,38 @@ let s:concealends = ''
|
||||
if has('conceal') && get(g:, 'markdown_syntax_conceal', 1) == 1
|
||||
let s:concealends = ' concealends'
|
||||
endif
|
||||
exe 'syn region markdownItalic matchgroup=markdownItalicDelimiter start="\S\@<=\*\|\*\S\@=" end="\S\@<=\*\|\*\S\@=" skip="\\\*" contains=markdownLineStart,@Spell' . s:concealends
|
||||
exe 'syn region markdownItalic matchgroup=markdownItalicDelimiter start="\w\@<!_\S\@=" end="\S\@<=_\w\@!" skip="\\_" contains=markdownLineStart,@Spell' . s:concealends
|
||||
exe 'syn region markdownBold matchgroup=markdownBoldDelimiter start="\S\@<=\*\*\|\*\*\S\@=" end="\S\@<=\*\*\|\*\*\S\@=" skip="\\\*" contains=markdownLineStart,markdownItalic,@Spell' . s:concealends
|
||||
exe 'syn region markdownBold matchgroup=markdownBoldDelimiter start="\w\@<!__\S\@=" end="\S\@<=__\w\@!" skip="\\_" contains=markdownLineStart,markdownItalic,@Spell' . s:concealends
|
||||
exe 'syn region markdownBoldItalic matchgroup=markdownBoldItalicDelimiter start="\S\@<=\*\*\*\|\*\*\*\S\@=" end="\S\@<=\*\*\*\|\*\*\*\S\@=" skip="\\\*" contains=markdownLineStart,@Spell' . s:concealends
|
||||
exe 'syn region markdownBoldItalic matchgroup=markdownBoldItalicDelimiter start="\w\@<!___\S\@=" end="\S\@<=___\w\@!" skip="\\_" contains=markdownLineStart,@Spell' . s:concealends
|
||||
exe 'syn region markdownItalic matchgroup=markdownItalicDelimiter start="\*\S\@=" end="\S\@<=\*\|^$" skip="\\\*" contains=markdownLineStart,@Spell' . s:concealends
|
||||
exe 'syn region markdownItalic matchgroup=markdownItalicDelimiter start="\w\@<!_\S\@=" end="\S\@<=_\w\@!\|^$" skip="\\_" contains=markdownLineStart,@Spell' . s:concealends
|
||||
exe 'syn region markdownBold matchgroup=markdownBoldDelimiter start="\*\*\S\@=" end="\S\@<=\*\*\|^$" skip="\\\*" contains=markdownLineStart,markdownItalic,@Spell' . s:concealends
|
||||
exe 'syn region markdownBold matchgroup=markdownBoldDelimiter start="\w\@<!__\S\@=" end="\S\@<=__\w\@!\|^$" skip="\\_" contains=markdownLineStart,markdownItalic,@Spell' . s:concealends
|
||||
exe 'syn region markdownBoldItalic matchgroup=markdownBoldItalicDelimiter start="\*\*\*\S\@=" end="\S\@<=\*\*\*\|^$" skip="\\\*" contains=markdownLineStart,@Spell' . s:concealends
|
||||
exe 'syn region markdownBoldItalic matchgroup=markdownBoldItalicDelimiter start="\w\@<!___\S\@=" end="\S\@<=___\w\@!\|^$" skip="\\_" contains=markdownLineStart,@Spell' . s:concealends
|
||||
exe 'syn region markdownStrike matchgroup=markdownStrikeDelimiter start="\~\~\S\@=" end="\S\@<=\~\~\|^$" contains=markdownLineStart,@Spell' . s:concealends
|
||||
|
||||
syn region markdownCode matchgroup=markdownCodeDelimiter start="`" end="`" keepend contains=markdownLineStart
|
||||
syn region markdownCode matchgroup=markdownCodeDelimiter start="`` \=" end=" \=``" keepend contains=markdownLineStart
|
||||
syn region markdownCode matchgroup=markdownCodeDelimiter start="^\s*````*.*$" end="^\s*````*\ze\s*$" keepend
|
||||
syn region markdownCodeBlock matchgroup=markdownCodeDelimiter start="^\s*\z(`\{3,\}\).*$" end="^\s*\z1\ze\s*$" keepend
|
||||
syn region markdownCodeBlock matchgroup=markdownCodeDelimiter start="^\s*\z(\~\{3,\}\).*$" end="^\s*\z1\ze\s*$" keepend
|
||||
|
||||
syn match markdownFootnote "\[^[^\]]\+\]"
|
||||
syn match markdownFootnoteDefinition "^\[^[^\]]\+\]:"
|
||||
|
||||
if main_syntax ==# 'markdown'
|
||||
let s:done_include = {}
|
||||
for s:type in g:markdown_fenced_languages
|
||||
if has_key(s:done_include, matchstr(s:type,'[^.]*'))
|
||||
continue
|
||||
endif
|
||||
exe 'syn region markdownHighlight'.substitute(matchstr(s:type,'[^=]*$'),'\..*','','').' matchgroup=markdownCodeDelimiter start="^\s*````*\s*\%({.\{-}\.\)\='.matchstr(s:type,'[^=]*').'}\=\S\@!.*$" end="^\s*````*\ze\s*$" keepend contains=@markdownHighlight'.substitute(matchstr(s:type,'[^=]*$'),'\.','','g') . s:concealends
|
||||
let s:done_include[matchstr(s:type,'[^.]*')] = 1
|
||||
endfor
|
||||
unlet! s:type
|
||||
unlet! s:done_include
|
||||
let s:done_include = {}
|
||||
for s:type in g:markdown_fenced_languages
|
||||
if has_key(s:done_include, matchstr(s:type,'[^.]*'))
|
||||
continue
|
||||
endif
|
||||
exe 'syn region markdownHighlight_'.substitute(matchstr(s:type,'[^=]*$'),'\..*','','').' matchgroup=markdownCodeDelimiter start="^\s*\z(`\{3,\}\)\s*\%({.\{-}\.\)\='.matchstr(s:type,'[^=]*').'}\=\S\@!.*$" end="^\s*\z1\ze\s*$" keepend contains=@markdownHighlight_'.tr(matchstr(s:type,'[^=]*$'),'.','_') . s:concealends
|
||||
exe 'syn region markdownHighlight_'.substitute(matchstr(s:type,'[^=]*$'),'\..*','','').' matchgroup=markdownCodeDelimiter start="^\s*\z(\~\{3,\}\)\s*\%({.\{-}\.\)\='.matchstr(s:type,'[^=]*').'}\=\S\@!.*$" end="^\s*\z1\ze\s*$" keepend contains=@markdownHighlight_'.tr(matchstr(s:type,'[^=]*$'),'.','_') . s:concealends
|
||||
let s:done_include[matchstr(s:type,'[^.]*')] = 1
|
||||
endfor
|
||||
unlet! s:type
|
||||
unlet! s:done_include
|
||||
|
||||
if get(b:, 'markdown_yaml_head', get(g:, 'markdown_yaml_head', main_syntax ==# 'markdown'))
|
||||
syn include @markdownYamlTop syntax/yaml.vim
|
||||
unlet! b:current_syntax
|
||||
syn region markdownYamlHead start="\%^---$" end="^\%(---\|\.\.\.\)\s*$" keepend contains=@markdownYamlTop,@Spell
|
||||
endif
|
||||
|
||||
syn match markdownEscape "\\[][\\`*_{}()<>#+.!-]"
|
||||
@@ -156,6 +185,8 @@ hi def link markdownBold htmlBold
|
||||
hi def link markdownBoldDelimiter markdownBold
|
||||
hi def link markdownBoldItalic htmlBoldItalic
|
||||
hi def link markdownBoldItalicDelimiter markdownBoldItalic
|
||||
hi def link markdownStrike htmlStrike
|
||||
hi def link markdownStrikeDelimiter markdownStrike
|
||||
hi def link markdownCodeDelimiter Delimiter
|
||||
|
||||
hi def link markdownEscape Special
|
||||
|
||||
167
runtime/syntax/poefilter.vim
Normal file
167
runtime/syntax/poefilter.vim
Normal file
@@ -0,0 +1,167 @@
|
||||
" Vim syntax file
|
||||
" Language: PoE item filter
|
||||
" Maintainer: ObserverOfTime <chronobserver@disroot.org>
|
||||
" Filenames: *.filter
|
||||
" Last Change: 2022 Oct 07
|
||||
|
||||
if exists('b:current_syntax')
|
||||
finish
|
||||
endif
|
||||
|
||||
let s:cpo_save = &cpoptions
|
||||
set cpoptions&vim
|
||||
|
||||
" Comment
|
||||
syn keyword poefilterTodo TODO NOTE XXX contained
|
||||
syn match poefilterCommentTag /\[[0-9A-Z\[\]]\+\]/ contained
|
||||
syn match poefilterComment /#.*$/ contains=poefilterTodo,poefilterCommentTag,@Spell
|
||||
|
||||
" Blocks
|
||||
syn keyword poefilterBlock Show Hide
|
||||
|
||||
" Conditions
|
||||
syn keyword poefilterCondition
|
||||
\ AlternateQuality
|
||||
\ AnyEnchantment
|
||||
\ BlightedMap
|
||||
\ Corrupted
|
||||
\ ElderItem
|
||||
\ ElderMap
|
||||
\ FracturedItem
|
||||
\ Identified
|
||||
\ Mirrored
|
||||
\ Replica
|
||||
\ Scourged
|
||||
\ ShapedMap
|
||||
\ ShaperItem
|
||||
\ SynthesisedItem
|
||||
\ UberBlightedMap
|
||||
\ skipwhite nextgroup=poefilterBoolean
|
||||
syn keyword poefilterCondition
|
||||
\ ArchnemesisMod
|
||||
\ BaseType
|
||||
\ Class
|
||||
\ EnchantmentPassiveNode
|
||||
\ HasEnchantment
|
||||
\ HasExplicitMod
|
||||
\ ItemLevel
|
||||
\ SocketGroup
|
||||
\ Sockets
|
||||
\ skipwhite nextgroup=poefilterOperator,poefilterString
|
||||
syn keyword poefilterCondition
|
||||
\ AreaLevel
|
||||
\ BaseArmour
|
||||
\ BaseDefencePercentile
|
||||
\ BaseEnergyShield
|
||||
\ BaseEvasion
|
||||
\ BaseWard
|
||||
\ CorruptedMods
|
||||
\ DropLevel
|
||||
\ EnchantmentPassiveNum
|
||||
\ GemLevel
|
||||
\ HasEaterOfWorldsImplicit
|
||||
\ HasSearingExarchImplicit
|
||||
\ Height
|
||||
\ LinkedSockets
|
||||
\ MapTier
|
||||
\ Quality
|
||||
\ StackSize
|
||||
\ Width
|
||||
\ skipwhite nextgroup=poefilterOperator,poefilterNumber
|
||||
syn keyword poefilterCondition
|
||||
\ GemQualityType
|
||||
\ skipwhite nextgroup=poefilterString,poefilterQuality
|
||||
syn keyword poefilterCondition
|
||||
\ HasInfluence
|
||||
\ skipwhite nextgroup=poefilterString,poefilterInfluence
|
||||
syn keyword poefilterCondition
|
||||
\ Rarity
|
||||
\ skipwhite nextgroup=poefilterString,poefilterRarity
|
||||
|
||||
" Actions
|
||||
syn keyword poefilterAction
|
||||
\ PlayAlertSound
|
||||
\ PlayAlertSoundPositional
|
||||
\ skipwhite nextgroup=poefilterNumber,poefilterDisable
|
||||
syn keyword poefilterAction
|
||||
\ CustomAlertSound
|
||||
\ CustomAlertSoundOptional
|
||||
\ skipwhite nextgroup=poefilterString
|
||||
syn keyword poefilterAction
|
||||
\ DisableDropSound
|
||||
\ EnableDropSound
|
||||
\ DisableDropSoundIfAlertSound
|
||||
\ EnableDropSoundIfAlertSound
|
||||
\ skipwhite nextgroup=poefilterBoolean
|
||||
syn keyword poefilterAction
|
||||
\ MinimapIcon
|
||||
\ SetBackgroundColor
|
||||
\ SetBorderColor
|
||||
\ SetFontSize
|
||||
\ SetTextColor
|
||||
\ skipwhite nextgroup=poefilterNumber
|
||||
syn keyword poefilterAction
|
||||
\ PlayEffect
|
||||
\ skipwhite nextgroup=poefilterColour
|
||||
|
||||
" Operators
|
||||
syn match poefilterOperator /!\|[<>=]=\?/ contained
|
||||
\ skipwhite nextgroup=poefilterString,poefilterNumber,
|
||||
\ poefilterQuality,poefilterRarity,poefilterInfluence
|
||||
|
||||
" Arguments
|
||||
syn match poefilterString /[-a-zA-Z0-9:,']/ contained contains=@Spell
|
||||
\ skipwhite nextgroup=poefilterString,poefilterNumber,
|
||||
\ poefilterQuality,poefilterRarity,poefilterInfluence
|
||||
syn region poefilterString matchgroup=poefilterQuote keepend
|
||||
\ start=/"/ end=/"/ concealends contained contains=@Spell
|
||||
\ skipwhite nextgroup=poefilterString,poefilterNumber,
|
||||
\ poefilterQuality,poefilterRarity,poefilterInfluence
|
||||
syn match poefilterNumber /-1\|0\|[1-9][0-9]*/ contained
|
||||
\ skipwhite nextgroup=poefilterString,poefilterNumber,
|
||||
\ poefilterQuality,poefilterRarity,poefilterInfluence,poefilterColour
|
||||
syn keyword poefilterBoolean True False contained
|
||||
|
||||
" Special arguments (conditions)
|
||||
syn keyword poefilterQuality Superior Divergent Anomalous Phantasmal
|
||||
\ contained skipwhite nextgroup=poefilterString,poefilterQuality
|
||||
syn keyword poefilterRarity Normal Magic Rare Unique
|
||||
\ contained skipwhite nextgroup=poefilterString,poefilterRarity
|
||||
syn keyword poefilterInfluence Shaper Elder
|
||||
\ Crusader Hunter Redeemer Warlord None
|
||||
\ contained skipwhite nextgroup=poefilterString,poefilterInfluence
|
||||
|
||||
" Special arguments (actions)
|
||||
syn keyword poefilterColour Red Green Blue Brown
|
||||
\ White Yellow Cyan Grey Orange Pink Purple
|
||||
\ contained skipwhite nextgroup=poefilterShape,poefilterTemp
|
||||
syn keyword poefilterShape Circle Diamond Hecagon Square Star Triangle
|
||||
\ Cross Moon Raindrop Kite Pentagon UpsideDownHouse contained
|
||||
syn keyword poefilterDisable None contained
|
||||
syn keyword poefilterTemp Temp contained
|
||||
|
||||
" Colours
|
||||
|
||||
hi def link poefilterAction Statement
|
||||
hi def link poefilterBlock Structure
|
||||
hi def link poefilterBoolean Boolean
|
||||
hi def link poefilterColour Special
|
||||
hi def link poefilterComment Comment
|
||||
hi def link poefilterCommentTag SpecialComment
|
||||
hi def link poefilterCondition Conditional
|
||||
hi def link poefilterDisable Constant
|
||||
hi def link poefilterInfluence Special
|
||||
hi def link poefilterNumber Number
|
||||
hi def link poefilterOperator Operator
|
||||
hi def link poefilterQuality Special
|
||||
hi def link poefilterQuote Delimiter
|
||||
hi def link poefilterRarity Special
|
||||
hi def link poefilterShape Special
|
||||
hi def link poefilterString String
|
||||
hi def link poefilterTemp StorageClass
|
||||
hi def link poefilterTodo Todo
|
||||
|
||||
let b:current_syntax = 'poefilter'
|
||||
|
||||
let &cpoptions = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
@@ -1,30 +1,42 @@
|
||||
" Vim syntax file
|
||||
" Language: sed
|
||||
" Maintainer: Haakon Riiser <hakonrk@fys.uio.no>
|
||||
" URL: http://folk.uio.no/hakonrk/vim/syntax/sed.vim
|
||||
" Last Change: 2010 May 29
|
||||
" Language: sed
|
||||
" Maintainer: Doug Kearns <dougkearns@gmail.com>
|
||||
" Previous Maintainer: Haakon Riiser <hakonrk@fys.uio.no>
|
||||
" Contributor: Jack Haden-Enneking
|
||||
" Last Change: 2022 Oct 15
|
||||
|
||||
" quit when a syntax file was already loaded
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
finish
|
||||
endif
|
||||
|
||||
syn keyword sedTodo contained TODO FIXME XXX
|
||||
|
||||
syn match sedError "\S"
|
||||
|
||||
syn match sedWhitespace "\s\+" contained
|
||||
syn match sedSemicolon ";"
|
||||
syn match sedAddress "[[:digit:]$]"
|
||||
syn match sedAddress "\d\+\~\d\+"
|
||||
syn region sedAddress matchgroup=Special start="[{,;]\s*/\(\\/\)\="lc=1 skip="[^\\]\(\\\\\)*\\/" end="/I\=" contains=sedTab,sedRegexpMeta
|
||||
syn region sedAddress matchgroup=Special start="^\s*/\(\\/\)\=" skip="[^\\]\(\\\\\)*\\/" end="/I\=" contains=sedTab,sedRegexpMeta
|
||||
syn match sedComment "^\s*#.*$"
|
||||
syn match sedFunction "[dDgGhHlnNpPqQx=]\s*\($\|;\)" contains=sedSemicolon,sedWhitespace
|
||||
syn region sedAddress matchgroup=Special start="[{,;]\s*/\%(\\/\)\="lc=1 skip="[^\\]\%(\\\\\)*\\/" end="/I\=" contains=sedTab,sedRegexpMeta
|
||||
syn region sedAddress matchgroup=Special start="^\s*/\%(\\/\)\=" skip="[^\\]\%(\\\\\)*\\/" end="/I\=" contains=sedTab,sedRegexpMeta
|
||||
syn match sedFunction "[dDgGhHlnNpPqQx=]\s*\%($\|;\)" contains=sedSemicolon,sedWhitespace
|
||||
if exists("g:sed_dialect") && g:sed_dialect ==? "bsd"
|
||||
syn match sedComment "^\s*#.*$" contains=sedTodo
|
||||
else
|
||||
syn match sedFunction "[dDgGhHlnNpPqQx=]\s*\ze#" contains=sedSemicolon,sedWhitespace
|
||||
syn match sedComment "#.*$" contains=sedTodo
|
||||
endif
|
||||
syn match sedLabel ":[^;]*"
|
||||
syn match sedLineCont "^\(\\\\\)*\\$" contained
|
||||
syn match sedLineCont "[^\\]\(\\\\\)*\\$"ms=e contained
|
||||
syn match sedLineCont "^\%(\\\\\)*\\$" contained
|
||||
syn match sedLineCont "[^\\]\%(\\\\\)*\\$"ms=e contained
|
||||
syn match sedSpecial "[{},!]"
|
||||
if exists("highlight_sedtabs")
|
||||
syn match sedTab "\t" contained
|
||||
|
||||
" continue to silently support the old name
|
||||
let s:highlight_tabs = v:false
|
||||
if exists("g:highlight_sedtabs") || get(g:, "sed_highlight_tabs", 0)
|
||||
let s:highlight_tabs = v:true
|
||||
syn match sedTab "\t" contained
|
||||
endif
|
||||
|
||||
" Append/Change/Insert
|
||||
@@ -34,39 +46,39 @@ syn region sedBranch matchgroup=sedFunction start="[bt]" matchgroup=sedSemicolon
|
||||
syn region sedRW matchgroup=sedFunction start="[rw]" matchgroup=sedSemicolon end=";\|$" contains=sedWhitespace
|
||||
|
||||
" Substitution/transform with various delimiters
|
||||
syn region sedFlagwrite matchgroup=sedFlag start="w" matchgroup=sedSemicolon end=";\|$" contains=sedWhitespace contained
|
||||
syn match sedFlag "[[:digit:]gpI]*w\=" contains=sedFlagwrite contained
|
||||
syn region sedFlagWrite matchgroup=sedFlag start="w" matchgroup=sedSemicolon end=";\|$" contains=sedWhitespace contained
|
||||
syn match sedFlag "[[:digit:]gpI]*w\=" contains=sedFlagWrite contained
|
||||
syn match sedRegexpMeta "[.*^$]" contained
|
||||
syn match sedRegexpMeta "\\." contains=sedTab contained
|
||||
syn match sedRegexpMeta "\[.\{-}\]" contains=sedTab contained
|
||||
syn match sedRegexpMeta "\\{\d\*,\d*\\}" contained
|
||||
syn match sedRegexpMeta "\\(.\{-}\\)" contains=sedTab contained
|
||||
syn match sedReplaceMeta "&\|\\\($\|.\)" contains=sedTab contained
|
||||
syn match sedRegexpMeta "\\%(.\{-}\\)" contains=sedTab contained
|
||||
syn match sedReplaceMeta "&\|\\\%($\|.\)" contains=sedTab contained
|
||||
|
||||
" Metacharacters: $ * . \ ^ [ ~
|
||||
" @ is used as delimiter and treated on its own below
|
||||
let __at = char2nr("@")
|
||||
let __sed_i = char2nr(" ") " ASCII: 32, EBCDIC: 64
|
||||
let s:at = char2nr("@")
|
||||
let s:i = char2nr(" ") " ASCII: 32, EBCDIC: 64
|
||||
if has("ebcdic")
|
||||
let __sed_last = 255
|
||||
let s:last = 255
|
||||
else
|
||||
let __sed_last = 126
|
||||
let s:last = 126
|
||||
endif
|
||||
let __sed_metacharacters = '$*.\^[~'
|
||||
while __sed_i <= __sed_last
|
||||
let __sed_delimiter = escape(nr2char(__sed_i), __sed_metacharacters)
|
||||
if __sed_i != __at
|
||||
exe 'syn region sedAddress matchgroup=Special start=@\\'.__sed_delimiter.'\(\\'.__sed_delimiter.'\)\=@ skip=@[^\\]\(\\\\\)*\\'.__sed_delimiter.'@ end=@'.__sed_delimiter.'I\=@ contains=sedTab'
|
||||
exe 'syn region sedRegexp'.__sed_i 'matchgroup=Special start=@'.__sed_delimiter.'\(\\\\\|\\'.__sed_delimiter.'\)*@ skip=@[^\\'.__sed_delimiter.']\(\\\\\)*\\'.__sed_delimiter.'@ end=@'.__sed_delimiter.'@me=e-1 contains=sedTab,sedRegexpMeta keepend contained nextgroup=sedReplacement'.__sed_i
|
||||
exe 'syn region sedReplacement'.__sed_i 'matchgroup=Special start=@'.__sed_delimiter.'\(\\\\\|\\'.__sed_delimiter.'\)*@ skip=@[^\\'.__sed_delimiter.']\(\\\\\)*\\'.__sed_delimiter.'@ end=@'.__sed_delimiter.'@ contains=sedTab,sedReplaceMeta keepend contained nextgroup=sedFlag'
|
||||
endif
|
||||
let __sed_i = __sed_i + 1
|
||||
let s:metacharacters = '$*.\^[~'
|
||||
while s:i <= s:last
|
||||
let s:delimiter = escape(nr2char(s:i), s:metacharacters)
|
||||
if s:i != s:at
|
||||
exe 'syn region sedAddress matchgroup=Special start=@\\'.s:delimiter.'\%(\\'.s:delimiter.'\)\=@ skip=@[^\\]\%(\\\\\)*\\'.s:delimiter.'@ end=@'.s:delimiter.'[IM]\=@ contains=sedTab'
|
||||
exe 'syn region sedRegexp'.s:i 'matchgroup=Special start=@'.s:delimiter.'\%(\\\\\|\\'.s:delimiter.'\)*@ skip=@[^\\'.s:delimiter.']\%(\\\\\)*\\'.s:delimiter.'@ end=@'.s:delimiter.'@me=e-1 contains=sedTab,sedRegexpMeta keepend contained nextgroup=sedReplacement'.s:i
|
||||
exe 'syn region sedReplacement'.s:i 'matchgroup=Special start=@'.s:delimiter.'\%(\\\\\|\\'.s:delimiter.'\)*@ skip=@[^\\'.s:delimiter.']\%(\\\\\)*\\'.s:delimiter.'@ end=@'.s:delimiter.'@ contains=sedTab,sedReplaceMeta keepend contained nextgroup=@sedFlags'
|
||||
endif
|
||||
let s:i = s:i + 1
|
||||
endwhile
|
||||
syn region sedAddress matchgroup=Special start=+\\@\(\\@\)\=+ skip=+[^\\]\(\\\\\)*\\@+ end=+@I\=+ contains=sedTab,sedRegexpMeta
|
||||
syn region sedRegexp64 matchgroup=Special start=+@\(\\\\\|\\@\)*+ skip=+[^\\@]\(\\\\\)*\\@+ end=+@+me=e-1 contains=sedTab,sedRegexpMeta keepend contained nextgroup=sedReplacement64
|
||||
syn region sedReplacement64 matchgroup=Special start=+@\(\\\\\|\\@\)*+ skip=+[^\\@]\(\\\\\)*\\@+ end=+@+ contains=sedTab,sedReplaceMeta keepend contained nextgroup=sedFlag
|
||||
syn region sedAddress matchgroup=Special start=+\\@\%(\\@\)\=+ skip=+[^\\]\%(\\\\\)*\\@+ end=+@I\=+ contains=sedTab,sedRegexpMeta
|
||||
syn region sedRegexp64 matchgroup=Special start=+@\%(\\\\\|\\@\)*+ skip=+[^\\@]\%(\\\\\)*\\@+ end=+@+me=e-1 contains=sedTab,sedRegexpMeta keepend contained nextgroup=sedReplacement64
|
||||
syn region sedReplacement64 matchgroup=Special start=+@\%(\\\\\|\\@\)*+ skip=+[^\\@]\%(\\\\\)*\\@+ end=+@+ contains=sedTab,sedReplaceMeta keepend contained nextgroup=sedFlag
|
||||
|
||||
" Since the syntax for the substituion command is very similar to the
|
||||
" Since the syntax for the substitution command is very similar to the
|
||||
" syntax for the transform command, I use the same pattern matching
|
||||
" for both commands. There is one problem -- the transform command
|
||||
" (y) does not allow any flags. To save memory, I ignore this problem.
|
||||
@@ -80,7 +92,7 @@ hi def link sedComment Comment
|
||||
hi def link sedDelete Function
|
||||
hi def link sedError Error
|
||||
hi def link sedFlag Type
|
||||
hi def link sedFlagwrite Constant
|
||||
hi def link sedFlagWrite Constant
|
||||
hi def link sedFunction Function
|
||||
hi def link sedLabel Label
|
||||
hi def link sedLineCont Special
|
||||
@@ -88,23 +100,24 @@ hi def link sedPutHoldspc Function
|
||||
hi def link sedReplaceMeta Special
|
||||
hi def link sedRegexpMeta Special
|
||||
hi def link sedRW Constant
|
||||
hi def link sedSemicolon Special
|
||||
hi def link sedSemicolon Special
|
||||
hi def link sedST Function
|
||||
hi def link sedSpecial Special
|
||||
hi def link sedTodo Todo
|
||||
hi def link sedWhitespace NONE
|
||||
if exists("highlight_sedtabs")
|
||||
hi def link sedTab Todo
|
||||
if s:highlight_tabs
|
||||
hi def link sedTab Todo
|
||||
endif
|
||||
let __sed_i = char2nr(" ") " ASCII: 32, EBCDIC: 64
|
||||
while __sed_i <= __sed_last
|
||||
exe "hi def link sedRegexp".__sed_i "Macro"
|
||||
exe "hi def link sedReplacement".__sed_i "NONE"
|
||||
let __sed_i = __sed_i + 1
|
||||
let s:i = char2nr(" ") " ASCII: 32, EBCDIC: 64
|
||||
while s:i <= s:last
|
||||
exe "hi def link sedRegexp".s:i "Macro"
|
||||
exe "hi def link sedReplacement".s:i "NONE"
|
||||
let s:i = s:i + 1
|
||||
endwhile
|
||||
|
||||
|
||||
unlet __sed_i __sed_last __sed_delimiter __sed_metacharacters
|
||||
unlet s:i s:last s:delimiter s:metacharacters s:at
|
||||
unlet s:highlight_tabs
|
||||
|
||||
let b:current_syntax = "sed"
|
||||
|
||||
" vim: sts=4 sw=4 ts=8
|
||||
" vim: nowrap sw=2 sts=2 ts=8 noet:
|
||||
|
||||
63
runtime/syntax/ssa.vim
Normal file
63
runtime/syntax/ssa.vim
Normal file
@@ -0,0 +1,63 @@
|
||||
" Vim syntax file
|
||||
" Language: SubStation Alpha
|
||||
" Maintainer: ObserverOfTime <chronobserver@disroot.org>
|
||||
" Filenames: *.ass,*.ssa
|
||||
" Last Change: 2022 Oct 10
|
||||
|
||||
if exists('b:current_syntax')
|
||||
finish
|
||||
endif
|
||||
|
||||
" Comments
|
||||
syn keyword ssaTodo TODO FIXME NOTE XXX contained
|
||||
syn match ssaComment /^\(;\|!:\).*$/ contains=ssaTodo,@Spell
|
||||
syn match ssaTextComment /{[^}]*}/ contained contains=@Spell
|
||||
|
||||
" Sections
|
||||
syn match ssaSection /^\[[a-zA-Z0-9+ ]\+\]$/
|
||||
|
||||
" Headers
|
||||
syn match ssaHeader /^[^;!:]\+:/ skipwhite nextgroup=ssaField
|
||||
|
||||
" Fields
|
||||
syn match ssaField /[^,]*/ contained skipwhite nextgroup=ssaDelimiter
|
||||
|
||||
" Time
|
||||
syn match ssaTime /\d:\d\d:\d\d\.\d\d/ contained skipwhite nextgroup=ssaDelimiter
|
||||
|
||||
" Delimiter
|
||||
syn match ssaDelimiter /,/ contained skipwhite nextgroup=ssaField,ssaTime,ssaText
|
||||
|
||||
" Text
|
||||
syn match ssaText /\(^Dialogue:\(.*,\)\{9}\)\@<=.*$/ contained contains=@ssaTags,@Spell
|
||||
syn cluster ssaTags contains=ssaOverrideTag,ssaEscapeChar,ssaTextComment,ssaItalics,ssaBold,ssaUnderline,ssaStrikeout
|
||||
|
||||
" Override tags
|
||||
syn match ssaOverrideTag /{\\[^}]\+}/ contained contains=@NoSpell
|
||||
|
||||
" Special characters
|
||||
syn match ssaEscapeChar /\\[nNh{}]/ contained contains=@NoSpell
|
||||
|
||||
" Markup
|
||||
syn region ssaItalics start=/{\\i1}/ end=/{\\i0}/ matchgroup=ssaOverrideTag keepend oneline contained contains=@ssaTags,@Spell
|
||||
syn region ssaBold start=/{\\b1}/ end=/{\\b0}/ matchgroup=ssaOverrideTag keepend oneline contained contains=@ssaTags,@Spell
|
||||
syn region ssaUnderline start=/{\\u1}/ end=/{\\u0}/ matchgroup=ssaOverrideTag keepend oneline contained contains=@ssaTags,@Spell
|
||||
syn region ssaStrikeout start=/{\\s1}/ end=/{\\s0}/ matchgroup=ssaOverrideTag keepend oneline contained contains=@ssaTags,@Spell
|
||||
|
||||
hi def link ssaDelimiter Delimiter
|
||||
hi def link ssaComment Comment
|
||||
hi def link ssaEscapeChar SpecialChar
|
||||
hi def link ssaField String
|
||||
hi def link ssaHeader Label
|
||||
hi def link ssaSection StorageClass
|
||||
hi def link ssaOverrideTag Special
|
||||
hi def link ssaTextComment Comment
|
||||
hi def link ssaTime Number
|
||||
hi def link ssaTodo Todo
|
||||
|
||||
hi ssaBold cterm=bold gui=bold
|
||||
hi ssaItalics cterm=italic gui=italic
|
||||
hi ssaStrikeout cterm=strikethrough gui=strikethrough
|
||||
hi ssaUnderline cterm=underline gui=underline
|
||||
|
||||
let b:current_syntax = 'srt'
|
||||
@@ -91,7 +91,7 @@ NOTA: A medida que vaya avanzando en este tutor no intente memorizar,
|
||||
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Lección 1.4: EDITAR TEXTO - BORRAR
|
||||
Lección 1.4: EDITAR TEXTO - INSERTAR
|
||||
|
||||
** Pulse i para insertar texto. **
|
||||
|
||||
@@ -248,9 +248,12 @@ Ahora contin
|
||||
Una lista resumida de movimientos:
|
||||
w - hasta el comienzo de la siguiente palabra, EXCLUYENDO su primer
|
||||
carácter.
|
||||
e - hasta el final de la palabra actual, INCLUYENDO su primer carácter.
|
||||
e - hasta el final de la palabra actual, INCLUYENDO el último carácter.
|
||||
$ - hasta el final de la línea, INCLUYENDO el último carácter.
|
||||
|
||||
Por tanto, al escribir de borrará desde la posición del cursor, hasta
|
||||
el final de la palabra.
|
||||
|
||||
NOTA: Pulsando únicamente el movimiento estando en el modo Normal sin un
|
||||
operador, moverá el cursor como se especifica en la lista anterior.
|
||||
|
||||
@@ -262,7 +265,7 @@ NOTA: Pulsando
|
||||
|
||||
1. Mueva el cursor al comienzo de la línea marcada con --->.
|
||||
|
||||
2. Escriba 2w para mover el cursor dos palabras hacia adelante.
|
||||
2. Escriba 2w para mover el cursor dos palabras hacia adelante.
|
||||
|
||||
3. Escriba 3e para mover el cursor al final de la tercera palabra hacia
|
||||
adelante.
|
||||
@@ -271,7 +274,7 @@ NOTA: Pulsando
|
||||
|
||||
5. Repita el paso 2 y 3 con diferentes números.
|
||||
|
||||
---> Esto es solo una línea con palabra donde poder moverse.
|
||||
---> Esto es solo una línea con palabras donde poder moverse.
|
||||
|
||||
6. Pase a la lección 2.5.
|
||||
|
||||
@@ -288,15 +291,15 @@ NOTA: Pulsando
|
||||
anteriormente, añada un contador antes del movimiento para eliminar más:
|
||||
d número movimiento
|
||||
|
||||
1. Mueva el cursos a la primera palabra en MAYÚSCULAS en la línea
|
||||
marcada con --->.
|
||||
1. Mueva el cursor al inicio de la primera palabra en MAYÚSCULAS en la
|
||||
línea marcada con --->.
|
||||
|
||||
2. Escriba d2w para eliminar las dos palabras en MAYÚSCULAS.
|
||||
|
||||
3. Repita los pasos 1 y 2 con diferentes contadores para eliminar
|
||||
las siguientes palabras en MAYÚSCULAS con un comando.
|
||||
|
||||
---> esta ABC DE serie FGHI JK LMN OP de palabras ha sido Q RS TUV limpiada.
|
||||
---> Esta ABC DE serie FGHI JK LMN OP de palabras ha sido Q RS TUV limpiada.
|
||||
|
||||
|
||||
|
||||
@@ -319,7 +322,7 @@ NOTA: Pulsando
|
||||
|
||||
---> 1) Las rosas son rojas,
|
||||
---> 2) El barro es divertido,
|
||||
---> 3) Las violetas son azules,
|
||||
---> 3) La violeta es azul,
|
||||
---> 4) Tengo un coche,
|
||||
---> 5) Los relojes dan la hora,
|
||||
---> 6) El azúcar es dulce
|
||||
@@ -362,7 +365,7 @@ mencionados anteriormente.
|
||||
3. Para borrar desde el cursor hasta el final de una línea pulse: d$
|
||||
4. Para borrar una línea entera pulse: dd
|
||||
|
||||
5. Para repetir un movimiento precédalo con un número: 2w
|
||||
5. Para repetir un movimiento anteponga un número: 2w
|
||||
6. El formato para un comando de cambio es:
|
||||
operador [número] movimiento
|
||||
donde:
|
||||
@@ -394,7 +397,7 @@ mencionados anteriormente.
|
||||
5. Repita los pasos 2 a 4 para poner todas las líneas en el orden correcto.
|
||||
|
||||
---> d) ¿Puedes aprenderla tú?
|
||||
---> b) Las violetas son azules,
|
||||
---> b) La violeta es azul,
|
||||
---> c) La inteligencia se aprende,
|
||||
---> a) Las rosas son rojas,
|
||||
|
||||
@@ -426,7 +429,7 @@ NOTA: Recuerde que deber
|
||||
Lección 3.3: EL COMANDO CAMBIAR
|
||||
|
||||
|
||||
** Para cambiar hasta el final de una línea, escriba ce . **
|
||||
** Para cambiar hasta el final de una palabra, escriba ce . **
|
||||
|
||||
1. Mueva el cursor a la primera línea inferior marcada con --->.
|
||||
|
||||
@@ -477,7 +480,7 @@ NOTA: Puede utilizar el retorno de carro para corregir errores mientras escribe.
|
||||
escriba p . Esto pega el texto después del cursor (si se borró una
|
||||
línea, al pegarla, esta se situará en la línea debajo del cursor).
|
||||
|
||||
2. Para sustituir el carácter bajo el cursor, pulse r y luego el
|
||||
2. Para reemplazar el carácter bajo el cursor, pulse r y luego el
|
||||
carácter que quiere que esté en ese lugar.
|
||||
|
||||
3. El operador change le permite cambiar desde la posición del cursor
|
||||
@@ -585,11 +588,11 @@ NOTA:
|
||||
---> Laas mejores épocas para ver laas flores son laas primaveras.
|
||||
|
||||
4. Para cambiar cada ocurrencia de la cadena de caracteres entre dos líneas,
|
||||
Pulse :#,#s/viejo/nuevo/g donde #,# son los números de línea del rango
|
||||
Escriba :#,#s/viejo/nuevo/g donde #,# son los números de línea del rango
|
||||
de líneas donde se realizará la sustitución.
|
||||
Pulse :%s/old/new/g para cambiar cada ocurrencia en todo el
|
||||
Escriba :%s/old/new/g para cambiar cada ocurrencia en todo el
|
||||
archivo.
|
||||
Pulse :%s/old/new/gc para encontrar cada ocurrencia en todo el
|
||||
Escriba :%s/old/new/gc para encontrar cada ocurrencia en todo el
|
||||
archivo, pidiendo confirmación para
|
||||
realizar la sustitución o no.
|
||||
|
||||
@@ -602,19 +605,19 @@ NOTA:
|
||||
número G mueve el cursor a ese número de línea.
|
||||
gg mueve el cursor a la primera línea del archivo.
|
||||
|
||||
2. Pulsando / seguido de una frase busca la frase hacia ADELANTE.
|
||||
Pulsando ? seguido de una frase busca la frase hacia ATRÁS.
|
||||
2. Escribiendo / seguido de una frase busca la frase hacia ADELANTE.
|
||||
Escribiendo ? seguido de una frase busca la frase hacia ATRÁS.
|
||||
Después de una búsqueda pulse n para encontrar la aparición
|
||||
siguiente en la misma dirección o N para buscar en dirección opuesta.
|
||||
|
||||
3. Pulsando % cuando el cursor esta sobre (,), [,], { o } localiza
|
||||
la pareja correspondiente.
|
||||
|
||||
4. Para cambiar viejo en el primer nuevo en una línea pulse :s/viejo/nuevo
|
||||
Para cambiar todos los viejo por nuevo en una línea pulse :s/viejo/nuevo/g
|
||||
Para cambiar frases entre dos números de líneas pulse :#,#s/viejo/nuevo/g
|
||||
Para cambiar viejo por nuevo en todo el fichero pulse :%s/viejo/nuevo/g
|
||||
Para pedir confirmación en cada caso añada 'c' :%s/viejo/nuevo/gc
|
||||
4. Para cambiar viejo en el primer nuevo en una línea escriba :s/viejo/nuevo
|
||||
Para cambiar todos los viejo por nuevo en una línea escriba :s/viejo/nuevo/g
|
||||
Para cambiar frases entre dos números de líneas escriba :#,#s/viejo/nuevo/g
|
||||
Para cambiar viejo por nuevo en todo el fichero escriba :%s/viejo/nuevo/g
|
||||
Para pedir confirmación en cada caso añada 'c' :%s/viejo/nuevo/gc
|
||||
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
@@ -631,7 +634,7 @@ NOTA:
|
||||
|
||||
3. Como ejemplo escriba ls después del ! y luego pulse <INTRO>. Esto
|
||||
le mostrará una lista de su directorio, igual que si estuviera en el
|
||||
símbolo del sistema. Si ls no funciona utilice !:dir .
|
||||
símbolo del sistema. Si ls no funciona utilice :!dir .
|
||||
|
||||
NOTA: De esta manera es posible ejecutar cualquier comando externo,
|
||||
también incluyendo argumentos.
|
||||
@@ -680,7 +683,7 @@ NOTA: Si saliera de Vim y volviera a entrar de nuevo con vim TEST , el
|
||||
:'<,'>
|
||||
|
||||
4. Pulse w TEST , donde TEST es un nombre de archivo que aún no existe.
|
||||
Verifique que :'<,'>w TEST antes de pulsar <INTRO>.
|
||||
Verifique que ve :'<,'>w TEST antes de pulsar <INTRO>.
|
||||
|
||||
5. Vim escribirá las líneas seleccionadas en el archivo TEST. Utilice
|
||||
:!dir o :!ls para verlo. ¡No lo elimine todavía! Lo utilizaremos
|
||||
@@ -759,7 +762,7 @@ NOTA: Tambi
|
||||
---> Después de pulsar o el cursor se sitúa en la línea abierta en modo Insertar.
|
||||
|
||||
4. Para abrir una línea por ENCIMA del cursor, simplemente pulse una O
|
||||
mayúscula, en lugar de una o minúscula. Pruebe este en la línea siguiente.
|
||||
mayúscula, en lugar de una o minúscula. Pruebe esto en la línea siguiente.
|
||||
|
||||
---> Abra una línea sobre esta pulsando O cuando el cursor está en esta línea.
|
||||
|
||||
@@ -893,7 +896,7 @@ NOTA: Si quiere ignorar las may
|
||||
'hls' 'hlsearch' resalta todas las coincidencias de la frases
|
||||
Puedes utilizar tanto los nombre largos o cortos de las opciones.
|
||||
|
||||
7. Añade "no" para inhabilitar una opción: :set noic
|
||||
7. Añada "no" para inhabilitar una opción: :set noic
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Lección 7: OBTENER AYUDA
|
||||
|
||||
@@ -91,7 +91,7 @@ NOTA: A medida que vaya avanzando en este tutor no intente memorizar,
|
||||
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Lección 1.4: EDITAR TEXTO - BORRAR
|
||||
Lección 1.4: EDITAR TEXTO - INSERTAR
|
||||
|
||||
** Pulse i para insertar texto. **
|
||||
|
||||
@@ -248,9 +248,12 @@ Ahora continúe con la Lección 2.
|
||||
Una lista resumida de movimientos:
|
||||
w - hasta el comienzo de la siguiente palabra, EXCLUYENDO su primer
|
||||
carácter.
|
||||
e - hasta el final de la palabra actual, INCLUYENDO su primer carácter.
|
||||
e - hasta el final de la palabra actual, INCLUYENDO el último carácter.
|
||||
$ - hasta el final de la línea, INCLUYENDO el último carácter.
|
||||
|
||||
Por tanto, al escribir de borrará desde la posición del cursor, hasta
|
||||
el final de la palabra.
|
||||
|
||||
NOTA: Pulsando únicamente el movimiento estando en el modo Normal sin un
|
||||
operador, moverá el cursor como se especifica en la lista anterior.
|
||||
|
||||
@@ -262,7 +265,7 @@ NOTA: Pulsando únicamente el movimiento estando en el modo Normal sin un
|
||||
|
||||
1. Mueva el cursor al comienzo de la línea marcada con --->.
|
||||
|
||||
2. Escriba 2w para mover el cursor dos palabras hacia adelante.
|
||||
2. Escriba 2w para mover el cursor dos palabras hacia adelante.
|
||||
|
||||
3. Escriba 3e para mover el cursor al final de la tercera palabra hacia
|
||||
adelante.
|
||||
@@ -271,7 +274,7 @@ NOTA: Pulsando únicamente el movimiento estando en el modo Normal sin un
|
||||
|
||||
5. Repita el paso 2 y 3 con diferentes números.
|
||||
|
||||
---> Esto es solo una línea con palabra donde poder moverse.
|
||||
---> Esto es solo una línea con palabras donde poder moverse.
|
||||
|
||||
6. Pase a la lección 2.5.
|
||||
|
||||
@@ -288,15 +291,15 @@ NOTA: Pulsando únicamente el movimiento estando en el modo Normal sin un
|
||||
anteriormente, añada un contador antes del movimiento para eliminar más:
|
||||
d número movimiento
|
||||
|
||||
1. Mueva el cursos a la primera palabra en MAYÚSCULAS en la línea
|
||||
marcada con --->.
|
||||
1. Mueva el cursor al inicio de la primera palabra en MAYÚSCULAS en la
|
||||
línea marcada con --->.
|
||||
|
||||
2. Escriba d2w para eliminar las dos palabras en MAYÚSCULAS.
|
||||
|
||||
3. Repita los pasos 1 y 2 con diferentes contadores para eliminar
|
||||
las siguientes palabras en MAYÚSCULAS con un comando.
|
||||
|
||||
---> esta ABC DE serie FGHI JK LMN OP de palabras ha sido Q RS TUV limpiada.
|
||||
---> Esta ABC DE serie FGHI JK LMN OP de palabras ha sido Q RS TUV limpiada.
|
||||
|
||||
|
||||
|
||||
@@ -319,7 +322,7 @@ NOTA: Pulsando únicamente el movimiento estando en el modo Normal sin un
|
||||
|
||||
---> 1) Las rosas son rojas,
|
||||
---> 2) El barro es divertido,
|
||||
---> 3) Las violetas son azules,
|
||||
---> 3) La violeta es azul,
|
||||
---> 4) Tengo un coche,
|
||||
---> 5) Los relojes dan la hora,
|
||||
---> 6) El azúcar es dulce
|
||||
@@ -362,7 +365,7 @@ mencionados anteriormente.
|
||||
3. Para borrar desde el cursor hasta el final de una línea pulse: d$
|
||||
4. Para borrar una línea entera pulse: dd
|
||||
|
||||
5. Para repetir un movimiento precédalo con un número: 2w
|
||||
5. Para repetir un movimiento anteponga un número: 2w
|
||||
6. El formato para un comando de cambio es:
|
||||
operador [número] movimiento
|
||||
donde:
|
||||
@@ -394,7 +397,7 @@ mencionados anteriormente.
|
||||
5. Repita los pasos 2 a 4 para poner todas las líneas en el orden correcto.
|
||||
|
||||
---> d) ¿Puedes aprenderla tú?
|
||||
---> b) Las violetas son azules,
|
||||
---> b) La violeta es azul,
|
||||
---> c) La inteligencia se aprende,
|
||||
---> a) Las rosas son rojas,
|
||||
|
||||
@@ -426,7 +429,7 @@ NOTA: Recuerde que debería aprender practicando.
|
||||
Lección 3.3: EL COMANDO CAMBIAR
|
||||
|
||||
|
||||
** Para cambiar hasta el final de una línea, escriba ce . **
|
||||
** Para cambiar hasta el final de una palabra, escriba ce . **
|
||||
|
||||
1. Mueva el cursor a la primera línea inferior marcada con --->.
|
||||
|
||||
@@ -477,7 +480,7 @@ NOTA: Puede utilizar el retorno de carro para corregir errores mientras escribe.
|
||||
escriba p . Esto pega el texto después del cursor (si se borró una
|
||||
línea, al pegarla, esta se situará en la línea debajo del cursor).
|
||||
|
||||
2. Para sustituir el carácter bajo el cursor, pulse r y luego el
|
||||
2. Para reemplazar el carácter bajo el cursor, pulse r y luego el
|
||||
carácter que quiere que esté en ese lugar.
|
||||
|
||||
3. El operador change le permite cambiar desde la posición del cursor
|
||||
@@ -585,11 +588,11 @@ NOTA: ¡Esto es muy útil en la detección de errores en un programa con
|
||||
---> Laas mejores épocas para ver laas flores son laas primaveras.
|
||||
|
||||
4. Para cambiar cada ocurrencia de la cadena de caracteres entre dos líneas,
|
||||
Pulse :#,#s/viejo/nuevo/g donde #,# son los números de línea del rango
|
||||
Escriba :#,#s/viejo/nuevo/g donde #,# son los números de línea del rango
|
||||
de líneas donde se realizará la sustitución.
|
||||
Pulse :%s/old/new/g para cambiar cada ocurrencia en todo el
|
||||
Escriba :%s/old/new/g para cambiar cada ocurrencia en todo el
|
||||
archivo.
|
||||
Pulse :%s/old/new/gc para encontrar cada ocurrencia en todo el
|
||||
Escriba :%s/old/new/gc para encontrar cada ocurrencia en todo el
|
||||
archivo, pidiendo confirmación para
|
||||
realizar la sustitución o no.
|
||||
|
||||
@@ -602,19 +605,19 @@ NOTA: ¡Esto es muy útil en la detección de errores en un programa con
|
||||
número G mueve el cursor a ese número de línea.
|
||||
gg mueve el cursor a la primera línea del archivo.
|
||||
|
||||
2. Pulsando / seguido de una frase busca la frase hacia ADELANTE.
|
||||
Pulsando ? seguido de una frase busca la frase hacia ATRÁS.
|
||||
2. Escribiendo / seguido de una frase busca la frase hacia ADELANTE.
|
||||
Escribiendo ? seguido de una frase busca la frase hacia ATRÁS.
|
||||
Después de una búsqueda pulse n para encontrar la aparición
|
||||
siguiente en la misma dirección o N para buscar en dirección opuesta.
|
||||
|
||||
3. Pulsando % cuando el cursor esta sobre (,), [,], { o } localiza
|
||||
la pareja correspondiente.
|
||||
|
||||
4. Para cambiar viejo en el primer nuevo en una línea pulse :s/viejo/nuevo
|
||||
Para cambiar todos los viejo por nuevo en una línea pulse :s/viejo/nuevo/g
|
||||
Para cambiar frases entre dos números de líneas pulse :#,#s/viejo/nuevo/g
|
||||
Para cambiar viejo por nuevo en todo el fichero pulse :%s/viejo/nuevo/g
|
||||
Para pedir confirmación en cada caso añada 'c' :%s/viejo/nuevo/gc
|
||||
4. Para cambiar viejo en el primer nuevo en una línea escriba :s/viejo/nuevo
|
||||
Para cambiar todos los viejo por nuevo en una línea escriba :s/viejo/nuevo/g
|
||||
Para cambiar frases entre dos números de líneas escriba :#,#s/viejo/nuevo/g
|
||||
Para cambiar viejo por nuevo en todo el fichero escriba :%s/viejo/nuevo/g
|
||||
Para pedir confirmación en cada caso añada 'c' :%s/viejo/nuevo/gc
|
||||
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
@@ -631,7 +634,7 @@ NOTA: ¡Esto es muy útil en la detección de errores en un programa con
|
||||
|
||||
3. Como ejemplo escriba ls después del ! y luego pulse <INTRO>. Esto
|
||||
le mostrará una lista de su directorio, igual que si estuviera en el
|
||||
símbolo del sistema. Si ls no funciona utilice !:dir .
|
||||
símbolo del sistema. Si ls no funciona utilice :!dir .
|
||||
|
||||
NOTA: De esta manera es posible ejecutar cualquier comando externo,
|
||||
también incluyendo argumentos.
|
||||
@@ -680,7 +683,7 @@ NOTA: Si saliera de Vim y volviera a entrar de nuevo con vim TEST , el
|
||||
:'<,'>
|
||||
|
||||
4. Pulse w TEST , donde TEST es un nombre de archivo que aún no existe.
|
||||
Verifique que :'<,'>w TEST antes de pulsar <INTRO>.
|
||||
Verifique que ve :'<,'>w TEST antes de pulsar <INTRO>.
|
||||
|
||||
5. Vim escribirá las líneas seleccionadas en el archivo TEST. Utilice
|
||||
:!dir o :!ls para verlo. ¡No lo elimine todavía! Lo utilizaremos
|
||||
@@ -759,7 +762,7 @@ NOTA: También puede leer la salida de un comando externo. Por ejemplo,
|
||||
---> Después de pulsar o el cursor se sitúa en la línea abierta en modo Insertar.
|
||||
|
||||
4. Para abrir una línea por ENCIMA del cursor, simplemente pulse una O
|
||||
mayúscula, en lugar de una o minúscula. Pruebe este en la línea siguiente.
|
||||
mayúscula, en lugar de una o minúscula. Pruebe esto en la línea siguiente.
|
||||
|
||||
---> Abra una línea sobre esta pulsando O cuando el cursor está en esta línea.
|
||||
|
||||
@@ -893,7 +896,7 @@ NOTA: Si quiere ignorar las mayúsculas y minúsculas, solo para un comando
|
||||
'hls' 'hlsearch' resalta todas las coincidencias de la frases
|
||||
Puedes utilizar tanto los nombre largos o cortos de las opciones.
|
||||
|
||||
7. Añade "no" para inhabilitar una opción: :set noic
|
||||
7. Añada "no" para inhabilitar una opción: :set noic
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Lección 7: OBTENER AYUDA
|
||||
|
||||
@@ -178,14 +178,6 @@ There used to be a KDE version of Vim, using Qt libraries, but since it didn't
|
||||
work very well and there was no maintainer it was dropped.
|
||||
|
||||
|
||||
Unix: COMPILING WITH MULTI-BYTE
|
||||
|
||||
When you want to compile with the multi-byte features enabled, make sure you
|
||||
compile on a machine where the locale settings actually work, otherwise the
|
||||
configure tests may fail. You need to compile with "big" features:
|
||||
|
||||
./configure --with-features=big
|
||||
|
||||
Unix: COMPILING ON LINUX
|
||||
|
||||
On Linux, when using -g to compile (which is default for gcc), the executable
|
||||
|
||||
@@ -896,45 +896,45 @@ work on MS-DOS because of the limited amount of memory available.
|
||||
After you've built the Vim binaries as described above, you're ready to
|
||||
install Vim on your system. However, if you've obtained the Vim sources
|
||||
using Git, Mercurial or by downloading them as a unix tar file, you must
|
||||
first create a "vim82" directory. If you instead downloaded the sources as
|
||||
first create a "vim90" directory. If you instead downloaded the sources as
|
||||
zip files, you can skip this setup as the zip archives already have the
|
||||
correct directory structure.
|
||||
|
||||
A. Create a Vim "runtime" subdirectory named "vim82"
|
||||
A. Create a Vim "runtime" subdirectory named "vim90"
|
||||
-----------------------------------------------------
|
||||
If you obtained your Vim sources as zip files, you can skip this step.
|
||||
Otherwise, continue reading.
|
||||
|
||||
Go to the directory that contains the Vim "src" and "runtime"
|
||||
directories and create a new subdirectory named "vim82".
|
||||
directories and create a new subdirectory named "vim90".
|
||||
|
||||
Copy the "runtime" files into "vim82":
|
||||
copy runtime\* vim82
|
||||
xcopy /s runtime\* vim82
|
||||
Copy the "runtime" files into "vim90":
|
||||
copy runtime\* vim90
|
||||
xcopy /s runtime\* vim90
|
||||
|
||||
B. Copy the new binaries into the "vim82" directory
|
||||
B. Copy the new binaries into the "vim90" directory
|
||||
----------------------------------------------------
|
||||
Regardless of how you installed the Vim sources, you need to copy the
|
||||
new binaries you created above into "vim82":
|
||||
new binaries you created above into "vim90":
|
||||
|
||||
copy src\*.exe vim82
|
||||
copy src\tee\tee.exe vim82
|
||||
copy src\xxd\xxd.exe vim82
|
||||
copy src\*.exe vim90
|
||||
copy src\tee\tee.exe vim90
|
||||
copy src\xxd\xxd.exe vim90
|
||||
|
||||
To install the "Edit with Vim" popup menu, you need both 32-bit and 64-bit
|
||||
versions of gvimext.dll. They should be copied to "vim82\GvimExt32" and
|
||||
"vim82\GvimExt64" respectively.
|
||||
versions of gvimext.dll. They should be copied to "vim90\GvimExt32" and
|
||||
"vim90\GvimExt64" respectively.
|
||||
First, build the 32-bit version, then:
|
||||
|
||||
mkdir vim82\GvimExt32
|
||||
copy src\GvimExt\gvimext.dll vim82\GvimExt32
|
||||
mkdir vim90\GvimExt32
|
||||
copy src\GvimExt\gvimext.dll vim90\GvimExt32
|
||||
|
||||
Next, clean the 32-bit version and build the 64-bit version, then:
|
||||
|
||||
mkdir vim82\GvimExt64
|
||||
copy src\GvimExt\gvimext.dll vim82\GvimExt64
|
||||
mkdir vim90\GvimExt64
|
||||
copy src\GvimExt\gvimext.dll vim90\GvimExt64
|
||||
|
||||
C. Copy gettext and iconv DLLs into the "vim82" directory
|
||||
C. Copy gettext and iconv DLLs into the "vim90" directory
|
||||
----------------------------------------------------------
|
||||
Get gettext and iconv DLLs from the following site:
|
||||
https://github.com/mlocati/gettext-iconv-windows/releases
|
||||
@@ -942,7 +942,7 @@ correct directory structure.
|
||||
Download the files gettextX.X.X.X-iconvX.XX-shared-{32,64}.zip, extract
|
||||
DLLs and place them as follows:
|
||||
|
||||
vim82\
|
||||
vim90\
|
||||
| libintl-8.dll
|
||||
| libiconv-2.dll
|
||||
| libgcc_s_sjlj-1.dll (only for 32-bit)
|
||||
@@ -956,18 +956,18 @@ correct directory structure.
|
||||
libintl-8.dll
|
||||
libiconv-2.dll
|
||||
|
||||
The DLLs in the "vim82" should be the same bitness with the (g)vim.exe.
|
||||
The DLLs in the "vim90" should be the same bitness with the (g)vim.exe.
|
||||
|
||||
D. Move the "vim82" directory into the Vim installation subdirectory
|
||||
D. Move the "vim90" directory into the Vim installation subdirectory
|
||||
---------------------------------------------------------------------
|
||||
Move the "vim82" subdirectory into the subdirectory where you want Vim
|
||||
Move the "vim90" subdirectory into the subdirectory where you want Vim
|
||||
to be installed. Typically, this subdirectory will be named "vim".
|
||||
If you already have a "vim82" subdirectory in "vim", delete it first
|
||||
If you already have a "vim90" subdirectory in "vim", delete it first
|
||||
by running its uninstall.exe program.
|
||||
|
||||
E. Install Vim
|
||||
---------------
|
||||
"cd" to your Vim installation subdirectory "vim\vim82" and run the
|
||||
"cd" to your Vim installation subdirectory "vim\vim90" and run the
|
||||
"install.exe" program. It will ask you a number of questions about
|
||||
how you would like to have your Vim setup. Among these are:
|
||||
- You can tell it to write a "_vimrc" file with your preferences in the
|
||||
|
||||
@@ -79,11 +79,10 @@ from CVS mirror ftp://ftp.polarhome.com/pub/cvs/SOURCE/
|
||||
Description : Build model selection
|
||||
Options: : TINY - No optional features enabled
|
||||
NORMAL - A default selection of features enabled
|
||||
BIG - Many features enabled, as rich as possible.
|
||||
(OpenVMS default)
|
||||
(OpenVMS default)
|
||||
HUGE - All possible features enabled.
|
||||
Uncommented - will default to BIG
|
||||
Default : MODEL = BIG
|
||||
Uncommented - will default to NORMAL
|
||||
Default : MODEL = NORMAL
|
||||
|
||||
Parameter name : GUI
|
||||
Description : GUI or terminal mode executable
|
||||
|
||||
@@ -29,14 +29,6 @@ CFLAGS += \
|
||||
-DFEAT_HUGE
|
||||
else
|
||||
|
||||
# Vim 'big' build
|
||||
ifeq ($(BUILD),big)
|
||||
CFLAGS += \
|
||||
-DFEAT_BROWSE \
|
||||
-DFEAT_MOUSE \
|
||||
-DFEAT_BIG
|
||||
else
|
||||
|
||||
# Vim 'normal' build
|
||||
ifeq ($(BUILD),normal)
|
||||
CFLAGS +=\
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
# Updated 2014 Oct 13.
|
||||
|
||||
#>>>>> choose options:
|
||||
# FEATURES=[TINY | NORMAL | BIG | HUGE]
|
||||
# FEATURES=[TINY | NORMAL | HUGE]
|
||||
# Set to TINY to make a minimal version (no optional features).
|
||||
FEATURES=HUGE
|
||||
|
||||
@@ -113,7 +113,7 @@ TERMINAL=no
|
||||
endif
|
||||
|
||||
# Set to yes to enable sound support.
|
||||
ifneq ($(findstring $(FEATURES),BIG HUGE),)
|
||||
ifneq ($(findstring $(FEATURES),HUGE),)
|
||||
SOUND=yes
|
||||
else
|
||||
SOUND=no
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
#
|
||||
# !!!! After changing any features do "nmake clean" first !!!!
|
||||
#
|
||||
# Feature Set: FEATURES=[TINY, NORMAL, BIG, HUGE] (default is HUGE)
|
||||
# Feature Set: FEATURES=[TINY, NORMAL, HUGE] (default is HUGE)
|
||||
#
|
||||
# Name to add to the version: MODIFIED_BY=[name of modifier]
|
||||
#
|
||||
@@ -354,7 +354,7 @@ TERM_DEPS = \
|
||||
!endif
|
||||
|
||||
!ifndef SOUND
|
||||
! if "$(FEATURES)"=="HUGE" || "$(FEATURES)"=="BIG"
|
||||
! if "$(FEATURES)"=="HUGE"
|
||||
SOUND = yes
|
||||
! else
|
||||
SOUND = no
|
||||
@@ -1124,7 +1124,7 @@ CFLAGS = $(CFLAGS) -DMSWINPS
|
||||
!endif # POSTSCRIPT
|
||||
|
||||
#
|
||||
# FEATURES: TINY, NORMAL, BIG or HUGE
|
||||
# FEATURES: TINY, NORMAL, or HUGE
|
||||
#
|
||||
CFLAGS = $(CFLAGS) -DFEAT_$(FEATURES)
|
||||
|
||||
|
||||
@@ -29,7 +29,6 @@ DECC = YES
|
||||
# Build model selection
|
||||
# TINY - No optional features enabled
|
||||
# NORMAL - A default selection of features enabled
|
||||
# BIG - Many features enabled, as rich as possible. (default)
|
||||
# HUGE - All possible features enabled.
|
||||
# Please select one of these alternatives above.
|
||||
MODEL = HUGE
|
||||
|
||||
@@ -453,7 +453,6 @@ CClink = $(CC)
|
||||
# Uncomment this when you want to include the Tcl interface.
|
||||
# First one is for static linking, second one for dynamic loading.
|
||||
# Debian package is "tcl-dev".
|
||||
# This requires at least "normal" features, "tiny" doesn't work.
|
||||
#CONF_OPT_TCL = --enable-tclinterp
|
||||
#CONF_OPT_TCL = --enable-tclinterp=dynamic
|
||||
#CONF_OPT_TCL = --enable-tclinterp --with-tclsh=tclsh8.4
|
||||
@@ -482,7 +481,7 @@ CClink = $(CC)
|
||||
# MULTIBYTE - To edit multi-byte characters.
|
||||
# This is now always enabled.
|
||||
|
||||
# When building with at least "big" features, right-left and Arabic
|
||||
# When building with "huge" features, right-left and Arabic
|
||||
# features are enabled. Use this to disable them.
|
||||
#CONF_OPT_MULTIBYTE = --disable-rightleft --disable-arabic
|
||||
|
||||
@@ -518,7 +517,7 @@ CClink = $(CC)
|
||||
# though you have /dev/sysmouse and includes.
|
||||
#CONF_OPT_SYSMOUSE = --disable-sysmouse
|
||||
|
||||
# libcanberra - For sound support. Default is on for big features.
|
||||
# libcanberra - For sound support. Default is on for huge features.
|
||||
# Uncomment one of the two to chose otherwise.
|
||||
# CONF_OPT_CANBERRA = --enable-canberra
|
||||
# CONF_OPT_CANBERRA = --disable-canberra
|
||||
@@ -532,7 +531,6 @@ CClink = $(CC)
|
||||
# The default is "huge" for most systems.
|
||||
#CONF_OPT_FEAT = --with-features=tiny
|
||||
#CONF_OPT_FEAT = --with-features=normal
|
||||
#CONF_OPT_FEAT = --with-features=big
|
||||
#CONF_OPT_FEAT = --with-features=huge
|
||||
|
||||
# COMPILED BY - For including a specific e-mail address for ":version".
|
||||
|
||||
@@ -1,710 +0,0 @@
|
||||
#include "stdafx.h"
|
||||
#include <comdef.h> // For _bstr_t
|
||||
#include "VisVim.h"
|
||||
#include "Commands.h"
|
||||
#include "OleAut.h"
|
||||
|
||||
#ifdef _DEBUG
|
||||
#define new DEBUG_NEW
|
||||
#undef THIS_FILE
|
||||
static char THIS_FILE[] = __FILE__;
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
// Change directory before opening file?
|
||||
#define CD_SOURCE 0 // Cd to source path
|
||||
#define CD_SOURCE_PARENT 1 // Cd to parent directory of source path
|
||||
#define CD_NONE 2 // No cd
|
||||
|
||||
|
||||
static BOOL g_bEnableVim = TRUE; // Vim enabled
|
||||
static BOOL g_bDevStudioEditor = FALSE; // Open file in Dev Studio editor simultaneously
|
||||
static BOOL g_bNewTabs = FALSE;
|
||||
static int g_ChangeDir = CD_NONE; // CD after file open?
|
||||
|
||||
static void VimSetEnableState(BOOL bEnableState);
|
||||
static BOOL VimOpenFile(BSTR& FileName, long LineNr);
|
||||
static DISPID VimGetDispatchId(COleAutomationControl& VimOle, char* Method);
|
||||
static void VimErrDiag(COleAutomationControl& VimOle);
|
||||
static void VimChangeDir(COleAutomationControl& VimOle, DISPID DispatchId, BSTR& FileName);
|
||||
static void DebugMsg(char* Msg, char* Arg = NULL);
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CCommands
|
||||
|
||||
CCommands::CCommands()
|
||||
{
|
||||
// m_pApplication == NULL; M$ Code generation bug!!!
|
||||
m_pApplication = NULL;
|
||||
m_pApplicationEventsObj = NULL;
|
||||
m_pDebuggerEventsObj = NULL;
|
||||
}
|
||||
|
||||
CCommands::~CCommands()
|
||||
{
|
||||
ASSERT(m_pApplication != NULL);
|
||||
if (m_pApplication)
|
||||
{
|
||||
m_pApplication->Release();
|
||||
m_pApplication = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
void CCommands::SetApplicationObject(IApplication * pApplication)
|
||||
{
|
||||
// This function assumes pApplication has already been AddRef'd
|
||||
// for us, which CDSAddIn did in its QueryInterface call
|
||||
// just before it called us.
|
||||
m_pApplication = pApplication;
|
||||
if (! m_pApplication)
|
||||
return;
|
||||
|
||||
// Create Application event handlers
|
||||
XApplicationEventsObj::CreateInstance(&m_pApplicationEventsObj);
|
||||
if (! m_pApplicationEventsObj)
|
||||
{
|
||||
ReportInternalError("XApplicationEventsObj::CreateInstance");
|
||||
return;
|
||||
}
|
||||
m_pApplicationEventsObj->AddRef();
|
||||
m_pApplicationEventsObj->Connect(m_pApplication);
|
||||
m_pApplicationEventsObj->m_pCommands = this;
|
||||
|
||||
#ifdef NEVER
|
||||
// Create Debugger event handler
|
||||
CComPtr < IDispatch > pDebugger;
|
||||
if (SUCCEEDED(m_pApplication->get_Debugger(&pDebugger))
|
||||
&& pDebugger != NULL)
|
||||
{
|
||||
XDebuggerEventsObj::CreateInstance(&m_pDebuggerEventsObj);
|
||||
m_pDebuggerEventsObj->AddRef();
|
||||
m_pDebuggerEventsObj->Connect(pDebugger);
|
||||
m_pDebuggerEventsObj->m_pCommands = this;
|
||||
}
|
||||
#endif
|
||||
|
||||
// Get settings from registry HKEY_CURRENT_USER\Software\Vim\VisVim
|
||||
HKEY hAppKey = GetAppKey("Vim");
|
||||
if (hAppKey)
|
||||
{
|
||||
HKEY hSectionKey = GetSectionKey(hAppKey, "VisVim");
|
||||
if (hSectionKey)
|
||||
{
|
||||
g_bEnableVim = GetRegistryInt(hSectionKey, "EnableVim",
|
||||
g_bEnableVim);
|
||||
g_bDevStudioEditor = GetRegistryInt(hSectionKey,
|
||||
"DevStudioEditor", g_bDevStudioEditor);
|
||||
g_bNewTabs = GetRegistryInt(hSectionKey, "NewTabs",
|
||||
g_bNewTabs);
|
||||
g_ChangeDir = GetRegistryInt(hSectionKey, "ChangeDir",
|
||||
g_ChangeDir);
|
||||
RegCloseKey(hSectionKey);
|
||||
}
|
||||
RegCloseKey(hAppKey);
|
||||
}
|
||||
}
|
||||
|
||||
void CCommands::UnadviseFromEvents()
|
||||
{
|
||||
ASSERT(m_pApplicationEventsObj != NULL);
|
||||
if (m_pApplicationEventsObj)
|
||||
{
|
||||
m_pApplicationEventsObj->Disconnect(m_pApplication);
|
||||
m_pApplicationEventsObj->Release();
|
||||
m_pApplicationEventsObj = NULL;
|
||||
}
|
||||
|
||||
#ifdef NEVER
|
||||
if (m_pDebuggerEventsObj)
|
||||
{
|
||||
// Since we were able to connect to the Debugger events, we
|
||||
// should be able to access the Debugger object again to
|
||||
// unadvise from its events (thus the VERIFY_OK below--see
|
||||
// stdafx.h).
|
||||
CComPtr < IDispatch > pDebugger;
|
||||
VERIFY_OK(m_pApplication->get_Debugger(&pDebugger));
|
||||
ASSERT(pDebugger != NULL);
|
||||
m_pDebuggerEventsObj->Disconnect(pDebugger);
|
||||
m_pDebuggerEventsObj->Release();
|
||||
m_pDebuggerEventsObj = NULL;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Event handlers
|
||||
|
||||
// Application events
|
||||
|
||||
HRESULT CCommands::XApplicationEvents::BeforeBuildStart()
|
||||
{
|
||||
AFX_MANAGE_STATE(AfxGetStaticModuleState());
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CCommands::XApplicationEvents::BuildFinish(long nNumErrors, long nNumWarnings)
|
||||
{
|
||||
AFX_MANAGE_STATE(AfxGetStaticModuleState());
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CCommands::XApplicationEvents::BeforeApplicationShutDown()
|
||||
{
|
||||
AFX_MANAGE_STATE(AfxGetStaticModuleState());
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
// The open document event handle is the place where the real interface work
|
||||
// is done.
|
||||
// Vim gets called from here.
|
||||
//
|
||||
HRESULT CCommands::XApplicationEvents::DocumentOpen(IDispatch * theDocument)
|
||||
{
|
||||
AFX_MANAGE_STATE(AfxGetStaticModuleState());
|
||||
|
||||
if (! g_bEnableVim)
|
||||
// Vim not enabled or empty command line entered
|
||||
return S_OK;
|
||||
|
||||
// First get the current file name and line number
|
||||
|
||||
// Get the document object
|
||||
CComQIPtr < ITextDocument, &IID_ITextDocument > pDoc(theDocument);
|
||||
if (! pDoc)
|
||||
return S_OK;
|
||||
|
||||
BSTR FileName;
|
||||
long LineNr = -1;
|
||||
|
||||
// Get the document name
|
||||
if (FAILED(pDoc->get_FullName(&FileName)))
|
||||
return S_OK;
|
||||
|
||||
LPDISPATCH pDispSel;
|
||||
|
||||
// Get a selection object dispatch pointer
|
||||
if (SUCCEEDED(pDoc->get_Selection(&pDispSel)))
|
||||
{
|
||||
// Get the selection object
|
||||
CComQIPtr < ITextSelection, &IID_ITextSelection > pSel(pDispSel);
|
||||
|
||||
if (pSel)
|
||||
// Get the selection line number
|
||||
pSel->get_CurrentLine(&LineNr);
|
||||
|
||||
pDispSel->Release();
|
||||
}
|
||||
|
||||
// Open the file in Vim and position to the current line
|
||||
if (VimOpenFile(FileName, LineNr))
|
||||
{
|
||||
if (! g_bDevStudioEditor)
|
||||
{
|
||||
// Close the document in developer studio
|
||||
CComVariant vSaveChanges = dsSaveChangesPrompt;
|
||||
DsSaveStatus Saved;
|
||||
|
||||
pDoc->Close(vSaveChanges, &Saved);
|
||||
}
|
||||
}
|
||||
|
||||
// We're done here
|
||||
SysFreeString(FileName);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CCommands::XApplicationEvents::BeforeDocumentClose(IDispatch * theDocument)
|
||||
{
|
||||
AFX_MANAGE_STATE(AfxGetStaticModuleState());
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CCommands::XApplicationEvents::DocumentSave(IDispatch * theDocument)
|
||||
{
|
||||
AFX_MANAGE_STATE(AfxGetStaticModuleState());
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CCommands::XApplicationEvents::NewDocument(IDispatch * theDocument)
|
||||
{
|
||||
AFX_MANAGE_STATE(AfxGetStaticModuleState());
|
||||
|
||||
if (! g_bEnableVim)
|
||||
// Vim not enabled or empty command line entered
|
||||
return S_OK;
|
||||
|
||||
// First get the current file name and line number
|
||||
|
||||
CComQIPtr < ITextDocument, &IID_ITextDocument > pDoc(theDocument);
|
||||
if (! pDoc)
|
||||
return S_OK;
|
||||
|
||||
BSTR FileName;
|
||||
HRESULT hr;
|
||||
|
||||
hr = pDoc->get_FullName(&FileName);
|
||||
if (FAILED(hr))
|
||||
return S_OK;
|
||||
|
||||
// Open the file in Vim and position to the current line
|
||||
if (VimOpenFile(FileName, 0))
|
||||
{
|
||||
if (! g_bDevStudioEditor)
|
||||
{
|
||||
// Close the document in developer studio
|
||||
CComVariant vSaveChanges = dsSaveChangesPrompt;
|
||||
DsSaveStatus Saved;
|
||||
|
||||
pDoc->Close(vSaveChanges, &Saved);
|
||||
}
|
||||
}
|
||||
|
||||
SysFreeString(FileName);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CCommands::XApplicationEvents::WindowActivate(IDispatch * theWindow)
|
||||
{
|
||||
AFX_MANAGE_STATE(AfxGetStaticModuleState());
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CCommands::XApplicationEvents::WindowDeactivate(IDispatch * theWindow)
|
||||
{
|
||||
AFX_MANAGE_STATE(AfxGetStaticModuleState());
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CCommands::XApplicationEvents::WorkspaceOpen()
|
||||
{
|
||||
AFX_MANAGE_STATE(AfxGetStaticModuleState());
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CCommands::XApplicationEvents::WorkspaceClose()
|
||||
{
|
||||
AFX_MANAGE_STATE(AfxGetStaticModuleState());
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CCommands::XApplicationEvents::NewWorkspace()
|
||||
{
|
||||
AFX_MANAGE_STATE(AfxGetStaticModuleState());
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
// Debugger event
|
||||
|
||||
HRESULT CCommands::XDebuggerEvents::BreakpointHit(IDispatch * pBreakpoint)
|
||||
{
|
||||
AFX_MANAGE_STATE(AfxGetStaticModuleState());
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// VisVim dialog
|
||||
|
||||
class CMainDialog : public CDialog
|
||||
{
|
||||
public:
|
||||
CMainDialog(CWnd * pParent = NULL); // Standard constructor
|
||||
|
||||
//{{AFX_DATA(CMainDialog)
|
||||
enum { IDD = IDD_ADDINMAIN };
|
||||
int m_ChangeDir;
|
||||
BOOL m_bDevStudioEditor;
|
||||
BOOL m_bNewTabs;
|
||||
//}}AFX_DATA
|
||||
|
||||
//{{AFX_VIRTUAL(CMainDialog)
|
||||
protected:
|
||||
virtual void DoDataExchange(CDataExchange * pDX); // DDX/DDV support
|
||||
//}}AFX_VIRTUAL
|
||||
|
||||
protected:
|
||||
//{{AFX_MSG(CMainDialog)
|
||||
afx_msg void OnEnable();
|
||||
afx_msg void OnDisable();
|
||||
//}}AFX_MSG
|
||||
DECLARE_MESSAGE_MAP()
|
||||
};
|
||||
|
||||
CMainDialog::CMainDialog(CWnd * pParent /* =NULL */ )
|
||||
: CDialog(CMainDialog::IDD, pParent)
|
||||
{
|
||||
//{{AFX_DATA_INIT(CMainDialog)
|
||||
m_ChangeDir = -1;
|
||||
m_bDevStudioEditor = FALSE;
|
||||
m_bNewTabs = FALSE;
|
||||
//}}AFX_DATA_INIT
|
||||
}
|
||||
|
||||
void CMainDialog::DoDataExchange(CDataExchange * pDX)
|
||||
{
|
||||
CDialog::DoDataExchange(pDX);
|
||||
//{{AFX_DATA_MAP(CMainDialog)
|
||||
DDX_Radio(pDX, IDC_CD_SOURCE_PATH, m_ChangeDir);
|
||||
DDX_Check(pDX, IDC_DEVSTUDIO_EDITOR, m_bDevStudioEditor);
|
||||
DDX_Check(pDX, IDC_NEW_TABS, m_bNewTabs);
|
||||
//}}AFX_DATA_MAP
|
||||
}
|
||||
|
||||
BEGIN_MESSAGE_MAP(CMainDialog, CDialog)
|
||||
//{{AFX_MSG_MAP(CMainDialog)
|
||||
//}}AFX_MSG_MAP
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CCommands methods
|
||||
|
||||
STDMETHODIMP CCommands::VisVimDialog()
|
||||
{
|
||||
AFX_MANAGE_STATE(AfxGetStaticModuleState());
|
||||
|
||||
// Use m_pApplication to access the Developer Studio Application
|
||||
// object,
|
||||
// and VERIFY_OK to see error strings in DEBUG builds of your add-in
|
||||
// (see stdafx.h)
|
||||
|
||||
VERIFY_OK(m_pApplication->EnableModeless(VARIANT_FALSE));
|
||||
|
||||
CMainDialog Dlg;
|
||||
|
||||
Dlg.m_bDevStudioEditor = g_bDevStudioEditor;
|
||||
Dlg.m_bNewTabs = g_bNewTabs;
|
||||
Dlg.m_ChangeDir = g_ChangeDir;
|
||||
if (Dlg.DoModal() == IDOK)
|
||||
{
|
||||
g_bDevStudioEditor = Dlg.m_bDevStudioEditor;
|
||||
g_bNewTabs = Dlg.m_bNewTabs;
|
||||
g_ChangeDir = Dlg.m_ChangeDir;
|
||||
|
||||
// Save settings to registry HKEY_CURRENT_USER\Software\Vim\VisVim
|
||||
HKEY hAppKey = GetAppKey("Vim");
|
||||
if (hAppKey)
|
||||
{
|
||||
HKEY hSectionKey = GetSectionKey(hAppKey, "VisVim");
|
||||
if (hSectionKey)
|
||||
{
|
||||
WriteRegistryInt(hSectionKey, "DevStudioEditor",
|
||||
g_bDevStudioEditor);
|
||||
WriteRegistryInt(hSectionKey, "NewTabs",
|
||||
g_bNewTabs);
|
||||
WriteRegistryInt(hSectionKey, "ChangeDir", g_ChangeDir);
|
||||
RegCloseKey(hSectionKey);
|
||||
}
|
||||
RegCloseKey(hAppKey);
|
||||
}
|
||||
}
|
||||
|
||||
VERIFY_OK(m_pApplication->EnableModeless(VARIANT_TRUE));
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
STDMETHODIMP CCommands::VisVimEnable()
|
||||
{
|
||||
AFX_MANAGE_STATE(AfxGetStaticModuleState());
|
||||
VimSetEnableState(true);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
STDMETHODIMP CCommands::VisVimDisable()
|
||||
{
|
||||
AFX_MANAGE_STATE(AfxGetStaticModuleState());
|
||||
VimSetEnableState(false);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
STDMETHODIMP CCommands::VisVimToggle()
|
||||
{
|
||||
AFX_MANAGE_STATE(AfxGetStaticModuleState());
|
||||
VimSetEnableState(! g_bEnableVim);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
STDMETHODIMP CCommands::VisVimLoad()
|
||||
{
|
||||
AFX_MANAGE_STATE(AfxGetStaticModuleState());
|
||||
|
||||
// Use m_pApplication to access the Developer Studio Application object,
|
||||
// and VERIFY_OK to see error strings in DEBUG builds of your add-in
|
||||
// (see stdafx.h)
|
||||
|
||||
CComBSTR bStr;
|
||||
// Define dispatch pointers for document and selection objects
|
||||
CComPtr < IDispatch > pDispDoc, pDispSel;
|
||||
|
||||
// Get a document object dispatch pointer
|
||||
VERIFY_OK(m_pApplication->get_ActiveDocument(&pDispDoc));
|
||||
if (! pDispDoc)
|
||||
return S_OK;
|
||||
|
||||
BSTR FileName;
|
||||
long LineNr = -1;
|
||||
|
||||
// Get the document object
|
||||
CComQIPtr < ITextDocument, &IID_ITextDocument > pDoc(pDispDoc);
|
||||
|
||||
if (! pDoc)
|
||||
return S_OK;
|
||||
|
||||
// Get the document name
|
||||
if (FAILED(pDoc->get_FullName(&FileName)))
|
||||
return S_OK;
|
||||
|
||||
// Get a selection object dispatch pointer
|
||||
if (SUCCEEDED(pDoc->get_Selection(&pDispSel)))
|
||||
{
|
||||
// Get the selection object
|
||||
CComQIPtr < ITextSelection, &IID_ITextSelection > pSel(pDispSel);
|
||||
|
||||
if (pSel)
|
||||
// Get the selection line number
|
||||
pSel->get_CurrentLine(&LineNr);
|
||||
}
|
||||
|
||||
// Open the file in Vim
|
||||
VimOpenFile(FileName, LineNr);
|
||||
|
||||
SysFreeString(FileName);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Here we do the actual processing and communication with Vim
|
||||
//
|
||||
|
||||
// Set the enable state and save to registry
|
||||
//
|
||||
static void VimSetEnableState(BOOL bEnableState)
|
||||
{
|
||||
g_bEnableVim = bEnableState;
|
||||
HKEY hAppKey = GetAppKey("Vim");
|
||||
if (hAppKey)
|
||||
{
|
||||
HKEY hSectionKey = GetSectionKey(hAppKey, "VisVim");
|
||||
if (hSectionKey)
|
||||
WriteRegistryInt(hSectionKey, "EnableVim", g_bEnableVim);
|
||||
RegCloseKey(hAppKey);
|
||||
}
|
||||
}
|
||||
|
||||
// Open the file 'FileName' in Vim and goto line 'LineNr'
|
||||
// 'FileName' is expected to contain an absolute DOS path including the drive
|
||||
// letter.
|
||||
// 'LineNr' must contain a valid line number or 0, e. g. for a new file
|
||||
//
|
||||
static BOOL VimOpenFile(BSTR& FileName, long LineNr)
|
||||
{
|
||||
|
||||
// OLE automation object for com. with Vim
|
||||
// When the object goes out of scope, its destructor destroys the OLE
|
||||
// connection;
|
||||
// This is important to avoid blocking the object
|
||||
// (in this memory corruption would be likely when terminating Vim
|
||||
// while still running DevStudio).
|
||||
// So keep this object local!
|
||||
COleAutomationControl VimOle;
|
||||
|
||||
// :cd D:/Src2/VisVim/
|
||||
//
|
||||
// Get a dispatch id for the SendKeys method of Vim;
|
||||
// enables connection to Vim if necessary
|
||||
DISPID DispatchId;
|
||||
DispatchId = VimGetDispatchId(VimOle, "SendKeys");
|
||||
if (! DispatchId)
|
||||
// OLE error, can't obtain dispatch id
|
||||
goto OleError;
|
||||
|
||||
OLECHAR Buf[MAX_OLE_STR];
|
||||
char FileNameTmp[MAX_OLE_STR];
|
||||
char VimCmd[MAX_OLE_STR];
|
||||
char *s, *p;
|
||||
|
||||
// Prepend CTRL-\ CTRL-N to exit insert mode
|
||||
VimCmd[0] = 0x1c;
|
||||
VimCmd[1] = 0x0e;
|
||||
VimCmd[2] = 0;
|
||||
|
||||
#ifdef SINGLE_WINDOW
|
||||
// Update the current file in Vim if it has been modified.
|
||||
// Disabled, because it could write the file when you don't want to.
|
||||
sprintf(VimCmd + 2, ":up\n");
|
||||
#endif
|
||||
if (! VimOle.Method(DispatchId, "s", TO_OLE_STR_BUF(VimCmd, Buf)))
|
||||
goto OleError;
|
||||
|
||||
// Change Vim working directory to where the file is if desired
|
||||
if (g_ChangeDir != CD_NONE)
|
||||
VimChangeDir(VimOle, DispatchId, FileName);
|
||||
|
||||
// Make Vim open the file.
|
||||
// In the filename convert all \ to /, put a \ before a space.
|
||||
if (g_bNewTabs)
|
||||
{
|
||||
sprintf(VimCmd, ":tab drop ");
|
||||
s = VimCmd + 10;
|
||||
}
|
||||
else
|
||||
{
|
||||
sprintf(VimCmd, ":drop ");
|
||||
s = VimCmd + 6;
|
||||
}
|
||||
sprintf(FileNameTmp, "%S", (char *)FileName);
|
||||
for (p = FileNameTmp; *p != '\0' && s < VimCmd + MAX_OLE_STR - 4; ++p)
|
||||
if (*p == '\\')
|
||||
*s++ = '/';
|
||||
else
|
||||
{
|
||||
if (*p == ' ')
|
||||
*s++ = '\\';
|
||||
*s++ = *p;
|
||||
}
|
||||
*s++ = '\n';
|
||||
*s = '\0';
|
||||
|
||||
if (! VimOle.Method(DispatchId, "s", TO_OLE_STR_BUF(VimCmd, Buf)))
|
||||
goto OleError;
|
||||
|
||||
if (LineNr > 0)
|
||||
{
|
||||
// Goto line
|
||||
sprintf(VimCmd, ":%ld\n", LineNr);
|
||||
if (! VimOle.Method(DispatchId, "s", TO_OLE_STR_BUF(VimCmd, Buf)))
|
||||
goto OleError;
|
||||
}
|
||||
|
||||
// Make Vim come to the foreground
|
||||
if (! VimOle.Method("SetForeground"))
|
||||
VimOle.ErrDiag();
|
||||
|
||||
// We're done
|
||||
return true;
|
||||
|
||||
OleError:
|
||||
// There was an OLE error
|
||||
// Check if it's the "unknown class string" error
|
||||
VimErrDiag(VimOle);
|
||||
return false;
|
||||
}
|
||||
|
||||
// Return the dispatch id for the Vim method 'Method'
|
||||
// Create the Vim OLE object if necessary
|
||||
// Returns a valid dispatch id or null on error
|
||||
//
|
||||
static DISPID VimGetDispatchId(COleAutomationControl& VimOle, char* Method)
|
||||
{
|
||||
// Initialize Vim OLE connection if not already done
|
||||
if (! VimOle.IsCreated())
|
||||
{
|
||||
if (! VimOle.CreateObject("Vim.Application"))
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// Get the dispatch id for the SendKeys method.
|
||||
// By doing this, we are checking if Vim is still there...
|
||||
DISPID DispatchId = VimOle.GetDispatchId("SendKeys");
|
||||
if (! DispatchId)
|
||||
{
|
||||
// We can't get a dispatch id.
|
||||
// This means that probably Vim has been terminated.
|
||||
// Don't issue an error message here, instead
|
||||
// destroy the OLE object and try to connect once more
|
||||
//
|
||||
// In fact, this should never happen, because the OLE aut. object
|
||||
// should not be kept long enough to allow the user to terminate Vim
|
||||
// to avoid memory corruption (why the heck is there no system garbage
|
||||
// collection for those damned OLE memory chunks???).
|
||||
VimOle.DeleteObject();
|
||||
if (! VimOle.CreateObject("Vim.Application"))
|
||||
// If this create fails, it's time for an error msg
|
||||
return NULL;
|
||||
|
||||
if (! (DispatchId = VimOle.GetDispatchId("SendKeys")))
|
||||
// There is something wrong...
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return DispatchId;
|
||||
}
|
||||
|
||||
// Output an error message for an OLE error
|
||||
// Check on the classstring error, which probably means Vim wasn't registered.
|
||||
//
|
||||
static void VimErrDiag(COleAutomationControl& VimOle)
|
||||
{
|
||||
SCODE sc = GetScode(VimOle.GetResult());
|
||||
if (sc == CO_E_CLASSSTRING)
|
||||
{
|
||||
char Buf[256];
|
||||
sprintf(Buf, "There is no registered OLE automation server named "
|
||||
"\"Vim.Application\".\n"
|
||||
"Use the OLE-enabled version of Vim with VisVim and "
|
||||
"make sure to register Vim by running \"vim -register\".");
|
||||
MessageBox(NULL, Buf, "OLE Error", MB_OK);
|
||||
}
|
||||
else
|
||||
VimOle.ErrDiag();
|
||||
}
|
||||
|
||||
// Change directory to the directory the file 'FileName' is in or its parent
|
||||
// directory according to the setting of the global 'g_ChangeDir':
|
||||
// 'FileName' is expected to contain an absolute DOS path including the drive
|
||||
// letter.
|
||||
// CD_NONE
|
||||
// CD_SOURCE_PATH
|
||||
// CD_SOURCE_PARENT
|
||||
//
|
||||
static void VimChangeDir(COleAutomationControl& VimOle, DISPID DispatchId, BSTR& FileName)
|
||||
{
|
||||
// Do a :cd first
|
||||
|
||||
// Get the path name of the file ("dir/")
|
||||
CString StrFileName = FileName;
|
||||
char Drive[_MAX_DRIVE];
|
||||
char Dir[_MAX_DIR];
|
||||
char DirUnix[_MAX_DIR * 2];
|
||||
char *s, *t;
|
||||
|
||||
_splitpath(StrFileName, Drive, Dir, NULL, NULL);
|
||||
|
||||
// Convert to Unix path name format, escape spaces.
|
||||
t = DirUnix;
|
||||
for (s = Dir; *s; ++s)
|
||||
if (*s == '\\')
|
||||
*t++ = '/';
|
||||
else
|
||||
{
|
||||
if (*s == ' ')
|
||||
*t++ = '\\';
|
||||
*t++ = *s;
|
||||
}
|
||||
*t = '\0';
|
||||
|
||||
|
||||
// Construct the cd command; append /.. if cd to parent
|
||||
// directory and not in root directory
|
||||
OLECHAR Buf[MAX_OLE_STR];
|
||||
char VimCmd[MAX_OLE_STR];
|
||||
|
||||
sprintf(VimCmd, ":cd %s%s%s\n", Drive, DirUnix,
|
||||
g_ChangeDir == CD_SOURCE_PARENT && DirUnix[1] ? ".." : "");
|
||||
VimOle.Method(DispatchId, "s", TO_OLE_STR_BUF(VimCmd, Buf));
|
||||
}
|
||||
|
||||
#ifdef _DEBUG
|
||||
// Print out a debug message
|
||||
//
|
||||
static void DebugMsg(char* Msg, char* Arg)
|
||||
{
|
||||
char Buf[400];
|
||||
sprintf(Buf, Msg, Arg);
|
||||
AfxMessageBox(Buf);
|
||||
}
|
||||
#endif
|
||||
@@ -1,127 +0,0 @@
|
||||
// Commands.h : header file
|
||||
//
|
||||
|
||||
#if !defined(AFX_COMMANDS_H__AC726717_2977_11D1_B2F3_006008040780__INCLUDED_)
|
||||
#define AFX_COMMANDS_H__AC726717_2977_11D1_B2F3_006008040780__INCLUDED_
|
||||
|
||||
#include "vsvtypes.h"
|
||||
|
||||
class CCommands :
|
||||
public CComDualImpl < ICommands,
|
||||
&IID_ICommands,
|
||||
&LIBID_VisVim >,
|
||||
public CComObjectRoot,
|
||||
public CComCoClass < CCommands,
|
||||
&CLSID_Commands >
|
||||
{
|
||||
protected:
|
||||
IApplication * m_pApplication;
|
||||
|
||||
public:
|
||||
CCommands ();
|
||||
~CCommands ();
|
||||
void SetApplicationObject (IApplication * m_pApplication);
|
||||
IApplication *GetApplicationObject ()
|
||||
{
|
||||
return m_pApplication;
|
||||
}
|
||||
void UnadviseFromEvents ();
|
||||
|
||||
BEGIN_COM_MAP (CCommands)
|
||||
COM_INTERFACE_ENTRY (IDispatch)
|
||||
COM_INTERFACE_ENTRY (ICommands)
|
||||
END_COM_MAP ()
|
||||
DECLARE_NOT_AGGREGATABLE (CCommands)
|
||||
|
||||
protected:
|
||||
// This class template is used as the base class for the Application
|
||||
// event handler object and the Debugger event handler object,
|
||||
// which are declared below.
|
||||
template < class IEvents,
|
||||
const IID * piidEvents,
|
||||
const GUID * plibid,
|
||||
class XEvents,
|
||||
const CLSID * pClsidEvents >
|
||||
class XEventHandler :
|
||||
public CComDualImpl < IEvents,
|
||||
piidEvents,
|
||||
plibid >,
|
||||
public CComObjectRoot,
|
||||
public CComCoClass < XEvents,
|
||||
pClsidEvents >
|
||||
{
|
||||
public:
|
||||
BEGIN_COM_MAP (XEvents)
|
||||
COM_INTERFACE_ENTRY (IDispatch)
|
||||
COM_INTERFACE_ENTRY_IID (*piidEvents, IEvents)
|
||||
END_COM_MAP ()
|
||||
DECLARE_NOT_AGGREGATABLE (XEvents)
|
||||
void Connect (IUnknown * pUnk)
|
||||
{
|
||||
VERIFY (SUCCEEDED (AtlAdvise (pUnk, this, *piidEvents,
|
||||
&m_dwAdvise)));
|
||||
}
|
||||
void Disconnect (IUnknown * pUnk)
|
||||
{
|
||||
AtlUnadvise (pUnk, *piidEvents, m_dwAdvise);
|
||||
}
|
||||
|
||||
CCommands *m_pCommands;
|
||||
|
||||
protected:
|
||||
DWORD m_dwAdvise;
|
||||
};
|
||||
|
||||
// This object handles events fired by the Application object
|
||||
class XApplicationEvents : public XEventHandler < IApplicationEvents,
|
||||
&IID_IApplicationEvents,
|
||||
&LIBID_VisVim,
|
||||
XApplicationEvents,
|
||||
&CLSID_ApplicationEvents >
|
||||
{
|
||||
public:
|
||||
// IApplicationEvents methods
|
||||
STDMETHOD (BeforeBuildStart) (THIS);
|
||||
STDMETHOD (BuildFinish) (THIS_ long nNumErrors, long nNumWarnings);
|
||||
STDMETHOD (BeforeApplicationShutDown) (THIS);
|
||||
STDMETHOD (DocumentOpen) (THIS_ IDispatch * theDocument);
|
||||
STDMETHOD (BeforeDocumentClose) (THIS_ IDispatch * theDocument);
|
||||
STDMETHOD (DocumentSave) (THIS_ IDispatch * theDocument);
|
||||
STDMETHOD (NewDocument) (THIS_ IDispatch * theDocument);
|
||||
STDMETHOD (WindowActivate) (THIS_ IDispatch * theWindow);
|
||||
STDMETHOD (WindowDeactivate) (THIS_ IDispatch * theWindow);
|
||||
STDMETHOD (WorkspaceOpen) (THIS);
|
||||
STDMETHOD (WorkspaceClose) (THIS);
|
||||
STDMETHOD (NewWorkspace) (THIS);
|
||||
};
|
||||
typedef CComObject < XApplicationEvents > XApplicationEventsObj;
|
||||
XApplicationEventsObj *m_pApplicationEventsObj;
|
||||
|
||||
// This object handles events fired by the Application object
|
||||
class XDebuggerEvents : public XEventHandler < IDebuggerEvents,
|
||||
&IID_IDebuggerEvents,
|
||||
&LIBID_VisVim,
|
||||
XDebuggerEvents,
|
||||
&CLSID_DebuggerEvents >
|
||||
{
|
||||
public:
|
||||
// IDebuggerEvents method
|
||||
STDMETHOD (BreakpointHit) (THIS_ IDispatch * pBreakpoint);
|
||||
};
|
||||
typedef CComObject < XDebuggerEvents > XDebuggerEventsObj;
|
||||
XDebuggerEventsObj *m_pDebuggerEventsObj;
|
||||
|
||||
public:
|
||||
// ICommands methods
|
||||
STDMETHOD (VisVimDialog) (THIS);
|
||||
STDMETHOD (VisVimEnable) (THIS);
|
||||
STDMETHOD (VisVimDisable) (THIS);
|
||||
STDMETHOD (VisVimToggle) (THIS);
|
||||
STDMETHOD (VisVimLoad) (THIS);
|
||||
};
|
||||
|
||||
typedef CComObject < CCommands > CCommandsObj;
|
||||
|
||||
//{{AFX_INSERT_LOCATION}}
|
||||
|
||||
#endif // !defined(AFX_COMMANDS_H__AC726717_2977_11D1_B2F3_006008040780__INCLUDED)
|
||||
@@ -1,160 +0,0 @@
|
||||
#include "stdafx.h"
|
||||
#include "VisVim.h"
|
||||
#include "DSAddIn.h"
|
||||
#include "Commands.h"
|
||||
|
||||
#ifdef _DEBUG
|
||||
#define new DEBUG_NEW
|
||||
#undef THIS_FILE
|
||||
static char THIS_FILE[] = __FILE__;
|
||||
|
||||
#endif
|
||||
|
||||
// This is called when the user first loads the add-in, and on start-up
|
||||
// of each subsequent Developer Studio session
|
||||
STDMETHODIMP CDSAddIn::OnConnection (IApplication * pApp, VARIANT_BOOL bFirstTime,
|
||||
long dwCookie, VARIANT_BOOL * OnConnection)
|
||||
{
|
||||
AFX_MANAGE_STATE (AfxGetStaticModuleState ());
|
||||
*OnConnection = VARIANT_FALSE;
|
||||
|
||||
// Store info passed to us
|
||||
IApplication *pApplication = NULL;
|
||||
HRESULT hr;
|
||||
|
||||
hr = pApp->QueryInterface (IID_IApplication, (void **) &pApplication);
|
||||
if (FAILED (hr))
|
||||
{
|
||||
ReportLastError (hr);
|
||||
return E_UNEXPECTED;
|
||||
}
|
||||
if (pApplication == NULL)
|
||||
{
|
||||
ReportInternalError ("IApplication::QueryInterface");
|
||||
return E_UNEXPECTED;
|
||||
}
|
||||
|
||||
m_dwCookie = dwCookie;
|
||||
|
||||
// Create command dispatch, send info back to DevStudio
|
||||
CCommandsObj::CreateInstance (&m_pCommands);
|
||||
if (! m_pCommands)
|
||||
{
|
||||
ReportInternalError ("CCommandsObj::CreateInstance");
|
||||
return E_UNEXPECTED;
|
||||
}
|
||||
m_pCommands->AddRef ();
|
||||
|
||||
// The QueryInterface above AddRef'd the Application object. It will
|
||||
// be Release'd in CCommand's destructor.
|
||||
m_pCommands->SetApplicationObject (pApplication);
|
||||
|
||||
hr = pApplication->SetAddInInfo ((long) AfxGetInstanceHandle (),
|
||||
(LPDISPATCH) m_pCommands, IDR_TOOLBAR_MEDIUM, IDR_TOOLBAR_LARGE,
|
||||
m_dwCookie);
|
||||
if (FAILED (hr))
|
||||
{
|
||||
ReportLastError (hr);
|
||||
return E_UNEXPECTED;
|
||||
}
|
||||
|
||||
// Inform DevStudio of the commands we implement
|
||||
if (! AddCommand (pApplication, "VisVimDialog", "VisVimDialogCmd",
|
||||
IDS_CMD_DIALOG, 0, bFirstTime))
|
||||
return E_UNEXPECTED;
|
||||
if (! AddCommand (pApplication, "VisVimEnable", "VisVimEnableCmd",
|
||||
IDS_CMD_ENABLE, 1, bFirstTime))
|
||||
return E_UNEXPECTED;
|
||||
if (! AddCommand (pApplication, "VisVimDisable", "VisVimDisableCmd",
|
||||
IDS_CMD_DISABLE, 2, bFirstTime))
|
||||
return E_UNEXPECTED;
|
||||
if (! AddCommand (pApplication, "VisVimToggle", "VisVimToggleCmd",
|
||||
IDS_CMD_TOGGLE, 3, bFirstTime))
|
||||
return E_UNEXPECTED;
|
||||
if (! AddCommand (pApplication, "VisVimLoad", "VisVimLoadCmd",
|
||||
IDS_CMD_LOAD, 4, bFirstTime))
|
||||
return E_UNEXPECTED;
|
||||
|
||||
*OnConnection = VARIANT_TRUE;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
// This is called on shut-down, and also when the user unloads the add-in
|
||||
STDMETHODIMP CDSAddIn::OnDisconnection (VARIANT_BOOL bLastTime)
|
||||
{
|
||||
AFX_MANAGE_STATE (AfxGetStaticModuleState ());
|
||||
|
||||
m_pCommands->UnadviseFromEvents ();
|
||||
m_pCommands->Release ();
|
||||
m_pCommands = NULL;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
// Add a command to DevStudio
|
||||
// Creates a toolbar button for the command also.
|
||||
// 'MethodName' is the name of the method specified in the .odl file
|
||||
// 'StrResId' the resource id of the descriptive string
|
||||
// 'GlyphIndex' the image index into the command buttons bitmap
|
||||
// Return true on success
|
||||
//
|
||||
bool CDSAddIn::AddCommand (IApplication* pApp, char* MethodName, char* CmdName,
|
||||
UINT StrResId, UINT GlyphIndex, VARIANT_BOOL bFirstTime)
|
||||
{
|
||||
CString CmdString;
|
||||
CString CmdText;
|
||||
|
||||
CmdText.LoadString (StrResId);
|
||||
CmdString = CmdName;
|
||||
CmdString += CmdText;
|
||||
|
||||
CComBSTR bszCmdString (CmdString);
|
||||
CComBSTR bszMethod (MethodName);
|
||||
CComBSTR bszCmdName (CmdName);
|
||||
|
||||
// (see stdafx.h for the definition of VERIFY_OK)
|
||||
|
||||
VARIANT_BOOL bRet;
|
||||
VERIFY_OK (pApp->AddCommand (bszCmdString, bszMethod, GlyphIndex,
|
||||
m_dwCookie, &bRet));
|
||||
if (bRet == VARIANT_FALSE)
|
||||
{
|
||||
// AddCommand failed because a command with this name already exists.
|
||||
ReportInternalError ("IApplication::AddCommand");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
// Add toolbar buttons only if this is the first time the add-in
|
||||
// is being loaded. Toolbar buttons are automatically remembered
|
||||
// by Developer Studio from session to session, so we should only
|
||||
// add the toolbar buttons once.
|
||||
if (bFirstTime == VARIANT_TRUE)
|
||||
VERIFY_OK (pApp->AddCommandBarButton (dsGlyph, bszCmdName, m_dwCookie));
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void ReportLastError (HRESULT Err)
|
||||
{
|
||||
char *Buf = NULL;
|
||||
char Msg[512];
|
||||
|
||||
FormatMessage (FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_ALLOCATE_BUFFER,
|
||||
NULL, Err,
|
||||
MAKELANGID (LANG_NEUTRAL, SUBLANG_DEFAULT),
|
||||
Buf, 400, NULL);
|
||||
sprintf (Msg, "Unexpected error (Error code: %lx)\n%s", Err, Buf);
|
||||
|
||||
::MessageBox (NULL, Msg, "VisVim", MB_OK | MB_ICONSTOP);
|
||||
if (Buf)
|
||||
LocalFree (Buf);
|
||||
}
|
||||
|
||||
void ReportInternalError (char* Fct)
|
||||
{
|
||||
char Msg[512];
|
||||
|
||||
sprintf (Msg, "Unexpected error\n%s failed", Fct);
|
||||
::MessageBox (NULL, Msg, "VisVim", MB_OK | MB_ICONSTOP);
|
||||
}
|
||||
|
||||
@@ -1,53 +0,0 @@
|
||||
// DSAddIn.h : header file
|
||||
//
|
||||
|
||||
#if !defined(AFX_DSADDIN_H__AC726715_2977_11D1_B2F3_006008040780__INCLUDED_)
|
||||
#define AFX_DSADDIN_H__AC726715_2977_11D1_B2F3_006008040780__INCLUDED_
|
||||
|
||||
#include "commands.h"
|
||||
|
||||
// {4F9E01C0-406B-11d2-8006-00001C405077}
|
||||
DEFINE_GUID (CLSID_DSAddIn,
|
||||
0x4f9e01c0, 0x406b, 0x11d2, 0x80, 0x6, 0x0, 0x0, 0x1c, 0x40, 0x50, 0x77);
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CDSAddIn
|
||||
|
||||
class CDSAddIn :
|
||||
public IDSAddIn,
|
||||
public CComObjectRoot,
|
||||
public CComCoClass < CDSAddIn,
|
||||
&CLSID_DSAddIn >
|
||||
{
|
||||
public:
|
||||
DECLARE_REGISTRY (CDSAddIn, "VisVim.DSAddIn.1",
|
||||
"VisVim Developer Studio Add-in", IDS_VISVIM_LONGNAME,
|
||||
THREADFLAGS_BOTH)
|
||||
|
||||
CDSAddIn ()
|
||||
{
|
||||
}
|
||||
|
||||
BEGIN_COM_MAP (CDSAddIn)
|
||||
COM_INTERFACE_ENTRY (IDSAddIn)
|
||||
END_COM_MAP ()
|
||||
DECLARE_NOT_AGGREGATABLE (CDSAddIn)
|
||||
|
||||
// IDSAddIns
|
||||
public:
|
||||
STDMETHOD (OnConnection) (THIS_ IApplication * pApp, VARIANT_BOOL bFirstTime,
|
||||
long dwCookie, VARIANT_BOOL * OnConnection);
|
||||
STDMETHOD (OnDisconnection) (THIS_ VARIANT_BOOL bLastTime);
|
||||
|
||||
protected:
|
||||
bool AddCommand (IApplication* pApp, char* MethodName, char* CmdName,
|
||||
UINT StrResId, UINT GlyphIndex, VARIANT_BOOL bFirstTime);
|
||||
|
||||
protected:
|
||||
CCommandsObj * m_pCommands;
|
||||
DWORD m_dwCookie;
|
||||
};
|
||||
|
||||
//{{AFX_INSERT_LOCATION}}
|
||||
|
||||
#endif // !defined(AFX_DSADDIN_H__AC726715_2977_11D1_B2F3_006008040780__INCLUDED)
|
||||
@@ -1,781 +0,0 @@
|
||||
//
|
||||
// Class for creating OLE automation controllers.
|
||||
//
|
||||
// CreateObject() creates an automation object
|
||||
// Invoke() will call a property or method of the automation object.
|
||||
// GetProperty() returns a property
|
||||
// SetProperty() changes a property
|
||||
// Method() invokes a method
|
||||
//
|
||||
// For example, the following VB code will control Microsoft Word:
|
||||
//
|
||||
// Private Sub Form_Load()
|
||||
// Dim wb As Object
|
||||
// Set wb = CreateObject("Word.Basic")
|
||||
// wb.AppShow
|
||||
// wb.FileNewDefault
|
||||
// wb.Insert "This is a test"
|
||||
// wb.FileSaveAs "c:\sample.doc)"
|
||||
// End Sub
|
||||
//
|
||||
// A C++ automation controller that does the same can be written as follows:
|
||||
// the helper functions:
|
||||
//
|
||||
// Void FormLoad ()
|
||||
// {
|
||||
// COleAutomationControl Aut;
|
||||
// Aut.CreateObject("Word.Basic");
|
||||
// Aut.Method ("AppShow");
|
||||
// Aut.Method ("FileNewDefault");
|
||||
// Aut.Method ("Insert", "s", (LPOLESTR) OLESTR ("This is a test"));
|
||||
// Aut.Method ("FileSaveAs", "s", OLESTR ("c:\\sample.doc"));
|
||||
// }
|
||||
//
|
||||
//
|
||||
|
||||
#include "stdafx.h"
|
||||
#include <stdarg.h>
|
||||
#include "oleaut.h"
|
||||
|
||||
#ifdef _DEBUG
|
||||
#define new DEBUG_NEW
|
||||
#undef THIS_FILE
|
||||
static char THIS_FILE[] = __FILE__;
|
||||
#endif
|
||||
|
||||
|
||||
static bool CountArgsInFormat (LPCTSTR Format, UINT* nArgs);
|
||||
static LPCTSTR GetNextVarType (LPCTSTR Format, VARTYPE* pVarType);
|
||||
|
||||
|
||||
COleAutomationControl::COleAutomationControl ()
|
||||
{
|
||||
m_pDispatch = NULL;
|
||||
m_hResult = NOERROR;
|
||||
m_nErrArg = 0;
|
||||
VariantInit (&m_VariantResult);
|
||||
}
|
||||
|
||||
COleAutomationControl::~COleAutomationControl ()
|
||||
{
|
||||
DeleteObject ();
|
||||
}
|
||||
|
||||
void COleAutomationControl::DeleteObject ()
|
||||
{
|
||||
if (m_pDispatch)
|
||||
{
|
||||
m_pDispatch->Release ();
|
||||
m_pDispatch = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
// Creates an instance of the Automation object and
|
||||
// obtains its IDispatch interface.
|
||||
//
|
||||
// Parameters:
|
||||
// ProgId ProgID of Automation object
|
||||
//
|
||||
bool COleAutomationControl::CreateObject (char* ProgId)
|
||||
{
|
||||
CLSID ClsId; // CLSID of automation object
|
||||
LPUNKNOWN pUnknown = NULL; // IUnknown of automation object
|
||||
|
||||
// Retrieve CLSID from the progID that the user specified
|
||||
LPOLESTR OleProgId = TO_OLE_STR (ProgId);
|
||||
m_hResult = CLSIDFromProgID (OleProgId, &ClsId);
|
||||
if (FAILED (m_hResult))
|
||||
goto error;
|
||||
|
||||
// Create an instance of the automation object and ask for the
|
||||
// IDispatch interface
|
||||
m_hResult = CoCreateInstance (ClsId, NULL, CLSCTX_SERVER,
|
||||
IID_IUnknown, (void**) &pUnknown);
|
||||
if (FAILED (m_hResult))
|
||||
goto error;
|
||||
|
||||
m_hResult = pUnknown->QueryInterface (IID_IDispatch, (void**) &m_pDispatch);
|
||||
if (FAILED (m_hResult))
|
||||
goto error;
|
||||
|
||||
pUnknown->Release ();
|
||||
return true;
|
||||
|
||||
error:
|
||||
if (pUnknown)
|
||||
pUnknown->Release ();
|
||||
if (m_pDispatch)
|
||||
m_pDispatch->Release ();
|
||||
return false;
|
||||
}
|
||||
|
||||
// Return the dispatch id of a named service
|
||||
// This id can be used in subsequent calls to GetProperty (), SetProperty () and
|
||||
// Method (). This is the preferred method when performance is important.
|
||||
//
|
||||
DISPID COleAutomationControl::GetDispatchId (char* Name)
|
||||
{
|
||||
DISPID DispatchId;
|
||||
|
||||
ASSERT (m_pDispatch);
|
||||
|
||||
// Get DISPID of property/method
|
||||
LPOLESTR OleName = TO_OLE_STR (Name);
|
||||
m_hResult = m_pDispatch->GetIDsOfNames (IID_NULL, &OleName, 1,
|
||||
LOCALE_USER_DEFAULT, &DispatchId);
|
||||
if (FAILED (m_hResult))
|
||||
return NULL;
|
||||
return DispatchId;
|
||||
}
|
||||
|
||||
// The following functions use these parameters:
|
||||
//
|
||||
// Parameters:
|
||||
//
|
||||
// Name Name of property or method.
|
||||
//
|
||||
// Format Format string that describes the variable list of parameters that
|
||||
// follows. The format string can contain the following characters.
|
||||
// & = mark the following format character as VT_BYREF
|
||||
// B = VT_BOOL
|
||||
// i = VT_I2
|
||||
// I = VT_I4
|
||||
// r = VT_R2
|
||||
// R = VT_R4
|
||||
// c = VT_CY
|
||||
// s = VT_BSTR (string pointer can be passed,
|
||||
// BSTR will be allocated by this function).
|
||||
// e = VT_ERROR
|
||||
// d = VT_DATE
|
||||
// v = VT_VARIANT. Use this to pass data types that are not described
|
||||
// in the format string. (For example SafeArrays).
|
||||
// D = VT_DISPATCH
|
||||
// U = VT_UNKNOWN
|
||||
//
|
||||
// ... Arguments of the property or method.
|
||||
// Arguments are described by Format.
|
||||
//
|
||||
|
||||
bool COleAutomationControl::GetProperty (char* Name)
|
||||
{
|
||||
return Invoke (DISPATCH_PROPERTYGET, Name, NULL, NULL);
|
||||
}
|
||||
|
||||
bool COleAutomationControl::GetProperty (DISPID DispatchId)
|
||||
{
|
||||
return Invoke (DISPATCH_PROPERTYGET, DispatchId, NULL, NULL);
|
||||
}
|
||||
|
||||
bool COleAutomationControl::PutProperty (char* Name, LPCTSTR Format, ...)
|
||||
{
|
||||
va_list ArgList;
|
||||
|
||||
va_start (ArgList, Format);
|
||||
bool bRet = Invoke (DISPATCH_PROPERTYPUT, Name, Format, ArgList);
|
||||
va_end (ArgList);
|
||||
return bRet;
|
||||
}
|
||||
|
||||
bool COleAutomationControl::PutProperty (DISPID DispatchId, LPCTSTR Format, ...)
|
||||
{
|
||||
va_list ArgList;
|
||||
|
||||
va_start (ArgList, Format);
|
||||
bool bRet = Invoke (DISPATCH_PROPERTYPUT, DispatchId, Format, ArgList);
|
||||
va_end (ArgList);
|
||||
return bRet;
|
||||
}
|
||||
|
||||
bool COleAutomationControl::Method (char* Name, LPCTSTR Format, ...)
|
||||
{
|
||||
va_list ArgList;
|
||||
|
||||
va_start (ArgList, Format);
|
||||
bool bRet = Invoke (DISPATCH_METHOD, Name, Format, ArgList);
|
||||
va_end (ArgList);
|
||||
return bRet;
|
||||
}
|
||||
|
||||
bool COleAutomationControl::Method (DISPID DispatchId, LPCTSTR Format, ...)
|
||||
{
|
||||
va_list ArgList;
|
||||
|
||||
va_start (ArgList, Format);
|
||||
bool bRet = Invoke (DISPATCH_METHOD, DispatchId, Format, ArgList);
|
||||
va_end (ArgList);
|
||||
return bRet;
|
||||
}
|
||||
|
||||
bool COleAutomationControl::Invoke (WORD Flags, char* Name,
|
||||
LPCTSTR Format, va_list ArgList)
|
||||
{
|
||||
DISPID DispatchId = GetDispatchId (Name);
|
||||
if (! DispatchId)
|
||||
return false;
|
||||
return Invoke (Flags, DispatchId, Format, ArgList);
|
||||
}
|
||||
|
||||
bool COleAutomationControl::Invoke (WORD Flags, DISPID DispatchId,
|
||||
LPCTSTR Format, va_list ArgList)
|
||||
{
|
||||
UINT ArgCount = 0;
|
||||
VARIANTARG* ArgVector = NULL;
|
||||
|
||||
ASSERT (m_pDispatch);
|
||||
|
||||
DISPPARAMS DispatchParams;
|
||||
memset (&DispatchParams, 0, sizeof (DispatchParams));
|
||||
|
||||
// Determine number of arguments
|
||||
if (Format)
|
||||
CountArgsInFormat (Format, &ArgCount);
|
||||
|
||||
// Property puts have a named argument that represents the value that
|
||||
// the property is being assigned.
|
||||
DISPID DispIdNamed = DISPID_PROPERTYPUT;
|
||||
if (Flags & DISPATCH_PROPERTYPUT)
|
||||
{
|
||||
if (ArgCount == 0)
|
||||
{
|
||||
m_hResult = ResultFromScode (E_INVALIDARG);
|
||||
return false;
|
||||
}
|
||||
DispatchParams.cNamedArgs = 1;
|
||||
DispatchParams.rgdispidNamedArgs = &DispIdNamed;
|
||||
}
|
||||
|
||||
if (ArgCount)
|
||||
{
|
||||
// Allocate memory for all VARIANTARG parameters
|
||||
ArgVector = (VARIANTARG*) CoTaskMemAlloc (
|
||||
ArgCount * sizeof (VARIANTARG));
|
||||
if (! ArgVector)
|
||||
{
|
||||
m_hResult = ResultFromScode (E_OUTOFMEMORY);
|
||||
return false;
|
||||
}
|
||||
memset (ArgVector, 0, sizeof (VARIANTARG) * ArgCount);
|
||||
|
||||
// Get ready to walk vararg list
|
||||
LPCTSTR s = Format;
|
||||
|
||||
VARIANTARG *p = ArgVector + ArgCount - 1; // Params go in opposite order
|
||||
|
||||
for (;;)
|
||||
{
|
||||
VariantInit (p);
|
||||
if (! (s = GetNextVarType (s, &p->vt)))
|
||||
break;
|
||||
|
||||
if (p < ArgVector)
|
||||
{
|
||||
m_hResult = ResultFromScode (E_INVALIDARG);
|
||||
goto Cleanup;
|
||||
}
|
||||
switch (p->vt)
|
||||
{
|
||||
case VT_I2:
|
||||
V_I2 (p) = va_arg (ArgList, short);
|
||||
break;
|
||||
case VT_I4:
|
||||
V_I4 (p) = va_arg (ArgList, long);
|
||||
break;
|
||||
case VT_R4:
|
||||
V_R4 (p) = va_arg (ArgList, float);
|
||||
break;
|
||||
case VT_DATE:
|
||||
case VT_R8:
|
||||
V_R8 (p) = va_arg (ArgList, double);
|
||||
break;
|
||||
case VT_CY:
|
||||
V_CY (p) = va_arg (ArgList, CY);
|
||||
break;
|
||||
case VT_BSTR:
|
||||
V_BSTR (p) = SysAllocString (va_arg (ArgList,
|
||||
OLECHAR*));
|
||||
if (! p->bstrVal)
|
||||
{
|
||||
m_hResult = ResultFromScode (E_OUTOFMEMORY);
|
||||
p->vt = VT_EMPTY;
|
||||
goto Cleanup;
|
||||
}
|
||||
break;
|
||||
case VT_DISPATCH:
|
||||
V_DISPATCH (p) = va_arg (ArgList, LPDISPATCH);
|
||||
break;
|
||||
case VT_ERROR:
|
||||
V_ERROR (p) = va_arg (ArgList, SCODE);
|
||||
break;
|
||||
case VT_BOOL:
|
||||
V_BOOL (p) = va_arg (ArgList, BOOL) ? -1 : 0;
|
||||
break;
|
||||
case VT_VARIANT:
|
||||
*p = va_arg (ArgList, VARIANTARG);
|
||||
break;
|
||||
case VT_UNKNOWN:
|
||||
V_UNKNOWN (p) = va_arg (ArgList, LPUNKNOWN);
|
||||
break;
|
||||
|
||||
case VT_I2 | VT_BYREF:
|
||||
V_I2REF (p) = va_arg (ArgList, short*);
|
||||
break;
|
||||
case VT_I4 | VT_BYREF:
|
||||
V_I4REF (p) = va_arg (ArgList, long*);
|
||||
break;
|
||||
case VT_R4 | VT_BYREF:
|
||||
V_R4REF (p) = va_arg (ArgList, float*);
|
||||
break;
|
||||
case VT_R8 | VT_BYREF:
|
||||
V_R8REF (p) = va_arg (ArgList, double*);
|
||||
break;
|
||||
case VT_DATE | VT_BYREF:
|
||||
V_DATEREF (p) = va_arg (ArgList, DATE*);
|
||||
break;
|
||||
case VT_CY | VT_BYREF:
|
||||
V_CYREF (p) = va_arg (ArgList, CY*);
|
||||
break;
|
||||
case VT_BSTR | VT_BYREF:
|
||||
V_BSTRREF (p) = va_arg (ArgList, BSTR*);
|
||||
break;
|
||||
case VT_DISPATCH | VT_BYREF:
|
||||
V_DISPATCHREF (p) = va_arg (ArgList, LPDISPATCH*);
|
||||
break;
|
||||
case VT_ERROR | VT_BYREF:
|
||||
V_ERRORREF (p) = va_arg (ArgList, SCODE*);
|
||||
break;
|
||||
case VT_BOOL | VT_BYREF:
|
||||
{
|
||||
BOOL* pBool = va_arg (ArgList, BOOL*);
|
||||
|
||||
*pBool = 0;
|
||||
V_BOOLREF (p) = (VARIANT_BOOL*) pBool;
|
||||
}
|
||||
break;
|
||||
case VT_VARIANT | VT_BYREF:
|
||||
V_VARIANTREF (p) = va_arg (ArgList, VARIANTARG*);
|
||||
break;
|
||||
case VT_UNKNOWN | VT_BYREF:
|
||||
V_UNKNOWNREF (p) = va_arg (ArgList, LPUNKNOWN*);
|
||||
break;
|
||||
|
||||
default:
|
||||
{
|
||||
m_hResult = ResultFromScode (E_INVALIDARG);
|
||||
goto Cleanup;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
--p; // Get ready to fill next argument
|
||||
}
|
||||
}
|
||||
|
||||
DispatchParams.cArgs = ArgCount;
|
||||
DispatchParams.rgvarg = ArgVector;
|
||||
|
||||
// Initialize return variant, in case caller forgot. Caller can pass
|
||||
// NULL if return value is not expected.
|
||||
VariantInit (&m_VariantResult);
|
||||
|
||||
// Make the call
|
||||
m_hResult = m_pDispatch->Invoke (DispatchId, IID_NULL, LOCALE_USER_DEFAULT,
|
||||
Flags, &DispatchParams, &m_VariantResult,
|
||||
&m_ExceptionInfo, &m_nErrArg);
|
||||
|
||||
Cleanup:
|
||||
// Cleanup any arguments that need cleanup
|
||||
if (ArgCount)
|
||||
{
|
||||
VARIANTARG* p = ArgVector;
|
||||
|
||||
while (ArgCount--)
|
||||
{
|
||||
switch (p->vt)
|
||||
{
|
||||
case VT_BSTR:
|
||||
VariantClear (p);
|
||||
break;
|
||||
}
|
||||
++p;
|
||||
}
|
||||
CoTaskMemFree (ArgVector);
|
||||
}
|
||||
|
||||
return FAILED (m_hResult) ? false : true;
|
||||
}
|
||||
|
||||
#define CASE_SCODE(sc) \
|
||||
case sc: \
|
||||
lstrcpy((char*)ErrName, (char*)#sc); \
|
||||
break;
|
||||
|
||||
void COleAutomationControl::ErrDiag ()
|
||||
{
|
||||
char ErrName[200];
|
||||
|
||||
SCODE sc = GetScode (m_hResult);
|
||||
switch (sc)
|
||||
{
|
||||
// SCODE's defined in SCODE.H
|
||||
CASE_SCODE (S_OK)
|
||||
CASE_SCODE (S_FALSE)
|
||||
CASE_SCODE (E_UNEXPECTED)
|
||||
CASE_SCODE (E_OUTOFMEMORY)
|
||||
CASE_SCODE (E_INVALIDARG)
|
||||
CASE_SCODE (E_NOINTERFACE)
|
||||
CASE_SCODE (E_POINTER)
|
||||
CASE_SCODE (E_HANDLE)
|
||||
CASE_SCODE (E_ABORT)
|
||||
CASE_SCODE (E_FAIL)
|
||||
CASE_SCODE (E_ACCESSDENIED)
|
||||
|
||||
// SCODE's defined in OLE2.H
|
||||
CASE_SCODE (OLE_E_OLEVERB)
|
||||
CASE_SCODE (OLE_E_ADVF)
|
||||
CASE_SCODE (OLE_E_ENUM_NOMORE)
|
||||
CASE_SCODE (OLE_E_ADVISENOTSUPPORTED)
|
||||
CASE_SCODE (OLE_E_NOCONNECTION)
|
||||
CASE_SCODE (OLE_E_NOTRUNNING)
|
||||
CASE_SCODE (OLE_E_NOCACHE)
|
||||
CASE_SCODE (OLE_E_BLANK)
|
||||
CASE_SCODE (OLE_E_CLASSDIFF)
|
||||
CASE_SCODE (OLE_E_CANT_GETMONIKER)
|
||||
CASE_SCODE (OLE_E_CANT_BINDTOSOURCE)
|
||||
CASE_SCODE (OLE_E_STATIC)
|
||||
CASE_SCODE (OLE_E_PROMPTSAVECANCELLED)
|
||||
CASE_SCODE (OLE_E_INVALIDRECT)
|
||||
CASE_SCODE (OLE_E_WRONGCOMPOBJ)
|
||||
CASE_SCODE (OLE_E_INVALIDHWND)
|
||||
CASE_SCODE (OLE_E_NOT_INPLACEACTIVE)
|
||||
CASE_SCODE (OLE_E_CANTCONVERT)
|
||||
CASE_SCODE (OLE_E_NOSTORAGE)
|
||||
|
||||
CASE_SCODE (DV_E_FORMATETC)
|
||||
CASE_SCODE (DV_E_DVTARGETDEVICE)
|
||||
CASE_SCODE (DV_E_STGMEDIUM)
|
||||
CASE_SCODE (DV_E_STATDATA)
|
||||
CASE_SCODE (DV_E_LINDEX)
|
||||
CASE_SCODE (DV_E_TYMED)
|
||||
CASE_SCODE (DV_E_CLIPFORMAT)
|
||||
CASE_SCODE (DV_E_DVASPECT)
|
||||
CASE_SCODE (DV_E_DVTARGETDEVICE_SIZE)
|
||||
CASE_SCODE (DV_E_NOIVIEWOBJECT)
|
||||
|
||||
CASE_SCODE (OLE_S_USEREG)
|
||||
CASE_SCODE (OLE_S_STATIC)
|
||||
CASE_SCODE (OLE_S_MAC_CLIPFORMAT)
|
||||
|
||||
CASE_SCODE (CONVERT10_E_OLESTREAM_GET)
|
||||
CASE_SCODE (CONVERT10_E_OLESTREAM_PUT)
|
||||
CASE_SCODE (CONVERT10_E_OLESTREAM_FMT)
|
||||
CASE_SCODE (CONVERT10_E_OLESTREAM_BITMAP_TO_DIB)
|
||||
CASE_SCODE (CONVERT10_E_STG_FMT)
|
||||
CASE_SCODE (CONVERT10_E_STG_NO_STD_STREAM)
|
||||
CASE_SCODE (CONVERT10_E_STG_DIB_TO_BITMAP)
|
||||
CASE_SCODE (CONVERT10_S_NO_PRESENTATION)
|
||||
|
||||
CASE_SCODE (CLIPBRD_E_CANT_OPEN)
|
||||
CASE_SCODE (CLIPBRD_E_CANT_EMPTY)
|
||||
CASE_SCODE (CLIPBRD_E_CANT_SET)
|
||||
CASE_SCODE (CLIPBRD_E_BAD_DATA)
|
||||
CASE_SCODE (CLIPBRD_E_CANT_CLOSE)
|
||||
|
||||
CASE_SCODE (DRAGDROP_E_NOTREGISTERED)
|
||||
CASE_SCODE (DRAGDROP_E_ALREADYREGISTERED)
|
||||
CASE_SCODE (DRAGDROP_E_INVALIDHWND)
|
||||
CASE_SCODE (DRAGDROP_S_DROP)
|
||||
CASE_SCODE (DRAGDROP_S_CANCEL)
|
||||
CASE_SCODE (DRAGDROP_S_USEDEFAULTCURSORS)
|
||||
|
||||
CASE_SCODE (OLEOBJ_E_NOVERBS)
|
||||
CASE_SCODE (OLEOBJ_E_INVALIDVERB)
|
||||
CASE_SCODE (OLEOBJ_S_INVALIDVERB)
|
||||
CASE_SCODE (OLEOBJ_S_CANNOT_DOVERB_NOW)
|
||||
CASE_SCODE (OLEOBJ_S_INVALIDHWND)
|
||||
CASE_SCODE (INPLACE_E_NOTUNDOABLE)
|
||||
CASE_SCODE (INPLACE_E_NOTOOLSPACE)
|
||||
CASE_SCODE (INPLACE_S_TRUNCATED)
|
||||
|
||||
// SCODE's defined in COMPOBJ.H
|
||||
CASE_SCODE (CO_E_NOTINITIALIZED)
|
||||
CASE_SCODE (CO_E_ALREADYINITIALIZED)
|
||||
CASE_SCODE (CO_E_CANTDETERMINECLASS)
|
||||
CASE_SCODE (CO_E_CLASSSTRING)
|
||||
CASE_SCODE (CO_E_IIDSTRING)
|
||||
CASE_SCODE (CO_E_APPNOTFOUND)
|
||||
CASE_SCODE (CO_E_APPSINGLEUSE)
|
||||
CASE_SCODE (CO_E_ERRORINAPP)
|
||||
CASE_SCODE (CO_E_DLLNOTFOUND)
|
||||
CASE_SCODE (CO_E_ERRORINDLL)
|
||||
CASE_SCODE (CO_E_WRONGOSFORAPP)
|
||||
CASE_SCODE (CO_E_OBJNOTREG)
|
||||
CASE_SCODE (CO_E_OBJISREG)
|
||||
CASE_SCODE (CO_E_OBJNOTCONNECTED)
|
||||
CASE_SCODE (CO_E_APPDIDNTREG)
|
||||
CASE_SCODE (CLASS_E_NOAGGREGATION)
|
||||
CASE_SCODE (CLASS_E_CLASSNOTAVAILABLE)
|
||||
CASE_SCODE (REGDB_E_READREGDB)
|
||||
CASE_SCODE (REGDB_E_WRITEREGDB)
|
||||
CASE_SCODE (REGDB_E_KEYMISSING)
|
||||
CASE_SCODE (REGDB_E_INVALIDVALUE)
|
||||
CASE_SCODE (REGDB_E_CLASSNOTREG)
|
||||
CASE_SCODE (REGDB_E_IIDNOTREG)
|
||||
CASE_SCODE (RPC_E_CALL_REJECTED)
|
||||
CASE_SCODE (RPC_E_CALL_CANCELED)
|
||||
CASE_SCODE (RPC_E_CANTPOST_INSENDCALL)
|
||||
CASE_SCODE (RPC_E_CANTCALLOUT_INASYNCCALL)
|
||||
CASE_SCODE (RPC_E_CANTCALLOUT_INEXTERNALCALL)
|
||||
CASE_SCODE (RPC_E_CONNECTION_TERMINATED)
|
||||
CASE_SCODE (RPC_E_SERVER_DIED)
|
||||
CASE_SCODE (RPC_E_CLIENT_DIED)
|
||||
CASE_SCODE (RPC_E_INVALID_DATAPACKET)
|
||||
CASE_SCODE (RPC_E_CANTTRANSMIT_CALL)
|
||||
CASE_SCODE (RPC_E_CLIENT_CANTMARSHAL_DATA)
|
||||
CASE_SCODE (RPC_E_CLIENT_CANTUNMARSHAL_DATA)
|
||||
CASE_SCODE (RPC_E_SERVER_CANTMARSHAL_DATA)
|
||||
CASE_SCODE (RPC_E_SERVER_CANTUNMARSHAL_DATA)
|
||||
CASE_SCODE (RPC_E_INVALID_DATA)
|
||||
CASE_SCODE (RPC_E_INVALID_PARAMETER)
|
||||
CASE_SCODE (RPC_E_CANTCALLOUT_AGAIN)
|
||||
CASE_SCODE (RPC_E_UNEXPECTED)
|
||||
|
||||
// SCODE's defined in DVOBJ.H
|
||||
CASE_SCODE (DATA_S_SAMEFORMATETC)
|
||||
CASE_SCODE (VIEW_E_DRAW)
|
||||
CASE_SCODE (VIEW_S_ALREADY_FROZEN)
|
||||
CASE_SCODE (CACHE_E_NOCACHE_UPDATED)
|
||||
CASE_SCODE (CACHE_S_FORMATETC_NOTSUPPORTED)
|
||||
CASE_SCODE (CACHE_S_SAMECACHE)
|
||||
CASE_SCODE (CACHE_S_SOMECACHES_NOTUPDATED)
|
||||
|
||||
// SCODE's defined in STORAGE.H
|
||||
CASE_SCODE (STG_E_INVALIDFUNCTION)
|
||||
CASE_SCODE (STG_E_FILENOTFOUND)
|
||||
CASE_SCODE (STG_E_PATHNOTFOUND)
|
||||
CASE_SCODE (STG_E_TOOMANYOPENFILES)
|
||||
CASE_SCODE (STG_E_ACCESSDENIED)
|
||||
CASE_SCODE (STG_E_INVALIDHANDLE)
|
||||
CASE_SCODE (STG_E_INSUFFICIENTMEMORY)
|
||||
CASE_SCODE (STG_E_INVALIDPOINTER)
|
||||
CASE_SCODE (STG_E_NOMOREFILES)
|
||||
CASE_SCODE (STG_E_DISKISWRITEPROTECTED)
|
||||
CASE_SCODE (STG_E_SEEKERROR)
|
||||
CASE_SCODE (STG_E_WRITEFAULT)
|
||||
CASE_SCODE (STG_E_READFAULT)
|
||||
CASE_SCODE (STG_E_SHAREVIOLATION)
|
||||
CASE_SCODE (STG_E_LOCKVIOLATION)
|
||||
CASE_SCODE (STG_E_FILEALREADYEXISTS)
|
||||
CASE_SCODE (STG_E_INVALIDPARAMETER)
|
||||
CASE_SCODE (STG_E_MEDIUMFULL)
|
||||
CASE_SCODE (STG_E_ABNORMALAPIEXIT)
|
||||
CASE_SCODE (STG_E_INVALIDHEADER)
|
||||
CASE_SCODE (STG_E_INVALIDNAME)
|
||||
CASE_SCODE (STG_E_UNKNOWN)
|
||||
CASE_SCODE (STG_E_UNIMPLEMENTEDFUNCTION)
|
||||
CASE_SCODE (STG_E_INVALIDFLAG)
|
||||
CASE_SCODE (STG_E_INUSE)
|
||||
CASE_SCODE (STG_E_NOTCURRENT)
|
||||
CASE_SCODE (STG_E_REVERTED)
|
||||
CASE_SCODE (STG_E_CANTSAVE)
|
||||
CASE_SCODE (STG_E_OLDFORMAT)
|
||||
CASE_SCODE (STG_E_OLDDLL)
|
||||
CASE_SCODE (STG_E_SHAREREQUIRED)
|
||||
CASE_SCODE (STG_E_NOTFILEBASEDSTORAGE)
|
||||
CASE_SCODE (STG_E_EXTANTMARSHALLINGS)
|
||||
CASE_SCODE (STG_S_CONVERTED)
|
||||
|
||||
// SCODE's defined in STORAGE.H
|
||||
CASE_SCODE (MK_E_CONNECTMANUALLY)
|
||||
CASE_SCODE (MK_E_EXCEEDEDDEADLINE)
|
||||
CASE_SCODE (MK_E_NEEDGENERIC)
|
||||
CASE_SCODE (MK_E_UNAVAILABLE)
|
||||
CASE_SCODE (MK_E_SYNTAX)
|
||||
CASE_SCODE (MK_E_NOOBJECT)
|
||||
CASE_SCODE (MK_E_INVALIDEXTENSION)
|
||||
CASE_SCODE (MK_E_INTERMEDIATEINTERFACENOTSUPPORTED)
|
||||
CASE_SCODE (MK_E_NOTBINDABLE)
|
||||
CASE_SCODE (MK_E_NOTBOUND)
|
||||
CASE_SCODE (MK_E_CANTOPENFILE)
|
||||
CASE_SCODE (MK_E_MUSTBOTHERUSER)
|
||||
CASE_SCODE (MK_E_NOINVERSE)
|
||||
CASE_SCODE (MK_E_NOSTORAGE)
|
||||
CASE_SCODE (MK_E_NOPREFIX)
|
||||
CASE_SCODE (MK_S_REDUCED_TO_SELF)
|
||||
CASE_SCODE (MK_S_ME)
|
||||
CASE_SCODE (MK_S_HIM)
|
||||
CASE_SCODE (MK_S_US)
|
||||
CASE_SCODE (MK_S_MONIKERALREADYREGISTERED)
|
||||
|
||||
// SCODE's defined in DISPATCH.H
|
||||
CASE_SCODE (DISP_E_UNKNOWNINTERFACE)
|
||||
CASE_SCODE (DISP_E_MEMBERNOTFOUND)
|
||||
CASE_SCODE (DISP_E_PARAMNOTFOUND)
|
||||
CASE_SCODE (DISP_E_TYPEMISMATCH)
|
||||
CASE_SCODE (DISP_E_UNKNOWNNAME)
|
||||
CASE_SCODE (DISP_E_NONAMEDARGS)
|
||||
CASE_SCODE (DISP_E_BADVARTYPE)
|
||||
CASE_SCODE (DISP_E_EXCEPTION)
|
||||
CASE_SCODE (DISP_E_OVERFLOW)
|
||||
CASE_SCODE (DISP_E_BADINDEX)
|
||||
CASE_SCODE (DISP_E_UNKNOWNLCID)
|
||||
CASE_SCODE (DISP_E_ARRAYISLOCKED)
|
||||
CASE_SCODE (DISP_E_BADPARAMCOUNT)
|
||||
CASE_SCODE (DISP_E_PARAMNOTOPTIONAL)
|
||||
CASE_SCODE (DISP_E_BADCALLEE)
|
||||
CASE_SCODE (DISP_E_NOTACOLLECTION)
|
||||
|
||||
CASE_SCODE (TYPE_E_BUFFERTOOSMALL)
|
||||
CASE_SCODE (TYPE_E_INVDATAREAD)
|
||||
CASE_SCODE (TYPE_E_UNSUPFORMAT)
|
||||
CASE_SCODE (TYPE_E_REGISTRYACCESS)
|
||||
CASE_SCODE (TYPE_E_LIBNOTREGISTERED)
|
||||
CASE_SCODE (TYPE_E_UNDEFINEDTYPE)
|
||||
CASE_SCODE (TYPE_E_QUALIFIEDNAMEDISALLOWED)
|
||||
CASE_SCODE (TYPE_E_INVALIDSTATE)
|
||||
CASE_SCODE (TYPE_E_WRONGTYPEKIND)
|
||||
CASE_SCODE (TYPE_E_ELEMENTNOTFOUND)
|
||||
CASE_SCODE (TYPE_E_AMBIGUOUSNAME)
|
||||
CASE_SCODE (TYPE_E_NAMECONFLICT)
|
||||
CASE_SCODE (TYPE_E_UNKNOWNLCID)
|
||||
CASE_SCODE (TYPE_E_DLLFUNCTIONNOTFOUND)
|
||||
CASE_SCODE (TYPE_E_BADMODULEKIND)
|
||||
CASE_SCODE (TYPE_E_SIZETOOBIG)
|
||||
CASE_SCODE (TYPE_E_DUPLICATEID)
|
||||
CASE_SCODE (TYPE_E_TYPEMISMATCH)
|
||||
CASE_SCODE (TYPE_E_OUTOFBOUNDS)
|
||||
CASE_SCODE (TYPE_E_IOERROR)
|
||||
CASE_SCODE (TYPE_E_CANTCREATETMPFILE)
|
||||
CASE_SCODE (TYPE_E_CANTLOADLIBRARY)
|
||||
CASE_SCODE (TYPE_E_INCONSISTENTPROPFUNCS)
|
||||
CASE_SCODE (TYPE_E_CIRCULARTYPE)
|
||||
|
||||
default:
|
||||
lstrcpy (ErrName, "UNKNOWN SCODE");
|
||||
}
|
||||
|
||||
char Buf[256];
|
||||
sprintf (Buf, "An OLE error occurred:\r\nCode = %s\r\nResult = %lx.",
|
||||
(char*) ErrName, m_hResult);
|
||||
MessageBox (NULL, Buf, "OLE Error", MB_OK);
|
||||
}
|
||||
|
||||
|
||||
static bool CountArgsInFormat (LPCTSTR Format, UINT* pArgCount)
|
||||
{
|
||||
*pArgCount = 0;
|
||||
|
||||
if (! Format)
|
||||
return true;
|
||||
|
||||
while (*Format)
|
||||
{
|
||||
if (*Format == '&')
|
||||
Format++;
|
||||
|
||||
switch (*Format)
|
||||
{
|
||||
case 'b':
|
||||
case 'i':
|
||||
case 'I':
|
||||
case 'r':
|
||||
case 'R':
|
||||
case 'c':
|
||||
case 's':
|
||||
case 'e':
|
||||
case 'd':
|
||||
case 'v':
|
||||
case 'D':
|
||||
case 'U':
|
||||
++ (*pArgCount);
|
||||
Format++;
|
||||
break;
|
||||
case '\0':
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
static LPCTSTR GetNextVarType (LPCTSTR Format, VARTYPE* pVarType)
|
||||
{
|
||||
*pVarType = 0;
|
||||
if (*Format == '&')
|
||||
{
|
||||
*pVarType = VT_BYREF;
|
||||
Format++;
|
||||
if (!*Format)
|
||||
return NULL;
|
||||
}
|
||||
switch (*Format)
|
||||
{
|
||||
case 'b':
|
||||
*pVarType |= VT_BOOL;
|
||||
break;
|
||||
case 'i':
|
||||
*pVarType |= VT_I2;
|
||||
break;
|
||||
case 'I':
|
||||
*pVarType |= VT_I4;
|
||||
break;
|
||||
case 'r':
|
||||
*pVarType |= VT_R4;
|
||||
break;
|
||||
case 'R':
|
||||
*pVarType |= VT_R8;
|
||||
break;
|
||||
case 'c':
|
||||
*pVarType |= VT_CY;
|
||||
break;
|
||||
case 's':
|
||||
*pVarType |= VT_BSTR;
|
||||
break;
|
||||
case 'e':
|
||||
*pVarType |= VT_ERROR;
|
||||
break;
|
||||
case 'd':
|
||||
*pVarType |= VT_DATE;
|
||||
break;
|
||||
case 'v':
|
||||
*pVarType |= VT_VARIANT;
|
||||
break;
|
||||
case 'U':
|
||||
*pVarType |= VT_UNKNOWN;
|
||||
break;
|
||||
case 'D':
|
||||
*pVarType |= VT_DISPATCH;
|
||||
break;
|
||||
case '\0':
|
||||
return NULL; // End of Format string
|
||||
default:
|
||||
return NULL;
|
||||
}
|
||||
return ++Format;
|
||||
}
|
||||
|
||||
#ifndef UNICODE
|
||||
char* ConvertToAnsi (OLECHAR* sUnicode)
|
||||
{
|
||||
static char BufAscii[MAX_OLE_STR];
|
||||
return ConvertToAnsiBuf (sUnicode, BufAscii);
|
||||
}
|
||||
|
||||
char* ConvertToAnsiBuf (OLECHAR* sUnicode, char* BufAscii)
|
||||
{
|
||||
WideCharToMultiByte (CP_ACP, 0, sUnicode, -1, BufAscii, MAX_OLE_STR, NULL, NULL);
|
||||
return BufAscii;
|
||||
}
|
||||
|
||||
OLECHAR* ConvertToUnicode (char* sAscii)
|
||||
{
|
||||
static OLECHAR BufUnicode[MAX_OLE_STR];
|
||||
return ConvertToUnicodeBuf (sAscii, BufUnicode);
|
||||
}
|
||||
|
||||
OLECHAR* ConvertToUnicodeBuf (char* sAscii, OLECHAR* BufUnicode)
|
||||
{
|
||||
MultiByteToWideChar (CP_ACP, 0, sAscii, -1, BufUnicode, MAX_OLE_STR);
|
||||
return BufUnicode;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -1,73 +0,0 @@
|
||||
#ifndef __OLEAUT_H__
|
||||
#define __OLEAUT_H__
|
||||
|
||||
class COleAutomationControl : public CObject
|
||||
{
|
||||
public:
|
||||
COleAutomationControl ();
|
||||
~COleAutomationControl ();
|
||||
bool CreateObject (char* ProgId);
|
||||
DISPID GetDispatchId (char* Name);
|
||||
bool GetProperty (char* Name);
|
||||
bool GetProperty (DISPID DispatchId);
|
||||
bool PutProperty (char* Name, LPCTSTR Format, ...);
|
||||
bool PutProperty (DISPID DispatchId, LPCTSTR Format, ...);
|
||||
bool Method (char* Name, LPCTSTR Format = NULL, ...);
|
||||
bool Method (DISPID DispatchId, LPCTSTR Format = NULL, ...);
|
||||
void DeleteObject ();
|
||||
void ErrDiag ();
|
||||
bool IsCreated ()
|
||||
{
|
||||
return m_pDispatch ? true : false;
|
||||
}
|
||||
bool IsAlive ();
|
||||
HRESULT GetResult ()
|
||||
{
|
||||
return m_hResult;
|
||||
}
|
||||
UINT GetErrArgNr ()
|
||||
{
|
||||
return m_nErrArg;
|
||||
}
|
||||
EXCEPINFO* GetExceptionInfo ()
|
||||
{
|
||||
return &m_ExceptionInfo;
|
||||
}
|
||||
LPVARIANT GetResultVariant ()
|
||||
{
|
||||
return &m_VariantResult;
|
||||
}
|
||||
|
||||
protected:
|
||||
bool Invoke (WORD Flags, char* Name, LPCTSTR Format, va_list ArgList);
|
||||
bool Invoke (WORD Flags, DISPID DispatchId, LPCTSTR Format, va_list ArgList);
|
||||
|
||||
protected:
|
||||
IDispatch* m_pDispatch;
|
||||
HRESULT m_hResult;
|
||||
UINT m_nErrArg;
|
||||
EXCEPINFO m_ExceptionInfo;
|
||||
VARIANTARG m_VariantResult;
|
||||
};
|
||||
|
||||
#ifdef UNICODE
|
||||
#define FROM_OLE_STRING(str) str
|
||||
#define FROM_OLE_STRING_BUF(str,buf) str
|
||||
#define TO_OLE_STR(str) str
|
||||
#define TO_OLE_STR_BUF(str,buf) str
|
||||
#define MAX_OLE_STR 1
|
||||
#else
|
||||
#define FROM_OLE_STR(str) ConvertToAnsi(str)
|
||||
#define FROM_OLE_STR_BUF(str,buf) ConvertToAnsiBuf(str,buf)
|
||||
char* ConvertToAnsi (OLECHAR* sUnicode);
|
||||
char* ConvertToAnsiBuf (OLECHAR* sUnicode, char* Buf);
|
||||
#define TO_OLE_STR(str) ConvertToUnicode(str)
|
||||
#define TO_OLE_STR_BUF(str,buf) ConvertToUnicodeBuf(str,buf)
|
||||
OLECHAR* ConvertToUnicode (char* sAscii);
|
||||
OLECHAR* ConvertToUnicodeBuf (char* sAscii, OLECHAR* Buf);
|
||||
// Maximum length of string that can be converted between Ansi & Unicode
|
||||
#define MAX_OLE_STR 500
|
||||
#endif
|
||||
|
||||
|
||||
#endif // __OLEAUT_H__
|
||||
@@ -1,326 +0,0 @@
|
||||
===============================
|
||||
Visual Studio - Vim Integration
|
||||
===============================
|
||||
|
||||
Copyright (C) 1997 Heiko Erhardt
|
||||
|
||||
VisVim is a Visual Studio Add-In that allows Vim to be integrated
|
||||
as the default text editor. It will be used instead of the Visual
|
||||
Studio built-in editor when you double-click on a file or press F4
|
||||
after compiling (it will go to the proper line in the Vim buffer).
|
||||
The file can be loaded exclusively by Vim or additionally to the
|
||||
builtin Visual Studio editor (this option can be set in the VisVim
|
||||
configuration dialog inside Visual Studio).
|
||||
Vim does not replace the Visual Studio editor, it still runs in its
|
||||
own window.
|
||||
|
||||
VisVim is based upon VisEmacs by Christopher Payne
|
||||
(Copyright (C) Christopher Payne 1997).
|
||||
|
||||
Author: Heiko Erhardt <heiko.erhardt@gmx.net>
|
||||
Based upon: VisEmacs by Christopher Payne <payneca@sagian.com>
|
||||
Version: 1.0
|
||||
Created: 23 Oct 1997
|
||||
Date: 23 Oct 1997
|
||||
|
||||
VisVim was originally GNU GPL licensed, as stated below. On March 21 2012
|
||||
Heiko Erhardt declared this work to be relicensed under the Vim license, as
|
||||
stated in ../../runtime/doc/uganda.txt (or ":help uganda" in Vim).
|
||||
|
||||
VisVim is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
VisVim is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
|
||||
Requirements
|
||||
------------
|
||||
|
||||
VisVim works with the *OLE-enabled* version of Vim version 5.0 and higher
|
||||
only!!! You must download the extra archive containing the OLE-enabled
|
||||
executable from your Vim download site. When building your own Vim
|
||||
executable, use the if_ole_vc.mak makefile (Vim 5.1 and higher).
|
||||
VisVim needs DevStudio 5.0 or higher. It does not work with DevStudio 4.2.
|
||||
|
||||
|
||||
Installation
|
||||
------------
|
||||
|
||||
1) Close running instances of DevStudio.
|
||||
|
||||
2) Copy VisVim.dll into a convenient directory like \vim,
|
||||
\vim\lib, or \vim\addin
|
||||
|
||||
3) Register the DLL using regsvr32.exe ... (Skip this on Windows 95/98)
|
||||
Example:
|
||||
> cd \vim\addin
|
||||
> regsvr32 VisVim.dll
|
||||
On NT, you should do this from an administrator account.
|
||||
Before installing a new version of VisVim you should unregister
|
||||
the old one using
|
||||
> regsvr32 -unregister VisVim.dll
|
||||
The batch files register.bat and unregister.bat can do that for you.
|
||||
|
||||
3a) If you didn't do this yet: Register the OLE gvim:
|
||||
> gvim -register
|
||||
|
||||
4) Start Visual Studio and go to:
|
||||
Tools
|
||||
Customize...
|
||||
Add-Ins and Macro Files
|
||||
|
||||
5) Click on Browse, and point Visual Studio to your VisVim.dll file.
|
||||
|
||||
6) Click the checkbox to indicate that you want to use the Add-In, and
|
||||
Close the Customize dialog box.
|
||||
|
||||
7) You should notice the VisVim Toolbar with the Vim Icon.
|
||||
Click the first item of the toolbar to get to the options dialog.
|
||||
|
||||
|
||||
Compiling VisVim
|
||||
----------------
|
||||
|
||||
Two Options:
|
||||
|
||||
1) Load the VisVim.mak file as a Workspace in Visual Studio and compile
|
||||
|
||||
2) Use the MSVC command line compiler:
|
||||
vcvars32
|
||||
nmake -f VisVim.mak
|
||||
|
||||
|
||||
Using VisVim
|
||||
------------
|
||||
|
||||
The VisVim DLL exposes several functions to the user. These functions are
|
||||
accessible using the toolbar or by assigning hotkeys to them (see below).
|
||||
The following functions are visible on the toolbar (from left to right):
|
||||
|
||||
1. VisVim settings dialog
|
||||
The settings you adjust here will be saved in the registry and
|
||||
will be reloaded on program startup.
|
||||
|
||||
2. Enable Vim
|
||||
Enables Vim as Visual Studio editor. Control will be switched to Vim when:
|
||||
- Clicking a file in the file view
|
||||
- Clicking a compiler error message line
|
||||
- Using the 'File-Open' Dialog
|
||||
- Showing the current source line when encountering a debugger breakpoint.
|
||||
- Using File-New
|
||||
|
||||
3. Disable Vim
|
||||
The internal Visual Studio editor will be used to edit files.
|
||||
|
||||
4. Toggle enable state
|
||||
Toggles the enable state of VisVim. Use this function if you want to have
|
||||
one button only to activate/deactivate Vim.
|
||||
|
||||
5. Load current file in Vim
|
||||
Loads the file shown in the internal editor into Vim. Use this function if
|
||||
you want the internal editor to stay active and just edit one file in Vim.
|
||||
This command works always whether Vim is enabled as default editor or not.
|
||||
|
||||
You cannot use DevStudio's debugger commands from inside Vim, so you should
|
||||
disable Vim before running the debugger.
|
||||
|
||||
You can customize the Vim toolbar itself or add the Vim buttons to other
|
||||
toolbars.
|
||||
To have fast access to the VisVim options dialog I suggest to create keyboard
|
||||
shortcuts:
|
||||
|
||||
1) Choose
|
||||
Tools
|
||||
Customize...
|
||||
Keyboard
|
||||
2) Choose Category:AddIns and Commands:VisVim.
|
||||
3) Choose 'Main' as editor, enter each hotkey and press the Assign button.
|
||||
I suggest:
|
||||
VisVimDialogCmd Alt+Shift+V
|
||||
VisVimEnableCmd Alt+Shift+E
|
||||
VisVimDisableCmd Alt+Shift+D
|
||||
VisVimToggleCmd Alt+Shift+T
|
||||
VisVimLoadCmd Alt+Shift+G
|
||||
4) Close the dialog
|
||||
|
||||
Now a typical debugging example:
|
||||
|
||||
Using "Alt+Shift+d" you turn off Vim before starting the debugger.
|
||||
After hitting the breakpoint you single step through your application
|
||||
using the internal source code editor and examine variables.
|
||||
When you stumble across the line with the null pointer
|
||||
assignment, just press "Alt+Shift+g", and correct the error in Vim.
|
||||
Save the file, press Alt+Tab to return to DevStudio and press F7 to compile.
|
||||
That's it.
|
||||
|
||||
|
||||
Troubleshooting
|
||||
---------------
|
||||
|
||||
1. When opening a file in DevStudio the file is opened in the DevStudio
|
||||
editor and immediately vanishes. No Vim shows up.
|
||||
Cause: Probably you don't have the OLE-enabled Vim or you didn't
|
||||
register it.
|
||||
Explanation: VisVim is notified by DevStudio if an 'open document' event
|
||||
occurs. It then closes the document in the internal editor
|
||||
and tries to start Vim. If Vim isn't properly OLE-registered,
|
||||
this won't work.
|
||||
Workaround: Download and install the OLE-enable version of Vim and
|
||||
execute "gvim -register".
|
||||
|
||||
2. Sometimes when clicking on a file, the file won't be opened by Vim but
|
||||
instead the Visual Studio editor comes up.
|
||||
Cause: The file was already loaded by the DevStudio editor.
|
||||
Explanation: VisVim works by hooks exposed by Visual Studio.
|
||||
Most of the functionality works from the OpenDocument hook.
|
||||
If a document is already loaded in the Visual Studio editor,
|
||||
no 'open document' event will be generated when clicking the
|
||||
file in the file list.
|
||||
Workaround: Close the document in Visual Studio first.
|
||||
|
||||
3. I can't get VisVim to work. Either the Vim toolbar does not appear at all
|
||||
or weird crashes happen.
|
||||
Cause: The Visual Studio installation is messed up.
|
||||
Explanation: I can't give you one. Ask M$.
|
||||
Workaround: Reinstall DevStudio (I know this is brute, but in some cases
|
||||
it helped). There was one case where the service pack 1 had
|
||||
to be installed, too.
|
||||
|
||||
4. If an instance of Vim is already running, VisVim will use that instance
|
||||
and not start a new one.
|
||||
Cause: This is proper OLE behaviour
|
||||
Explanation: Some call it a bug, some a feature. That's just the way OLE
|
||||
works.
|
||||
|
||||
5. When being in insert mode in Vim and selecting a file in Visual Studio,
|
||||
the Vim command :e ... is inserted as text instead of being executed.
|
||||
Cause: You probably know...
|
||||
Explanation: The Vim OLE automation interface interprets the VisVim
|
||||
commands as if they were typed in by the user.
|
||||
So if you're in insert mode Vim considers it to be text.
|
||||
I decided against sending an ESC before the command because
|
||||
it may cause a beep or at least a screen flash when noeb is
|
||||
set.
|
||||
Workaround: Get used to press ESC before switching to DevStudio.
|
||||
|
||||
6. I'm tired of VisVim but I can't get rid of it. I can't delete it in
|
||||
Tools-Customize-Add-Ins.
|
||||
Cause: You can't delete an item you once added to the add-ins
|
||||
list box.
|
||||
Explanation: M$ just didn't put a 'delete' button in the dialog box.
|
||||
Unfortunately there is no DEL key accelerator as well...
|
||||
Workaround: You can't kill it, but you can knock it out:
|
||||
1. Uncheck the check box in front of 'Vim Developer Studio
|
||||
Add-in'.
|
||||
2. Close Visual Studio.
|
||||
3. Delete VisVim.dll or move it somewhere it can't be found.
|
||||
4. Run Visual Studio.
|
||||
5. Tools -> Customize ->Add-ins and Macro-Files.
|
||||
6. A message appears:
|
||||
".../VisVim.dll" "This add-in no longer exists. It will
|
||||
no longer be displayed."
|
||||
That's it!
|
||||
|
||||
|
||||
Change history
|
||||
--------------
|
||||
|
||||
1.0a to 1.0
|
||||
-----------
|
||||
|
||||
- All settings in the VisVim dialog are remembered between DevStudio sessions
|
||||
by keeping them in the registry (HKEY_CURRENT_USER\Software\Vim\VisVim).
|
||||
- Added an option to do a :cd before opening the file (having a file opened
|
||||
by clicking it but finding out to be still in C:\Windows\system when trying to
|
||||
open another file by ":e" can be annoying). Change directory can be
|
||||
done to the source file's directory or its parent directory.
|
||||
- Added some explanations to the error message for the CO_E_CLASSSTRING error
|
||||
("Use OLE Vim and make sure to register...").
|
||||
|
||||
1.0 to 1.1a
|
||||
-----------
|
||||
|
||||
- The VisVim toolbar button now shows the new Vim icon instead of the old one.
|
||||
- Made some changes to the documentation, added the troubleshooting chapter
|
||||
and ToDo list.
|
||||
- File-New-* now invokes Vim instead of the builtin editor if enabled.
|
||||
|
||||
1.1 to 1.1b
|
||||
-----------
|
||||
|
||||
- Extended the VisVim toolbar to have multiple buttons instead of one.
|
||||
- Moved the enable/disable commands from the settings dialog to the toolbar.
|
||||
- Added the toggle enable/disable command
|
||||
- Added the 'load current file' command.
|
||||
|
||||
1.1b to 1.2
|
||||
-----------
|
||||
|
||||
No new features, just some fine tuning:
|
||||
|
||||
- Changed the GUID of the VisVim OLE interface to avoid conflicts with a
|
||||
version of VisEmacs or VisVile on the same computer (Guy Gascoigne)
|
||||
- Fixed a bug caused by a bug in the Developer Studio add-in code generator
|
||||
(Clark Morgan)
|
||||
- Fixed a memory leak (Clark Morgan)
|
||||
- Added an option in the VisVim dialog to prepend ESC before the first command
|
||||
that is sent to Vim. This will avoid inserting the command as text when Vim
|
||||
is still in insert mode.
|
||||
- An :update command is sent to Vim before any other command to update the
|
||||
current file if it is modified, or else the following :cd or :e command will fail.
|
||||
|
||||
1.2 to 1.3a
|
||||
-----------
|
||||
|
||||
- Fixed a bug caused by a missing EnableModeless() function call in VimLoad().
|
||||
This seems to reduce VisVim crashing DevStudio on some systems (it
|
||||
occasionally still seems to happen, but it's more stable now).
|
||||
(Vince Negri)
|
||||
- Added support for the new CTRL-\ CTRL-N command of Vim 5.4a.
|
||||
This prevents Vim from beeping when a VisVim command is executed and Vim is
|
||||
not in insert mode.
|
||||
|
||||
|
||||
ToDo List
|
||||
---------
|
||||
|
||||
P1 is highest priority, P10 lowest
|
||||
|
||||
P9 Switching to DevStudio using ALT-TAB may get annoying. Would be nice to
|
||||
have the option to map ActivateApplication("Visual Studio") in Vim.
|
||||
Vim DLLs would solve that problem.
|
||||
|
||||
P8 Execute :tag command in Vim for word under cursor in DevStudio
|
||||
|
||||
P7 Controlling the Visual Studio Debugger from inside Vim
|
||||
See message above. Also a 'Debug' highlight group and a
|
||||
command to highlight a certain line would be necessary.
|
||||
|
||||
P6 Provide an option to open the current file in VisVim in
|
||||
Visual Studio editor
|
||||
Same as above message. A kind of two way OLE automation would have to be
|
||||
established between VisVim and Vim. Also a 'Debug' highlight group and a
|
||||
command to highlight a certain line would be necessary.
|
||||
|
||||
|
||||
Known Problems
|
||||
--------------
|
||||
|
||||
- Occasional memory corruptions in DevStudio may appear on some systems.
|
||||
Reinstalling DevStudio helped in some cases.
|
||||
The cause of these crashes is unclear; there is no way to debug this.
|
||||
Recompiling VisVim with DevStudio SP3 didn't help.
|
||||
I assume it's a problem deep inside the DevStudio add-in OLE interfaces.
|
||||
This will hopefully be fixed with DevStudio 6.
|
||||
|
||||
|
||||
Have fun!
|
||||
|
||||
Heiko Erhardt
|
||||
heiko.erhardt@gmx.net
|
||||
|
||||
@@ -1,56 +0,0 @@
|
||||
#include "stdafx.h"
|
||||
|
||||
// Returns key for HKEY_CURRENT_USER\"Software"\Company\AppName
|
||||
// creating it if it doesn't exist
|
||||
// responsibility of the caller to call RegCloseKey() on the returned HKEY
|
||||
//
|
||||
HKEY GetAppKey (char* AppName)
|
||||
{
|
||||
HKEY hAppKey = NULL;
|
||||
HKEY hSoftKey = NULL;
|
||||
if (RegOpenKeyEx (HKEY_CURRENT_USER, "Software", 0, KEY_WRITE | KEY_READ,
|
||||
&hSoftKey) == ERROR_SUCCESS)
|
||||
{
|
||||
DWORD Dummy;
|
||||
RegCreateKeyEx (hSoftKey, AppName, 0, REG_NONE,
|
||||
REG_OPTION_NON_VOLATILE, KEY_WRITE | KEY_READ, NULL,
|
||||
&hAppKey, &Dummy);
|
||||
}
|
||||
if (hSoftKey)
|
||||
RegCloseKey (hSoftKey);
|
||||
|
||||
return hAppKey;
|
||||
}
|
||||
|
||||
// Returns key for
|
||||
// HKEY_CURRENT_USER\"Software"\RegistryKey\AppName\Section
|
||||
// creating it if it doesn't exist.
|
||||
// responsibility of the caller to call RegCloseKey () on the returned HKEY
|
||||
//
|
||||
HKEY GetSectionKey (HKEY hAppKey, LPCTSTR Section)
|
||||
{
|
||||
HKEY hSectionKey = NULL;
|
||||
DWORD Dummy;
|
||||
RegCreateKeyEx (hAppKey, Section, 0, REG_NONE,
|
||||
REG_OPTION_NON_VOLATILE, KEY_WRITE|KEY_READ, NULL,
|
||||
&hSectionKey, &Dummy);
|
||||
return hSectionKey;
|
||||
}
|
||||
|
||||
int GetRegistryInt (HKEY hSectionKey, LPCTSTR Entry, int Default)
|
||||
{
|
||||
DWORD Value;
|
||||
DWORD Type;
|
||||
DWORD Count = sizeof (DWORD);
|
||||
if (RegQueryValueEx (hSectionKey, (LPTSTR) Entry, NULL, &Type,
|
||||
(LPBYTE) &Value, &Count) == ERROR_SUCCESS)
|
||||
return Value;
|
||||
return Default;
|
||||
}
|
||||
|
||||
bool WriteRegistryInt (HKEY hSectionKey, char* Entry, int nValue)
|
||||
{
|
||||
return RegSetValueEx (hSectionKey, Entry, NULL, REG_DWORD,
|
||||
(LPBYTE) &nValue, sizeof (nValue)) == ERROR_SUCCESS;
|
||||
}
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
regsvr32.exe visvim.dll
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 2.6 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 758 B |
@@ -1,30 +0,0 @@
|
||||
//{{NO_DEPENDENCIES}}
|
||||
// Microsoft Developer Studio generated include file.
|
||||
// Used by VisVim.rc
|
||||
//
|
||||
#define IDS_VISVIM_LONGNAME 1
|
||||
#define IDS_VISVIM_DESCRIPTION 2
|
||||
#define IDS_CMD_DIALOG 3
|
||||
#define IDS_CMD_ENABLE 4
|
||||
#define IDS_CMD_DISABLE 5
|
||||
#define IDS_CMD_TOGGLE 6
|
||||
#define IDS_CMD_LOAD 7
|
||||
#define IDR_TOOLBAR_MEDIUM 128
|
||||
#define IDR_TOOLBAR_LARGE 129
|
||||
#define IDD_ADDINMAIN 130
|
||||
#define IDC_DEVSTUDIO_EDITOR 1000
|
||||
#define IDC_CD_SOURCE_PATH 1001
|
||||
#define IDC_CD_SOURCE_PARENT 1002
|
||||
#define IDC_CD_NONE 1003
|
||||
#define IDC_NEW_TABS 1004
|
||||
|
||||
// Next default values for new objects
|
||||
//
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NEXT_RESOURCE_VALUE 131
|
||||
#define _APS_NEXT_COMMAND_VALUE 32771
|
||||
#define _APS_NEXT_CONTROL_VALUE 1004
|
||||
#define _APS_NEXT_SYMED_VALUE 101
|
||||
#endif
|
||||
#endif
|
||||
@@ -1,6 +0,0 @@
|
||||
// Stdafx.cpp : source file that includes just the standard includes
|
||||
// VisEmacs.pch will be the pre-compiled header
|
||||
// stdafx.obj will contain the pre-compiled type information
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "atlimpl.cpp"
|
||||
@@ -1,73 +0,0 @@
|
||||
// Stdafx.h : include file for standard system include files,
|
||||
// or project specific include files that are used frequently, but
|
||||
// are changed infrequently
|
||||
//
|
||||
|
||||
#if !defined(AFX_STDAFX_H__AC72670E_2977_11D1_B2F3_006008040780__INCLUDED_)
|
||||
#define AFX_STDAFX_H__AC72670E_2977_11D1_B2F3_006008040780__INCLUDED_
|
||||
|
||||
#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
|
||||
|
||||
#include <afxwin.h> // MFC core and standard components
|
||||
#include <afxdisp.h>
|
||||
|
||||
#include <atlbase.h>
|
||||
//You may derive a class from CComModule and use it if you want to override
|
||||
//something, but do not change the name of _Module
|
||||
extern CComModule _Module;
|
||||
|
||||
#include <atlcom.h>
|
||||
|
||||
// Developer Studio Object Model
|
||||
#include <ObjModel\addauto.h>
|
||||
#include <ObjModel\appdefs.h>
|
||||
#include <ObjModel\appauto.h>
|
||||
#include <ObjModel\blddefs.h>
|
||||
#include <ObjModel\bldauto.h>
|
||||
#include <ObjModel\textdefs.h>
|
||||
#include <ObjModel\textauto.h>
|
||||
#include <ObjModel\dbgdefs.h>
|
||||
#include <ObjModel\dbgauto.h>
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Debugging support
|
||||
|
||||
// Use VERIFY_OK around all calls to the Developer Studio objects which
|
||||
// you expect to return S_OK.
|
||||
// In DEBUG builds of your add-in, VERIFY_OK displays an ASSERT dialog box
|
||||
// if the expression returns an HRESULT other than S_OK. If the HRESULT
|
||||
// is a success code, the ASSERT box will display that HRESULT. If it
|
||||
// is a failure code, the ASSERT box will display that HRESULT plus the
|
||||
// error description string provided by the object which raised the error.
|
||||
// In RETAIL builds of your add-in, VERIFY_OK just evaluates the expression
|
||||
// and ignores the returned HRESULT.
|
||||
|
||||
#ifdef _DEBUG
|
||||
|
||||
void GetLastErrorDescription (CComBSTR & bstr); // Defined in VisVim.cpp
|
||||
#define VERIFY_OK(f) \
|
||||
{ \
|
||||
HRESULT hr = (f); \
|
||||
if (hr != S_OK) \
|
||||
{ \
|
||||
if (FAILED(hr)) \
|
||||
{ \
|
||||
CComBSTR bstr; \
|
||||
GetLastErrorDescription(bstr); \
|
||||
_RPTF2(_CRT_ASSERT, "Object call returned %lx\n\n%S", hr, (BSTR) bstr); \
|
||||
} \
|
||||
else \
|
||||
_RPTF1(_CRT_ASSERT, "Object call returned %lx", hr); \
|
||||
} \
|
||||
}
|
||||
|
||||
#else //_DEBUG
|
||||
|
||||
#define VERIFY_OK(f) (f);
|
||||
|
||||
#endif //_DEBUG
|
||||
|
||||
//{{AFX_INSERT_LOCATION}}
|
||||
// Microsoft Developer Studio will insert additional declarations immediately before the previous line.
|
||||
|
||||
#endif // !defined(AFX_STDAFX_H__AC72670E_2977_11D1_B2F3_006008040780__INCLUDED)
|
||||
@@ -1 +0,0 @@
|
||||
regsvr32.exe -unregister visvim.dll
|
||||
@@ -1,152 +0,0 @@
|
||||
// VisVim.cpp : Defines the initialization routines for the DLL.
|
||||
//
|
||||
|
||||
#include "stdafx.h"
|
||||
#include <initguid.h>
|
||||
#include "VisVim.h"
|
||||
#include "DSAddIn.h"
|
||||
#include "Commands.h"
|
||||
|
||||
#ifdef _DEBUG
|
||||
#define new DEBUG_NEW
|
||||
#undef THIS_FILE
|
||||
static char THIS_FILE[] = __FILE__;
|
||||
|
||||
#endif
|
||||
|
||||
CComModule _Module;
|
||||
|
||||
BEGIN_OBJECT_MAP (ObjectMap)
|
||||
OBJECT_ENTRY (CLSID_DSAddIn, CDSAddIn)
|
||||
END_OBJECT_MAP ()
|
||||
|
||||
class CVisVimApp : public CWinApp
|
||||
{
|
||||
public:
|
||||
CVisVimApp ();
|
||||
|
||||
//{{AFX_VIRTUAL(CVisVimApp)
|
||||
public:
|
||||
virtual BOOL InitInstance ();
|
||||
virtual int ExitInstance ();
|
||||
//}}AFX_VIRTUAL
|
||||
|
||||
//{{AFX_MSG(CVisVimApp)
|
||||
//}}AFX_MSG
|
||||
DECLARE_MESSAGE_MAP ()
|
||||
};
|
||||
|
||||
BEGIN_MESSAGE_MAP (CVisVimApp, CWinApp)
|
||||
//{{AFX_MSG_MAP(CVisVimApp)
|
||||
//}}AFX_MSG_MAP
|
||||
END_MESSAGE_MAP ()
|
||||
|
||||
// The one and only CVisVimApp object
|
||||
CVisVimApp theApp;
|
||||
|
||||
CVisVimApp::CVisVimApp ()
|
||||
{
|
||||
}
|
||||
|
||||
BOOL CVisVimApp::InitInstance ()
|
||||
{
|
||||
_Module.Init (ObjectMap, m_hInstance);
|
||||
return CWinApp::InitInstance ();
|
||||
}
|
||||
|
||||
int CVisVimApp::ExitInstance ()
|
||||
{
|
||||
_Module.Term ();
|
||||
return CWinApp::ExitInstance ();
|
||||
}
|
||||
|
||||
// Special entry points required for inproc servers
|
||||
//
|
||||
|
||||
STDAPI DllGetClassObject (REFCLSID rclsid, REFIID riid, LPVOID * ppv)
|
||||
{
|
||||
AFX_MANAGE_STATE (AfxGetStaticModuleState ());
|
||||
return _Module.GetClassObject (rclsid, riid, ppv);
|
||||
}
|
||||
|
||||
STDAPI DllCanUnloadNow (void)
|
||||
{
|
||||
AFX_MANAGE_STATE (AfxGetStaticModuleState ());
|
||||
return (AfxDllCanUnloadNow () == S_OK && _Module.GetLockCount () == 0)
|
||||
? S_OK : S_FALSE;
|
||||
}
|
||||
|
||||
// By exporting DllRegisterServer, you can use regsvr32.exe
|
||||
//
|
||||
STDAPI DllRegisterServer (void)
|
||||
{
|
||||
AFX_MANAGE_STATE (AfxGetStaticModuleState ());
|
||||
HRESULT hRes;
|
||||
|
||||
// Registers object, typelib and all interfaces in typelib
|
||||
hRes = _Module.RegisterServer (TRUE);
|
||||
if (FAILED (hRes))
|
||||
// Hack: When this fails we might be a normal user, while the
|
||||
// admin already registered the module. Returning S_OK then
|
||||
// makes it work. When the module was never registered it
|
||||
// will soon fail in another way.
|
||||
// old code: return hRes;
|
||||
return S_OK;
|
||||
|
||||
_ATL_OBJMAP_ENTRY *pEntry = _Module.m_pObjMap;
|
||||
CRegKey key;
|
||||
LONG lRes = key.Open (HKEY_CLASSES_ROOT, _T ("CLSID"));
|
||||
|
||||
if (lRes == ERROR_SUCCESS)
|
||||
{
|
||||
USES_CONVERSION;
|
||||
LPOLESTR lpOleStr;
|
||||
|
||||
StringFromCLSID (*pEntry->pclsid, &lpOleStr);
|
||||
LPTSTR lpsz = OLE2T (lpOleStr);
|
||||
|
||||
lRes = key.Open (key, lpsz);
|
||||
if (lRes == ERROR_SUCCESS)
|
||||
{
|
||||
CString strDescription;
|
||||
|
||||
strDescription.LoadString (IDS_VISVIM_DESCRIPTION);
|
||||
key.SetKeyValue (_T ("Description"), strDescription);
|
||||
}
|
||||
CoTaskMemFree (lpOleStr);
|
||||
}
|
||||
|
||||
if (lRes != ERROR_SUCCESS)
|
||||
hRes = HRESULT_FROM_WIN32 (lRes);
|
||||
|
||||
return hRes;
|
||||
|
||||
}
|
||||
|
||||
// DllUnregisterServer - Removes entries from the system registry
|
||||
//
|
||||
STDAPI DllUnregisterServer (void)
|
||||
{
|
||||
AFX_MANAGE_STATE (AfxGetStaticModuleState ());
|
||||
|
||||
HRESULT hRes = S_OK;
|
||||
_Module.UnregisterServer ();
|
||||
return hRes;
|
||||
}
|
||||
|
||||
|
||||
// Debugging support
|
||||
|
||||
// GetLastErrorDescription is used in the implementation of the VERIFY_OK
|
||||
// macro, defined in stdafx.h.
|
||||
|
||||
#ifdef _DEBUG
|
||||
|
||||
void GetLastErrorDescription (CComBSTR & bstr)
|
||||
{
|
||||
CComPtr < IErrorInfo > pErrorInfo;
|
||||
if (GetErrorInfo (0, &pErrorInfo) == S_OK)
|
||||
pErrorInfo->GetDescription (&bstr);
|
||||
}
|
||||
|
||||
#endif //_DEBUG
|
||||
@@ -1,11 +0,0 @@
|
||||
; VisVim.def : Declares the module parameters for the DLL.
|
||||
|
||||
LIBRARY "VISVIM"
|
||||
DESCRIPTION 'VISVIM Windows Dynamic Link Library'
|
||||
|
||||
EXPORTS
|
||||
; Explicit exports can go here
|
||||
DllCanUnloadNow PRIVATE
|
||||
DllGetClassObject PRIVATE
|
||||
DllRegisterServer PRIVATE
|
||||
DllUnregisterServer PRIVATE
|
||||
Binary file not shown.
@@ -1,33 +0,0 @@
|
||||
// VisVIM.h : main header file for the VisVim DLL
|
||||
//
|
||||
|
||||
#if !defined(AFX_VISVIM_H__AC72670B_2977_11D1_B2F3_006008040780__INCLUDED_)
|
||||
#define AFX_VISVIM_H__AC72670B_2977_11D1_B2F3_006008040780__INCLUDED_
|
||||
|
||||
#ifndef __AFXWIN_H__
|
||||
#error include 'stdafx.h' before including this file for PCH
|
||||
#endif
|
||||
|
||||
#include "resource.h" // Main symbols
|
||||
|
||||
#include <ObjModel\addguid.h>
|
||||
#include <ObjModel\appguid.h>
|
||||
#include <ObjModel\bldguid.h>
|
||||
#include <ObjModel\textguid.h>
|
||||
#include <ObjModel\dbgguid.h>
|
||||
|
||||
//
|
||||
// Prototypes
|
||||
//
|
||||
|
||||
HKEY GetAppKey (char* AppName);
|
||||
HKEY GetSectionKey (HKEY hAppKey, LPCTSTR Section);
|
||||
int GetRegistryInt (HKEY hSectionKey, LPCTSTR Entry, int Default);
|
||||
bool WriteRegistryInt (HKEY hSectionKey, char* Entry, int nValue);
|
||||
void ReportLastError (HRESULT Err);
|
||||
void ReportInternalError (char* Fct);
|
||||
|
||||
//{{AFX_INSERT_LOCATION}}
|
||||
// Microsoft Developer Studio will insert additional declarations immediately before the previous line.
|
||||
|
||||
#endif // !defined(AFX_VISVIM_H__AC72670B_2977_11D1_B2F3_006008040780__INCLUDED)
|
||||
@@ -1,205 +0,0 @@
|
||||
# Microsoft Developer Studio Generated NMAKE File, Format Version 4.00
|
||||
# ** DO NOT EDIT **
|
||||
#
|
||||
# When Who What
|
||||
# 1999-08-01 Anon Original VisVim.dsp
|
||||
# 2001-08-08 W.Briscoe Back-ported to a condensed VC4 Makefile
|
||||
# Reduced inter-dependency of Release and Debug builds.
|
||||
#
|
||||
|
||||
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
|
||||
|
||||
!IF "$(CFG)" == ""
|
||||
CFG=VisVim - Win32 Release
|
||||
!MESSAGE No configuration specified. Defaulting to VisVim - Win32 Release.
|
||||
!ENDIF
|
||||
|
||||
!IF "$(CFG)" != "VisVim - Win32 Release" && "$(CFG)" != "VisVim - Win32 Debug"
|
||||
!MESSAGE Invalid configuration "$(CFG)" specified.
|
||||
!MESSAGE You can specify a configuration when running NMAKE on this makefile
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "VisVim.mak" CFG="VisVim - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "VisVim - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
|
||||
!MESSAGE "VisVim - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
|
||||
!MESSAGE
|
||||
!ERROR An invalid configuration is specified.
|
||||
!ENDIF
|
||||
|
||||
!IF "$(OS)" == "Windows_NT"
|
||||
NULL=
|
||||
DEL_TREE = rmdir /s /q
|
||||
!ELSE
|
||||
NULL=nul
|
||||
DEL_TREE = deltree /y
|
||||
!ENDIF
|
||||
# Begin Project
|
||||
# PROP Target_Last_Scanned "VisVim - Win32 Release"
|
||||
# PROP Use_MFC 2
|
||||
CPP=cl.exe
|
||||
RSC=rc.exe
|
||||
LINK32=link.exe
|
||||
|
||||
!IF "$(CFG)" == "VisVim - Win32 Release"
|
||||
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir ".\Release"
|
||||
# PROP Intermediate_Dir ".\Release"
|
||||
# PROP Target_Dir ""
|
||||
OUTDIR=.\Release
|
||||
INTDIR=.\Release
|
||||
CPP_OBJS=.\Release/
|
||||
|
||||
# ADD CPP /MD /O2 /D "NDEBUG" /I.\Release
|
||||
CPP_PROJ= /MD /O2 /D "NDEBUG" /I.\Release
|
||||
# ADD RSC /d "NDEBUG
|
||||
RSC_PROJ= /d "NDEBUG"
|
||||
# ADD LINK32 /pdb:none
|
||||
LINK32_FLAGS=/pdb:none
|
||||
|
||||
!ELSEIF "$(CFG)" == "VisVim - Win32 Debug"
|
||||
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir ".\Debug"
|
||||
# PROP Intermediate_Dir ".\Debug"
|
||||
# PROP Target_Dir ""
|
||||
OUTDIR=.\Debug
|
||||
INTDIR=.\Debug
|
||||
CPP_OBJS=.\Debug/
|
||||
|
||||
# ADD CPP /MDd /Gm /Zi /Od /D "_DEBUG" /I.\Debug
|
||||
CPP_PROJ= /MDd /Gm /Zi /Od /D "_DEBUG" /I.\Debug /Fd"$(INTDIR)/"
|
||||
MTL_PROJ= /D "_DEBUG"
|
||||
# ADD RSC /d "_DEBUG
|
||||
RSC_PROJ= /d "_DEBUG"
|
||||
# ADD LINK32 /debug /pdbtype:sept /pdb:".\Debug/VisVim.pdb"
|
||||
LINK32_FLAGS=/debug /pdbtype:sept /pdb:"$(OUTDIR)/VisVim.pdb"
|
||||
|
||||
!ENDIF
|
||||
|
||||
# ADD CPP /nologo /W3 /GX /D "WIN32" /D "_WINDOWS" /D "_WINDLL" /D "_AFXDLL" /D "_USRDLL" /c
|
||||
CPP_PROJ=$(CPP_PROJ) /nologo /W3 /GX /D "WIN32" /D "_WINDOWS" /D "_WINDLL" /D "_AFXDLL" /D "_USRDLL" /c /Fo"$(INTDIR)/"
|
||||
# ADD RSC /l 0x409 /d "_AFXDLL"
|
||||
RSC_PROJ=$(RSC_PROJ) /l 0x409 /d "_AFXDLL" /fo"$(INTDIR)/VisVim.res"
|
||||
# ADD LINK32 /nologo /subsystem:windows /dll /machine:I386 /incremental:no
|
||||
LINK32_FLAGS=$(LINK32_FLAGS) /nologo /subsystem:windows /dll /machine:I386\
|
||||
/incremental:no /def:".\VisVim.def"\
|
||||
/out:"$(OUTDIR)/VisVim.dll" /implib:"$(OUTDIR)/VisVim.lib"
|
||||
|
||||
ALL : "$(OUTDIR)\VisVim.dll"
|
||||
|
||||
CLEAN :
|
||||
-@if exist "$(INTDIR)/$(NULL)" $(DEL_TREE) "$(INTDIR)"
|
||||
|
||||
"$(OUTDIR)" :
|
||||
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
|
||||
|
||||
LINK32_OBJS= \
|
||||
"$(INTDIR)/VisVim.res" \
|
||||
"$(INTDIR)/VisVim.obj" \
|
||||
"$(INTDIR)/StdAfx.obj" \
|
||||
"$(INTDIR)/Reg.obj" \
|
||||
"$(INTDIR)/DSAddIn.obj" \
|
||||
"$(INTDIR)/OleAut.obj" \
|
||||
"$(INTDIR)/Commands.obj"
|
||||
|
||||
"$(OUTDIR)\VisVim.dll" : "$(OUTDIR)" ".\VisVim.def" $(LINK32_OBJS)
|
||||
$(LINK32) $(LINK32_FLAGS) $(LINK32_OBJS)
|
||||
|
||||
{.}.c{$(CPP_OBJS)}.obj:
|
||||
$(CPP) $(CPP_PROJ) $<
|
||||
|
||||
{.}.cpp{$(CPP_OBJS)}.obj:
|
||||
$(CPP) $(CPP_PROJ) $<
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "VisVim - Win32 Release"
|
||||
# Name "VisVim - Win32 Debug"
|
||||
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\VisVim.cpp
|
||||
|
||||
"$(INTDIR)\VisVim.obj" : $(SOURCE) "$(INTDIR)"
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\VisVim.def
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\VisVim.odl
|
||||
|
||||
!IF "$(CFG)" == "VisVim - Win32 Release"
|
||||
|
||||
# PROP Ignore_Default_Tool 1
|
||||
# Begin Custom Build
|
||||
|
||||
"$(INTDIR)\VisVim.tlb" : $(SOURCE) "$(INTDIR)"
|
||||
midl /nologo /mktyplib203 /win32 /tlb VisVim.tlb /h VSVTypes.h .\VisVim.odl /out .\Release /D "NDEBUG"
|
||||
|
||||
# End Custom Build
|
||||
|
||||
!ELSEIF "$(CFG)" == "VisVim - Win32 Debug"
|
||||
|
||||
# PROP Ignore_Default_Tool 1
|
||||
# Begin Custom Build
|
||||
|
||||
"$(INTDIR)\VisVim.tlb" : $(SOURCE) "$(INTDIR)"
|
||||
midl /nologo /mktyplib203 /win32 /tlb VisVim.tlb /h VSVTypes.h .\VisVim.odl /out .\Debug /D "_DEBUG"
|
||||
|
||||
# End Custom Build
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\StdAfx.cpp
|
||||
|
||||
"$(INTDIR)\StdAfx.obj" : $(SOURCE) "$(INTDIR)"
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\VisVim.rc
|
||||
|
||||
"$(INTDIR)\VisVim.res" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\VisVim.tlb"
|
||||
$(RSC) $(RSC_PROJ) /i "$(INTDIR)" $(SOURCE)
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Reg.cpp
|
||||
|
||||
"$(INTDIR)\Reg.obj" : $(SOURCE) "$(INTDIR)"
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\DSAddIn.cpp
|
||||
|
||||
"$(INTDIR)\DSAddIn.obj" : $(SOURCE) "$(INTDIR)"
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\OleAut.cpp
|
||||
|
||||
"$(INTDIR)\OleAut.obj" : $(SOURCE) "$(INTDIR)"
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Commands.cpp
|
||||
|
||||
"$(INTDIR)\Commands.obj" : $(SOURCE) "$(INTDIR)"
|
||||
|
||||
# End Source File
|
||||
# End Target
|
||||
# End Project
|
||||
@@ -1,61 +0,0 @@
|
||||
// VisVim.odl : type library source for VisVim.dll
|
||||
|
||||
// This file will be processed by the Make Type Library (mktyplib) tool to
|
||||
// produce the type library (VisVim.tlb).
|
||||
|
||||
[ uuid(AC726707-2977-11D1-B2F3-006008040780), version(1.0),
|
||||
helpstring ("VisVim Developer Studio Add-in") ]
|
||||
library VisVim
|
||||
{
|
||||
importlib("stdole32.tlb");
|
||||
importlib("devshl.dll");
|
||||
importlib("ide\devdbg.pkg");
|
||||
|
||||
|
||||
// Dual interface for CCommands
|
||||
//
|
||||
// All commands that your add-in adds to DevStudio
|
||||
// must appear in this interface. You may use the
|
||||
// ClassView to add methods to this interface, which
|
||||
// will cause stub implementations of those methods to
|
||||
// appear in your CCommands class.
|
||||
|
||||
[ uuid(AC726703-2977-11D1-B2F3-006008040780),
|
||||
oleautomation,
|
||||
dual
|
||||
]
|
||||
|
||||
interface ICommands : IDispatch
|
||||
{
|
||||
// methods
|
||||
[id(1)]
|
||||
HRESULT VisVimDialog();
|
||||
HRESULT VisVimEnable();
|
||||
HRESULT VisVimDisable();
|
||||
HRESULT VisVimToggle();
|
||||
HRESULT VisVimLoad();
|
||||
};
|
||||
|
||||
// Class information for CCommands
|
||||
|
||||
[ uuid(AC726704-2977-11D1-B2F3-006008040780) ]
|
||||
coclass Commands
|
||||
{
|
||||
[default] interface ICommands;
|
||||
};
|
||||
|
||||
[ hidden, uuid(AC726705-2977-11D1-B2F3-006008040780) ]
|
||||
coclass ApplicationEvents
|
||||
{
|
||||
[default] interface IApplicationEvents;
|
||||
}
|
||||
|
||||
[ hidden, uuid(AC726706-2977-11D1-B2F3-006008040780) ]
|
||||
coclass DebuggerEvents
|
||||
{
|
||||
[default] interface IDebuggerEvents;
|
||||
}
|
||||
|
||||
//{{AFX_APPEND_ODL}}
|
||||
//}}AFX_APPEND_ODL}}
|
||||
};
|
||||
@@ -1,202 +0,0 @@
|
||||
//Microsoft Developer Studio generated resource script.
|
||||
//
|
||||
#include "resource.h"
|
||||
|
||||
#define APSTUDIO_READONLY_SYMBOLS
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 2 resource.
|
||||
//
|
||||
#include "afxres.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#undef APSTUDIO_READONLY_SYMBOLS
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Englisch (USA) resources
|
||||
|
||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
|
||||
#ifdef _WIN32
|
||||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||
#pragma code_page(1252)
|
||||
#endif //_WIN32
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TEXTINCLUDE
|
||||
//
|
||||
|
||||
1 TEXTINCLUDE DISCARDABLE
|
||||
BEGIN
|
||||
"resource.h\0"
|
||||
END
|
||||
|
||||
2 TEXTINCLUDE DISCARDABLE
|
||||
BEGIN
|
||||
"#include ""afxres.h""\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
3 TEXTINCLUDE DISCARDABLE
|
||||
BEGIN
|
||||
"#define _AFX_NO_SPLITTER_RESOURCES\r\n"
|
||||
"#define _AFX_NO_OLE_RESOURCES\r\n"
|
||||
"#define _AFX_NO_TRACKER_RESOURCES\r\n"
|
||||
"#define _AFX_NO_PROPERTY_RESOURCES\r\n"
|
||||
"\r\n"
|
||||
"#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)\r\n"
|
||||
"#ifdef _WIN32\r\n"
|
||||
"LANGUAGE 9, 1\r\n"
|
||||
"#pragma code_page(1252)\r\n"
|
||||
"#endif\r\n"
|
||||
"#include ""afxres.rc"" // Standard components\r\n"
|
||||
"#endif\r\n"
|
||||
"1 TYPELIB ""VisVim.tlb""\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Bitmap
|
||||
//
|
||||
|
||||
IDR_TOOLBAR_MEDIUM BITMAP MOVEABLE PURE "res\\ToolbarM.bmp"
|
||||
IDR_TOOLBAR_LARGE BITMAP MOVEABLE PURE "res\\ToolbarL.bmp"
|
||||
|
||||
#ifndef _MAC
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Version
|
||||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 1,1,0,1
|
||||
PRODUCTVERSION 1,1,0,1
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
#else
|
||||
FILEFLAGS 0x0L
|
||||
#endif
|
||||
FILEOS 0x4L
|
||||
FILETYPE 0x2L
|
||||
FILESUBTYPE 0x0L
|
||||
BEGIN
|
||||
BLOCK "StringFileInfo"
|
||||
BEGIN
|
||||
BLOCK "040904b0"
|
||||
BEGIN
|
||||
VALUE "CompanyName", "\0"
|
||||
VALUE "FileDescription", "VisVim DLL\0"
|
||||
VALUE "FileVersion", "1, 1, 0, 1\0"
|
||||
VALUE "InternalName", "VisVim\0"
|
||||
VALUE "LegalCopyright", "Copyright (C) 1998\0"
|
||||
VALUE "OriginalFilename", "VisVim.DLL\0"
|
||||
VALUE "ProductName", "VisVim Dynamic Link Library\0"
|
||||
VALUE "ProductVersion", "1, 1, 0, 1\0"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
BEGIN
|
||||
VALUE "Translation", 0x409, 1200
|
||||
END
|
||||
END
|
||||
|
||||
#endif // !_MAC
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Dialog
|
||||
//
|
||||
|
||||
IDD_ADDINMAIN DIALOG DISCARDABLE 0, 0, 178, 124
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Vim Add-In 1.4"
|
||||
FONT 8, "MS Sans Serif"
|
||||
BEGIN
|
||||
CONTROL "&Open file in DevStudio editor simultaneously",
|
||||
IDC_DEVSTUDIO_EDITOR,"Button",BS_AUTOCHECKBOX | WS_GROUP |
|
||||
WS_TABSTOP,7,7,153,10
|
||||
CONTROL "Open files in new tabs",
|
||||
IDC_NEW_TABS,"Button",BS_AUTOCHECKBOX | WS_GROUP |
|
||||
WS_TABSTOP,7,21,153,10
|
||||
GROUPBOX "Current directory",IDC_STATIC,7,35,164,58,WS_GROUP
|
||||
CONTROL "Set to &source file path",IDC_CD_SOURCE_PATH,"Button",
|
||||
BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,17,49,85,10
|
||||
CONTROL "Set to &parent directory of source file path",
|
||||
IDC_CD_SOURCE_PARENT,"Button",BS_AUTORADIOBUTTON,17,63,
|
||||
143,10
|
||||
CONTROL "Do ¬ change",IDC_CD_NONE,"Button",BS_AUTORADIOBUTTON,
|
||||
17,78,63,10
|
||||
DEFPUSHBUTTON "&Ok",IDOK,7,102,74,14,WS_GROUP
|
||||
PUSHBUTTON "&Cancel",IDCANCEL,97,102,74,14,WS_GROUP
|
||||
END
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// DESIGNINFO
|
||||
//
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
GUIDELINES DESIGNINFO DISCARDABLE
|
||||
BEGIN
|
||||
IDD_ADDINMAIN, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 171
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 117
|
||||
END
|
||||
END
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// String Table
|
||||
//
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
IDS_VISVIM_LONGNAME "Vim Developer Studio Add-In"
|
||||
IDS_VISVIM_DESCRIPTION "Allows integration of Vim as the text editor in Developer Studio."
|
||||
IDS_CMD_DIALOG "\nVim Add-In Dialog\nDisplays the options dialog box of the Vim Add-In\nVim Add-In Dialog"
|
||||
IDS_CMD_ENABLE "\nEnable Vim Add-In\nEnables Vim as Visual Studio editor\nEnable Vim Add-In"
|
||||
IDS_CMD_DISABLE "\nDisable Vim Add-In\nDisables Vim as Visual Studio editor\nDisable Vim Add-In"
|
||||
IDS_CMD_TOGGLE "\nToggle Vim Add-In State\nToggles the enable state of the Vim Add-In\nToggle Vim Add-In State"
|
||||
IDS_CMD_LOAD "\nVim Add-In Load Document\nLoads the current document in Vim\nVim Add-In Load Document"
|
||||
END
|
||||
|
||||
#endif // Englisch (USA) resources
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
#ifndef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 3 resource.
|
||||
//
|
||||
#define _AFX_NO_SPLITTER_RESOURCES
|
||||
#define _AFX_NO_OLE_RESOURCES
|
||||
#define _AFX_NO_TRACKER_RESOURCES
|
||||
#define _AFX_NO_PROPERTY_RESOURCES
|
||||
|
||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
|
||||
#ifdef _WIN32
|
||||
LANGUAGE 9, 1
|
||||
#pragma code_page(1252)
|
||||
#endif
|
||||
#include "afxres.rc" // Standard components
|
||||
#endif
|
||||
1 TYPELIB "VisVim.tlb"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#endif // not APSTUDIO_INVOKED
|
||||
|
||||
@@ -1,91 +0,0 @@
|
||||
========================================================================
|
||||
DEVELOPER STUDIO ADD-IN : VisVim
|
||||
========================================================================
|
||||
|
||||
|
||||
The Add-in Wizard has created this VisVim DLL for you. This DLL not only
|
||||
demonstrates the basics of creating a Developer Studio add-in, but it is also
|
||||
a starting point for writing your own add-in.
|
||||
|
||||
An add-in mainly does two things.
|
||||
(1) It adds commands to Developer Studio, which can then be tied
|
||||
to keystrokes or toolbar buttons by the user or programmatically
|
||||
by the add-in.
|
||||
(2) It responds to events fired by Developer Studio.
|
||||
In both cases, the add-in code has access to the full Developer Studio
|
||||
Automation Object Model, and may manipulate those objects to affect the
|
||||
behavior of Developer Studio.
|
||||
|
||||
This file contains a summary of what you will find in each of the files that
|
||||
make up your VisVim DLL.
|
||||
|
||||
|
||||
VisVim.h
|
||||
This is the main header file for the DLL. It declares the
|
||||
CVisVimApp class.
|
||||
|
||||
VisVim.cpp
|
||||
This is the main DLL source file. It contains the class CVisVimApp.
|
||||
It also contains the OLE entry points required of inproc servers.
|
||||
|
||||
VisVim.odl
|
||||
This file contains the Object Description Language source code for the
|
||||
type library of your DLL.
|
||||
|
||||
VisVim.rc
|
||||
This is a listing of all of the Microsoft Windows resources that the
|
||||
program uses. It includes the sample toolbar bitmap that is stored
|
||||
in the RES subdirectory. This file can be directly edited in Microsoft
|
||||
Developer Studio.
|
||||
|
||||
res\VisVim.rc2
|
||||
This file contains resources that are not edited by Microsoft
|
||||
Developer Studio. You should place all resources not
|
||||
editable by the resource editor in this file.
|
||||
|
||||
VisVim.def
|
||||
This file contains information about the DLL that must be
|
||||
provided to run with Microsoft Windows. It defines parameters
|
||||
such as the name and description of the DLL. It also exports
|
||||
functions from the DLL.
|
||||
|
||||
VisVim.clw
|
||||
This file contains information used by ClassWizard to edit existing
|
||||
classes or add new classes. ClassWizard also uses this file to store
|
||||
information needed to create and edit message maps and dialog data
|
||||
maps and to create prototype member functions.
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
Add-in-specific files:
|
||||
|
||||
DSAddIn.cpp, DSAddIn.h
|
||||
These files contain the CDSAddIn class, which implements the
|
||||
IDSAddIn interface. This interface contains handlers
|
||||
for connecting and disconnecting the add-in.
|
||||
|
||||
Commands.cpp, Commands.h
|
||||
These files contain the CCommands class, which implements your
|
||||
command dispatch interface. This interface contains one method
|
||||
for each command you add to Developer Studio.
|
||||
These files also contain stub implementations of handlers for all events
|
||||
fired by the Developer Studio Application object.
|
||||
|
||||
OleAut.cpp
|
||||
These files contain a general OLE automation class used to communicate
|
||||
with vim.
|
||||
|
||||
Reg.cpp
|
||||
These files contain functions to access the registry.
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
Other standard files:
|
||||
|
||||
StdAfx.h, StdAfx.cpp
|
||||
These files are used to build a precompiled header (PCH) file
|
||||
named VisVim.pch and a precompiled types file named StdAfx.obj.
|
||||
|
||||
Resource.h
|
||||
This is the standard header file, which defines new resource IDs.
|
||||
Microsoft Developer Studio reads and updates this file.
|
||||
|
||||
10
src/alloc.c
10
src/alloc.c
@@ -472,15 +472,7 @@ free_all_mem(void)
|
||||
# endif
|
||||
|
||||
# ifdef FEAT_QUICKFIX
|
||||
{
|
||||
win_T *win;
|
||||
tabpage_T *tab;
|
||||
|
||||
qf_free_all(NULL);
|
||||
// Free all location lists
|
||||
FOR_ALL_TAB_WINDOWS(tab, win)
|
||||
qf_free_all(win);
|
||||
}
|
||||
free_quickfix();
|
||||
# endif
|
||||
|
||||
// Close all script inputs.
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user