There are a lot of tutorials in the Vim Editor, C + +, and it's better to edit Lua.
Recently got a long time, finally the basic needs are ready, summed up.
The main articles to look at are
Vim User manual Chinese version
Teach you how to convert vim into an IDE programming environment
The main plug-in is: I used the plugin has been uploaded: resources
Vimmanager
Grep.vim
Minibufexpl.vim
Taglist_45
Vim-misc
Vim-lua-ftplugin
The software used:
Grep
Ctags58
General issues vim Edit file (mostly C/s + +) The main function is to teach you how to convert vim into an IDE programming environment, but not all of them are useful.
Top Open File list and Left folder preview with file preview
The plugin used TagList Winmanager
_VIMRC Configuration
Let tlist_show_one_file=1
Let Tlist_exit_onlywindow=1
Let G:minibufexplmapwindownavarrows=1
Let g:winmanagerwindowlayout= ' fileexplorer| TagList '
Switch left column shortcut key settings
Input wmtoggle every time too troublesome, _VIMRC add the following line can be used WM switch
Nmap wm:wmtoggle<cr>
Open LUA file to automate WM
Au vimenter *.lua:wmtoggle
F3 One-click Search
The plugin used Grep.vim
Input: Grep XXX *-R too troublesome, _VIMRC add the following line F3 one click Search
Nmap <silent><F3>: Grep <c-r>,c-w> *-R <CR>
LUA-related plugins vim-lua-ftplugin Vim-misc
When you have finished installing the Lua file, many functions are normal, such as [{Jump
Ctags
Ctags default generated tag is generated in accordance with C + + format, found on the internet can be used, but because their own LUA code has a special format needs to be identified, only need to make a minor change
Ctags--langdef=mylua--langmap=mylua:.lua--regex-mylua= "/^.*\s*function\s* (\w+):(\w+). *$/\2/f/"--regex-MYLUA= "/ ^\s* (\w+) \s*=\s*[0-9]+.*$/\1/e/"--regex-mylua="/^.*\s*function\s* (\w+) \. (\w+). *$/\2/f/"--regex-mylua="/^.*\s*function\s* (\w+) \s*\ (. *$/\1/f/"--regex-mylua="/^\s* (\w+) \s*=\s*\{.*$/\1/e /"--regex-mylua="/^\s*module\s+\ "(\w+) \". *$/\1/m,module/"--regex-mylua="/^\s*module\s+\ "[a-zA-Z0-9._]+\. (\w+) \ ". *$/\1/m,module/"--languages=mylua--excmd=number-r.
For example, the variables defined in my LUA are:
Def.method ("string"). funcname1 = function (name)
You only need to add--regex-mylua= "/^.*\s*def\.method\ ([^)]*\) \. (\w+) \s*=\s*function\ ([^)]*\). *$/\1/f/"
The format is "/Match pattern/\index/type/"
Vim Edit LUA Code configuration