Yggdroot / LeaderF

An efficient fuzzy finder that helps to locate files, buffers, mrus, gtags, etc. on the fly for both vim and neovim.
Apache License 2.0
2.14k stars 180 forks source link

使用Lf_PopupPreviewPosition = 'top'时提示Pattern not found: Lf_PopupPreviewPosition = 'top' #1064

Closed Kaiser-Yang closed 4 months ago

Kaiser-Yang commented 4 months ago

source leaderf_config after source vimplug_config

image

Describe your question, feature request, or bug.

当我启动vim时,提示我:

Pattern not found: Lf_PopupPreviewPosition = 'top'
Press ENTER or type command to continue

Steps to reproduce

配置完后启动vim时。

Actual behaviour

preview window依然在右侧: image

Expected behaviour

希望将preview window移动到搜索栏的上侧。

Kaiser-Yang commented 4 months ago

Translation: When I use Lf_PopupPreviewPosition = 'top', every time I launch vim, it gives me:

Pattern not found: Lf_PopupPreviewPosition = 'top'
Press ENTER or type command to continue

and my preview window is still on the right of the find window.

My configure files are pinned above.

Yggdroot commented 4 months ago

let g:Lf_CommandMap = {'<C-K>': ['<Up>'], '<C-J>': ['<Down>']} 的意思是把默认的键c-k 变成 up,map后,up有c-k的功能,而c-k失效了。 如果想让两个同时有效,let g:Lf_CommandMap = {'<C-K>': ['<Up>', '<C-K>'], '<C-J>': ['<Down>']}, 所以文档没错。

Kaiser-Yang commented 4 months ago

let g:Lf_CommandMap = {'<C-K>': ['<Up>'], '<C-J>': ['<Down>']} 的意思是把默认的键c-k 变成 up,map后,up有c-k的功能,而c-k失效了。 如果想让两个同时有效,let g:Lf_CommandMap = {'<C-K>': ['<Up>', '<C-K>'], '<C-J>': ['<Down>']}, 所以文档没错。

好像是我读错了,文档确实没错。那么请问第二个问题是什么原因呢?

Yggdroot commented 4 months ago

Pattern not found: Lf_PopupPreviewPosition = 'top' Press ENTER or type command to continue

是这个问题吗? 不知道为什么启动vim就有这个问题,启动时好像跟LeaderF没关系。 也就是let g:Lf_PopupPreviewPosition = 'top' 会报错太奇怪了。

vimrc

set encoding=utf-8
syntax enable
set nocompatible

"{{{
filetype on  
"}}}

set runtimepath^=~/.vim/plugged/LeaderF
let g:Lf_PopupPreviewPosition = 'top'

vim -u vimrc 这样试一下。

Kaiser-Yang commented 4 months ago

Pattern not found: Lf_PopupPreviewPosition = 'top' Press ENTER or type command to continue

是这个问题吗? 不知道为什么启动vim就有这个问题,启动时好像跟LeaderF没关系。 也就是let g:Lf_PopupPreviewPosition = 'top' 会报错太奇怪了。

vimrc

set encoding=utf-8
syntax enable
set nocompatible

"{{{
filetype on  
"}}}

set runtimepath^=~/.vim/plugged/LeaderF
let g:Lf_PopupPreviewPosition = 'top'

vim -u vimrc 这样试一下。

前四行在我的.vimrc文件中本身存在,因此我只增加了倒数第二行,位置在我source插件配置文件之前,如下图所示: image

即使是这样,我依然会得到同样的报错: image

Yggdroot commented 4 months ago

首先,用我的最小vimrc应该没有问题,然后你再慢慢加上你的source xxx,看看问题出在哪里。

Kaiser-Yang commented 4 months ago

首先,用我的最小vimrc应该没有问题,然后你再慢慢加上你的source xxx,看看问题出在哪里。

我已经注释了我的所有vim配置,只留下了:

set nocompatible
filetype on
scriptencoding utf-8
set encoding=utf-8
syntax on
set runtimepath^=~/.vim/plugged/LeaderF
source ~/.vim/vim_plugin_config/vimplug_config.vim
source ~/.vim/vim_plugin_config/leaderf_config.vim

并且我的vimplug_config.vim中我也只留下了:

call plug#begin('~/.vim/plugged')
Plug 'Yggdroot/LeaderF', { 'do': ':LeaderfInstallCExtension' }
call plug#end()

我的leader_config.vim保持不变,此时依然会出现同样的错误: image

image image image

Kaiser-Yang commented 4 months ago

好吧,我已经找到问题了,我把let写成了leg

Kaiser-Yang commented 4 months ago

首先,用我的最小vimrc应该没有问题,然后你再慢慢加上你的source xxx,看看问题出在哪里。

我已经找到问题了,我把let写成了leg,非常抱歉浪费了你宝贵的时间,谢谢你的耐心解答。

Yggdroot commented 4 months ago

好吧,我已经找到问题了,我把let写成了leg

image