install.fairie/dotfiles/.vim/plugged/vim-devicons/doc/webdevicons.txt

1079 lines
39 KiB
Text
Raw Normal View History

*devicons*
===============================================================================
Contents ~
1. Introduction |devicons-introduction|
2. Features |devicons-features|
3. Installation |devicons-installation|
4. Developers |devicons-developers|
5. Troubleshooting |devicons-troubleshooting|
6. Contributing |devicons-contributing|
1. Code of Conduct [22] |devicons-code-of-conduct-22|
2. Contributing Guide [23] |devicons-contributing-guide-23|
3. Promotion |devicons-promotion|
7. Acknowledgments |devicons-acknowledgments|
8. License |devicons-license|
9. Detailed Installation |devicons-detailed-installation|
1. Step 1 'Nerd Font' |Nerd-Font|
2. Step 2 'VimDevIcons Plugin' |VimDevIcons-Plugin|
1. Pathogen [38] |devicons-pathogen-38|
2. NeoBundle [39] |devicons-neobundle-39|
3. Vundle [40] |devicons-vundle-40|
4. Manual |devicons-manual|
3. Step 3 'Configure Vim' |Configure-Vim|
1. Set Encoding |devicons-set-encoding|
2. Set Font |devicons-set-font|
3. vim-airline |devicons-vim-airline|
4. vimrc examples |devicons-vimrc-examples|
4. That's it! You're done. |devicons-thats-it-youre-done.|
10. Usage |devicons-usage|
1. NERDTree |devicons-nerdtree|
2. Unite |devicons-unite|
3. Denite |devicons-denite|
4. Vimfiler |devicons-vimfiler|
5. CtrlP |devicons-ctrlp|
6. Airline |devicons-airline|
7. Startify |devicons-startify|
8. Lightline Setup |devicons-lightline-setup|
9. Powerline Setup |devicons-powerline-setup|
10. Flagship |devicons-flagship|
11. Detailed Features |devicons-detailed-features|
12. Extra Configuration |devicons-extra-configuration|
1. Character Mappings |devicons-character-mappings|
2. API |devicons-api|
1. Public Methods |devicons-public-methods|
2. API Examples |devicons-api-examples|
1. Status line |devicons-status-line|
2. Simple function call |devicons-simple-function-call|
3. Integration with other plugins |devicons-integration-with-other-plugins|
1. vim-startify |devicons-vim-startify|
13. FAQ |devicons-faq|
1. Why isn't it working? How come I don't see any icons? |devicons-why-isnt-it-working-how-come-i-dont-see-any-icons|
2. How did you get color matching based on file type in NERDtree? |devicons-how-did-you-get-color-matching-based-on-file-type-in-nerdtree|
3. How did you get color matching on just the glyph/icon in NERDtree? |devicons-how-did-you-get-color-matching-on-just-glyph-icon-in-nerdtree|
4. How do I solve issues after re-sourcing my |vimrc|?
5. Why do I have artifacts after (or instead) of icons? |devicons-why-do-i-have-artifacts-after-of-icons|
6. Square brackets around icons |devicons-square-brackets-around-icons|
1. from terminal |devicons-from-terminal|
7. Do I have to use a patched font such as Nerd Fonts? |devicons-do-i-have-to-use-patched-font-such-as-nerd-fonts|
8. Rationale: Why does this exist? How did this start? |devicons-rationale-why-does-this-exist-how-did-this-start|
14. References |devicons-references|
===============================================================================
*devicons-introduction*
Introduction ~
>
_ ___ ____ ____
| | / (_____ ___ / __ \___ _ __/ _/________ ____ _____
| | / / / __ `__ \/ / / / _ | | / // // ___/ __ \/ __ \/ ___/
| |/ / / / / / / / /_/ / __| |/ _/ // /__/ /_/ / / / (__ )
|___/_/_/ /_/ /_/_____/\___/|___/___/\___/\____/_/ /_/____/
<
**VimDevIcons**
Adds Icons to Your Plugins
Supports plugins such as NERDTree [1], vim-airline [2], CtrlP [3], powerline
[4], denite [5], unite [6], lightline.vim [7], vim-startify [8], vimfiler [9],
vim-workspace [10] and flagship [11].
See Screenshots [12] for more.
===============================================================================
*devicons-features*
Features ~
- Adds filetype glyphs (icons) to various vim plugins.
- Supports byte order marker (BOM).
- Customizable and extendable glyphs settings.
- Supports a wide range of file type extensions.
- Supports popular full filenames, like '.gitignore', 'node_modules',
'.vimrc'.
- Works with patched fonts, especially Nerd Fonts [13].
See Detailed Features [14] for more.
See Configuration [15] for a list of configuration and customization options.
===============================================================================
*devicons-installation*
Installation ~
1. Install a Nerd Font compatible font [16] or patch your own [17]. Then set
your terminal font (or 'guifont' if you are using GUI version of Vim).
2. Install the Vim plugin with your favorite plugin manager, e.g. vim-plug
[18]:
"vim Plug 'ryanoasis/vim-devicons'"
Always load the vim-devicons as the very last one.
3. Configure Vim
'vim set encoding=UTF-8'
No need to set explicitly under Neovim: always uses UTF-8 as the default
encoding.
See Installation [19] for detailed setup instructions
Use ':help devicons' for further configuration.
===============================================================================
*devicons-developers*
Developers ~
See DEVELOPER [20] for how to use the API.
===============================================================================
*devicons-troubleshooting*
Troubleshooting ~
See FAQ [21].
===============================================================================
*devicons-contributing*
Contributing ~
-------------------------------------------------------------------------------
*devicons-code-of-conduct-22*
Code of Conduct [22] ~
This project has adopted a Code of Conduct that we expect project participants
to adhere to. Check out code of conduct [22] for further details.
-------------------------------------------------------------------------------
*devicons-contributing-guide-23*
Contributing Guide [23] ~
Read our contributing [23] guide to learn about how to send pull requests,
creating issues properly.
-------------------------------------------------------------------------------
*devicons-promotion*
Promotion ~
You can help us by simply giving a star or voting on vim.org. It will ensure
continued development going forward.
- Star this repository on GitHub [24].
- Vote for it on vim.org [25].
===============================================================================
*devicons-acknowledgments*
Acknowledgments ~
Thanks goes to these people for inspiration and helping with sending PRs.
- vim-airline [2]
- nerdtree [1]
- nerdtree-git-plugin [26] by @Xuyuanp [27]
- seti-ui [28] by @jesseweed [29]
- devicons [30] by @vorillaz [31]
- development.svg.icons [32] by @benatespina [33]
- Learn Vimscript the Hard Way [34] book by Steve Losh [35]
- All contributors [36]
===============================================================================
*devicons-license*
License ~
MIT [37]
===============================================================================
*devicons-detailed-installation*
Detailed Installation ~
-------------------------------------------------------------------------------
*Nerd-Font*
Step 1 'Nerd Font' ~
Get a **Nerd Font!** [16] or patch your own. [17] Without this, things break
-------------------------------------------------------------------------------
*VimDevIcons-Plugin*
Step 2 'VimDevIcons Plugin' ~
**Set VimDevIcons to load _after_ these plugins!**
NERDTree [1] | vim-airline [2] | CtrlP [3] | powerline [4] | Denite [5] | unite
[6] | lightline.vim [7] | vim-startify [8] | vimfiler [9] | flagship [11]
Choose your favorite plugin manager
-------------------------------------------------------------------------------
*devicons-pathogen-38*
Pathogen [38] ~
- 'git clone https://github.com/ryanoasis/vim-devicons ~/.vim/bundle/vim-
devicons'
-------------------------------------------------------------------------------
*devicons-neobundle-39*
NeoBundle [39] ~
- Add to vimrc:
"vim NeoBundle 'ryanoasis/vim-devicons'" * And install it:
'vim :so ~/.vimrc :NeoBundleInstall'
-------------------------------------------------------------------------------
*devicons-vundle-40*
Vundle [40] ~
- Add to vimrc:
"vim Plugin 'ryanoasis/vim-devicons'" * And install it:
'vim :so ~/.vimrc :PlugInstall'
-------------------------------------------------------------------------------
*devicons-manual*
Manual ~
- copy all of the files into your '~/.vim' directory
-------------------------------------------------------------------------------
*Configure-Vim*
Step 3 'Configure Vim' ~
Add the following in your '.vimrc' or '.gvimrc':
-------------------------------------------------------------------------------
*devicons-set-encoding*
Set Encoding ~
**Set encoding to UTF-8 to show glyphs**
'vim set encoding=utf8'
-------------------------------------------------------------------------------
*devicons-set-font*
Set Font ~
**Set Vim font to a Nerd Font**
Linux 'vim set guifont='
>
set guifont=DroidSansMono\ Nerd\ Font\ 11
<
macOS (OS X) and Windows
>
set guifont=:h
<
>
set guifont=DroidSansMono\ Nerd\ Font:h11
" or:
set guifont=DroidSansMono_Nerd_Font:h11
<
**Note:** if you don't set 'guifont' then you'll have to set your terminal's
font, else things break!
-------------------------------------------------------------------------------
*devicons-vim-airline*
vim-airline ~
**If you use vim-airline you need this:**
'vim let g:airline_powerline_fonts = 1'
-------------------------------------------------------------------------------
*devicons-vimrc-examples*
vimrc examples ~
- Sample Windows vimrc configuration 1 [41]
- Sample Linux vimrc configuration 1 [42]
-------------------------------------------------------------------------------
*devicons-thats-it-youre-done.*
That's it! You're done. ~
===============================================================================
*devicons-usage*
Usage ~
If you installed and setup things correctly you should now see icons in the
supported plugins!
**Notes on include order:** _for support of these plugins: NERDTree [1], vim-
airline [2], CtrlP [3], powerline [4], Denite [5], unite [6], vimfiler [9],
flagship [11] you **must** configure vim to load those plugins__before_ vim-
devicons loads. for better nerdtree-git-plugin [26] support, you _should_
configure vim to load nerdtree-git-plugin **_before_** VimDevIcons loads. * if
you are lazy loading Denite [5] using the Dein plugin manager, you will need to
source VimDevIcons before Denite loads.
Lightline Setup and Powerline Setup require some extra setup as shown below:
-------------------------------------------------------------------------------
*devicons-nerdtree*
NERDTree ~
Should work "out of the box", no particular configuration should be needed.
>
" Can be enabled or disabled
let g:webdevicons_enable_nerdtree = 1
<
>
" whether or not to show the nerdtree brackets around flags
let g:webdevicons_conceal_nerdtree_brackets = 1
<
-------------------------------------------------------------------------------
*devicons-unite*
Unite ~
Should work "out of the box", no particular configuration should be needed.
>
" Can be enabled or disabled
" adding the custom source to unite
let g:webdevicons_enable_unite = 1
<
-------------------------------------------------------------------------------
*devicons-denite*
Denite ~
Should work "out of the box", no particular configuration should be needed.
>
" Can be enabled or disabled
" Adding the custom source to denite
let g:webdevicons_enable_denite = 1
<
-------------------------------------------------------------------------------
*devicons-vimfiler*
Vimfiler ~
Should work "out of the box", no particular configuration should be needed.
>
" Can be enabled or disabled
" adding the column to vimfiler
let g:webdevicons_enable_vimfiler = 1
<
-------------------------------------------------------------------------------
*devicons-ctrlp*
CtrlP ~
Should work "out of the box", no particular configuration should be needed.
>
" Can be enabled or disabled
" add glyphs to all modes
let g:webdevicons_enable_ctrlp = 1
<
-------------------------------------------------------------------------------
*devicons-airline*
Airline ~
Should work "out of the box", no particular configuration should be needed.
>
" adding to vim-airline's tabline
let g:webdevicons_enable_airline_tabline = 1
<
>
" adding to vim-airline's statusline
let g:webdevicons_enable_airline_statusline = 1
<
-------------------------------------------------------------------------------
*devicons-startify*
Startify ~
Should work "out of the box", no particular configuration should be needed.
>
" Can be enabled or disabled
" adding to vim-startify screen
let g:webdevicons_enable_startify = 1
<
-------------------------------------------------------------------------------
*devicons-lightline-setup*
Lightline Setup ~
To add the appropriate icon to lightline [7], call the function
'WebDevIconsGetFileTypeSymbol()' and/or 'WebDevIconsGetFileFormatSymbol()' in
your '.vimrc'. For example, you could set your sections to:
>
let g:lightline = {
\ 'component_function': {
\ 'filetype': 'MyFiletype',
\ 'fileformat': 'MyFileformat',
\ }
\ }
function! MyFiletype()
return winwidth(0) > 70 ? (strlen(&filetype) ? &filetype . ' ' . WebDevIconsGetFileTypeSymbol() : 'no ft') : ''
endfunction
function! MyFileformat()
return winwidth(0) > 70 ? (&fileformat . ' ' . WebDevIconsGetFileFormatSymbol()) : ''
endfunction
<
-------------------------------------------------------------------------------
*devicons-powerline-setup*
Powerline Setup ~
- _Note this is for the current Powerline [4] not the deprecated vim-
powerline [43]_
To enable for Powerline [4] some |vimrc| and powerline configuration changes
are needed:
|vimrc| changes (only required if you don't already have powerline setup for
vim):
>
set rtp+=$HOME/.local/lib/python2.7/site-packages/powerline/bindings/vim/
" Always show statusline
set laststatus=2
" Use 256 colours (Use this setting only if your terminal supports 256 colours)
set t_Co=256
<
powerline configuration changes:
file type segment
>
{
"function": "vim_devicons.powerline.segments.webdevicons",
"priority": 10,
"draw_soft_divider": false,
"after": " "
}
<
file format segment
>
{
"function": "vim_devicons.powerline.segments.webdevicons_file_format",
"draw_soft_divider": false,
"exclude_modes": ["nc"],
"priority": 90
}
<
for full example see sample file [44]
-------------------------------------------------------------------------------
*devicons-flagship*
Flagship ~
Should work "out of the box", no particular configuration should be needed.
>
" Can be enabled or disabled
" adding to flagship's statusline
let g:webdevicons_enable_flagship_statusline = 1
<
===============================================================================
*devicons-detailed-features*
Detailed Features ~
- Adds filetype glyphs (icons) to various vim plugins, currently supports:
- NERDTree [1]
- Using the version hosted on vimscripts [45] in favor of GitHub will
lead to a outdated message, and icons will fail to show.
- vim-airline [2] (statusline and tabline)
- CtrlP [3] (All modes now supported)
- Using the version hosted on vimscripts [46] in favor of GitHub will
lead to a outdated message, and icons will fail to show.
- powerline [4] (statusline)
- see: powerline setup
- Denite [5]
- Currently supports 'file_rec', 'file_old', 'buffer', and
'directory_rec'
- unite [6]
- Currently supports 'file', 'file_rec', 'buffer', 'file_rec/async', and
'file_rec/neovim'
- lightline.vim [7] (statusline)
- see: lightline setup
- vim-startify [8]
- vimfiler [9]
- flagship [11]
- Support is **experimental** because the API may be changing [47]
- vim-workspace [10]
- Supports byte order marker (BOM)
- Customizable and extendable glyphs (icons) settings
- ability to override defaults and use your own characters or glyphs
- Supports a wide range of file type extensions by default:
- 'styl, sass, scss, htm, html, slim, ejs, css, less, md, rmd, json, js, jsx,
rb, php, py, pyc, pyd, pyo, coffee, mustache, hbs, conf, ini, yml, yaml,
bat, jpg, jpeg, bmp, png, gif, twig, cpp, c++, cxx, cc, cp, c, h, hpp, hxx,
hs, lhs, lua, java, sh, bash, zsh, ksh, csh, awk, ps1, fish, diff, db, clj,
cljs, edn, scala, go, dart, xul, sln, suo, pl, pm, t, rss, f#, fsscript,
fsx, fs, fsi, rs, rlib, d, erl, hrl, vim, ai, psd, psb, ts, jl, pp, vue,
swift, eex, ex, exs'
- Supports a few full filename matches, by default:
- 'gruntfile.coffee, gruntfile.js, gruntfile.ls, gulpfile.coffee,
gulpfile.js, gulpfile.ls, dropbox, .ds_store, .gitconfig, .gitignore,
.bashrc, .zshrc, .vimrc, .bashprofile, favicon.ico, license, node_modules,
react.jsx, procfile'
- Supports a few library pattern matches, by default:
- 'jquery, angular, backbone, requirejs, materialize, mootools, Vagrantfile'
- Works with patched fonts, especially Nerd Fonts [13]
===============================================================================
*devicons-extra-configuration*
Extra Configuration ~
- These options can be defined in your |vimrc| or 'gvimrc'
- Most options are enabled **'1'** by default but can be disabled with
**'0'**
- You _should_**not** need to configure anything, however, the following
options are provided for customizing or changing the defaults:
>
" loading the plugin
let g:webdevicons_enable = 1
<
>
" adding the flags to NERDTree
let g:webdevicons_enable_nerdtree = 1
<
>
" adding the custom source to unite
let g:webdevicons_enable_unite = 1
<
>
" adding the column to vimfiler
let g:webdevicons_enable_vimfiler = 1
<
>
" adding to vim-airline's tabline
let g:webdevicons_enable_airline_tabline = 1
<
>
" adding to vim-airline's statusline
let g:webdevicons_enable_airline_statusline = 1
<
>
" ctrlp glyphs
let g:webdevicons_enable_ctrlp = 1
<
>
" adding to vim-startify screen
let g:webdevicons_enable_startify = 1
<
>
" adding to flagship's statusline
let g:webdevicons_enable_flagship_statusline = 1
<
>
" turn on/off file node glyph decorations (not particularly useful)
let g:WebDevIconsUnicodeDecorateFileNodes = 1
<
>
" use double-width(1) or single-width(0) glyphs
" only manipulates padding, has no effect on terminal or set(guifont) font
let g:WebDevIconsUnicodeGlyphDoubleWidth = 1
<
>
" whether or not to show the nerdtree brackets around flags
let g:webdevicons_conceal_nerdtree_brackets = 1
<
>
" the amount of space to use after the glyph character (default ' ')
let g:WebDevIconsNerdTreeAfterGlyphPadding = ' '
<
>
" Force extra padding in NERDTree so that the filetype icons line up vertically
let g:WebDevIconsNerdTreeGitPluginForceVAlign = 1
<
>
" Adding the custom source to denite
let g:webdevicons_enable_denite = 1
" the amount of space to use after the glyph character in vim-airline
tabline(default '')
let g:WebDevIconsTabAirLineAfterGlyphPadding = ' '
" the amount of space to use before the glyph character in vim-airline
tabline(default ' ')
let g:WebDevIconsTabAirLineBeforeGlyphPadding = ' '
<
-------------------------------------------------------------------------------
*devicons-character-mappings*
Character Mappings ~
- 'ƛ' is used as an example below, substitute for the glyph you **actually**
want to use
>
" change the default character when no match found
let g:WebDevIconsUnicodeDecorateFileNodesDefaultSymbol = 'ƛ'
<
>
" set a byte character marker (BOM) utf-8 symbol when retrieving file encoding
" disabled by default with no value
let g:WebDevIconsUnicodeByteOrderMarkerDefaultSymbol = ''
<
>
" enable folder/directory glyph flag (disabled by default with 0)
let g:WebDevIconsUnicodeDecorateFolderNodes = 1
<
>
" enable open and close folder/directory glyph flags (disabled by default with 0)
let g:DevIconsEnableFoldersOpenClose = 1
<
>
" enable pattern matching glyphs on folder/directory (enabled by default with 1)
let g:DevIconsEnableFolderPatternMatching = 1
<
>
" enable file extension pattern matching glyphs on folder/directory (disabled by default with 0)
let g:DevIconsEnableFolderExtensionPatternMatching = 0
<
>
" disable showing the distribution for unix file encoding (enabled by default with 1)
let g:DevIconsEnableDistro = 0
<
>
" enable custom folder/directory glyph exact matching
" (enabled by default when g:WebDevIconsUnicodeDecorateFolderNodes is set to 1)
let WebDevIconsUnicodeDecorateFolderNodesExactMatches = 1
<
>
" change the default folder/directory glyph/icon
let g:WebDevIconsUnicodeDecorateFolderNodesDefaultSymbol = 'ƛ'
<
>
" change the default open folder/directory glyph/icon (default is '')
let g:DevIconsDefaultFolderOpenSymbol = 'ƛ'
<
>
" change the default dictionary mappings for file extension matches
let g:WebDevIconsUnicodeDecorateFileNodesExtensionSymbols = {} " needed
let g:WebDevIconsUnicodeDecorateFileNodesExtensionSymbols['js'] = 'ƛ'
<
>
" change the default dictionary mappings for exact file node matches
let g:WebDevIconsUnicodeDecorateFileNodesExactSymbols = {} " needed
let g:WebDevIconsUnicodeDecorateFileNodesExactSymbols['MyReallyCoolFile.okay'] = 'ƛ'
<
>
" add or override individual additional filetypes
let g:WebDevIconsUnicodeDecorateFileNodesExtensionSymbols = {} " needed
let g:WebDevIconsUnicodeDecorateFileNodesExtensionSymbols['myext'] = 'ƛ'
<
>
" add or override pattern matches for filetypes
" these take precedence over the file extensions
let g:WebDevIconsUnicodeDecorateFileNodesPatternSymbols = {} " needed
let g:WebDevIconsUnicodeDecorateFileNodesPatternSymbols['.*jquery.*\.js$'] = 'ƛ'
<
specify OS to decide an icon for unix fileformat (_not_ defined by default) -
this is useful for avoiding unnecessary 'system()' call. see #135 [48] for
further details.
>
let g:WebDevIconsOS = 'Darwin'
<
-------------------------------------------------------------------------------
*devicons-api*
API ~
>
" returns the font character that represents the icon
" parameters: a:1 (filename), a:2 (isDirectory)
" both parameters optional
" by default without parameters uses buffer name
WebDevIconsGetFileTypeSymbol(...)
" returns the font character that represents
" the file format as an icon (windows, linux, mac)
WebDevIconsGetFileFormatSymbol()
<
-------------------------------------------------------------------------------
*devicons-public-methods*
Public Methods ~
>
" Returns the current version of the plugin
webdevicons#version()
<
>
" Calls webdevicons#softRefresh()
" basically a backwards compatibility convenience
webdevicons#refresh()
<
>
" Does a 'hard' refresh of NERDTree
" resets vim-devicons syntax and closes and reopens NERDTree
webdevicons#hardRefresh()
<
>
" Does a 'soft' refresh of NERDTree
" resets vim-devicons syntax and toggles NERDTree to the same state
webdevicons#softRefresh()
<
-------------------------------------------------------------------------------
*devicons-api-examples*
API Examples ~
-------------------------------------------------------------------------------
*devicons-status-line*
Status line ~
Custom vim status line (not relying on vim-airline or lightline):
>
set statusline=%f\ %{WebDevIconsGetFileTypeSymbol()}\ %h%w%m%r\ %=%(%l,%c%V\ %Y\ %=\ %P%)
<
-------------------------------------------------------------------------------
*devicons-simple-function-call*
Simple function call ~
>
echo WebDevIconsGetFileFormatSymbol()
<
-------------------------------------------------------------------------------
*devicons-integration-with-other-plugins*
Integration with other plugins ~
-------------------------------------------------------------------------------
*devicons-vim-startify*
vim-startify ~
>
let entry_format = "' ['. index .']'. repeat(' ', (3 - strlen(index)))"
if exists('*WebDevIconsGetFileTypeSymbol') " support for vim-devicons
let entry_format .= ". WebDevIconsGetFileTypeSymbol(entry_path) .' '. entry_path"
else
let entry_format .= '. entry_path'
endif
<
===============================================================================
*devicons-faq*
FAQ ~
**Table of Contents:**
**It's not working at all:**
- **Why isn't it working? How come I don't see any icons?**
**Syntax or color highlighting:**
- **How did you get color matching based on file type in NERDtree?**
- **How did you get color matching on just the glyph/icon in NERDtree?**
**Re-sourcing |vimrc|:**
- **How do I solve issues after re-sourcing my |vimrc|?**
**Weird artifacts after/on the glyphs:**
- **Why do I have artifacts after (or instead) of icons?**
- **Square brackets around icons?**
**Fonts:**
- **Do I have to use a patched font such as Nerd Fonts?**
**Why does this exist? How did this start?**
-------------------------------------------------------------------------------
*devicons-why-isnt-it-working-how-come-i-dont-see-any-icons*
Why isn't it working? How come I don't see any icons? ~
- Are you using the patched font provided in the separate repo (Nerd Fonts
[13]) or are you patching your own?
- _NOTE:_ if running vim and no font set it will default to the terminal font
that is set
- check what the vim/gvim font is set to, from ex mode:
'vim :set guifont?'
- check if the plugin is loaded (should give '1'), from ex mode:
'vim :echo loaded_webdevicons'
- check if the plugin is enabled (should give '1'), from ex mode:
'vim :echo g:webdevicons_enable'
- check if the plugin is enabled for NERDTree (should give '1'), from ex
mode:
- this should _NOT_ need to be set under normal circumstances
'vim :echo g:webdevicons_enable_nerdtree'
- check if you are able to see the characters, from ex mode:
'vim :echo g:WebDevIconsUnicodeDecorateFileNodesDefaultSymbol'
- if all this looks correct you may try this to see if any files show flags
- last resort, see if you can even set the default symbol and have it
display anywhere (NERDTree, vim-airline's statusline, vim-airlines's
tabline), from ex mode:
"vim :let g:WebDevIconsUnicodeDecorateFileNodesDefaultSymbol='x'"
-------------------------------------------------------------------------------
*devicons-how-did-you-get-color-matching-based-on-file-type-in-nerdtree*
How did you get color matching based on file type in NERDtree? ~
- You can either use this additional plugin: vim-nerdtree-syntax-highlight
[49] created by @tiagofumo [50]
- Or you can use my current settings from:
https://github.com/scrooloose/nerdtree/issues/201#issuecomment-9954740
```vim " NERDTress File highlighting function!
NERDTreeHighlightFile(extension, fg, bg, guifg, guibg) exec 'autocmd
FileType nerdtree highlight ' . a:extension .' ctermbg='. a:bg .'
ctermfg='. a:fg .' guibg='. a:guibg .' guifg='. a:guifg exec 'autocmd
FileType nerdtree syn match ' . a:extension .' #^\s+.*'. a:extension .'$#'
endfunction
call NERDTreeHighlightFile('jade', 'green', 'none', 'green', '#151515')
call NERDTreeHighlightFile('ini', 'yellow', 'none', 'yellow', '#151515')
call NERDTreeHighlightFile('md', 'blue', 'none', '#3366FF', '#151515') call
NERDTreeHighlightFile('yml', 'yellow', 'none', 'yellow', '#151515') call
NERDTreeHighlightFile('config', 'yellow', 'none', 'yellow', '#151515') call
NERDTreeHighlightFile('conf', 'yellow', 'none', 'yellow', '#151515') call
NERDTreeHighlightFile('json', 'yellow', 'none', 'yellow', '#151515') call
NERDTreeHighlightFile('html', 'yellow', 'none', 'yellow', '#151515') call
NERDTreeHighlightFile('styl', 'cyan', 'none', 'cyan', '#151515') call
NERDTreeHighlightFile('css', 'cyan', 'none', 'cyan', '#151515') call
NERDTreeHighlightFile('coffee', 'Red', 'none', 'red', '#151515') call
NERDTreeHighlightFile('js', 'Red', 'none', '#ffa500', '#151515') call
NERDTreeHighlightFile('php', 'Magenta', 'none', '#ff00ff', '#151515') call
NERDTreeHighlightFile('ds_store', 'Gray', 'none', '#686868', '#151515')
call NERDTreeHighlightFile('gitconfig', 'Gray', 'none', '#686868',
'#151515') call NERDTreeHighlightFile('gitignore', 'Gray', 'none',
'#686868', '#151515') call NERDTreeHighlightFile('bashrc', 'Gray', 'none',
'#686868', '#151515') call NERDTreeHighlightFile('bashprofile', 'Gray',
'none', '#686868', '#151515') 'Note: If the colors still are not
highlighting, try invoking such as:' autocmd VimEnter * call
NERDTreeHighlightFile('jade', 'green', 'none', 'green', '#151515') ``` per:
https://github.com/ryanoasis/vim-devicons/issues/49#issuecomment-101753558
-------------------------------------------------------------------------------
*devicons-how-did-you-get-color-matching-on-just-glyph-icon-in-nerdtree*
How did you get color matching on just the glyph/icon in NERDtree? ~
- You can add something like this to your |vimrc|
```vim " NERDTress File highlighting only the glyph/icon " test highlight
just the glyph (icons) in nerdtree: autocmd filetype nerdtree highlight
haskell_icon ctermbg=none ctermfg=Red guifg=#ffa500 autocmd filetype
nerdtree highlight html_icon ctermbg=none ctermfg=Red guifg=#ffa500 autocmd
filetype nerdtree highlight go_icon ctermbg=none ctermfg=Red guifg=#ffa500
autocmd filetype nerdtree syn match haskell_icon ##
containedin=NERDTreeFile " if you are using another syn highlight for a
given line (e.g. " NERDTreeHighlightFile) need to give that name in the
'containedin' for this " other highlight to work with it autocmd filetype
nerdtree syn match html_icon ## containedin=NERDTreeFile,html autocmd
filetype nerdtree syn match go_icon ## containedin=NERDTreeFile ```
-------------------------------------------------------------------------------
How do I solve issues after re-sourcing my *vimrc*?
- Try adding this to the bottom of your |vimrc|
'vim if exists("g:loaded_webdevicons") call webdevicons#refresh() endif'
-------------------------------------------------------------------------------
*devicons-why-do-i-have-artifacts-after-of-icons*
Why do I have artifacts after (or instead) of icons? ~
- Dots after icons in NERDTree (on GVim), try:
'vim autocmd FileType nerdtree setlocal nolist'
source: Issue #110 [51]
- Newly created files in NERDTree are slow to show the glyph (icon)
- check your current setting of ':updatetime?'
- try setting 'updatetime' in your |vimrc| to a lower value like '250', for
more info see: Issue #153 [52]
-------------------------------------------------------------------------------
*devicons-square-brackets-around-icons*
Square brackets around icons ~
- By default if your Vim supports conceal you should not see these, debug
steps:
- Check if the plugin feature is set (should be '1'):
'vim echo g:webdevicons_conceal_nerdtree_brackets'
- Check that your vim was compiled with the 'conceal' feature (should be
'+conceal'):
```shell
-------------------------------------------------------------------------------
*devicons-from-terminal*
from terminal ~
vim --version | grep conceal ```
- Check the 'conceallevel' (should be '3'):
'vim set conceallevel?'
-------------------------------------------------------------------------------
*devicons-do-i-have-to-use-patched-font-such-as-nerd-fonts*
Do I have to use a patched font such as Nerd Fonts? ~
VimDevIcons was desired to work with Nerd Fonts [13], however you do _not_ have
to use a patched font or even Nerd Fonts specified glyphs. You have 2 main
options:
fontconfig fallback
1. Install the NERD Font symbol fonts:
2. Symbols Nerd Font:style=1000-em [53]
3. Symbols Nerd Font:style=2048-em [54]
4. Install 10-nerd-font-symbols.conf [55] for Fontconfig
5. for additional information see: Issue #124 [56] and [Nerd Fonts
'fontconfig']
Use your own glyph codepoints
- specify your own glyphs and/or use your own font (see: Character Mappings
[57])
-------------------------------------------------------------------------------
*devicons-rationale-why-does-this-exist-how-did-this-start*
Rationale: Why does this exist? How did this start? ~
After seeing the awesome theme for Atom (seti-ui) and the awesome plugins work
done for NERDTree and vim-airline and wanting something like this for Vim I
decided to create my first plugin.
===============================================================================
*devicons-references*
References ~
[1] https://github.com/scrooloose/nerdtree
[2] https://github.com/vim-airline/vim-airline
[3] https://github.com/ctrlpvim/ctrlp.vim
[4] https://github.com/powerline/powerline
[5] https://github.com/Shougo/denite.nvim
[6] https://github.com/Shougo/unite.vim
[7] https://github.com/itchyny/lightline.vim
[8] https://github.com/mhinz/vim-startify
[9] https://github.com/Shougo/vimfiler.vim
[10] https://github.com/bagrat/vim-workspace
[11] https://github.com/tpope/vim-flagship
[12] https://github.com/ryanoasis/vim-devicons/wiki/screenshots
[13] https://github.com/ryanoasis/nerd-fonts
[14] https://github.com/ryanoasis/vim-devicons/wiki/Detailed-Features
[15] https://github.com/ryanoasis/vim-devicons/wiki/Extra-Configuration
[16] https://github.com/ryanoasis/nerd-fonts#font-installation
[17] https://github.com/ryanoasis/nerd-fonts#font-patcher
[18] https://github.com/junegunn/vim-plug
[19] https://github.com/ryanoasis/vim-devicons/wiki/Installation
[20] DEVELOPER.md
[21] https://github.com/ryanoasis/vim-devicons/wiki/FAQ-&-Troubleshooting
[22] CODE_OF_CONDUCT.md
[23] CONTRIBUTING.md
[24] https://github.com/ryanoasis/vim-devicons
[25] http://www.vim.org/scripts/script.php?script_id=5114
[26] https://github.com/Xuyuanp/nerdtree-git-plugin
[27] https://github.com/Xuyuanp
[28] https://atom.io/themes/seti-ui
[29] https://github.com/jesseweed
[30] http://vorillaz.github.io/devicons
[31] https://github.com/vorillaz
[32] https://github.com/benatespina/development.svg.icons
[33] https://github.com/benatespina
[34] http://learnvimscriptthehardway.stevelosh.com/
[35] http://stevelosh.com/
[36] https://github.com/ryanoasis/vim-devicons/graphs/contributors
[37] LICENSE
[38] https://github.com/tpope/vim-pathogen
[39] https://github.com/Shougo/neobundle.vim
[40] https://github.com/gmarik/vundle
[41] https://github.com/ryanoasis/vim-devicons/wiki/samples/v0.10.x/.vimrc-windows-1
[42] https://github.com/ryanoasis/vim-devicons/wiki/samples/v0.10.x/.vimrc-linux-1
[43] https://github.com/Lokaltog/vim-powerline
[44] https://github.com/ryanoasis/vim-devicons/wiki/samples/v0.10.x/powerline/themes/vim/default.json
[45] http://www.vim.org/scripts/script.php?script_id=1658
[46] http://www.vim.org/scripts/script.php?script_id=3736
[47] https://github.com/tpope/vim-flagship/issues/6#issuecomment-116121220
[48] https://github.com/ryanoasis/vim-devicons/pull/135
[49] https://github.com/tiagofumo/vim-nerdtree-syntax-highlight
[50] https://github.com/tiagofumo
[51] https://github.com/ryanoasis/vim-devicons/issues/110#issue-103801335
[52] https://github.com/ryanoasis/vim-devicons/issues/153
[53] https://github.com/ryanoasis/nerd-fonts/blob/master/src/glyphs/Symbols-1000-em%20Nerd%20Font%20Complete.ttf
[54] https://github.com/ryanoasis/nerd-fonts/blob/master/src/glyphs/Symbols-2048-em%20Nerd%20Font%20Complete.ttf
[55] https://github.com/ryanoasis/nerd-fonts/blob/master/10-nerd-font-symbols.conf
[56] https://github.com/ryanoasis/vim-devicons/issues/124
[57] https://github.com/ryanoasis/vim-devicons#character-mappings
vim: ft=help