Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

^_ shows up at the end of a file name #396

Closed
narutaro opened this issue Mar 1, 2022 · 13 comments · Fixed by #397
Closed

^_ shows up at the end of a file name #396

narutaro opened this issue Mar 1, 2022 · 13 comments · Fixed by #397
Labels
could not reproduce The issue is not reproducable

Comments

@narutaro
Copy link

narutaro commented Mar 1, 2022

I use Mac with vim version 8.2.3489. Wen I launch Fern, ^_ shows up at the end of a file name in the file tree. Any way to remove them?

  |  .zprofile^_                                     
  |  .zsh_history^_   
  |  .zshrc^_ 

.vimrc is as follows.

" vim-plug
call plug#begin()
Plug 'lambdalisue/fern.vim'
call plug#end()

" Show hidden files
let g:fern#default_hidden=1

" Show file tree with Ctrl+n
nnoremap <C-n> :Fern . -reveal=% -drawer -toggle -width=40<CR>

" Color
colorscheme molokai
@narutaro narutaro changed the title '^_' shows up at the end of a file name ^_ shows up at the end of a file name Mar 1, 2022
@lambdalisue
Copy link
Owner

@narutaro Could you try if #397 solves your issue?

@narutaro
Copy link
Author

narutaro commented Mar 2, 2022

Hi @lambdalisue, thank you for your quick update. After doing the followings, I still see the ^_. I am not really familiar with this and not sure if I am doing right. Give me your advice.

  1. Fetch fix-syntax in plugged
% cd /Users/me/.vim/plugged/fern.vim
% git branch
* fix-syntax
  master
  1. Put the fern.vim in autoload

@lambdalisue
Copy link
Owner

https://github.com/junegunn/vim-plug#example

Not sure but prob.

Plug 'lambdalisue/fern.vim', { 'branch': 'fix-syntax' }

@narutaro
Copy link
Author

narutaro commented Mar 3, 2022

I could not make it work with both vim-plug and jetpack while both of them has fix-syntax branch in the directory...

@lambdalisue
Copy link
Owner

Hum... Then please create a minimal vimrc.

@brandon1024
Copy link
Contributor

This happens to me anytime I source my vimrc. Closing the drawer and reopening it fixes it for me.

@lambdalisue
Copy link
Owner

Unfortunately, everybody use different settings so we need a minimal vimrc to reproduce the issue.

@narutaro
Copy link
Author

narutaro commented Mar 4, 2022

I created the ~/vimrc.min

if exists('+compatible') && &compatible
  set nocompatible
endif

" Disable Vim's native pack feature
set packpath=

" Clone https://github.com/lambdalisue/fern.vim in somewhere
" and specify that directory to the below
" set runtimepath^=~/ghq/github.com/lambdalisue/fern.vim
set runtimepath^=~/min/fern.vim

filetype plugin indent on
syntax on
"----------------------------------------------------------------

" Add extra settings here to reproduce the issue...

"----------------------------------------------------------------
echomsg "Custom minimal vimrc has loaded"

then

% vim -N -u ~/vimrc.min

Now, :Fern . gets:

 me^_                                                                                                                                                                            
  |+ Applications/^_
  |+ Desktop/^_
  |+ Documents/^_
  |+ Downloads/^_
  |+ Library/^_
  |+ Movies/^_
  |+ Music/^_
  |+ Pictures/^_
  |+ Public/^_
  |+ min/^_
  |  vimrc.min^_

@ydzhou
Copy link
Contributor

ydzhou commented Mar 20, 2022

I can also reproduce for Vim 8.2 used in mac Terminal app
截屏2022-03-20 上午3 32 54

@ydzhou
Copy link
Contributor

ydzhou commented Mar 20, 2022

This line and the same line in nerdfont plugin are causing above issue
https://github.com/lambdalisue/fern.vim/blob/63b79ab7440095a1adc1c10f2bfdba4ceb46080a/autoload/fern/renderer/default.vim#L88

After deleting the ^_ in suffix . '^_' . a:node.badge, it works. Are you trying to type a space before a.node.badge but somehow it is a special space?

@lambdalisue
Copy link
Owner

I found that Vim on macOS didn't built with conceal and that cause this issue. Does Vim built with conceal feature?

@lambdalisue lambdalisue added the could not reproduce The issue is not reproducable label Mar 21, 2022
@ydzhou
Copy link
Contributor

ydzhou commented Mar 21, 2022

I found that Vim on macOS didn't built with conceal and that cause this issue. Does Vim built with conceal feature?

You are correct. After I rebuilt with conceal, it works.

@narutaro
Copy link
Author

narutaro commented Apr 1, 2022

It works for me too. Thank you @lambdalisue and @ydzhou!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
could not reproduce The issue is not reproducable
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants