- Notifications
You must be signed in to change notification settings - Fork0
A vim plugin for running multiple process asynchronously base on neomake.
License
NotificationsYou must be signed in to change notification settings
tracyone/neomake-multiprocess
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
A vim plugin for running multiple process asynchronously base onneomake.
- Run multiple process asynchronously and output to quickfix window.
- Global search asynchronously, supportag,rg, grep and git grep, and output to quickfix window with
errorformatoption seted properly.
Usevim-plug:
Plug'neomake/neomake'Plug'tracyone/neomake-multiprocess'
:h neomakemp.txtneomakemp#run_command(command [, callback] [,arglist] [, flag])
Runcommand asynchronously:
callbackis aFuncrefvariable which will be called aftercommandexit.arglistis alistvariable which will be passed tocallbackflagspecify whether open quickfix window after command exited.
Global search charactor containing a match to the given PATTERN:
neomakemp#global_search(pattern [, flag])flag is bit base variable:
- 0x01-->search in opened buffer
- 0x02-->search original string
| Shortcut | mode | Description |
|---|---|---|
<Leader>vv | visual,normal | global search selected word or under current curosr |
<Leader>vb | visual,normal | searching through all existing buffers |
<Leader>vg | visual,normal | searching in current file |
<Leader>vr | normal | run command from user input |
<Leader>vs | normal | global search from user input |
you can remap it:
"search words on current cursor.nmap<yourkey><Plug>(neomakemp_global_search)"run commands from user inputnmap<yourkey><Plug>(neomakemp_run_command)"search words from user input(regular expression)nmap<yourkey><Plug>(neomakemp_global_search2)"search word on current cursor in exist buffersnmap<yourkey><Plug>(neomakemp_global_search_buf)"search word in current filenmap<yourkey><Plug>(neomakemp_global_search_cur_file)
| Name | Description |
|---|---|
| g:neomakemp_grep_command | rg,ag ,grep orgit |
| g:neomakemp_exclude_files | list variable,specify the ignore file |
| g:neomakemp_exclude_dirs | list variable,specify the ignore directory |
Config example:
"autodetect the existence of commands and select the faster one(rg > ag > grep)letg:neomakemp_grep_command="ag""following is default valueletg:neomakemp_exclude_files=['*.jpg','*.png','*.min.js','*.swp','*.pyc','*.out','*.o']letg:neomakemp_exclude_dirs=['.git','bin','log','build','node_modules','.bundle','.tmp','.svn' ]
Quickfix window will be opened under following condition:
- Global search
- Some error happened
flagis equal to 1
Display running status of commands invim-airline:
letg:airline_section_error=airline#section#create_right(['%{neomakemp#run_status()}'])
Display running status in vim's buildin statusline:
letstatusline.=neomakemp#run_status()
Following example showing how to generate cscope file asynchronously.
function!s:AddCscopeOut(read_project,...)ifa:read_project==1ifempty(glob('.project'))exec'silent! cs add cscope.out'elsefors:lineinreadfile('.project','')exec'silent! cs add'.s:line.'/cscope.out'endforendifelseifa:0==1exec'cs add'.a:1.'/cscope.out'elseexec'silent! cs add cscope.out'endifendifendfunctionletl:gen_cscope_files='find' .a:dir.' -name "*.[chsS]" >' .l:cscopefilescallneomakemp#RunCommand(l:gen_cscope_files.'&&cscope -Rbkq -i'.l:cscopefiles,function('<SID>AddCscopeOut'),[0,a:dir])
About
A vim plugin for running multiple process asynchronously base on neomake.
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
No packages published
