I am seriously addicted to vim -- has anyone created a vim plugin for code blocks?Addicted to vim and working with C::B - how is that possible...?! :lol: ;-)
:) Recently, I do some jobs to make codeblocks internal editor works like vim.I just build and test this plugin, at least it can switch between vim's normal mode and insert mode, and then I can move caret around by "h,j,k,l" key. I'm just a vim beginner, so I think this plugin is useful, at least it can move caret without the help of mouse. ;)
Try it, any feedback is welcome.
https://code.google.com/p/cbvike/
Thanks to codeblocks group.
:) Recently, I do some jobs to make codeblocks internal editor works like vim.
Try it, any feedback is welcome.
https://code.google.com/p/cbvike/
Thanks to codeblocks group.
:) Recently, I do some jobs to make codeblocks internal editor works like vim.I just build and test this plugin, at least it can switch between vim's normal mode and insert mode, and then I can move caret around by "h,j,k,l" key. I'm just a vim beginner, so I think this plugin is useful, at least it can move caret without the help of mouse. ;)
Try it, any feedback is welcome.
https://code.google.com/p/cbvike/
Thanks to codeblocks group.
I suggest not using absolute paths in cbp, instead, you can try my patch::) Recently, I do some jobs to make codeblocks internal editor works like vim.
Try it, any feedback is welcome.
https://code.google.com/p/cbvike/
Thanks to codeblocks group.
I've made some improvement of this code.
https://github.com/zmj64351508/cbvike
Thanks to ayheos
vike.cbp | 30 +++++++++++++++---------------
1 file changed, 15 insertions(+), 15 deletions(-)
diff --git a/vike.cbp b/vike.cbp
index a4e498d..868fd11 100644
--- a/vike.cbp
+++ b/vike.cbp
@@ -7,12 +7,13 @@
<Option compiler="gcc" />
<Build>
<Target title="default">
- <Option output="..\..\..\devel\share\CodeBlocks\plugins\vike.dll" prefix_auto="0" extension_auto="0" />
- <Option object_output="..\..\..\.objs\plugins\contrib\vike" />
+ <Option output="$(#cb_sdk)/devel/share/CodeBlocks/plugins/vike.dll" prefix_auto="0" extension_auto="0" />
+ <Option object_output="$(#cb_sdk)/.objs/plugins/contrib/vike" />
<Option type="3" />
<Option compiler="gcc" />
- <Option parameters="--debug-log -na -ns -nd" />
- <Option host_application="..\..\..\devel\codeblocks.exe" />
+ <Option parameters="--debug-log -na -ns -nd -p debug" />
+ <Option host_application="$(#cb_sdk)/devel/codeblocks.exe" />
+ <Option run_host_application_in_terminal="0" />
<Compiler>
<Add option="-Winvalid-pch" />
<Add option="-pipe" />
@@ -33,8 +34,8 @@
</Linker>
</Target>
<Environment>
- <Variable name="WX_SUFFIX" value="u" />
<Variable name="WX_CFG" value="" />
+ <Variable name="WX_SUFFIX" value="u" />
</Environment>
</Build>
<VirtualTargets>
@@ -43,23 +44,22 @@
<Compiler>
<Add option="-Wall" />
<Add option="-g" />
- <Add directory="..\..\..\include" />
- <Add directory="..\..\..\sdk\wxscintilla\include" />
+ <Add directory="$(#cb_sdk)/include" />
+ <Add directory="$(#cb_sdk)/sdk/wxscintilla/include" />
<Add directory="$(#WX.include)" />
- <Add directory="$(#WX.lib)\gcc_dll$(WX_CFG)\msw$(WX_SUFFIX)" />
- <Add directory="$(#WX)\contrib\include" />
+ <Add directory="$(#WX.lib)/gcc_dll$(WX_CFG)/msw$(WX_SUFFIX)" />
+ <Add directory="$(#WX)/contrib/include" />
</Compiler>
<Linker>
<Add library="codeblocks" />
<Add library="wxmsw28$(WX_SUFFIX)" />
- <Add library="wxscintilla" />
- <Add directory="D:\Prog\CodeBlocks_bak" />
- <Add directory="$(#WX.lib)\gcc_dll$(WX_CFG)" />
- <Add directory="..\..\..\devel" />
+ <Add library="wxscintilla_cb" />
+ <Add directory="$(#WX.lib)/gcc_dll$(WX_CFG)" />
+ <Add directory="$(#cb_sdk)/devel" />
</Linker>
<ExtraCommands>
- <Add after="zip -j9 ..\..\..\devel\share\CodeBlocks\vike.zip manifest.xml" />
- <Add after="zip -j9 vike.cbplugin ..\..\..\devel\share\CodeBlocks\plugins\vike.dll ..\..\..\devel\share\CodeBlocks\vike.zip" />
+ <Add after="zip -j9 $(#cb_sdk)\devel\share\CodeBlocks\vike.zip manifest.xml" />
+ <Add after="zip -j9 vike.cbplugin $(#cb_sdk)\devel\share\CodeBlocks\plugins\vike.dll $(#cb_sdk)\devel\share\CodeBlocks\vike.zip" />
<Mode after="always" />
</ExtraCommands>
<Unit filename="cbvike.cpp" />
I suggest not using absolute paths in cbp, instead, you can try my patch:Codevike.cbp | 30 +++++++++++++++---------------
1 file changed, 15 insertions(+), 15 deletions(-)
diff --git a/vike.cbp b/vike.cbp
index a4e498d..868fd11 100644
--- a/vike.cbp
+++ b/vike.cbp
@@ -7,12 +7,13 @@
<Option compiler="gcc" />
<Build>
<Target title="default">
- <Option output="..\..\..\devel\share\CodeBlocks\plugins\vike.dll" prefix_auto="0" extension_auto="0" />
- <Option object_output="..\..\..\.objs\plugins\contrib\vike" />
+ <Option output="$(#cb_sdk)/devel/share/CodeBlocks/plugins/vike.dll" prefix_auto="0" extension_auto="0" />
+ <Option object_output="$(#cb_sdk)/.objs/plugins/contrib/vike" />
<Option type="3" />
<Option compiler="gcc" />
- <Option parameters="--debug-log -na -ns -nd" />
- <Option host_application="..\..\..\devel\codeblocks.exe" />
+ <Option parameters="--debug-log -na -ns -nd -p debug" />
+ <Option host_application="$(#cb_sdk)/devel/codeblocks.exe" />
+ <Option run_host_application_in_terminal="0" />
<Compiler>
<Add option="-Winvalid-pch" />
<Add option="-pipe" />
@@ -33,8 +34,8 @@
</Linker>
</Target>
<Environment>
- <Variable name="WX_SUFFIX" value="u" />
<Variable name="WX_CFG" value="" />
+ <Variable name="WX_SUFFIX" value="u" />
</Environment>
</Build>
<VirtualTargets>
@@ -43,23 +44,22 @@
<Compiler>
<Add option="-Wall" />
<Add option="-g" />
- <Add directory="..\..\..\include" />
- <Add directory="..\..\..\sdk\wxscintilla\include" />
+ <Add directory="$(#cb_sdk)/include" />
+ <Add directory="$(#cb_sdk)/sdk/wxscintilla/include" />
<Add directory="$(#WX.include)" />
- <Add directory="$(#WX.lib)\gcc_dll$(WX_CFG)\msw$(WX_SUFFIX)" />
- <Add directory="$(#WX)\contrib\include" />
+ <Add directory="$(#WX.lib)/gcc_dll$(WX_CFG)/msw$(WX_SUFFIX)" />
+ <Add directory="$(#WX)/contrib/include" />
</Compiler>
<Linker>
<Add library="codeblocks" />
<Add library="wxmsw28$(WX_SUFFIX)" />
- <Add library="wxscintilla" />
- <Add directory="D:\Prog\CodeBlocks_bak" />
- <Add directory="$(#WX.lib)\gcc_dll$(WX_CFG)" />
- <Add directory="..\..\..\devel" />
+ <Add library="wxscintilla_cb" />
+ <Add directory="$(#WX.lib)/gcc_dll$(WX_CFG)" />
+ <Add directory="$(#cb_sdk)/devel" />
</Linker>
<ExtraCommands>
- <Add after="zip -j9 ..\..\..\devel\share\CodeBlocks\vike.zip manifest.xml" />
- <Add after="zip -j9 vike.cbplugin ..\..\..\devel\share\CodeBlocks\plugins\vike.dll ..\..\..\devel\share\CodeBlocks\vike.zip" />
+ <Add after="zip -j9 $(#cb_sdk)\devel\share\CodeBlocks\vike.zip manifest.xml" />
+ <Add after="zip -j9 vike.cbplugin $(#cb_sdk)\devel\share\CodeBlocks\plugins\vike.dll $(#cb_sdk)\devel\share\CodeBlocks\vike.zip" />
<Mode after="always" />
</ExtraCommands>
<Unit filename="cbvike.cpp" />
Note: you can define cb_sdk in C::B's settings->global variables to the root folder of C::B source.
BTW: I have contacted ayheos weeks ago, he said his cbvilike development freezes currently.
@scarphin: thanks, I finally think mouse is still necessary when editing under C::B. ;)
cbvike
VIM plugin for Code::Blocks.
It's based on https://code.google.com/p/cbvike/ and improved in my own way. So It still retains the name of cbvike but I change the license file.
@arthurzmj, I see you have some commits, good work.
Suggestion:
1, vike.layout should not be put in git, because this is a user preference file.
2, I see you have a "bin" folder which contains some generated dlls, I also think this should be removed, because users can have different compilers, and all the binaries files can be build on their local computer.
3, I'm a very beginner of Vim, I still mainly use mouse, so if you can write a document about what functionality this plugin supplies, that will be better. ;D
Thanks.
I'm sorry to be late for the reply. Good suggestions. But I'm now busy with some other work, so I'll improve it when I'm free. As the license problem you mentioned, I made a mistake. Thank you for pointing it out.Ok, once you make a step in your project, you can add a reply here(I will receive an email notification), so I can test it, thanks for your contribution. :D
Ok, once you make a step in your project, you can add a reply here(I will receive an email notification), so I can test it, thanks for your contribution. :DI restarted to develop the project. Welcome to do some test. You can find the source on my Github. Any feedback is welcome.