pseewald / vim-anyfold Goto Github PK
View Code? Open in Web Editor NEWLanguage agnostic vim plugin for folding and motion based on indentation.
License: MIT License
Language agnostic vim plugin for folding and motion based on indentation.
License: MIT License
The description on this site says zx
can be used to re-fold everything. This command does nothing for me. However, zM
does re-fold.
is there any shortcut key or command to do fold/unfold all block ?
Firstly, thanks for developing this. Folding can be kind of a pain in vim, and this makes it better!
I'm getting errors when editing the end of a file
E684: list index out of range: 2266
E15: Invalid expression: b:anyfold_ind_buffer[v:lnum-1]
Press ENTER or type command to continue
...
This error repeats a few times before completing my command and returning.
This happens, for example, when I try adding a line to the bottom of the file.
Version Info
$ vim --version
VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Jun 23 2016 20:22:47)
Compiled by [email protected]
Normal version without GUI. Features included (+) or not (-):
-arabic +autocmd -balloon_eval -browse +builtin_terms +byte_offset +cindent
-clientserver -clipboard +cmdline_compl +cmdline_hist +cmdline_info +comments
-conceal +cryptv +cscope +cursorbind +cursorshape +dialog_con +diff +digraphs
-dnd -ebcdic -emacs_tags +eval +ex_extra +extra_search -farsi +file_in_path
+find_in_path +float +folding -footer +fork() -gettext -hangul_input +iconv
+insert_expand +jumplist -keymap -langmap +libcall +linebreak +lispindent
+listcmds +localmap -lua +menu +mksession +modify_fname +mouse -mouseshape
-mouse_dec -mouse_gpm -mouse_jsbterm -mouse_netterm -mouse_sysmouse
+mouse_xterm +multi_byte +multi_lang -mzscheme +netbeans_intg -osfiletype
+path_extra -perl +persistent_undo +postscript +printer -profile +python/dyn
-python3 +quickfix +reltime -rightleft +ruby/dyn +scrollbind +signs
+smartindent -sniff +startuptime +statusline -sun_workshop +syntax +tag_binary
+tag_old_static -tag_any_white -tcl +terminfo +termresponse +textobjects +title
-toolbar +user_commands +vertsplit +virtualedit +visual +visualextra +viminfo
+vreplace +wildignore +wildmenu +windows +writebackup -X11 -xfontset -xim -xsmp
-xterm_clipboard -xterm_save
system vimrc file: "$VIM/vimrc"
user vimrc file: "$HOME/.vimrc"
user exrc file: "$HOME/.exrc"
fall-back for $VIM: "/usr/share/vim"
Compilation: gcc -c -I. -D_FORTIFY_SOURCE=0 -Iproto -DHAVE_CONFIG_H -arch i386 -arch x86_64 -g -Os -pipe
Linking: gcc -arch i386 -arch x86_64 -o vim -lncurses
These are my configuration for vim-anyfold in .vimrc
" configuration for vim-anyfold
syntax on
let anyfold_activate = 1
let anyfold_fold_comments = 1
set foldlevel=0
" configuration for vim-anyfold
This is the py file, which I want to fold, since there are lots of continuous comments, I want to fold them, but vim-anyfold not working.
https://www.dropbox.com/s/dmivhrx6j8h3na8/lesson1.py?dl=0
If I set autocmd Filetype * AnyFoldActivate
in my neovim's config, then if I use GitGutterPreviewhunk
, errors occurred as below
Error detected while processing function gitgutter#hunk#preview[3]..<SNR>164_hunk_op[62]..<SNR>164_preview[6]..<SNR>164
_populate_hunk_preview_window:
line 14:
E16: Invalid range: call nvim_win_set_height(s:winid, height)
line 18:
E16: Invalid range: call nvim_buf_set_lines(winbufnr(s:winid), 0, -1, v:false, [])
line 19:
E16: Invalid range: call nvim_buf_set_lines(winbufnr(s:winid), 0, -1, v:false, a:body)
line 20:
E16: Invalid range: call nvim_buf_set_option(winbufnr(s:winid), 'modified', v:false)
line 23:
E16: Invalid range: call nvim_buf_clear_namespace(winbufnr(s:winid), ns_id, 0, -1)
Error detected while processing function gitgutter#hunk#preview[3]..<SNR>164_hunk_op[62]..<SNR>164_preview[6]..<SNR>164
_populate_hunk_preview_window[24]..gitgutter#diff_highlight#process:
line 21:
E16: Invalid range: call s:diff(rline, aline, i, i+removed, 0, 0, regions, 1)
Error detected while processing function gitgutter#hunk#preview[3]..<SNR>164_hunk_op[62]..<SNR>164_preview[6]..<SNR>164
_populate_hunk_preview_window:
line 29:
E16: Invalid range: call nvim_win_set_cursor(s:winid, [1,0])
Error detected while processing function gitgutter#hunk#preview[3]..<SNR>164_hunk_op[62]..<SNR>164_preview:
line 7:
E16: Invalid range: call s:enable_staging_from_hunk_preview_window()
If not set autocmd Filetype * AnyFoldActivate
, gitgutter's preview works well.
set foldlevel=99
)set foldlevel=99
)Seems to be caused by this line.
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'pseewald/vim-anyfold'
Plugin 'terryma/vim-multiple-cursors'
call vundle#end() " required
filetype plugin indent on " required
autocmd Filetype * AnyFoldActivate
let g:multi_cursor_start_word_key = '<C-s>'
let g:multi_cursor_next_key = '<C-s>'
let g:multi_cursor_quit_key = '<Esc>'
At least in Linux kernel's scripts/kconfig/menu.c file I observe how wrongly the plugin detects the foldable blocks.
Besides that, it would be nice to not fold all foldable blocks automatically at file opening, but instead find and mark them as foldable so that the user could fold them when he wants by just pressing 'za' or whatever mapped key.
any_fold is compatible with Allman style ?
https://en.wikipedia.org/wiki/Indent_style#Allman_style
while (x == y)
{
something();
somethingelse();
}
with the curly bracket under
Compare the above images. The first is from vscode, the second from vim using anyfold. It's the same code, but there's one obvious difference: the folding. You see, the source code has at least one empty space after every class and function definition. Vscode's folding does the right thing - it leaves the space there. But anyfold gets rid of the space. If I add two empty lines, it gets rid of both of them. This makes my code feel very crowded when it's folded, and as someone who uses folding constantly, this is very annoying.
I am using anyfold to fold a markdown document, e.g.
First Heading
========
- note
- foldline1
- foldline2
- foldline 3
Second heading
The Plugin folds the indented "foldlines" and includes the two trailing empty
lines until the 2nd heading into the fold. This means that, when folded, the
fold is immediately followed by the heading without a separating blank line.
This makes navigation with {
or }
impossible.
Could this be fixed?
" deprecated initialization using anyfold_activate variable
" still works but echoes a warning
au BufNewFile,BufRead * call anyfold#init(0)
First, this autocmd don't be included in an augroup, which make user cannot use autocmd! augroup_name
to disable it.
Second, this autocmd make vim call this function when read or create a buffer, which means vim will source autoload/anyfold.vim
. If we change it to (just move some lines from autoload function to plugin/anyfold.vim
)
au BufNewFile,BufRead * call s:init()
function! s:init() abort
if exists("g:anyfold_activate")
let b:anyfold_activate = g:anyfold_activate
endif
if !exists("b:anyfold_activate")
return
elseif !b:anyfold_activate
return
endif
call anyfold#init(1)
endfunction
Now, if g: or b:anyfold_activate don't exist, the autoload function anyfold#init
will not be called, so autoload/anyfold.vim
will not be sourced, it can save time of sourcing a script.
I think it will be better.
Thanks!
let anyfold_activate = 1
means every file will autofold when it open.
but I just want to manual folding
Thanks for this plugin.
This is how I have anyfold configured:
" Minimalistic display of closed folds
let g:anyfold_fold_display = 1
" Fold multiline comments
let g:anyfold_fold_comments = 1
let g:anyfold_identify_comments = 2
let g:anyfold_comments = []
I am trying to have folds in yaml files based on indent. The following file:
- dfdfdf: 223
dfdf: 23423
sdfsdf:
sdfsdf: 1232
sdfsdf: 1232
sdfsdf: 1232
sdfsdf:
sdfsdf: 1232
sdfsdf: 1232
sdfsdf: 1232
however produces a single fold with anyfold that folds the whole file. I would expect it to produce two more folds on the inner indents. Am I doing sth wrong? Is this by design? Can I somehow enable the inner folds as well?
There's a way/shortcut to achieve this?
E121: Undefined variable: b:anyfold_ind_actual
Press ENTER or type command to continue
Error detected while processing function 112_ReloadFolds:
line 14:
E116: Invalid arguments for function len(b:anyfold_ind_actual)
Press ENTER or type command to continue
Error detected while processing function 112_ReloadFolds:
line 14:
E15: Invalid expression: line('$') - len(b:anyfold_ind_actual)
Press ENTER or type command to continue
Error detected while processing function 112_ReloadFolds:
line 14:
E121: Undefined variable: b:anyfold_ind_actual
Press ENTER or type command to continue
Error detected while processing function 112_ReloadFolds:
line 14:
E116: Invalid arguments for function len(b:anyfold_ind_actual)
Press ENTER or type command to continue
Error detected while processing function 112_ReloadFolds:
line 14:
E15: Invalid expression: line('$') - len(b:anyfold_ind_actual)
Press ENTER or type command to continue
Error detected while processing function 112_ReloadFolds:
line 14:
E121: Undefined variable: b:anyfold_ind_actual
Press ENTER or type command to continue
Error detected while processing function 112_ReloadFolds:
line 14:
E116: Invalid arguments for function len(b:anyfold_ind_actual)
Press ENTER or type command to continue
Error detected while processing function 112_ReloadFolds:
line 14:
E15: Invalid expression: line('$') - len(b:anyfold_ind_actual)
Press ENTER or type command to continue
Error detected while processing function 112_ReloadFolds:
line 14:
E121: Undefined variable: b:anyfold_ind_actual
when use vim-anyfold together with vim-plug I always got errors while running:
:PlugInstall
I am using vim-anyfold with GitGutter plugin. :GitGutterPreviewHunk
opens a pop window to view changes. But when autocmd Filetype * AnyFoldActivate
is present in my vimrc, it throws the following error:
Error detected while processing function gitgutter#hunk#preview[3]..<SNR>153_hunk_op[62]..<SNR>153_preview[6]..<SNR>153_populate_hunk_preview_window:
line 14:
E16: Invalid range: call nvim_win_set_height(s:winid, height)
line 18:
E16: Invalid range: call nvim_buf_set_lines(winbufnr(s:winid), 0, -1, v:false, [])
line 19:
E16: Invalid range: call nvim_buf_set_lines(winbufnr(s:winid), 0, -1, v:false, a:body)
line 20:
E16: Invalid range: call nvim_buf_set_option(winbufnr(s:winid), 'modified', v:false)
line 23:
E16: Invalid range: call nvim_buf_clear_namespace(winbufnr(s:winid), ns_id, 0, -1)
Error detected while processing function gitgutter#hunk#preview[3]..<SNR>153_hunk_op[62]..<SNR>153_preview[6]..<SNR>153_populate_hunk_preview_window[24]..gitgutter#diff_highlight#process:
line 21:
E16: Invalid range: call s:diff(rline, aline, i, i+removed, 0, 0, regions, 1)
Error detected while processing function gitgutter#hunk#preview[3]..<SNR>153_hunk_op[62]..<SNR>153_preview[6]..<SNR>153_populate_hunk_preview_window:
line 29:
E16: Invalid range: call nvim_win_set_cursor(s:winid, [1,0])
Error detected while processing function gitgutter#hunk#preview[3]..<SNR>153_hunk_op[62]..<SNR>153_preview:
line 7:
E16: Invalid range: call s:enable_staging_from_hunk_preview_window()
I understand that this is also related to GitGutter, but I just wanted to confirm if vim-anyfold does anything which might cause issue when opening pop-up windos in neovim v0.4.4
Any chance to configure foldmethod=syntax
instead of foldmethod=expr
by default?
Tried with vim's autocmd BufRead,BufNewFile * set foldmethod=syntax
but it's working randomly for me π
So I have this issue where⦠when writing a Ruby class, the cursor jumps to the top of the class after I write a method in it. I originally thought this was some Ruby plugin enforcing best-practices, but that's not the case. Turns out vim-anyfold
tries responds to TextChangedI
and tries to recompute folds on the fly. The behaviour I see is that it tries to fold the class soon as the end
keyword for the function is typed.
I tried this on a test PHP file, and anyfold
only folds on InsertLeave
Any ideas?
[ctrl - O]
repetitively to traverse back the jump list:jump
command.We can make use of :keepjumps
command to keep the jumplist intact.
Please read :help :keepjumps
Currently, when using anyfold to fold away lists in a plain text files, any section headings in the file get confused as part of the list.
For e.g., given
# Heading 1
## Heading 1.1
- List level 1
- List level 2
- List level 3
- List level 3
- List level 2
- List level 3
- List level 3
## Heading 1.2
- List level 1
- List level 2
- List level 3
- List level 3
- List level 2
- List level 3
- List level 3
## Heading 2
## Heading 2.2
- List level 1
- List level 2
- List level 3
- List level 3
- List level 2
- List level 3
- List level 3
## Heading 2.2
- List level 1
- List level 2
- List level 3
- List level 3
- List level 2
- List level 3
- List level 3
we see:
Would it be possible to have vim-anyfold optionally recognize these headings and not fold them, so it looks like this:
This can be a command, e.g., "AnyFoldIncludeTextHeaders on" (which will fold headers, as it does now, by default), "AnyFoldIncludeTextHeaders off" (which will result in the second case).
Not easy to reproduce, I haven't found the 100% scenario to reproduce this issue. But I am sure it happened at my side 4-5 times daily.
I only saw this issue when open/close PROJECTROOT/.git/index repeatedly.
.git/index file is a special file under .git folder. Its content is dynamically changed in background.
Not sure whether it is related to neovim.
I am using neovim, vim is too too too slow for me. And transfer from vim to neovim is very very easy.
Bellowing are the neovim output:
Error detected while processing function 80_ReloadFolds:
line 14:
E121: Undefined variable: b:anyfold_ind_actual
Press ENTER or type command to continue
Error detected while processing function 80_ReloadFolds:
line 14:
E116: Invalid arguments for function len
Press ENTER or type command to continue
Error detected while processing function 80_ReloadFolds:
line 14:
E15: Invalid expression: line('$') - len(b:anyfold_ind_actual)
Press ENTER or type command to continue
Error detected while processing function 80_ReloadFolds:
line 14:
E121: Undefined variable: b:anyfold_ind_actual
Press ENTER or type command to continue
Error detected while processing function 80_ReloadFolds:
line 14:
E116: Invalid arguments for function len
Press ENTER or type command to continue
Error detected while processing function 80_ReloadFolds:
line 14:
E15: Invalid expression: line('$') - len(b:anyfold_ind_actual)
I usually make use of foldnestmax=2, more folding than that seems like an overkill to me (mostly Python code).
http://vimdoc.sourceforge.net/htmldoc/options.html#'foldnestmax'
So having vim-anyfold pick up that option, would be great for me.
vim-anyfold doesn't fold import/include statements currently.
We should fold #import/#include statements for java, cpp, c, python etc.
Most major IDEs currently do this.
Hi,
I like this project. Just moved away from simpylfold.
BACKGROUND
I was wondering if something like customization was possible using vim-anyfold. Please have a look at the two pictures attached to this message. The first screenshot shows the editor without folds:
You see four "blocks" of code all preceded with a characteristic form of comment (three hashes in a row and the comment text restricted to the 2nd row, at least for Python code). This specific format is intended to be different from the "normal" line comments, as they kind of are on a different level and relate rather to a block
than to a line
of code or the inner program structures (for, if,...). Now, I would like to always keep these "block comments" visible, regardless on which indentation level they are written. Folds of this type should start with one of these block comments and end just before the next block comment (or the end of the file / function / ... ). See the next picture for clarification of the outcome:
This modified screenshot shows the editor scope after applying the fold method on the specifically designed block comments. So, the developer can concentrate on the block comments alone and is free to step into deeper levels of the code as he wishes.
QUESTION
Is there something like a mechanism to specify a language-specific regular expression statement (e.g. ^[\s]*#[\s]*[\r\n]+[\s]*#[\s]*[a-zA-z0-9]+[\s]*[\r\n]+[\s]*#
) matching the very specific form of a block comment? So that folds can be realized between these block comments?
HINTS
If there is nothing like this possible at the moment, I would be glad for any developer who could give me some hints where to start implementing this feature myself. I hope, this would be possible starting off with the current code base.
Any Ideas?
Thanks.
Nnako
Hello,
I find the mandatory mapping of anyfold_toggle_key
to be unnecessary and imposing because Vim already has a za
shortcut that essentially does the same thing: the only difference between them is that anyfold_toggle_key
honors the g:anyfold_auto_reload
setting whereas Vim's za
does not. π
If you could expose the ReloadFolds()
function as a <Plug>(AnyFold-Reload-Folds)
shortcut, then we could do away with the π mandatory anyfold_toggle_key
and instead allow the user to decide ποΈ if they really want to trigger ReloadFolds()
through a mapping (which is also of their choice):
nmap za <Plug>(AnyFold-Reload-Folds):normal! za<CR>
Thanks for your consideration.
Error detected while processing function <SNR>335_ReloadFolds:
line 10:
E684: list index out of range: 5
Press ENTER or type command to continue
Error detected while processing function <SNR>335_ReloadFolds:
line 10:
E15: Invalid expression: s:LineIndent(curr_line) != b:anyfold_ind_actual[curr_line - 1]
When I run with autocmd FileType * AnyFoldActivate
in my vimrc, I get the following error after modifying the buffer:
Error detected while processing InsertLeave Autocommands for "<buffer=1>"..function <SNR>103_ReloadFolds:
line 38:
E111: Missing ']'
This has started happening only recently. Strangely, you haven't modified vim-anyfold recently. I've tried removing each of my other plugins in turn, and the problem remains. Perhaps a newer version of vim is causing this?
" deprecated initialization using anyfold_activate variable
" still works but echoes a warning
au BufNewFile,BufRead * call anyfold#init(0)
First, this autocmd don't be included in an augroup, which make user cannot use autocmd! augroup_name
to disable it.
Second, this autocmd make vim call this function when read or create a buffer, which means vim will source autoload/anyfold.vim
. If we change it to (just move some lines from autoload function to plugin/anyfold.vim
)
au BufNewFile,BufRead * call s:init()
function! s:init() abort
if exists("g:anyfold_activate")
let b:anyfold_activate = g:anyfold_activate
endif
if !exists("b:anyfold_activate")
return
elseif !b:anyfold_activate
return
endif
call anyfold#init(1)
endfunction
Now, if g: or b:anyfold_activate don't exist, the autoload function anyfold#init
will not be called, so autoload/anyfold.vim
will not be sourced, it can save time of sourcing a script.
I think it will be better.
Thanks!
For example, this php code block.
default: echo("ERROR: Invalid vm kind '$kind'\n"); usage(); die();
This is my dropbox link to the php file:
https://www.dropbox.com/s/lmquuigc5ysot0v/zend_vm_gen.php?dl=0
The first time, it could fold on "default:". While, if I check out to another git commit/branch from outside, and inside vim, therefore, I reload it, then it will say
E490: No fold found
I have tested the similar scenario for python file, it works.
I really love your plugin, I am trying to fix this issue, if you could help, greatly appreciate.
steps to reproduce
:vsplit
if g:anyfold_motion
noremap <script> <buffer> <silent> ]]
\ :<c-u>call <SID>JumpFoldEnd(0,v:count1)<cr>
noremap <script> <buffer> <silent> [[
\ :<c-u>call <SID>JumpFoldStart(0,v:count1)<cr>
noremap <script> <buffer> <silent> ]k
\ :<c-u>call <SID>JumpPrevFoldEnd(0,v:count1)<cr>
Why not use anyfold#jumpfoldend
to replace <SID>
? <SID>
make it is impossible for user to customize their hotkeys in vimrc.
TAGS
To define a help tag, place the name between asterisks (*tag-name*). The
tag-name should be different from all the Vim help tag names and ideally
should begin with the name of the Vim plugin. The tag name is usually right
aligned on a line.
[j
in braceless.vim and vim-anyfold and helptag exception occur:
Vim(helptags):E154
Hi,
To be honest, I haven't installed the plugin, but just from reading the README, I don't get what the benefit of this plugin is, in contrast to vim's foldmethod=indent
.
Would be nice to have this information in the README. :-)
Greets
Jounathaen
Hi,
it seems running :vsplit term://top
or even term://bash
in neovim
(v0.2.1-dev
from official Ubuntu PPA, Ubuntu 16.04 amd64, ), actually an example taken directly from neovim documentation yields Error detected while processing function <SNR>195_ReloadFolds
.
I suppose it is not really a good idea to fold terminal content - anyfold
could most likely be safely disabled in some way for this type of buffer. I could do that in my vimrc, but I have no idea how to do that. Could you perhaps point me in the right direction?
The following comparison in function CommentLine
is executed for each line and the bottleneck in the current implementation:
synIDattr(synID(a:lnum,indent(a:lnum)+1,1),"name") =~? 'Comment'
A faster alternative may be to parse the comments
string (see h: comments
).
Is it possible to configure it so that the line with the terminating brace }
and/or blank lines gets included in the fold?
If I have:
void f() {
std::puts("foo");
}
void g() {
std::puts("bar");
}
struct baz {
int x;
int y;
};
I'd like it to fold into:
void f() { ---------------------------------- 4 lines
void g() { ---------------------------------- 4 lines
struct baz { -------------------------------- 5 lines
instead of:
void f() { ---------------------------------- 2 lines
}
void g() { ---------------------------------- 2 lines
}
struct baz { -------------------------------- 3 lines
};
EDIT 1:
It seems like putting the opening brace on its own line might accomplish what I want, I'll report back here after further testing.
EDIT 2:
Never mind that... same results regardless, but in some cases it seems to fold as I want, and in others it doesn't. Not quite sure yet what's causing the difference in behaviour for me.
But one issues seems to be when the brace ends with a semi-colon such as in the case of struct, class, union, enum, or brace initialization. But then again, in some cases it works... for example:
In one file I have these (white space annotated for clarity):
// ...
<blank line>
// using aliases:
<tab> using U8 = uint8_t;
<tab> using U16 = uint16_t;
<tab> using U32 = uint32_t;
<tab> using U64 = uint64_t;
<tab> using I8 = int8_t;
<tab> using I16 = int16_t;
<tab> using I32 = int32_t;
<tab> using I64 = int64_t;
<tab> using F32 = float;
<tab> using F64 = double;
<blank line>
struct FG { // foreground color
<tab> U8 code = 255;
};
<blank line>
[[nodiscard]] inline auto to_string( FG const fg ) -> std::string {
<tab> return std::string("38;5;") + std::to_string(fg.code);
}
<blank line>
struct BG { // background color
<tab> U8 code = 238;
};
<blank line>
// ...
and I can fold all the using aliases into the comment, the function and BG properly, but not FG.
If I do try to fold them all it becomes:
// ...
// using aliases: 12 lines
struct FG { // foreground color 2 lines
};
<blank line>
[[nodiscard]] inline auto to_string( FG const fg ) -> std::string { 4 lines
struct BG { // background color 4 lines
// ...
So in the above case all but FG work as desired. Super weird.
Opening nerdtree or tagbar and pressing e.g. ?
triggers:
Error detected while processing function <SNR>93_ReloadFolds..<SNR>93_NextNonBlankLine..<SNR>93_ConsiderLine..<SNR>93_IsComment:
line 3:
E684: list index out of range: 1
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.