-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtasks.ini
166 lines (134 loc) · 4.54 KB
/
tasks.ini
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
# ~/.config/nvim/tasks.ini
# last update: 2021-01-03 02:00
# https://github.com/skywind3000/asynctasks.vim
# https://github.com/skywind3000/asynctasks.vim/wiki/Task-Examples
# This file Contains tasks which is suitable for my work. for example tasks that
# are related to ros, embedded programming, c, c++, python, ... , and will be better
# and more complete as the time goes. note that this is very nice feature that can
# produce the ros plugin for vim/neovim, just like the one we have in vscode.
[project-cmake-init]
command=sh ~/.config/nvim/task_scripts/cmake_ccpp_project_init.sh $(?Language) $(?project_name) $(?minimum_cmake_version:3.2)
cwd=$(VIM_CWD)
output=quickfix
errorformat=%f:%l:%m
silent=1
notify=echo
[project-cmake]
command=if [ -e compile_commands.json ]; then rm compile_commands.json; fi && cd build && cmake .. && mv compile_commands.json .. && echo "run :CocRestart"
# note that you need to restart coc for new generated compile_commands.json file.
cwd=$(VIM_CWD)
output=quickfix
errorformat=%f:%l:%m
silent=1
notify=echo
[project-cmake-build]
command=cd build && cmake --build . --config $(?build_type:Debug)
cwd=$(VIM_CWD)
output=quickfix
errorformat=%f:%l:%m
save=2
[public-project-file-run]
command:c, cpp="$(VIM_CWD)/build/$(?executable_name:$(VIM_DIRNAME))"
command:python=python "$(VIM_FILENAME)"
command:sh=sh "$(VIM_FILENAME)"
command:zsh=zsh "$(VIM_FILENAME)"
command:bash=bash "$(VIM_FILENAME)"
cwd=$(VIM_CWD)
output=terminal
save=2
[single-file-build:release]
command:c,cpp=gcc -O2 -Wall "$(VIM_FILEPATH)" -o "$(VIM_PATHNOEXT)" -lstdc++ -lm -msse3
output=quickfix
cwd=$(VIM_FILEDIR)
save=2
[single-file-build:debug]
command:c,cpp=gcc -g -Wall "$(VIM_FILEPATH)" -o "$(VIM_PATHNOEXT)" -lstdc++ -lm -msse3
output=quickfix
cwd=$(VIM_FILEDIR)
save=2
[single-file-run]
command="$(VIM_FILEPATH)"
command:c,cpp="$(VIM_PATHNOEXT)"
command:python=python "$(VIM_FILENAME)"
command:sh=sh "$(VIM_FILENAME)"
command:zsh=zsh "$(VIM_FILENAME)"
command:bash=bash "$(VIM_FILENAME)"
command:vim=:source %
output=terminal
cwd=$(VIM_FILEDIR)
save=2
[grep-word]
command=rg -n --no-heading --color never "$(?keyword)" "<root>" -tc -tcpp -tpy -tvim -tgo
cwd=$(VIM_ROOT)
errorformat=%f:%l:%m
[grep-cword]
command=rg -n --no-heading --color never "$(VIM_CWORD)" "<root>" -tc -tcpp -tpy -tvim -tgo
cwd=$(VIM_ROOT)
errorformat=%f:%l:%m
# Generate Ctags Database
[gen-tags]
command=ctags -R -f tags . && echo "Dont't forget to run:" && echo ":set tags+=./tags;"
cwd=$(VIM_ROOT)
# Cscope database generation
# for more info go through:
# https://stackoverflow.com/questions/33676829/vim-configuration-for-linux-kernel-development
# http://cscope.sourceforge.net/cscope_vim_tutorial.html
# http://cscope.sourceforge.net/large_projects.html
[gen-cscope]
command=cscope -R -b && echo "run :cs add /path/to/your/cscope.out"
cwd=$(VIM_CWD)
[kernel-ctags-cscope]
command=make O=$(?database_path:.) ARCH=$(?architecture:x86_64) COMPILED_SOURCE=1 cscope tags && echo "run :cs add /path/to/your/kernel/cscope.out" && echo "run :set tags=/path/to/your/kernel/tags"
cwd=$(VIM_CWD)
[ros-workspace-init:zsh]
command=zsh ~/.config/nvim/task_scripts/ros_workspace_init.zsh
cwd=$(VIM_CWD)
silent=1
notify=echo
[ros-workspace-init:bash]
command=sh ~/.config/nvim/task_scripts/bash_scripts/ros_workspace_init.sh
cwd=$(VIM_CWD)
silent=1
notify=echo
[ros-create-pkg:zsh]
command=zsh ~/.config/nvim/task_scripts/ros_create_pkg.zsh $(?package_name) $(?dependencies)
cwd=$(VIM_CWD)
silent=1
notify=echo
[ros-create-pkg:bash]
command=sh ~/.config/nvim/task_scripts/bash_scripts/ros_create_pkg.sh $(?package_name) $(?dependencies)
cwd=$(VIM_CWD)
silent=1
notify=echo
[ros-add-node:zsh]
command=zsh ~/.config/nvim/task_scripts/node_create.zsh $(?package_name) $(?PyOrCpp:cpp) $(?node_name)
cwd=$(VIM_CWD)
silent=1
notify=echo
[ros-add-node:bash]
command=sh ~/.config/nvim/task_scripts/bash_scripts/node_create.sh $(?package_name) $(?PyOrCpp:cpp) $(?node_name)
cwd=$(VIM_CWD)
silent=1
notify=echo
[ros-catkin-make:zsh]
command=zsh ~/.config/nvim/task_scripts/ros_catkin_make.zsh
cwd=$(VIM_CWD)
[ros-catkin-make:bash]
command=sh ~/.config/nvim/task_scripts/bash_scripts/ros_catkin_make.sh
cwd=$(VIM_CWD)
[roscore-spawn]
command=roscore
cwd=$HOME
output=terminal
silent=1
notify=echo
[roscore-kill]
# does not work at the momment because of bug of the plugin
# Asyntasks. I added two key bindings to "~/.config/nvim/init.vim" to overpass
# this bug.
command=killall -9 roscore; killall -9 rosmaster
cwd=$HOME
output=terminal
silent=1
notify=echo
# I think it is complete enough to start work. in future i will make it even better.