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

missing config info for pattern based symbols in readme #152

Closed
7 tasks done
adelarsq opened this issue May 7, 2016 · 3 comments
Closed
7 tasks done

missing config info for pattern based symbols in readme #152

adelarsq opened this issue May 7, 2016 · 3 comments

Comments

@adelarsq
Copy link
Collaborator

adelarsq commented May 7, 2016

For some reason the config:

let g:WebDevIconsUnicodeDecorateFileNodesExtensionSymbols['js'] = 'a'

Don't work for files with name like jquery-1.7.1.js, jquery-1.7.1.min.js, jquery.min.js or jquery.js, but works for jquery.js:

screenshot

Configs:

let g:webdevicons_enable = 1
let g:webdevicons_enable_nerdtree = 1
let g:WebDevIconsNerdTreeAfterGlyphPadding = ' '
if !has("gui_running")
    if has("win32")
        let g:webdevicons_enable = 0
    endif
endif
if g:sysop == "mac"
    vim let g:WebDevIconsOS = 'Darwin'
endif
silent! if emoji#available()
    let g:webdevicons_conceal_nerdtree_brackets = 1
    let g:WebDevIconsUnicodeGlyphDoubleWidth = 1
    let g:WebDevIconsUnicodeDecorateFolderNodes = 1
    let g:DevIconsEnableFoldersOpenClose = 1
    let g:WebDevIconsUnicodeDecorateFileNodesExtensionSymbols = {}
    let g:WebDevIconsUnicodeDecorateFileNodesExtensionSymbols['js'] = 'a'
endif

Requirements

  • I have searched the issues for my issue and found nothing related and/or helpful
  • I have read or at least glanced at the FAQ
  • I have read or at least glanced at the Wiki
  • What version of vim are you using?
    MacVim 7.4 patch 1816
  • What version of vim-devicons are you using?
    0.8.2
  • Are you using vim from the terminal or a GUI vim?
    GUI
  • Are you using Mac, Linux or Windows?
    Mac
@adelarsq
Copy link
Collaborator Author

adelarsq commented May 7, 2016

There is an undocumented config that did solve the problem:

let g:WebDevIconsUnicodeDecorateFileNodesPatternSymbols = {}
let g:WebDevIconsUnicodeDecorateFileNodesPatternSymbols['.*jquery.*\.js$'] = 'a'
let g:WebDevIconsUnicodeDecorateFileNodesPatternSymbols['.*angular.*\.js$'] = 'a'
let g:WebDevIconsUnicodeDecorateFileNodesPatternSymbols['.*backbone.*\.js$'] = 'a'  
let g:WebDevIconsUnicodeDecorateFileNodesPatternSymbols['.*require.*\.js$'] = 'a'   
let g:WebDevIconsUnicodeDecorateFileNodesPatternSymbols['.*materialize.*\.js$'] = 'a'
let g:WebDevIconsUnicodeDecorateFileNodesPatternSymbols['.*materialize.*\.css$'] = 'a'
let g:WebDevIconsUnicodeDecorateFileNodesPatternSymbols['.*mootools.*\.js$'] = 'a' 

With some time I will create a pull request for this.

@ryanoasis
Copy link
Owner

Thanks that makes sense. The configuration is mentioned on the readme but you are right in that it doesn't exactly show very well how to use it. 👍

@ryanoasis
Copy link
Owner

Just went through this again and yes the pattern matches take precedence over the file extensions (which is probably what we want) but you are right in that the readme is missing the information for the option.

@ryanoasis ryanoasis changed the title no symbols for files like jquery-1.7.1.min.js missing config info for WebDevIconsUnicodeDecorateFileNodesPatternSymbols in readme Jun 12, 2016
@ryanoasis ryanoasis changed the title missing config info for WebDevIconsUnicodeDecorateFileNodesPatternSymbols in readme missing config info for pattern based symbols in readme Jun 12, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants