Comments (10)
命令调用看起来似乎没什么问题,请检查一下是否是ag的ignore配置的问题?
请在工作目录下输入
ag -D foo
看看ag的输出是否正常。
from ctrlsf.vim.
看下这两个结果 好像ag是正常的
from ctrlsf.vim.
很抱歉,我没有办法重现你的bug。
我觉得既然ag命令的执行没有报错,可能还是ag输出结果为空或者结果解析的部分出了问题。
以下信息可能对你debug有帮助:
https://github.com/dyng/ctrlsf.vim/blob/master/autoload/ctrlsf.vim#L133-L141
请在这段代码的附近添加打印command和ackprg_output的代码,看看实际执行的命令已经结果是否有问题。(一直想实现debug模式,不过太懒了……)
from ctrlsf.vim.
Given no further information, I close it.
from ctrlsf.vim.
我也遇到这个问题了
今天刚装的插件
无论搜索什么字符串都匹配不到
from ctrlsf.vim.
@dong8yong8 请你打开 debug 模式之后,看下日志,确认有结果从你的搜索程序返回。
打开 debug 模式
let g:ctrlsf_debug_mode = 1
from ctrlsf.vim.
我遇到的问题是,之前使用没有问题,后来更新过vim插件,结果就搜索没有结果了
执行如下类似命令,ag是能找到文件的
ag -D foo
目前都不知道如何处理,目前直接用ag来代替了
from ctrlsf.vim.
@yuanxj1024 请你打开 debug 模式,看下日志;如果你对怎么分析日志不了解,可以把日志拷贝贴上来。
打开 debug 模式的方法:
let g:ctrlsf_debug_mode = 1
from ctrlsf.vim.
@yuanxj1024 请你打开 debug 模式,看下日志;如果你对怎么分析日志不了解,可以把日志拷贝贴上来。
打开 debug 模式的方法:
let g:ctrlsf_debug_mode = 1
@dyng
日志如下:
Tokens: ['sendWholeLifeDuration']
ParsedResult: {'pattern': 'sendWholeLifeDuration'}
Options: {'pattern': 'sendWholeLifeDuration', '_vimregex': '\V\CsendWholeLifeDuration', '_vimhlregex': {'normal': '\V\C\(\^\d\+:\.\*\)\@<=sendWholeLifeDuration', 'compact': '\V\C\(|\d\+ col \d\+|\.\*\)\@<=sendWholeLifeDurati
on'}}
Tokens: ['-C', '3']
ParsedResult: {'context': 3}
ExecCommand: ag -C 3 --smart-case --literal --noheading --nogroup --nocolor --nobreak -- "sendWholeLifeDuration" "/Users/aaronyuan/Documents/working/pay-hybrid-icashier-brand"
TimerStarted: id=48
Searching...
ConsumeResult: size=0
想要搜索sendWholeLifeDuration 这个字符串肯定是存在
一下是ag的搜索结果
:!ag sendWholeLifeDuration
src/js/common/metrics.ts
134:export function sendWholeLifeDuration(now) {
我尝试单独执行debug信息里面的ag命令,发现有结果的
:!ag -C 3 --smart-case --literal --noheading --nogroup --nocolor --nobreak -- "sendWholeLifeDuration" "/Users/aaronyuan/Documents/working/pay-hybrid-icashier-brand" │
/Users/aaronyuan/Documents/working/pay-hybrid-icashier-brand/src/js/common/metrics.ts:131-/** │
/Users/aaronyuan/Documents/working/pay-hybrid-icashier-brand/src/js/common/metrics.ts:132- * 上报从启动到页面加载完成耗时 │
/Users/aaronyuan/Documents/working/pay-hybrid-icashier-brand/src/js/common/metrics.ts:133- */ │
/Users/aaronyuan/Documents/working/pay-hybrid-icashier-brand/src/js/common/metrics.ts:134:export function sendWholeLifeDuration(now) { │
/Users/aaronyuan/Documents/working/pay-hybrid-icashier-brand/src/js/common/metrics.ts:135- if (!canReportData()) { │
/Users/aaronyuan/Documents/working/pay-hybrid-icashier-brand/src/js/common/metrics.ts:136- return; │
/Users/aaronyuan/Documents/working/pay-hybrid-icashier-brand/src/js/common/metrics.ts:137- } │
/Users/aaronyuan/Documents/working/pay-hybrid-icashier-brand/src/js/view/index.ts:27-import { pollingPayStatusModal } from './polling-modal'; │
/Users/aaronyuan/Documents/working/pay-hybrid-icashier-brand/src/js/view/index.ts:28-import { indexPVAnalytics, newCardBannerViewAnalytics, pageIndexInitTechStat, pageIndexSuccessTechStat } from 'view/index/index-analytics';│
/Users/aaronyuan/Documents/working/pay-hybrid-icashier-brand/src/js/view/index.ts:29-import { isSupportOffline } from 'common/offline'; │
/Users/aaronyuan/Documents/working/pay-hybrid-icashier-brand/src/js/view/index.ts:30:import { sendWholeLifeDuration, sendFirstAjaxFailed, sendFirstAjaxSuccess, sendFirstAjaxBefore } from 'common/metrics'; │
/Users/aaronyuan/Documents/working/pay-hybrid-icashier-brand/src/js/view/index.ts:31-
from ctrlsf.vim.
@yuanxj1024 你再试一下,用同步搜索模式,let g:ctrlsf_search_mode = 'sync'
,看是否有结果?
另外ag
的bug比较多,你可以升级下,或者试下rg
。
from ctrlsf.vim.
Related Issues (20)
- Question: about a hack in the source code HOT 1
- preview window positioning HOT 6
- Error in ctrlsf#fs#FindProjectRoot HOT 4
- Keymap to open file in a vertical split HOT 2
- Question: Can I map or default the compact style to use quickfix list? HOT 1
- 查找时提示winlayout未定义 HOT 5
- How to specify search path? HOT 3
- *.hpp can't be find as default HOT 2
- Which regex engine? HOT 1
- "free(): invalid pointer" when doing async searches with neovim HOT 2
- Make filename not editable HOT 2
- async chops off first character when editing many files HOT 1
- preview with mouse
- Is it possible to search sentences rather than just a single word? HOT 2
- ctrlsf_backend keeps miserror HOT 3
- Question: is it possible to customize search for a word?
- How can I replace all occurence of the searched keyword? HOT 3
- Sync CtrlSF compact window when navigating via quickfix HOT 4
- Error detected while processing - Invalid argument HOT 1
- Feature request/query: how to pass a list of files to grep through? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ctrlsf.vim.