Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Make vim as a C/C++ IDE which inspired by CodeLite.

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 bin
Octocat-spinner-32 vimlite
Octocat-spinner-32 README
Octocat-spinner-32 VimLite.vba
README
This is a mirror of http://www.vim.org/scripts/script.php?script_id=3647

NOTE: Currently, VimLite is not stable enough.
NOTE2: Currently, VimLite only support Linux(or Unix like?) platform.
NOTE3: Currently, VimLite need Gvim.

Please report bugs here http://code.google.com/p/vimlite/issues/list.

SIMPLE USER GUIDE:
These are commonly used commands:
VLWorkspaceOpen [.workspace]

VLWInitCscopeDatabase [0|1]
VLWUpdateCscopeDatabase

VLWBuildActiveProject
VLWCleanActiveProject
VLWRunActiveProject

VLWParseFiles <file1> <file2> ...
VLWParseCurrentFile
VLWDeepParseCurrentFile
VLWTagsSetttings

VLWDbgStart
VLWDbgStop
VLWDbgStepIn
VLWDbgNext
VLWDbgStepOut
VLWDbgContinue
VLWDbgToggleBp


1. Project Manager:
Run this to start.
:VLWorkspaceOpen 
or
:VLWorkspaceOpen <.workspace file>

VimLite can load CodeLite's .workspace and .project files.

After open the VLWorkspace buffer, you can go the the buffer window and hit . (dot) or mouse release key to popup a menu.
All commands are in the pupup menu. And please watch help info around.
NOTE: Project Custom Build does not test enough. Do not use custom build currently.

2. Code Completion:
Currently, VimLite have two code completion engine: 
(1). Omnicpp code completion based on CodeLite's modified version of ctags; 
(2). Clang code completion.
The former will be faster and not 100% accurate, the latter will be slower and at most 100% accurate.
Default use the former, you can change this.

The OmniCpp code completion need a tags database to support completion, you need parse the workspace before start code completion. Put the cursor on workspace name line in VLWorkspace buffer window, popup the menu, select "Parse Workspace (Quick)".
NOTES about OmniCpp
1. Does not support local variables completion, use <C-x><C-n> instead.
2. Does not support using [namespace] statement in included files. This behavior is not recommended.
3. Does not support friend. Solution is just displaying all class members.
4. Does not support complex typedef (eg. typedef typename _Alloc::template rebind<value_type>::other _Pair_alloc_type;). Solution is configuring corresponding type replacement.
5. Does not support overload functions with different return types.


The Clang code completion will auto work, but need the current build configuration of the project is not a custom build.
VimLite need version of clang >= 2.9 to work.
On ubuntu 10.04, you can download the deb package here http://code.google.com/p/vimlite/downloads/list.


3. Debugger Integration:
VimLite integrate pyclewn in it. 
Start to debug the active projcet, just run :VLWDbgStart or press the icon on toolbar.

Please run :h pyclewn for more commands and info.


4. Customize:
NOTE: Right hand side is the default value, you can modify other values ​​for the same type, which if the type is integer and if the right hand side value of type is integer, 0 for False, non-zero for True.

(1). Worksapce Buffer / Window.
" Workspace window width
let g:VLWorkspaceWinSize = 30

" Set the wrokspace buffer name
let g:VLWorkspaceBufName = '==VLWorkspace=='

" Highlight the workspace buffer cursor line
let g:VLWrokspaceHighlightCursorline = 1

" If not 0, when the curser put on one source file buffer, the cursor of
" worksapce buffer's cursor will go the the corresponding source file line.
let g:VLWorkspaceLinkToEidtor = 1

" Will install a menu named 'VimLite'
let g:VLWorkspaceEnableMenuBarMenu = 1

" Will install some toolbar icons
let g:VLWorkspaceEnableToolBarMenu = 1

" Enable cscope, more info will be coming soon
let g:VLWorkspaceEnableCscope = 1

" If not 0, VimLite will not initiative to create cscope database, but only 
" connect an existing db
let g:VLWorkspaceJustConnectExistCscopeDb = 1

" Highlight the .h/.hpp and .c/.cpp file
let g:VLWorkspaceHighlightSourceFile = 1

" Insert worksapce name into title
let g:VLWorkspaceDispWspNameInTitle = 1

" Auto save all modified files before build projects
let g:VLWorkspaceSaveAllBeforeBuild = 0

" Use Clang code completion instead of OmniCpp based on modified ctags
let g:VLWorkspaceUseClangCC = 0

" The active project highlight group name
let g:VLWorkspaceActiveProjectHlGroup = 'SpecialKey'

" The key to popup general menu
let g:VLWorkspaceMenuKey = '.'

" The key to popup gui menu, this default value probably does not work
let g:VLWorkspacePopupMenuKey = '<RightRelease>'

" Auto parse the editing file when save it. Workspace files are only effective
let g:VLWorkspaceParseFileAfterSave = 1

OmniCpp:
" The key to trigger function calltips
let g:VLW_DispCalltipsKey = '<A-p>'

" The key to display the next calltip
let g:VLW_NextCalltipsKey = '<A-j>'

" The key to display the prev calltip
let g:VLW_PrevCalltipsKey = '<A-k>'

" Auto trigger code completion when input '.' (dot)
let g:VLOmniCpp_MayCompleteDot = 1

" Auto trigger code completion when input '>' (right arrow)
let g:VLOmniCpp_MayCompleteArrow = 1

" Auto trigger code completion when input ':' (colon)
let g:VLOmniCpp_MayCompleteColon = 1

" When completeopt does not contain longest option, this setting 
" controls the behaviour of the popup menu selection 
"   0 -> don't select first item
"   1 -> select first item (inserting it to the text)
"   2 -> select first item (without inserting it to the text)
let g:VLOmniCpp_ItemSelectionMode = 2

" Map <CR> (return) key to auto trigger function calltips 
" after select a function item in the code completion popup menu
let g:VLOmniCpp_MapReturnToDispCalltips = 1

Pyclewn Debugger:
" The frame sign background color, can be #xxxxxx format
let g:VLWDbgFrameSignBackground = 'DarkMagenta'


Screen shots:
http://forum.ubuntu.org.cn/download/file.php?id=136380&mode=view/ProjectSettings.png
http://forum.ubuntu.org.cn/download/file.php?id=135903&mode=view/cltest02.png
http://forum.ubuntu.org.cn/download/file.php?id=136304&mode=view/Screenshot.png
Something went wrong with that request. Please try again.