LeaderF
LeaderF copied to clipboard
cannot scroll the preview window in vim, but it works on nvim
- vim or neovim?
- [x] vim
- [ ] neovim
- Output of
vim --version
ornvim --version
:
VIM - Vi IMproved 9.0 (2022 Jun 28, compiled Aug 03 2022 08:47:08)
Included patches: 1-135
Modified by [email protected]
Compiled by [email protected]
Huge version with GTK3 GUI. Features included (+) or not (-):
+acl +file_in_path +mouse_urxvt -tag_any_white
+arabic +find_in_path +mouse_xterm +tcl
+autocmd +float +multi_byte +termguicolors
+autochdir +folding +multi_lang +terminal
-autoservername -footer -mzscheme +terminfo
+balloon_eval +fork() +netbeans_intg +termresponse
+balloon_eval_term +gettext +num64 +textobjects
+browse -hangul_input +packages +textprop
++builtin_terms +iconv +path_extra +timers
+byte_offset +insert_expand +perl +title
+channel +ipv6 +persistent_undo +toolbar
+cindent +job +popupwin +user_commands
+clientserver +jumplist +postscript +vartabs
+clipboard +keymap +printer +vertsplit
+cmdline_compl +lambda +profile +vim9script
+cmdline_hist +langmap -python +viminfo
+cmdline_info +libcall +python3 +virtualedit
+comments +linebreak +quickfix +visual
+conceal +lispindent +reltime +visualextra
+cryptv +listcmds +rightleft +vreplace
+cscope +localmap +ruby +wildignore
+cursorbind +lua +scrollbind +wildmenu
+cursorshape +menu +signs +windows
+dialog_con_gui +mksession +smartindent +writebackup
+diff +modify_fname +sodium +X11
+digraphs +mouse +sound -xfontset
+dnd +mouseshape +spell +xim
-ebcdic +mouse_dec +startuptime +xpm
+emacs_tags +mouse_gpm +statusline +xsmp_interact
+eval -mouse_jsbterm -sun_workshop +xterm_clipboard
+ex_extra +mouse_netterm +syntax -xterm_save
+extra_search +mouse_sgr +tag_binary
-farsi -mouse_sysmouse -tag_old_static
system vimrc file: "$VIM/vimrc"
user vimrc file: "$HOME/.vimrc"
2nd user vimrc file: "~/.vim/vimrc"
user exrc file: "$HOME/.exrc"
system gvimrc file: "$VIM/gvimrc"
user gvimrc file: "$HOME/.gvimrc"
2nd user gvimrc file: "~/.vim/gvimrc"
defaults file: "$VIMRUNTIME/defaults.vim"
system menu file: "$VIMRUNTIME/menu.vim"
fall-back for $VIM: "/usr/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK -pthread -I/usr/include/gtk-3.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0 -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -I/usr/include/gtk-3.0 -I/usr/include/gio-unix-2.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/fribidi -I/usr/include/harfbuzz -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/uuid -I/usr/include/freetype2 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/usr/include/x86_64-linux-gnu -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -Wdate-time -g -O2 -ffile-prefix-map=/build/vim-Z9iOBu/vim-9.0.0105+really.v9.0.0135=. -flto=auto -ffat-lto-objects -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -D_REENTRANT -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: gcc -L. -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -fstack-protector-strong -rdynamic -Wl,-export-dynamic -Wl,-E -Wl,-Bsymbolic-functions -flto=auto -ffat-lto-objects -flto=auto -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -o vim -lgtk-3 -lgdk-3 -lpangocairo-1.0 -lpango-1.0 -lharfbuzz -latk-1.0 -lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lSM -lICE -lXpm -lXt -lX11 -lXdmcp -lSM -lICE -lm -ltinfo -lselinux -lcanberra -lsodium -lacl -lattr -lgpm -L/usr/lib -llua5.2 -Wl,-E -fstack-protector-strong -L/usr/local/lib -L/usr/lib/x86_64-linux-gnu/perl/5.34/CORE -lperl -ldl -lm -lpthread -lcrypt -L/usr/lib/python3.10/config-3.10-x86_64-linux-gnu -lpython3.10 -lcrypt -ldl -lm -lm -L/usr/lib/x86_64-linux-gnu -ltcl8.6 -ldl -lz -lpthread -lm -lruby-3.0 -lm -L/usr/lib
- Output of
:echo has("python")
:
0
- Output of
:echo has("python3")
:
1
- Output of
:echo &pythondll
(only vim, not neovim):
not available
- Output of
:echo &pythonthreedll
(only vim, not neovim):
not available
- Output of
:py print(sys.version)
:
not available
- Output of
:py3 print(sys.version)
:
3.10.4 (main, Jun 29 2022, 12:14:53) [GCC 11.2.0]
- Output of
:echo g:Lf_Debug_Cmd
: - Output of
:echo g:Lf_FilesFromCache
: - Operating system:
- [x] Linux
- [ ] Mac OS X
- [ ] Windows
- [ ] Etc.
- Configurations related to LeaderF in vimrc:
let g:Lf_StlColorscheme = 'powerline'
let g:Lf_ShowDevIcons = 1
" For GUI vim, the icon font can be specify like this, for example
let g:Lf_DevIconsFont = "DroidSansMono Nerd Font Mono"
" If needs
set ambiwidth=double
let g:Lf_Ctags='/usr/bin/ctags-universal'
let g:Lf_GtagsAutoGenerate = 0
let g:Lf_GtagsGutentags = 1
let g:Lf_CacheDirectory = expand('~')
let g:Lf_RootMarkers = ['.git', '.svn', '.hg', '.project', '.root']
let g:Lf_WildIgnore = {
\ 'dir': ['.svn','.git','.hg'],
\ 'file': ['*.sw?','~$*','*.bak','*.exe','*.o','*.so','*.py[co]']
\}
" don't show the help in normal mode
let g:Lf_HideHelp = 1
let g:Lf_UseCache = 0
let g:Lf_UseVersionControlTool = 1
let g:Lf_IgnoreCurrentBufferName = 1
" popup mode
let g:Lf_WindowPosition = 'popup'
" let g:Lf_PreviewHorizontalPosition = 'left'
" let g:Lf_PopupPreviewPosition = 'right'
let g:Lf_PreviewInPopup = 1
let g:Lf_PopupWidth = 0.75
let g:Lf_StlSeparator = { 'left': "\ue0b0", 'right': "\ue0b2", 'font': "DejaVu Sans Mono for Powerline" }
let g:Lf_PreviewResult = {
\ 'File': 0,
\ 'Buffer': 0,
\ 'Mru': 0,
\ 'Tag': 0,
\ 'BufTag': 0,
\ 'Function': 1,
\ 'Line': 0,
\ 'Colorscheme': 0,
\ 'Rg': 0,
\ 'Gtags': 0
\}
" let g:Lf_PreviewHorizontalPosition = 'right'
" let g:Lf_ShortcutF = "<leader>ff"
" noremap <leader>ff :Leaderf file
noremap <leader>ff :Leaderf function<CR>
noremap <leader>fb :<C-U><C-R>=printf("Leaderf buffer %s", "")<CR><CR>
noremap <leader>fm :<C-U><C-R>=printf("Leaderf mru %s", "")<CR><CR>
noremap <leader>ft :<C-U><C-R>=printf("Leaderf bufTag %s", "")<CR><CR>
noremap <leader>fl :<C-U><C-R>=printf("Leaderf line %s", "")<CR><CR>
noremap <leader>frr :<C-U><C-R>=printf("Leaderf! rg --current-buffer -e %s ", expand("<cword>"))<CR>
noremap <leader>frf :<C-U><C-R>=printf("Leaderf! rg -e %s ", expand("<cword>"))<CR>
" search visually selected text literally
xnoremap gf :<C-U><C-R>=printf("Leaderf! rg -F -e %s ", leaderf#Rg#visual())<CR>
noremap go :<C-U>Leaderf! rg --recall<CR>
let g:Lf_Gtagslabel = 'native-pygments'
" nmap <unique> <leader>fgd <Plug>LeaderfGtagsDefinition
" nmap <unique> <leader>fgr <Plug>LeaderfGtagsReference
" nmap <unique> <leader>sss <Plug>LeaderfGtagsSymbol
" nmap <unique> <leader>fgg <Plug>LeaderfGtagsGrep
" vmap <unique> <leader>fgd <Plug>LeaderfGtagsDefinition
" vmap <unique> <leader>fgr <Plug>LeaderfGtagsReference
" vmap <unique> <leader>fgs <Plug>LeaderfGtagsSymbol
" vmap <unique> <leader>fg <Plug>LeaderfGtagsGrep
noremap <leader>tv :LeaderfBufTag<CR>
" noremap <leader>fr :<C-U><C-R>=printf("Leaderf! gtags -r %s --auto-jump", expand("<cword>"))<CR><CR>
" noremap <leader>fd :<C-U><C-R>=printf("Leaderf! gtags -d %s --auto-jump", expand("<cword>"))<CR><CR>
noremap <leader>fr :<C-U><C-R>=printf("Leaderf! gtags -r %s", expand("<cword>"))<CR><CR>
noremap <leader>fd :<C-U><C-R>=printf("Leaderf! gtags -d %s", expand("<cword>"))<CR><CR>
noremap <leader>fo :<C-U><C-R>=printf("Leaderf! gtags --recall %s", "")<CR><CR>
noremap <leader>fn :<C-U><C-R>=printf("Leaderf gtags --next %s", "")<CR><CR>
noremap <leader>fp :<C-U><C-R>=printf("Leaderf gtags --previous %s", "")<CR><CR>
command LfLine LeaderfLine
command LfSelf LeaderfSelf
command LfFile LeaderfFile
command LfRg LeaderfRg
command LfBuf LeaderfBuffer
command LfBTag LeaderfBufTag
Describe your question, feature request, or bug.
cannot scroll the preview window in vim by pressing <C-Up> or <C-Down>, but it works on nvim
Steps to reproduce
1. trigger file list
:LeaderfFile
2. select a file, and press <C-p> to preview
3. pressing <C-Up> or <C-Down>
Actual behaviour
the whole popup (filelist and preview) vanishes
Expected behaviour
I should be able to scroll the preview popup by pressing <C-Up> or <C-Down>
Can not reproduce.
Can not reproduce.
I use tmux. I fixed this issue by referring this link.
Several terminal emulators (alacritty, gnome, konsole, etc.) send special
codes for keys with modifiers, but these do not have an entry in the
termcap/terminfo database. You can make them work by adding a few lines in
your vimrc. For example, to make the Control modifier work with arrow keys
for the gnome terminal: >
if &term =~ 'gnome'
execute "set <xUp>=\<Esc>[@;*A"
execute "set <xDown>=\<Esc>[@;*B"
execute "set <xRight>=\<Esc>[@;*C"
execute "set <xLeft>=\<Esc>[@;*D"
endif
thanks!
Great.