Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
88 commits
Select commit Hold shift + click to select a range
f4b45ba
update asyncrun:1.3.15 (2017-07-30)
seaflygithub Jul 31, 2017
33db833
new vimtools for ubuntu
seaflygithub Aug 5, 2017
db04f48
refresh: README.md: coding manual
seaflygithub Aug 5, 2017
57e68c1
all in English
seaflygithub Aug 5, 2017
6a07e9a
open build_all.sh
seaflygithub Aug 5, 2017
7ff9bcc
add screen shot
seaflygithub Aug 5, 2017
be51e9a
fix:mapleader=','
seaflygithub Aug 5, 2017
93ecbe3
add mark manual to doc/vimtools-coding-manual.md
seaflygithub Aug 5, 2017
1c0d34f
add screenshots to show
seaflygithub Aug 5, 2017
4559d70
08.05-12:31
seaflygithub Aug 5, 2017
6ca14ce
fix:Lookupfile, integrate: LookupFile into auto_update_xxx
seaflygithub Aug 5, 2017
203010a
push
seaflygithub Aug 5, 2017
e1baa20
integrate LookupFile into auto_update_cscope_ctags_database
seaflygithub Aug 5, 2017
c74e41a
fix:about filenametags and tags
seaflygithub Aug 5, 2017
bd48b89
close auto-insert-head when mod and save file
seaflygithub Aug 6, 2017
691c1ad
del:Trinity
seaflygithub Aug 6, 2017
3a8c574
resize sourceinsight layout
seaflygithub Aug 6, 2017
0270c75
screenshot of Debuging and updating ...
seaflygithub Aug 6, 2017
d9667e5
update:some screenshots
seaflygithub Aug 6, 2017
dde9367
update:document
seaflygithub Aug 6, 2017
4223f3d
update:document
seaflygithub Aug 6, 2017
5cf2c32
update:README.md
seaflygithub Aug 6, 2017
d786903
fix:blank dir
seaflygithub Aug 6, 2017
3c34960
release:fix blank dir
seaflygithub Aug 6, 2017
8f3b24e
rm:auto_update_...
seaflygithub Aug 6, 2017
3220258
add:auto_update(SeaflyDennis.github)
seaflygithub Aug 6, 2017
3ba5b58
rm:code_complete
seaflygithub Aug 6, 2017
34a597b
add:code_complete(support shell)
seaflygithub Aug 6, 2017
497fc14
2017.08.06-23:00
seaflygithub Aug 6, 2017
1e9d10c
update:README.md
seaflygithub Aug 6, 2017
b8a3b52
update:README.md
seaflygithub Aug 6, 2017
2e77469
update:README.md
seaflygithub Aug 6, 2017
ad10d74
update:README.md:table test
seaflygithub Aug 6, 2017
ba32851
update:README.md:Create plugins table
seaflygithub Aug 6, 2017
1ff4231
update:README.md:align left
seaflygithub Aug 6, 2017
3c12b6b
resize:vimrc:refreshTime=500,winHeight=15
seaflygithub Aug 7, 2017
461c797
update:document
seaflygithub Aug 7, 2017
b53ada5
update:README.md:TOC
seaflygithub Aug 7, 2017
a3e266d
update:doc
seaflygithub Aug 7, 2017
de88d3c
update:doc
seaflygithub Aug 7, 2017
f8bb089
update:doc
seaflygithub Aug 7, 2017
f0a52dc
update:YCM support
seaflygithub Aug 7, 2017
3b59999
update:close YCM
seaflygithub Aug 7, 2017
1c7d529
update:git plugins management
seaflygithub Aug 7, 2017
4fe5980
update:document;will support stdlib's functions' attribute
seaflygithub Aug 9, 2017
72fa875
del:old auto_update_...
seaflygithub Aug 9, 2017
17ade90
update:auto_update_...:support stdlib parameters' note
seaflygithub Aug 9, 2017
49c2cc8
del:old auto_update_...
seaflygithub Aug 9, 2017
4b7e721
update:auto_update:Use opt format args + lookupfile + code_complete(s…
seaflygithub Aug 9, 2017
2b66eb3
del:old auto_update_...
seaflygithub Aug 12, 2017
ea6357e
add:new auto_update_...
seaflygithub Aug 12, 2017
001261b
del:old auto_update_...
seaflygithub Aug 12, 2017
3411f65
update:auto_...:mv-->cp -u .auto_update_.../tags ./
seaflygithub Aug 12, 2017
7a689ea
del:old auto_update
seaflygithub Aug 14, 2017
318c952
update:git reset --hard {code_complete support stdlib
seaflygithub Aug 14, 2017
b1dd250
update:doc
seaflygithub Aug 20, 2017
24862d9
update:doc
seaflygithub Aug 20, 2017
69472d3
update:doc
seaflygithub Aug 20, 2017
d66fca9
update:SeaflyDennis --> SeaflyGithub
seaflygithub Aug 21, 2017
e938c77
update:doc
seaflygithub Aug 21, 2017
a428322
update:doc
seaflygithub Aug 21, 2017
7cda1d6
update:README.md
seaflygithub Aug 25, 2017
0c98596
update:apt-get install vim-xxx
seaflygithub Aug 26, 2017
c76e2d9
update:a useful shell command
seaflygithub Aug 27, 2017
5bcab46
fix:F12,useful shell
seaflygithub Aug 27, 2017
e83d4a5
update:adjust winmanager bufexpHeight=50
seaflygithub Aug 27, 2017
494202d
update:decrease systags' size
seaflygithub Aug 31, 2017
d91007c
update:rm new nerdtree
seaflygithub Sep 4, 2017
52c235b
update:add old nerdtree
seaflygithub Sep 4, 2017
fffc847
Merge branch 'master' of https://github.com/SeaflyGithub/vimtools int…
seaflygithub Sep 16, 2017
eb26262
update:rm -rf asyncrun.vim
seaflygithub Sep 16, 2017
99d6fe4
update:rm -rf code_complete
seaflygithub Sep 16, 2017
d9c2c8f
update:rm -rf indentLine
seaflygithub Sep 16, 2017
9ee8459
update:rm -rf minibufexpl.vim
seaflygithub Sep 16, 2017
e617dac
OmniCppComplete
seaflygithub Sep 16, 2017
889a3af
update:auto github plugins modify
seaflygithub Sep 16, 2017
ca441c0
2017.09.17-14:44
seaflygithub Sep 17, 2017
7e522fb
add:vim_open_file.gif
seaflygithub Sep 17, 2017
e6d868a
add:after_run_createtag.gif
seaflygithub Sep 17, 2017
3bc12d2
add:sourceinsight_screenshot.gif
seaflygithub Sep 17, 2017
6aa6dd4
add:YCM:#install_youcompleteme
seaflygithub Sep 27, 2017
ae9df63
mod:config/vimrc.vim
seaflygithub Sep 27, 2017
c4bb181
new:rewrite vimrc.vim
seaflygithub Sep 27, 2017
6c8de59
update:simple
seaflygithub Sep 29, 2017
1605d48
fix:build_all.sh
seaflygithub Oct 1, 2017
e84501f
update:vim-header:add:strftime("%Y.%m.%d %X")
seaflygithub Oct 3, 2017
0a1aefc
add:contact_seafly.png
seaflygithub Oct 4, 2017
38c25aa
...
seaflygithub Oct 4, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
215 changes: 76 additions & 139 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,141 +1,78 @@
[TOC]

## 获取vimtools
在本站下载或克隆vimtools如:
``` shell
git clone -b master https://SeaflyDennis@github.com/SeaflyDennis/vimtools.git
```

## 安装vimtools
克隆后或下载解压zip之后会多出一个vimtools目录,

提示:目前(2017)对ubuntu支持会好点

- 1.获取简易安装帮助信息:`./build_all.sh help` 或 `./build_all.sh -h` 或 `./build_all.sh ?`
- 2.完整安装(初次安装推荐):`./build_all.sh`
- 3.只安装或更新vim:`./build_all.sh vim` 或 `./build_all.sh.sh only_vim`
- 4.只安装或更新脚本插件(xx.vim):`./build_all.sh scr_plg` 或 `./build_all.sh script_plugin`
- 5.只安装或更新源码插件(需要编译的):`./build_all.sh src_plg` 或 `./build_all.sh source_plugin`
- 6.只安装或更新配置文件:`./build_all.sh config` 或 `./build_all.sh update_config`

## 快速上手vimtools

### 进入工程环境
- 步骤01:进入目标工程顶层目录,`cd test_proj`
- 步骤02:启动vim,打开任何一个工程源文件。`vim Makefile`
- 步骤03:执行vim命令`:Createtag`同步同步工程源文件
- 步骤04:接下来就可以浏览编辑源代码了,当然有不同窗口布局模式,有winmanager窗口模式(F12), 有sourceinsight窗口模式(F8)

至此,我们成功进入工程环境,接下来我们就可以使用vim管理该工程了。



# vimtools用户手册

## 各种窗口模式

- 垂直分割窗口:`Ctrl-w v`
- 水平分割窗口:`Ctrl-w s`
- 窗口之间跳转切换:`Ctrl-w [h,j,k,l]`
- 该窗口打开一个文件:`:edit src2.c`
- winmanager窗口模式:按`F12`进入该窗口模式,再按`F12`退出该窗口模式
- sourceinsight窗口模式:按`F8`进入该窗口模式,再按`F8`退出该窗口模式

- F1~F12的功能
- F1 --系统默认键,我们不动他
- F2 --绑定了插入文件头功能,即按F2即可插入文件头
- F3 --导入cscope生成的工程数据库文件,前提是执行了object.sh
- F4 --导入ctags生产的taglist依赖文件,前提是执行了object.sh
- F5 --执行LookupFile插件来查找文件,前提是执行了object.sh
- F6 --闲置
- F7 --闲置
- F8 --启动sourceinsight窗口模式,前提是执行了object.sh
- F9 --闲置
- F10 --闲置
- F11 --闲置
- F12 --启动winmanager窗口模式,前提是执行了object.sh

- 常用快捷键
- cl --ESC模式下直接输入cl即可删除所有空行
- cs --ESC模式下直接输入cs即可删除所有行尾空格和行尾制表符
- cm --ESC模式下直接输入cm即可删除所有行尾^M符(Windows中的回车换行符)

- 快速编辑代码的常用操作

- https://github.com/mbbill/code_complete
- code_complete使用说明:
- 输入函数名后在输入(,然后按tab键就可以显示函数行参
- if,while,switch等,输入这些关键字后,直接按tab键就行
- 输入in后按tab,就是#include " "
- 输入is后按tab,就是#include < >
- 输入main后按tab,就是上图所示的那样,main函数就好了
- 输入cc后按tab,就是上图中的注释
- 输入ff后按tab,就是上图中的头文件,预处理宏
- 输入de后按tab,就是宏定义
- Ctrl + c --(按V选中)批量注释
- Ctrl + x --(按V选中)批量取消注释
- Ctrl + a --全选(模仿Windos编辑习惯)

- 文件头的配置
- 编辑~/.vimrc相应位置即可

E-mail:seafly0616@qq.com

# vimtools开发手册

## vimtools结构简介

- 首先你得有一定vim操作基础,要求基础不多,只要有就行
- 该强化包支持Ubuntu操作系统,仅适用于PC用户(需要root权限)
- build_all.sh --> 安装时候第一个执行的安装脚本
- config/ --> 该目录里以object.sh,vimrc.vim为核心
- vim/ --> 该目录存放vim源码包(用于离线安装)
- doc/ --> 该目录存放用户手册(README.md的PDF版:)
- plugin/ --> 该目录存放vim插件
- plugin/script/ --> 该目录存放各种vimscript类型的插件
- plugin/source/ --> 该目录存放需要编译的插件
- plugin/script/besides/ --> 该目录存放准备但还没集成到vimtools的插件

## build_all.sh主程结构

1. 获取操作系统类型:HOSTOS
2. 检查用户权限:SUDO
3. 获取python主分支版本号(2.x):PY_VERSION
4. 获取网络连接状态:network_connected
5. 安装python库
6. 通过switch语句读取用户命令参数来分别执行各自子函数
7. 最后执行完毕退出脚本

## config/vimrc.vim

- 简介:即.vimrc配置文件,这里为了省事集成太多特性(虽然这样不好,以后版本中可能分散管理,毕竟集权主义不好)
- vimrc基础技能列表:
- 绑定快捷键执行函数:map <F6> :call RunCode()<CR>
- 绑定组合键: nnoremap %s/\s\+$//g <c-c>s
- [Vim中的键映射参考页](http://www.cnblogs.com/softwaretesting/archive/2011/09/28/2194515.html)
- 习惯 vim 本来的按键,然后在此基础上增加功能是个不错的习惯。大部分用户也是遵循这个传统。
- 一般来说使用vim的人,不喜欢覆盖vim本来的键绑定。尤其是非常基本的按键。
- 如何添加新vimscript插件
- git或[vimscript官网](http://www.vim.org/scripts/index.php)获取新插件,重新打包使其解压后直接包含.vim或plugin
目录
- 新插件添加后如果有配置信息就写入config/vimrc.vim文件的适当位置并注明
插件信息
**测试图片**
![图片范例](./screenshots/test.png)

- F1~F12的功能绑定(闲置键可以绑定新功能也能测试新功能)
- F1 --系统默认键,我们不动他
- F2 --绑定了插入文件头功能,即按F2即可插入文件头
- F3 --导入cscope生成的工程数据库文件,前提是执行了object.sh
- F4 --导入ctags生产的taglist依赖文件,前提是执行了object.sh
- F5 --执行LookupFile插件来查找文件
- F6 --闲置
- F7 --闲置
- F8 --启动sourceinsight窗口模式
- F9 --闲置
- F10 --闲置
- F11 --闲置
- F12 --启动winmanager窗口模式


E-mail:seafly0616@qq.com
- [Get vimtools](#get-vimtools)
- [Install vimtools](#install-vimtools)
- [Power on vimtools](#power-on-vimtools)
- [vimtools user manual](#vimtools-user-manual)
- [Thanks following vim plugins](#thanks-following-vim-plugins)

# Get vimtools

git clone -b vimtools-ubuntu https://SeaflyGithub@github.com/SeaflyGithub/vimtools
![./screenshots/get_vimtools.gif](./screenshots/get_vimtools.gif)

# Install vimtools

1. Get into directory: `cd vimtools`
2. Get simple help: `./build_all.sh --help` or `./build_all.sh ?` or `./build_all.sh -h`
3. Install: `./build_all.sh all`

Install vimtools screenshot:
![./screenshots/201708062344-install_vimtools_username_useremail.png](./screenshots/201708062344-install_vimtools_username_useremail.png)

# Power on vimtools

1. Get into your project root directory: such as `cd linux-2.6.39`
2. Open a arbitrary source file with vim: such as `vim Makefile`
3. Run vim command: `ESC` + `:Createtag`
4. Enjoy yourself ! --(Press F8 power on/off sourceinsight Layout)

**After running `:Createtag` screenshot:**
![./screenshots/after_run_Createtag.gif](./screenshots/after_run_Createtag.gif)

**View Linux Kernel code with sourceinsight Layout Screenshot:**
![./screenshots/vimtools-ubuntu-sourceinsight-kernel-screenshot.gif](./screenshots/vimtools-ubuntu-sourceinsight-kernel-screenshot.gif)

# vimtools user manual

- [./doc/vim_useful_notebook-CN.md](https://github.com/SeaflyGithub/vimtools/blob/vimtools-ubuntu/doc/vim_useful_notebook-CN.md)
- [./doc/vimtools_users_manual-EN.md](https://github.com/SeaflyGithub/vimtools/blob/vimtools-ubuntu/doc/vimtools_user_manual-EN.md)
- [VIM 用户手册-For Vim version 8.0](http://vimcdoc.sourceforge.net/doc/usr_toc.html#usr_toc.txt)

# Thanks following vim plugins:


|Author |Plugin |Website |
| :------- | :------- |:------- |
|haolongzhangm |auto_update_cscope_ctags_database|https://github.com/haolongzhangm/auto_update_cscope_ctags_database |
|YouCompleteMe |Valloric |https://github.com/Valloric/YouCompleteMe |
|skywind3000 |asyncrun.vim |https://github.com/skywind3000/asyncrun.vim |
|SeaflyGithub |auto_update_cscope_ctags_database|https://github.com/SeaflyGithub/auto_update_cscope_ctags_database |
|马冬亮(凝霜 Loki) |code_complete |https://github.com/SeaflyGithub/code_complete |
|fholgado |minibufexpl.vim |https://github.com/fholgado/minibufexpl.vim |
|vim-scripts |minibufexplorerpp.vim |https://github.com/vim-scripts/minibufexplorerpp/blob/master/plugin/minibufexplpp.vim |
|scrooloose |nerdtree |https://github.com/scrooloose/nerdtree |
|wesleyche |SrcExpl |https://github.com/wesleyche/SrcExpl |
|wesleyche |Trinity |https://github.com/wesleyche/Trinity |
|alpertuna |vim-header |https://github.com/alpertuna/vim-header |
|honza |vim-snippets |https://github.com/honza/vim-snippets |
|Yggdroot |indentLine |https://github.com/Yggdroot/indentLine |
|plasticboy |vim-markdown |https://github.com/plasticboy/vim-markdown |
|terryma |vim-multiple-cursors |https://github.com/terryma/vim-multiple-cursors |
|honza |vim-snippets |https://github.com/honza/vim-snippets |
|SirVer |ultisnips |https://github.com/SirVer/ultisnips |
|Tuxdude |mark.vim |https://github.com/Tuxdude/mark.vim |
|vim-scripts |genutils |https://github.com/vim-scripts/genutils |
|vim-syntastic |syntastic |https://github.com/vim-syntastic/syntastic |
|vim-scripts |winmanager |https://github.com/vim-scripts/winmanager--Fox |
|csliu |a.vim |https://github.com/csliu/a.vim |
|jlanzarotta |bufexplorer |https://github.com/jlanzarotta/bufexplorer |
|sudar |comments.vim |https://github.com/sudar/comments.vim |
|vim-scripts |LookupFile |https://github.com/vim-scripts/lookupfile |
|vim-scripts |OmniCppComplete |https://github.com/vim-scripts/OmniCppComplete |
|vim-scripts |taglist.vim |https://github.com/vim-scripts/taglist.vim |
|vim-scripts |AutoComplPop |https://github.com/vim-scripts/AutoComplPop |
|othree |vim-autocomplpop |https://github.com/othree/vim-autocomplpop |
|exvim |ex-autocomplpop |https://github.com/exvim/ex-autocomplpop |
|scrooloose |nerdtree |https://github.com/scrooloose/nerdtree |
|scripts |CodeCommenter |http://www.vim.org/scripts/script.php?script_id=3941 |
Loading