* change font to Nerd Fonts
* add vim plugin vim-devicons * change iTerm2 configuration
This commit is contained in:
3
.gitmodules
vendored
3
.gitmodules
vendored
@@ -28,3 +28,6 @@
|
|||||||
[submodule ".tmux/plugins/tmux-urlview"]
|
[submodule ".tmux/plugins/tmux-urlview"]
|
||||||
path = .tmux/plugins/tmux-urlview
|
path = .tmux/plugins/tmux-urlview
|
||||||
url = https://github.com/tmux-plugins/tmux-urlview.git
|
url = https://github.com/tmux-plugins/tmux-urlview.git
|
||||||
|
[submodule ".vim/bundle/vim-devicons"]
|
||||||
|
path = .vim/bundle/vim-devicons
|
||||||
|
url = https://github.com/ryanoasis/vim-devicons.git
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
28
.vim/bundle/vim-devicons/.github/ISSUE_TEMPLATE.md
vendored
Normal file
28
.vim/bundle/vim-devicons/.github/ISSUE_TEMPLATE.md
vendored
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
#### Requirements
|
||||||
|
|
||||||
|
If you are **not** sure whether or not what you are reporting is actually an issue **or** you have a general question please message in the [Gitter Chat Room](https://gitter.im/ryanoasis/vim-devicons)
|
||||||
|
|
||||||
|
These items you must provide answers to. Make sure to add **all the information needed to understand the bug** so that someone can help. If the info is missing we'll add the 'Needs more information' label and _may_ choose to close the issue until there is enough information.
|
||||||
|
|
||||||
|
Please acknowledge that you understand by marking off the following list items below with an 'x'
|
||||||
|
|
||||||
|
|
||||||
|
_--- ✂ snip ✂ --- Delete this line and all of the ^above^ after reading and before submitting your issue please --- ✂ snip ✂ ---_
|
||||||
|
|
||||||
|
|
||||||
|
#### Required Info
|
||||||
|
|
||||||
|
- [ ] I have searched the [issues](https://github.com/ryanoasis/vim-devicons/issues) for my issue and found nothing related and/or helpful
|
||||||
|
- [ ] I have read or at least glanced at the [FAQ](https://github.com/ryanoasis/vim-devicons#faq--troubleshooting)
|
||||||
|
- [ ] I have read or at least glanced at the [Wiki](https://github.com/ryanoasis/vim-devicons/wiki)
|
||||||
|
|
||||||
|
- [ ] What **version** of vim are you using?
|
||||||
|
- hint: `vim --version`
|
||||||
|
- [ ] What **version** of vim-devicons are you using?
|
||||||
|
- hint: `:echo webdevicons#version()`
|
||||||
|
- [ ] Are you using vim from the terminal or a GUI vim?
|
||||||
|
- [ ] Are you using Mac, Linux or Windows?
|
||||||
|
|
||||||
|
#### Optional Info
|
||||||
|
|
||||||
|
- [ ] Provide **screenshots** where appropriate
|
||||||
15
.vim/bundle/vim-devicons/.github/PULL_REQUEST_TEMPLATE.md
vendored
Normal file
15
.vim/bundle/vim-devicons/.github/PULL_REQUEST_TEMPLATE.md
vendored
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
#### Requirements (please check off with 'x')
|
||||||
|
|
||||||
|
- [ ] I have read the [Contributing Guidelines](https://github.com/ryanoasis/vim-devicons/blob/master/contributing.md)
|
||||||
|
- [ ] I have read or at least glanced at the [FAQ](https://github.com/ryanoasis/vim-devicons#faq--troubleshooting)
|
||||||
|
- [ ] I have read or at least glanced at the [Wiki](https://github.com/ryanoasis/vim-devicons/wiki)
|
||||||
|
|
||||||
|
#### What does this Pull Request (PR) do?
|
||||||
|
|
||||||
|
#### How should this be manually tested?
|
||||||
|
|
||||||
|
#### Any background context you can provide?
|
||||||
|
|
||||||
|
#### What are the relevant tickets (if any)?
|
||||||
|
|
||||||
|
#### Screenshots (if appropriate or helpful)
|
||||||
22
.vim/bundle/vim-devicons/LICENSE
Normal file
22
.vim/bundle/vim-devicons/LICENSE
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
The MIT License (MIT)
|
||||||
|
|
||||||
|
Copyright (c) 2014 Ryan L McIntyre
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
|
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
" Version: 0.8.4
|
||||||
|
" Webpage: https://github.com/ryanoasis/vim-devicons
|
||||||
|
" Maintainer: Ryan McIntyre <ryanoasis@gmail.com>
|
||||||
|
" License: see LICENSE
|
||||||
|
|
||||||
|
function! airline#extensions#tabline#formatters#webdevicons#format(bufnr, buffers)
|
||||||
|
" Call original formatter.
|
||||||
|
let originalFormatter = airline#extensions#tabline#formatters#{g:_webdevicons_airline_orig_formatter}#format(a:bufnr, a:buffers)
|
||||||
|
return originalFormatter . ' ' . WebDevIconsGetFileTypeSymbol(bufname(a:bufnr)) . ' '
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" modeline syntax:
|
||||||
|
" vim: fdm=marker tabstop=2 softtabstop=2 shiftwidth=2 expandtab:
|
||||||
@@ -0,0 +1,80 @@
|
|||||||
|
"=============================================================================
|
||||||
|
" FILE: devicons.vim
|
||||||
|
" Version: 0.8.4
|
||||||
|
" Webpage: https://github.com/ryanoasis/vim-devicons
|
||||||
|
" Maintainer: Ryan McIntyre <ryanoasis@gmail.com>
|
||||||
|
" License: MIT license {{{
|
||||||
|
" Permission is hereby granted, free of charge, to any person obtaining
|
||||||
|
" a copy of this software and associated documentation files (the
|
||||||
|
" "Software"), to deal in the Software without restriction, including
|
||||||
|
" without limitation the rights to use, copy, modify, merge, publish,
|
||||||
|
" distribute, sublicense, and/or sell copies of the Software, and to
|
||||||
|
" permit persons to whom the Software is furnished to do so, subject to
|
||||||
|
" the following conditions:
|
||||||
|
"
|
||||||
|
" The above copyright notice and this permission notice shall be included
|
||||||
|
" in all copies or substantial portions of the Software.
|
||||||
|
"
|
||||||
|
" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||||
|
" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
|
" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
|
" IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||||
|
" CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||||
|
" TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||||
|
" SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
" }}}
|
||||||
|
"=============================================================================
|
||||||
|
|
||||||
|
let s:save_cpo = &cpo
|
||||||
|
set cpo&vim
|
||||||
|
|
||||||
|
function! vimfiler#columns#devicons#define()
|
||||||
|
return s:column
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
let s:column = {
|
||||||
|
\ 'name' : 'devicons',
|
||||||
|
\ 'description' : 'get devicon glyph',
|
||||||
|
\ 'syntax' : 'vimfilerColumn__devicons',
|
||||||
|
\ }
|
||||||
|
|
||||||
|
function! s:column.length(files, context)
|
||||||
|
return 3
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
function! s:column.define_syntax(context) "{{{
|
||||||
|
syntax match vimfilerColumn__TypeText '\[T\]'
|
||||||
|
\ contained containedin=vimfilerColumn__Type
|
||||||
|
syntax match vimfilerColumn__TypeImage '\[I\]'
|
||||||
|
\ contained containedin=vimfilerColumn__Type
|
||||||
|
syntax match vimfilerColumn__TypeArchive '\[A\]'
|
||||||
|
\ contained containedin=vimfilerColumn__Type
|
||||||
|
syntax match vimfilerColumn__TypeExecute '\[X\]'
|
||||||
|
\ contained containedin=vimfilerColumn__Type
|
||||||
|
syntax match vimfilerColumn__TypeMultimedia '\[M\]'
|
||||||
|
\ contained containedin=vimfilerColumn__Type
|
||||||
|
syntax match vimfilerColumn__TypeDirectory '\[do\]'
|
||||||
|
\ contained containedin=vimfilerColumn__Type
|
||||||
|
syntax match vimfilerColumn__TypeSystem '\[S\]'
|
||||||
|
\ contained containedin=vimfilerColumn__Type
|
||||||
|
syntax match vimfilerColumn__TypeLink '\[L\]'
|
||||||
|
\ contained containedin=vimfilerColumn__Type
|
||||||
|
|
||||||
|
highlight def link vimfilerColumn__TypeText Constant
|
||||||
|
highlight def link vimfilerColumn__TypeImage Type
|
||||||
|
highlight def link vimfilerColumn__TypeArchive Special
|
||||||
|
highlight def link vimfilerColumn__TypeExecute Statement
|
||||||
|
highlight def link vimfilerColumn__TypeMultimedia Identifier
|
||||||
|
highlight def link vimfilerColumn__TypeDirectory Preproc
|
||||||
|
highlight def link vimfilerColumn__TypeSystem Comment
|
||||||
|
highlight def link vimfilerColumn__TypeLink Comment
|
||||||
|
endfunction"}}}
|
||||||
|
|
||||||
|
function! s:column.get(file, context)
|
||||||
|
return WebDevIconsGetFileTypeSymbol(strpart(a:file.action__path, strridx(a:file.action__path, '/')), a:file.vimfiler__is_directory)
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
let &cpo = s:save_cpo
|
||||||
|
unlet s:save_cpo
|
||||||
|
|
||||||
|
" vim: foldmethod=marker
|
||||||
185
.vim/bundle/vim-devicons/changelog.md
Normal file
185
.vim/bundle/vim-devicons/changelog.md
Normal file
@@ -0,0 +1,185 @@
|
|||||||
|
|
||||||
|
CHANGELOG
|
||||||
|
================================================================================
|
||||||
|
This project is using [Semantic Versioning 2.0.0](http://semver.org/)
|
||||||
|
|
||||||
|
- v0.8.4
|
||||||
|
- Fixed always warning about deprecated CtrlP version (fixes #137)
|
||||||
|
- Fixed missing configuration info about pattern based symbols (fixes #152)
|
||||||
|
- Fixed `WebDevIconsGetFileTypeSymbol` method iterator missing `break` (PR #156) (@blueyed)
|
||||||
|
- Fixed a typo in the readme (PR #159) (@SSARCandy)
|
||||||
|
- Added reference to [tiagofumo/vim-nerdtree-syntax-highlight](https://github.com/tiagofumo/vim-nerdtree-syntax-highlight) in readme (PR #161) (@tiagofumo)
|
||||||
|
- However, the [FAQ](https://github.com/ryanoasis/vim-devicons/wiki/FAQ) has been moved to the [Wiki](https://github.com/ryanoasis/vim-devicons/wiki) in this release
|
||||||
|
- v0.8.3
|
||||||
|
- Fixed NERDTree not displaying glyph (icon) for newly created files (fixes #153)
|
||||||
|
- Also adds info to readme about `updatetime`
|
||||||
|
- Fixed resourcing `vimrc` not maintaining current NERDTree state (fixes #154)
|
||||||
|
- Adds new public methods `webdevicons#hardRefresh()` and `webdevicons#softRefresh()`
|
||||||
|
- Makes public method `webdevicons#refresh()` do a 'soft' refresh
|
||||||
|
- Fixed various source formatting and implemented most of vim lint ([vint](https://github.com/Kuniwak/vint)) recommendations
|
||||||
|
- Added public methods available to readme
|
||||||
|
- v0.8.2
|
||||||
|
- Updated `jsx` filetype (using React glyph) (enhancement PR #148) (@alpertuna)
|
||||||
|
- Added issue and pull request templates
|
||||||
|
- v0.8.1
|
||||||
|
- Fixed Unite display issues (absolute paths and/or duplicate paths) (fixes #140)
|
||||||
|
- Fixed custom CtrlP open function causing 'E16' (fixes #115)
|
||||||
|
- Fixed typo in readme for setting default folder glyph (PR #143)
|
||||||
|
- Added documentation for highlighting icon/glyphs only (not just entire lines) in NERDTree (fixes #142)
|
||||||
|
- v0.8.0
|
||||||
|
- Added support for more [unite](https://github.com/Shougo/unite.vim) actions: `file_rec/async`, `file_rec/neovim`, `file_rec/neovim2`, `file_rec/git` (enhancement PR #132, fixes #131) (@mhartington)
|
||||||
|
- Improved Darwin detection by using a lighter method/logic (#135) (@delphinus35)
|
||||||
|
- Fixes `NERDTree-C` (fix PR #139) (@endenwer)
|
||||||
|
- Fixes error using open/close symbols for folder (fixes #130)
|
||||||
|
- v0.7.1
|
||||||
|
- Misc readme updates
|
||||||
|
- Fixed performance issues and odd graphical artifacts in v0.7.0 (fixes #127)
|
||||||
|
- Improved installation instructions and re-organized some items to [Nerd Fonts repo](https://github.com/ryanoasis/nerd-fonts) (PR #129, fixes #125, #128) (@her)
|
||||||
|
- v0.7.0
|
||||||
|
- Deprecated support for [kien/ctrlp](https://github.com/kien/ctrlp.vim) and only support [active ctrlp fork](https://github.com/ctrlpvim/ctrlp.vim) going forward (fixes #117)
|
||||||
|
- Added information to readme about [vim-startify](https://github.com/mhinz/vim-startify) support (enhancement #94)
|
||||||
|
- Added information to readme with possible fix to 'Dots after icons' (fixes #110) (@KabbAmine)
|
||||||
|
- Added support for 'cljc' (Clojure) filetypes (fix PR #120) (@spacepluk)
|
||||||
|
- Fixed certain folders in NERDTree showing file glyphs (based on pattern matching) (fixes #112)
|
||||||
|
- Fixed OS icon being display with as Linux Tux on Mac (fixes #118,fix PR #121) (@trodrigu)
|
||||||
|
- Fixed deprecated Linux font path in readme (fix PR #123) (@jrobeson)
|
||||||
|
- v0.6.1
|
||||||
|
- Fixed likely breaking bug: undefined variable g:DevIconsEnableFoldersOpenClose (fixes #109)
|
||||||
|
- Fixed up the changelog details
|
||||||
|
- v0.6.0
|
||||||
|
- Added support for [Powerline](https://github.com/powerline/powerline) (enhancement PR #74) (@delphinus35)
|
||||||
|
- Added support for 'ts' (TypeScript) filetypes (enhancement #79)
|
||||||
|
- Added support for 'jl' (Julia) filetypes
|
||||||
|
- Added support for 'bat' (batch) filetypes
|
||||||
|
- Added support for 'ejs' (Embedded JavaScript Templates) filetypes (enhancement #105) (@lerrua)
|
||||||
|
- Added support for 'react.jsx' filetype
|
||||||
|
- Added support for 'procfile' filetype
|
||||||
|
- Changed default 'go' filetype glyph to a better one
|
||||||
|
- Added open & close folder glyphs (icons) (enhancement #104)
|
||||||
|
- Fixed new files not having icons until refreshing NERDTree (fixes #33)
|
||||||
|
- Solution very similar to [nerdtree-git-plugin](https://github.com/Xuyuanp/nerdtree-git-plugin)
|
||||||
|
- v0.5.4
|
||||||
|
- Misc readme updates
|
||||||
|
- Add support for ocaml 'ml', 'mli' filetypes (enhancement PR #99) (@CharlieMartell)
|
||||||
|
- Add support for 'sql' and 'dump' filetypes (enhancement PR #100) (@lerrua)
|
||||||
|
- Add support for 'ico' filetypes (enhancement PR #101) (@lerrua)
|
||||||
|
- Add support for 'markdown' filetypes (enhancement PR #102) (@lerrua)
|
||||||
|
- Improved install fonts instructions on Mac (enhancement PR #103) (@lerrua)
|
||||||
|
- v0.5.3
|
||||||
|
- Add 'slim' filetype support (same icon as 'html') (enhancement PR #98) (@lerrua)
|
||||||
|
- Add 'fish' filetype support (same icon as 'sh') (enhancement #93) (@michaelmrose)
|
||||||
|
- Updated old link references (enhancement PR #87) (@lerrua)
|
||||||
|
- Improved default Ruby icon (uses 'glyph set 2') (enhancement PR #97) (@lerrua)
|
||||||
|
- Prevent destorying user's conceal settings (Use setlocal) (enhancement PR #96) (@shawncplus)
|
||||||
|
- Fixes filenames of buffers getting lost in unite filter (fixes #86) (@ahrse)
|
||||||
|
- Various readme updates and fixes
|
||||||
|
- v0.5.2
|
||||||
|
- Various readme updates and fixes
|
||||||
|
- Various file clean-up (.gitignore removed)
|
||||||
|
- Fixed link to install fonts (PR #83 fixes #81) (@theRemix)
|
||||||
|
- Fixed glyph used for Go (PR #82) (@hoop33)
|
||||||
|
- Added Code of Conduct
|
||||||
|
- v0.5.1
|
||||||
|
- Fixed [CtrlP](https://github.com/ctrlpvim/ctrlp.vim) integration bugs (truncating 6 characters is unreliable) and only add glyphs for MRU File Mode (Fixes #80)
|
||||||
|
- Readme updates and improvements
|
||||||
|
- v0.5.0
|
||||||
|
- Readme updates (removed polls sections, v0.5.0 specific changes)
|
||||||
|
- Misc code formatting fixes (tabs to spaces, modeline additions, reorganization)
|
||||||
|
- Update API: make WebDevIconsGetFileFormatSymbol return only fenc (fixes #73)
|
||||||
|
- Added Perl support (enhancement #60)
|
||||||
|
- Added support for some (mostly frontend) frameworks (enhancement #61)
|
||||||
|
- Added basic support for vim-flagship (enhancement #70)
|
||||||
|
- Added support for Unite and Vimfiler (enhancement #54)
|
||||||
|
- Added support for CtrlP (enhancement #56)
|
||||||
|
- Rebranding part 1: title and image (vim-devicons) (enhancement #76)
|
||||||
|
- v0.4.4
|
||||||
|
- Lots of readme updates and tweaks
|
||||||
|
- Changelog semver details
|
||||||
|
- Spelling / confusing grammar corrections (PR #68) (@adelarsq)
|
||||||
|
- Fixed default folder/directory glyph (PR Fixes #72) (@cj)
|
||||||
|
- Mac OS X screenshot (Fixes #32) (@RageZBla)
|
||||||
|
- Fixed misalignment when used with [nerdtree-git-plugin](https://github.com/Xuyuanp/nerdtree-git-plugin) (Fixes #71)
|
||||||
|
- Fixed re-sourcing bug (Fixes #71)
|
||||||
|
- Fixed directory node user settings being overwritten (Fixes #59)
|
||||||
|
- Fixed minor screenshot issues and clean-up
|
||||||
|
- v0.4.3
|
||||||
|
- Prevent error 'Unknown function' when opening Vim without airline plugin (Fixes #67)
|
||||||
|
- Temporary fix for gvim glyph artifact issues (particuarly NERDTree) (Fixes #58)
|
||||||
|
- Support file format symbols (glyphs) in vim-airline (Enhancement #66)
|
||||||
|
- Add vimrc setup example to readme (Documentation #65)
|
||||||
|
- Fixes Conceal highlighting issues (Fixes #53, #52)
|
||||||
|
- Make sure plugin plays nice with [nerdtree-git-plugin](https://github.com/Xuyuanp/nerdtree-git-plugin) (Enhancement #62)
|
||||||
|
- general readme updates and improvements
|
||||||
|
- changelog format fixes
|
||||||
|
- v0.4.2
|
||||||
|
- Updated vim doc with latest readme updates (html2vimdoc)
|
||||||
|
- Fixes #7 update readme for font and vim setup on osx and win platforms
|
||||||
|
- Fixes #49 with a FAQ update
|
||||||
|
- Fixes #41 No such event: nerdtree syntax match (@nbicalcarata)
|
||||||
|
- Removed test files from the repo and added folders to git-ignore
|
||||||
|
- Warn about loading vim-webdevicons before nerdtree plugin
|
||||||
|
- fix lazy NERDTree (@blueyed)
|
||||||
|
- Improve conceiling with NERDTree (@blueyed)
|
||||||
|
- add instructions to readme for vim setup on os x (@alfredbez)
|
||||||
|
- v0.4.1
|
||||||
|
- Fixes #39 - updated screenshots (particularly nerdtree)
|
||||||
|
- Fixes #37 - g:webdevicons_conceal_nerdtree_brackets applying global config
|
||||||
|
- Add instructions to readme for adding icon to lightline (@hoop33)
|
||||||
|
- Updated vim doc with latest readme updates (sync'd with html2vimdoc)
|
||||||
|
- Added TL;DR section to readme
|
||||||
|
- Add a note to readme to load NERDTree before vim-webdevicons (@hoop33)
|
||||||
|
- Fix: Automatically turning off NERDTree support (@hoop33)
|
||||||
|
- general readme updates
|
||||||
|
- v0.4.0
|
||||||
|
- #27 Remove [ ] wrapping icons
|
||||||
|
- #26 Add detection and warning on unsupported (old) NERDTree versions
|
||||||
|
- updated readme with more links and new details on new features and conifgs
|
||||||
|
- #30 Improve vim standard plugin conventions and tips
|
||||||
|
- #30 work on sections and standard plugin conventions part 1
|
||||||
|
- #30 clean-up of unused (for now) autoload file
|
||||||
|
- #28 setting global options broken part 1
|
||||||
|
- #29 Add vimdoc, more updates
|
||||||
|
- autogenerating vimdoc using html2vimdoc
|
||||||
|
- readme updates
|
||||||
|
- v0.3.4
|
||||||
|
- Adds basic support for directory/folder glyphs - fixes #22
|
||||||
|
- optimize icon lookup - WebDevIconsGetFileTypeSymbol: use if/else (@blueyed)
|
||||||
|
- Do not clobber the default or customized airline formatter (@blueyed)
|
||||||
|
- fixed a bug related to the latest airline updates (Ali Aliev)
|
||||||
|
- various readme updates
|
||||||
|
- more sample usage images
|
||||||
|
- v0.3.3
|
||||||
|
- Load the plugin once only (@blueyed)
|
||||||
|
- Add font installation instructions, fixes #5 (@wikimatze)
|
||||||
|
- added plugin install instructions
|
||||||
|
- slight readme re-ordering
|
||||||
|
- moved contributing section near bottom
|
||||||
|
- added additional screenshots
|
||||||
|
- added more thanks to those whose some more of the glyphs came from
|
||||||
|
- v0.3.2
|
||||||
|
- moved screenshots into the wiki (wiki.vim-webdevicons) to reduce unnecessary project size of cloning repo
|
||||||
|
- v0.3.1
|
||||||
|
- readme updates (with references to new font-patcher repo)
|
||||||
|
- readme updates screenshots reference wiki
|
||||||
|
- v0.3.0
|
||||||
|
- moved font-patcher and patched fonts into a separate repo (nerd-filetype-glyphs-fonts-patcher)
|
||||||
|
- adds twigg file type support for #10 (@wikimatze)
|
||||||
|
- adds cpp file type support
|
||||||
|
- updated utf8 test file with glyphs
|
||||||
|
- readme fixes (@wikimatze, @blueyed)
|
||||||
|
- readme updates
|
||||||
|
- v0.2.1
|
||||||
|
- readme updates
|
||||||
|
- v0.2.0
|
||||||
|
- Script for patching any font: Initial cleaned up work for issue (feature enhancement) for #1
|
||||||
|
- added python font patcher and readme updates
|
||||||
|
- v0.1.4
|
||||||
|
- readme updates
|
||||||
|
- v0.1.3
|
||||||
|
- fixes #3 make matches case insensitive (ignore case)
|
||||||
|
- v0.1.2
|
||||||
|
- fixes lookup for exact file notes (@johngeorgewright)
|
||||||
|
- v0.1.1
|
||||||
|
- updated readme substantially
|
||||||
|
- v0.1.0
|
||||||
|
- release
|
||||||
33
.vim/bundle/vim-devicons/code_of_conduct.md
Normal file
33
.vim/bundle/vim-devicons/code_of_conduct.md
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
# Contributor Code of Conduct
|
||||||
|
|
||||||
|
As contributors and maintainers of this project, and in the interest of fostering an open and welcoming community,
|
||||||
|
we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation,
|
||||||
|
submitting pull requests or patches, and other activities.
|
||||||
|
|
||||||
|
We are committed to making participation in this project a harassment-free experience for everyone,
|
||||||
|
regardless of level of experience, gender, gender identity and expression, sexual orientation, disability,
|
||||||
|
personal appearance, body size, race, ethnicity, age, religion, or nationality.
|
||||||
|
|
||||||
|
Examples of unacceptable behavior by participants include:
|
||||||
|
|
||||||
|
* The use of sexualized language or imagery
|
||||||
|
* Personal attacks
|
||||||
|
* Trolling or insulting/derogatory comments
|
||||||
|
* Public or private harassment
|
||||||
|
* Publishing other's private information, such as physical or electronic addresses, without explicit permission
|
||||||
|
* Other unethical or unprofessional conduct.
|
||||||
|
|
||||||
|
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits,
|
||||||
|
code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct.
|
||||||
|
By adopting this Code of Conduct, project maintainers commit themselves to fairly and consistently
|
||||||
|
applying these principles to every aspect of managing this project. Project maintainers who do not
|
||||||
|
follow or enforce the Code of Conduct may be permanently removed from the project team.
|
||||||
|
|
||||||
|
This code of conduct applies both within project spaces and in public spaces when an individual
|
||||||
|
is representing the project or its community.
|
||||||
|
|
||||||
|
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue
|
||||||
|
or contacting one or more of the project maintainers.
|
||||||
|
|
||||||
|
This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org),
|
||||||
|
version 1.2.0, available at [http://contributor-covenant.org/version/1/2/0/](http://contributor-covenant.org/version/1/2/0/)
|
||||||
22
.vim/bundle/vim-devicons/contributing.md
Normal file
22
.vim/bundle/vim-devicons/contributing.md
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
# Contributing Guide
|
||||||
|
|
||||||
|
## How to contribute
|
||||||
|
|
||||||
|
Work In Progress, for now the minimum:
|
||||||
|
|
||||||
|
* Fork the project and submit a Pull Request (PR)
|
||||||
|
* Explain what the PR fixes or improves
|
||||||
|
* Screenshots for bonus points
|
||||||
|
* Use sensible commit messages
|
||||||
|
* If your PR fixes a separate issue number, include it in the commit message
|
||||||
|
|
||||||
|
## Things to keep in mind
|
||||||
|
* Smaller PRs are likely to be merged more quickly than bigger changes
|
||||||
|
* If it is a useful PR it **will** get merged in eventually
|
||||||
|
* [E.g. see how many have already been merged vs. still open](https://github.com/ryanoasis/vim-devicons/pulls)
|
||||||
|
* This project is using [Semantic Versioning 2.0.0](http://semver.org/)
|
||||||
|
* I try to group fixes into milestones/versions
|
||||||
|
* If your bug or PR is *not* trivial it will likely end up in the next **MINOR** version
|
||||||
|
* If your bug or PR *is* trivial *or* critical it will likely end up in the next **PATCH** version
|
||||||
|
* Most of the time PRs and fixes are *not* merged directly into master without being present on a new versioned branch
|
||||||
|
** Sometimes for small items I will make exceptions to get the fix or readme change on master sooner but even after there will *always* be a versioned branch to keep track of each release
|
||||||
708
.vim/bundle/vim-devicons/doc/webdevicons.txt
Normal file
708
.vim/bundle/vim-devicons/doc/webdevicons.txt
Normal file
@@ -0,0 +1,708 @@
|
|||||||
|
*readme.txt* VimDevIcons – Add Icons to Your Plugins
|
||||||
|
|
||||||
|
===============================================================================
|
||||||
|
Contents ~
|
||||||
|
|
||||||
|
1. Introduction |readme-introduction|
|
||||||
|
2. Image: vim-devicons (see reference [1]) |readme-image-vim-devicons|
|
||||||
|
1. Image: vim-devicons overall screenshot (see reference [17]) |readme-image-vim-devicons-overall-screenshot|
|
||||||
|
1. Features |readme-features|
|
||||||
|
2. Quick Links |readme-quick-links|
|
||||||
|
3. Table of Contents |readme-table-of-contents|
|
||||||
|
4. Installation |readme-installation|
|
||||||
|
1. Step 1 'Nerd Font' |Nerd-Font|
|
||||||
|
2. Step 2 'VimDevIcons Plugin' |VimDevIcons-Plugin|
|
||||||
|
1. Pathogen [26] |readme-pathogen-26|
|
||||||
|
2. NeoBundle [27] |readme-neobundle-27|
|
||||||
|
3. Vundle [28] |readme-vundle-28|
|
||||||
|
4. Manual |readme-manual|
|
||||||
|
3. Step 3 'Configure Vim' |Configure-Vim|
|
||||||
|
1. Set VimDevIcons to load _before_ these plugins! |readme-set-vimdevicons-to-load-_before_-these-plugins|
|
||||||
|
2. Set encoding to UTF-8 to show glyphs |readme-set-encoding-to-utf-8-to-show-glyphs|
|
||||||
|
3. Set Vim font to a Nerd Font |readme-set-vim-font-to-nerd-font|
|
||||||
|
4. If you use vim-airline you need this |readme-if-you-use-vim-airline-you-need-this|
|
||||||
|
5. vimrc examples |readme-vimrc-examples|
|
||||||
|
4. That's it! You're done. ✅ |readme-thats-it-youre-done.|
|
||||||
|
5. Usage |readme-usage|
|
||||||
|
1. Lightline Setup |readme-lightline-setup|
|
||||||
|
2. Powerline Setup |readme-powerline-setup|
|
||||||
|
6. Detailed Features |readme-detailed-features|
|
||||||
|
7. Extra Configuration |readme-extra-configuration|
|
||||||
|
1. Character Mappings |readme-character-mappings|
|
||||||
|
8. Public Methods |readme-public-methods|
|
||||||
|
9. Developer |readme-developer|
|
||||||
|
1. API |readme-api|
|
||||||
|
1. API Examples |readme-api-examples|
|
||||||
|
10. Todo |readme-todo|
|
||||||
|
11. License |readme-license|
|
||||||
|
12. FAQ / Troubleshooting |readme-faq-troubleshooting|
|
||||||
|
13. Screenshots |readme-screenshots|
|
||||||
|
14. Contributing |readme-contributing|
|
||||||
|
1. Promotion |readme-promotion|
|
||||||
|
2. Source code |readme-source-code|
|
||||||
|
15. Rationale |readme-rationale|
|
||||||
|
16. Inspiration and special thanks |readme-inspiration-special-thanks|
|
||||||
|
17. License
|
||||||
|
3. References |readme-references|
|
||||||
|
|
||||||
|
===============================================================================
|
||||||
|
*readme-introduction*
|
||||||
|
Introduction ~
|
||||||
|
|
||||||
|
===============================================================================
|
||||||
|
*readme-image-vim-devicons*
|
||||||
|
Image: vim-devicons (see reference [1]) ~
|
||||||
|
|
||||||
|
Image: GitHub version [2] Image: Join the chat at https://gitter.im/ryanoasis
|
||||||
|
/vim-devicons [4] Image: Flattr this git repo [6]
|
||||||
|
|
||||||
|
**VimDevIcons** adds filetype glyphs (icons) to other plugins such as NERDTree
|
||||||
|
[8], vim-airline [9], CtrlP [10], powerline [11], unite [12], lightline.vim
|
||||||
|
[13], vim-startify [14], vimfiler [15], and flagship [16].
|
||||||
|
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
*readme-image-vim-devicons-overall-screenshot*
|
||||||
|
Image: vim-devicons overall screenshot (see reference [17]) ~
|
||||||
|
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
*readme-features*
|
||||||
|
Features ~
|
||||||
|
|
||||||
|
**VimDevIcons integrates with these plugins and more:**
|
||||||
|
|
||||||
|
NERDTree [8] | vim-airline [9] | CtrlP [10] | powerline [11] | unite [12] |
|
||||||
|
lightline.vim [13] | vim-startify [14] | vimfiler [15] | flagship [16]
|
||||||
|
|
||||||
|
- 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 _(» More details... «)_
|
||||||
|
- Supports full filename matches _(» More details... «)_
|
||||||
|
- Supports library pattern matches _(» More details... «)_
|
||||||
|
- Works with patched fonts, especially Nerd Fonts [18]
|
||||||
|
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
*readme-quick-links*
|
||||||
|
Quick Links ~
|
||||||
|
|
||||||
|
| **Screenshots**| **API** | **Fonts ➶ [19]** | **Patcher ➶ [18]** | |---------
|
||||||
|
-----------------------|-----------------|------------------------------|------
|
||||||
|
-----------------------| | Image: screenshots | Image: api | Image: patcher-
|
||||||
|
logo-small [19] | Image: patcher-logo-small [18] |
|
||||||
|
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
*readme-table-of-contents*
|
||||||
|
Table of Contents ~
|
||||||
|
|
||||||
|
**TL;DR Installation**
|
||||||
|
|
||||||
|
**Installation**
|
||||||
|
|
||||||
|
**Usage** _**Lightline Setup**_ **Powerline Setup** _**Extra Configuration**_
|
||||||
|
**Character Mappings**
|
||||||
|
|
||||||
|
**Features**
|
||||||
|
|
||||||
|
**Screenshots**
|
||||||
|
|
||||||
|
**Methods**
|
||||||
|
|
||||||
|
**Developer** _**API**_ **Contributing** _**Inspiration and special thanks**_
|
||||||
|
**Todo** * **License**
|
||||||
|
|
||||||
|
**FAQ / Troubleshooting**
|
||||||
|
|
||||||
|
**Rationale**
|
||||||
|
|
||||||
|
Quick Installation (TL;DR)
|
||||||
|
|
||||||
|
1. Download and install a patched **Nerd Font [18]** (or patch your own) _(»
|
||||||
|
More details... «) [18]_
|
||||||
|
|
||||||
|
2. Install the plugin per your usual method _(» More details... «)_
|
||||||
|
|
||||||
|
3. Configure Vim _(» More details... «)_
|
||||||
|
|
||||||
|
4. a. **vim**: Set your terminal emulator font
|
||||||
|
5. b. **gvim**: Set 'guifont' in your 'vimrc'
|
||||||
|
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
*readme-installation*
|
||||||
|
Installation ~
|
||||||
|
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
*Nerd-Font*
|
||||||
|
Step 1 'Nerd Font' ~
|
||||||
|
|
||||||
|
Get a **Nerd Font!** [24] or patch your own. [25] Without this, things break
|
||||||
|
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
*VimDevIcons-Plugin*
|
||||||
|
Step 2 'VimDevIcons Plugin' ~
|
||||||
|
|
||||||
|
Choose your favorite plugin manager
|
||||||
|
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
*readme-pathogen-26*
|
||||||
|
Pathogen [26] ~
|
||||||
|
|
||||||
|
- 'git clone https://github.com/ryanoasis/vim-devicons ~/.vim/bundle/vim-
|
||||||
|
devicons'
|
||||||
|
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
*readme-neobundle-27*
|
||||||
|
NeoBundle [27] ~
|
||||||
|
|
||||||
|
- Add to vimrc:
|
||||||
|
|
||||||
|
"vim NeoBundle 'ryanoasis/vim-devicons'" * And install it:
|
||||||
|
|
||||||
|
'vim :so ~/.vimrc :NeoBundleInstall'
|
||||||
|
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
*readme-vundle-28*
|
||||||
|
Vundle [28] ~
|
||||||
|
|
||||||
|
- Add to vimrc:
|
||||||
|
|
||||||
|
"vim Plugin 'ryanoasis/vim-devicons'" * And install it:
|
||||||
|
|
||||||
|
'vim :so ~/.vimrc :PluginInstall'
|
||||||
|
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
*readme-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':
|
||||||
|
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
*readme-set-vimdevicons-to-load-_before_-these-plugins*
|
||||||
|
Set VimDevIcons to load _before_ these plugins! ~
|
||||||
|
|
||||||
|
NERDTree [8] | vim-airline [9] | CtrlP [29] | powerline [11] | unite [12] |
|
||||||
|
lightline.vim [13] | vim-startify [14] | vimfiler [15] | flagship [16]
|
||||||
|
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
*readme-set-encoding-to-utf-8-to-show-glyphs*
|
||||||
|
Set encoding to UTF-8 to show glyphs ~
|
||||||
|
|
||||||
|
'vim set encoding=utf8'
|
||||||
|
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
*readme-set-vim-font-to-nerd-font*
|
||||||
|
Set Vim font to a Nerd Font ~
|
||||||
|
|
||||||
|
Linux 'vim set guifont=<FONT_NAME> <FONT_SIZE>'
|
||||||
|
>
|
||||||
|
set guifont=Droid\ Sans\ Mono\ for\ Powerline\ Plus\ Nerd\ File\ Types\ 11
|
||||||
|
<
|
||||||
|
macOS (OS X) and Windows
|
||||||
|
>
|
||||||
|
set guifont=<FONT_NAME>:h<FONT_SIZE>
|
||||||
|
<
|
||||||
|
|
||||||
|
>
|
||||||
|
set guifont=Droid\ Sans\ Mono\ for\ Powerline\ Plus\ Nerd\ File\ Types:h11
|
||||||
|
<
|
||||||
|
**Note:** if you don't set 'guifont' then you'll have to set your terminal's
|
||||||
|
font, else things break!
|
||||||
|
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
*readme-if-you-use-vim-airline-you-need-this*
|
||||||
|
If you use vim-airline you need this ~
|
||||||
|
|
||||||
|
'vim let g:airline_powerline_fonts = 1'
|
||||||
|
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
*readme-vimrc-examples*
|
||||||
|
vimrc examples ~
|
||||||
|
|
||||||
|
- Sample Windows vimrc configuration 1 [30]
|
||||||
|
- Sample Linux vimrc configuration 1 [31]
|
||||||
|
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
*readme-thats-it-youre-done.*
|
||||||
|
That's it! You're done. ✅ ~
|
||||||
|
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
*readme-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 [8], vim-
|
||||||
|
airline [9], CtrlP [29], powerline [11], unite [12], vimfiler [15], flagship
|
||||||
|
[16] you **must** configure vim to load those plugins__before_ vim-devicons
|
||||||
|
loads. for better nerdtree-git-plugin [32] support, you _should_ configure vim
|
||||||
|
to load nerdtree-git-plugin **_before_** VimDevIcons loads.
|
||||||
|
|
||||||
|
Lightline Setup and Powerline Setup require some extra setup as shown below:
|
||||||
|
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
*readme-lightline-setup*
|
||||||
|
Lightline Setup ~
|
||||||
|
|
||||||
|
To add the appropriate icon to lightline [13], 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
|
||||||
|
<
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
*readme-powerline-setup*
|
||||||
|
Powerline Setup ~
|
||||||
|
|
||||||
|
- _Note this is for the current Powerline [11] not the deprecated vim-
|
||||||
|
powerline [33]_
|
||||||
|
|
||||||
|
To enable for Powerline [11] 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 [34]
|
||||||
|
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
*readme-detailed-features*
|
||||||
|
Detailed Features ~
|
||||||
|
|
||||||
|
- Adds filetype glyphs (icons) to various vim plugins, currently supports:
|
||||||
|
- NERDTree [8]
|
||||||
|
- vim-airline [9] (statusline and tabline)
|
||||||
|
- CtrlP [10]
|
||||||
|
|
||||||
|
- Currently only MRU file mode supported
|
||||||
|
|
||||||
|
- powerline [11] (statusline)
|
||||||
|
|
||||||
|
- see: powerline setup
|
||||||
|
|
||||||
|
- unite [12]
|
||||||
|
|
||||||
|
- Currently supports 'file', 'file_rec', 'buffer', 'file_rec/async', and
|
||||||
|
'file_rec/neovim'
|
||||||
|
|
||||||
|
- lightline.vim [13] (statusline)
|
||||||
|
|
||||||
|
- see: lightline setup
|
||||||
|
|
||||||
|
- vim-startify [14]
|
||||||
|
- vimfiler [15]
|
||||||
|
- flagship [16]
|
||||||
|
|
||||||
|
- Support is **experimental** because the API may be changing [35]
|
||||||
|
|
||||||
|
- 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, scss, htm, html, slim, ejs, css, less, md, json, js, jsx, rb, php,
|
||||||
|
py, pyc, pyd, pyo, coffee, mustache, hbs, conf, ini, yml, bat, jpg, jpeg,
|
||||||
|
bmp, png, gif, twig, cpp, c++, cxx, cc, cp, c, hs, lhs, lua, java, sh,
|
||||||
|
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'
|
||||||
|
- 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, .bashprofile, favicon.ico, license, node_modules, react.jsx,
|
||||||
|
procfile'
|
||||||
|
- Supports a few library pattern matches, by default:
|
||||||
|
- 'jquery, angular, backbone, requirejs, materialize, mootools'
|
||||||
|
- Works with patched fonts, especially Nerd Fonts [18]
|
||||||
|
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
*readme-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 MRU file mode glyphs
|
||||||
|
let g:webdevicons_enable_ctrlp = 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
|
||||||
|
<
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
*readme-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 = 'ƛ'
|
||||||
|
<
|
||||||
|
|
||||||
|
>
|
||||||
|
" 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
|
||||||
|
<
|
||||||
|
|
||||||
|
>
|
||||||
|
" 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 [36] for
|
||||||
|
further details.
|
||||||
|
>
|
||||||
|
let g:WebDevIconsOS = 'Darwin'
|
||||||
|
<
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
*readme-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()
|
||||||
|
<
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
*readme-developer*
|
||||||
|
Developer ~
|
||||||
|
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
*readme-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()
|
||||||
|
<
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
*readme-api-examples*
|
||||||
|
API Examples ~
|
||||||
|
>
|
||||||
|
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
|
||||||
|
<
|
||||||
|
source: vim-startify [14]
|
||||||
|
>
|
||||||
|
echo WebDevIconsGetFileFormatSymbol()
|
||||||
|
<
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
*readme-todo*
|
||||||
|
Todo ~
|
||||||
|
|
||||||
|
- [ ] more filetypes to support
|
||||||
|
- [ ] customize filetype icon colors
|
||||||
|
- [ ] more customization options in general
|
||||||
|
- [ ] more specific FAQ and Troubleshooting help
|
||||||
|
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
*readme-license*
|
||||||
|
License ~
|
||||||
|
|
||||||
|
See LICENSE
|
||||||
|
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
*readme-faq-troubleshooting*
|
||||||
|
FAQ / Troubleshooting ~
|
||||||
|
|
||||||
|
See FAQ [37]
|
||||||
|
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
*readme-screenshots*
|
||||||
|
Screenshots ~
|
||||||
|
|
||||||
|
See Screenshots [38]
|
||||||
|
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
*readme-contributing*
|
||||||
|
Contributing ~
|
||||||
|
|
||||||
|
Best ways to contribute _Star it on GitHub - if you use it and like it please
|
||||||
|
at least star it :)_ Promote _Open issues/tickets [39]_ Submit fixes and/or
|
||||||
|
improvements with Pull Requests
|
||||||
|
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
*readme-promotion*
|
||||||
|
Promotion ~
|
||||||
|
|
||||||
|
Like the project? Please support to ensure continued development going forward:
|
||||||
|
_Star this repo on GitHub [40]_ Follow the repo on GitHub [40] _Vote for it on
|
||||||
|
vim.org [41]_ Follow me * Twitter [42] * GitHub [43]
|
||||||
|
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
*readme-source-code*
|
||||||
|
Source code ~
|
||||||
|
|
||||||
|
Contributions and Pull Requests are welcome.
|
||||||
|
|
||||||
|
No real formal process has been setup - just stick to general good conventions
|
||||||
|
for now.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
*readme-rationale*
|
||||||
|
Rationale ~
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
*readme-inspiration-special-thanks*
|
||||||
|
Inspiration and special thanks ~
|
||||||
|
|
||||||
|
- vim-airline [9]
|
||||||
|
- nerdtree [8]
|
||||||
|
- nerdtree-git-plugin [32]
|
||||||
|
- seti-ui [44]
|
||||||
|
- devicons by Theodore Vorillas [45]
|
||||||
|
- benatespina development.svg.icons [46]
|
||||||
|
- Steve Losh [47]
|
||||||
|
- Also thanks to the many contributors [48]
|
||||||
|
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License ~
|
||||||
|
|
||||||
|
See LICENSE
|
||||||
|
|
||||||
|
===============================================================================
|
||||||
|
*readme-references*
|
||||||
|
References ~
|
||||||
|
|
||||||
|
[1] https://github.com/ryanoasis/vim-devicons/wiki/screenshots/v0.8.x/branding-logo.png
|
||||||
|
[2] http://badge.fury.io/gh/ryanoasis%2Fvim-devicons
|
||||||
|
[3] https://badge.fury.io/gh/ryanoasis%2Fvim-devicons.svg
|
||||||
|
[4] https://gitter.im/ryanoasis/vim-devicons?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge
|
||||||
|
[5] https://img.shields.io/gitter/room/nwjs/nw.js.svg?style=flat
|
||||||
|
[6] https://flattr.com/submit/auto?user_id=ryanoasis&url=https://github.com/ryanoasis/vim-devicons&title=vim-devicons&language=viml&tags=github&category=software
|
||||||
|
[7] https://img.shields.io/badge/donate-flattr%20this!-8DB65B.svg?style=flat
|
||||||
|
[8] https://github.com/scrooloose/nerdtree
|
||||||
|
[9] https://github.com/bling/vim-airline
|
||||||
|
[10] https://github.com/ctrlpvim/ctrlp.vim
|
||||||
|
[11] https://github.com/powerline/powerline
|
||||||
|
[12] https://github.com/Shougo/unite.vim
|
||||||
|
[13] https://github.com/itchyny/lightline.vim
|
||||||
|
[14] https://github.com/mhinz/vim-startify
|
||||||
|
[15] https://github.com/Shougo/vimfiler.vim
|
||||||
|
[16] https://github.com/tpope/vim-flagship
|
||||||
|
[17] https://github.com/ryanoasis/vim-devicons/wiki/screenshots/v0.8.x/overall-screenshot.png
|
||||||
|
[18] https://github.com/ryanoasis/nerd-fonts
|
||||||
|
[19] https://github.com/ryanoasis/nerd-fonts/tree/master/patched-fonts
|
||||||
|
[20] https://github.com/ryanoasis/vim-devicons/wiki/screenshots/v1.0.0/branding-logo-screenshots-sm.png
|
||||||
|
[21] https://github.com/ryanoasis/vim-devicons/wiki/screenshots/v1.0.0/branding-logo-api-sm.png
|
||||||
|
[22] https://raw.githubusercontent.com/ryanoasis/nerd-fonts/master/images/nerd-fonts-character-logo-md.png
|
||||||
|
[23] https://raw.githubusercontent.com/ryanoasis/nerd-fonts/master/images/nerd-fonts-patcher-logo-md.png
|
||||||
|
[24] https://github.com/ryanoasis/nerd-fonts#font-installation
|
||||||
|
[25] https://github.com/ryanoasis/nerd-fonts#font-patcher
|
||||||
|
[26] https://github.com/tpope/vim-pathogen
|
||||||
|
[27] https://github.com/Shougo/neobundle.vim
|
||||||
|
[28] https://github.com/gmarik/vundle
|
||||||
|
[29] https://github.com/kien/ctrlp.vim
|
||||||
|
[30] https://github.com/ryanoasis/vim-devicons/wiki/samples/v0.8.x/.vimrc-windows-1
|
||||||
|
[31] https://github.com/ryanoasis/vim-devicons/wiki/samples/v0.8.x/.vimrc-linux-1
|
||||||
|
[32] https://github.com/Xuyuanp/nerdtree-git-plugin
|
||||||
|
[33] https://github.com/Lokaltog/vim-powerline
|
||||||
|
[34] https://github.com/ryanoasis/vim-devicons/wiki/samples/v0.8.x/powerline/themes/vim/default.json
|
||||||
|
[35] https://github.com/tpope/vim-flagship/issues/6#issuecomment-116121220
|
||||||
|
[36] https://github.com/ryanoasis/vim-devicons/pull/135
|
||||||
|
[37] https://github.com/ryanoasis/vim-devicons/wiki/FAQ
|
||||||
|
[38] https://github.com/ryanoasis/vim-devicons/wiki/Screenshots
|
||||||
|
[39] https://github.com/ryanoasis/vim-devicons/issues
|
||||||
|
[40] https://github.com/ryanoasis/vim-devicons
|
||||||
|
[41] http://www.vim.org/scripts/script.php?script_id=5114
|
||||||
|
[42] http://twitter.com/ryanlmcintyre
|
||||||
|
[43] https://github.com/ryanoasis
|
||||||
|
[44] https://atom.io/themes/seti-ui
|
||||||
|
[45] http://vorillaz.github.io/devicons
|
||||||
|
[46] https://github.com/benatespina/development.svg.icons
|
||||||
|
[47] http://learnvimscriptthehardway.stevelosh.com/
|
||||||
|
[48] https://github.com/ryanoasis/vim-devicons/graphs/contributors
|
||||||
|
|
||||||
|
vim: ft=help
|
||||||
172
.vim/bundle/vim-devicons/nerdtree_plugin/webdevicons.vim
Normal file
172
.vim/bundle/vim-devicons/nerdtree_plugin/webdevicons.vim
Normal file
@@ -0,0 +1,172 @@
|
|||||||
|
" Version: 0.8.4
|
||||||
|
" Webpage: https://github.com/ryanoasis/vim-devicons
|
||||||
|
" Maintainer: Ryan McIntyre <ryanoasis@gmail.com>
|
||||||
|
" License: see LICENSE
|
||||||
|
|
||||||
|
" @todo fix duplicate global variable initialize here:
|
||||||
|
if !exists('g:webdevicons_enable')
|
||||||
|
let g:webdevicons_enable = 1
|
||||||
|
endif
|
||||||
|
|
||||||
|
if !exists('g:webdevicons_enable_nerdtree')
|
||||||
|
let g:webdevicons_enable_nerdtree = 1
|
||||||
|
endif
|
||||||
|
|
||||||
|
if !exists('g:DevIconsEnableFoldersOpenClose')
|
||||||
|
let g:DevIconsEnableFoldersOpenClose = 0
|
||||||
|
endif
|
||||||
|
|
||||||
|
if !exists('g:DevIconsEnableFolderPatternMatching')
|
||||||
|
let g:DevIconsEnableFolderPatternMatching = 1
|
||||||
|
endif
|
||||||
|
|
||||||
|
if !exists('g:DevIconsEnableFolderExtensionPatternMatching')
|
||||||
|
let g:DevIconsEnableFolderExtensionPatternMatching = 0
|
||||||
|
endif
|
||||||
|
|
||||||
|
" end @todo duplicate global variables
|
||||||
|
|
||||||
|
" Temporary (hopefully) fix for glyph issues in gvim (proper fix is with the
|
||||||
|
" actual font patcher)
|
||||||
|
if !exists('g:webdevicons_gui_glyph_fix')
|
||||||
|
let g:webdevicons_gui_glyph_fix = 1
|
||||||
|
endif
|
||||||
|
|
||||||
|
if g:webdevicons_enable_nerdtree == 1
|
||||||
|
if !exists('g:loaded_nerd_tree')
|
||||||
|
echohl WarningMsg |
|
||||||
|
\ echomsg 'vim-webdevicons requires NERDTree to be loaded before vim-webdevicons.'
|
||||||
|
endif
|
||||||
|
|
||||||
|
if exists('g:loaded_nerd_tree') && g:loaded_nerd_tree == 1 && !exists('g:NERDTreePathNotifier')
|
||||||
|
let g:webdevicons_enable_nerdtree = 0
|
||||||
|
echohl WarningMsg |
|
||||||
|
\ echomsg 'vim-webdevicons requires a newer version of NERDTree to show glyphs in NERDTree - consider updating NERDTree.'
|
||||||
|
endif
|
||||||
|
|
||||||
|
" @todo I don't even want this to execute UNLESS the user has the
|
||||||
|
" 'nerdtree-git-plugin' INSTALLED (not LOADED)
|
||||||
|
" As it currently functions this warning will display even if the user does
|
||||||
|
" not have nerdtree-git-plugin not just if it isn't loaded yet
|
||||||
|
" (not what we want)
|
||||||
|
"if !exists('g:loaded_nerdtree_git_status')
|
||||||
|
" echohl WarningMsg |
|
||||||
|
" \ echomsg 'vim-webdevicons works better when 'nerdtree-git-plugin' is loaded before vim-webdevicons (small refresh issues otherwise).'
|
||||||
|
"endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
if !exists('g:webdevicons_enable_airline_tabline')
|
||||||
|
let g:webdevicons_enable_airline_tabline = 1
|
||||||
|
endif
|
||||||
|
|
||||||
|
if !exists('g:webdevicons_enable_airline_statusline')
|
||||||
|
let g:webdevicons_enable_airline_statusline = 1
|
||||||
|
endif
|
||||||
|
|
||||||
|
function! s:SetupListeners()
|
||||||
|
call g:NERDTreePathNotifier.AddListener('init', 'NERDTreeWebDevIconsRefreshListener')
|
||||||
|
call g:NERDTreePathNotifier.AddListener('refresh', 'NERDTreeWebDevIconsRefreshListener')
|
||||||
|
call g:NERDTreePathNotifier.AddListener('refreshFlags', 'NERDTreeWebDevIconsRefreshListener')
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" Temporary (hopefully) fix for glyph issues in gvim (proper fix is with the
|
||||||
|
" actual font patcher)
|
||||||
|
|
||||||
|
" NERDTree-C
|
||||||
|
" scope: global
|
||||||
|
function! WebDevIconsNERDTreeChangeRootHandler(node)
|
||||||
|
call b:NERDTree.changeRoot(a:node)
|
||||||
|
call NERDTreeRender()
|
||||||
|
call a:node.putCursorHere(0, 0)
|
||||||
|
redraw!
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" NERDTree-u
|
||||||
|
" scope: global
|
||||||
|
function! WebDevIconsNERDTreeUpDirCurrentRootClosedHandler()
|
||||||
|
call nerdtree#ui_glue#upDir(0)
|
||||||
|
redraw!
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" NERDTreeMapActivateNode and <2-LeftMouse>
|
||||||
|
" handle the user activating a tree node
|
||||||
|
" scope: global
|
||||||
|
function! WebDevIconsNERDTreeMapActivateNode(node)
|
||||||
|
let path = a:node.path
|
||||||
|
let isOpen = a:node.isOpen
|
||||||
|
let padding = g:WebDevIconsNerdTreeAfterGlyphPadding
|
||||||
|
let prePadding = ''
|
||||||
|
let hasGitFlags = (len(path.flagSet._flagsForScope('git')) > 0)
|
||||||
|
let hasGitNerdTreePlugin = (exists('g:loaded_nerdtree_git_status') == 1)
|
||||||
|
|
||||||
|
if g:WebDevIconsUnicodeGlyphDoubleWidth == 0
|
||||||
|
let padding = ''
|
||||||
|
endif
|
||||||
|
|
||||||
|
if hasGitFlags && g:WebDevIconsUnicodeGlyphDoubleWidth == 1
|
||||||
|
let prePadding = ' '
|
||||||
|
endif
|
||||||
|
|
||||||
|
" align vertically at the same level: non git-flag nodes with git-flag nodes
|
||||||
|
if g:WebDevIconsNerdTreeGitPluginForceVAlign && !hasGitFlags && hasGitNerdTreePlugin
|
||||||
|
let prePadding .= ' '
|
||||||
|
endif
|
||||||
|
|
||||||
|
" toggle flag
|
||||||
|
if isOpen
|
||||||
|
let flag = prePadding . g:WebDevIconsUnicodeDecorateFolderNodesDefaultSymbol . padding
|
||||||
|
else
|
||||||
|
let flag = prePadding . g:DevIconsDefaultFolderOpenSymbol . padding
|
||||||
|
endif
|
||||||
|
|
||||||
|
call a:node.path.flagSet.clearFlags('webdevicons')
|
||||||
|
|
||||||
|
if flag !=? ''
|
||||||
|
call a:node.path.flagSet.addFlag('webdevicons', flag)
|
||||||
|
call a:node.path.refreshFlags(b:NERDTree)
|
||||||
|
endif
|
||||||
|
|
||||||
|
" continue with normal activate logic
|
||||||
|
call a:node.activate()
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
if g:webdevicons_enable == 1 && g:webdevicons_enable_nerdtree == 1
|
||||||
|
call s:SetupListeners()
|
||||||
|
|
||||||
|
if g:DevIconsEnableFoldersOpenClose
|
||||||
|
" NERDTreeMapActivateNode
|
||||||
|
call NERDTreeAddKeyMap({
|
||||||
|
\ 'key': g:NERDTreeMapActivateNode,
|
||||||
|
\ 'callback': 'WebDevIconsNERDTreeMapActivateNode',
|
||||||
|
\ 'override': 1,
|
||||||
|
\ 'scope': 'DirNode' })
|
||||||
|
|
||||||
|
" <2-LeftMouse>
|
||||||
|
call NERDTreeAddKeyMap({
|
||||||
|
\ 'key': '<2-LeftMouse>',
|
||||||
|
\ 'callback': 'WebDevIconsNERDTreeMapActivateNode',
|
||||||
|
\ 'override': 1,
|
||||||
|
\ 'scope': 'DirNode' })
|
||||||
|
endif
|
||||||
|
|
||||||
|
" Temporary (hopefully) fix for glyph issues in gvim (proper fix is with the
|
||||||
|
" actual font patcher)
|
||||||
|
if g:webdevicons_gui_glyph_fix == 1 && has('gui_running')
|
||||||
|
call NERDTreeAddKeyMap({
|
||||||
|
\ 'key': g:NERDTreeMapChangeRoot,
|
||||||
|
\ 'callback': 'WebDevIconsNERDTreeChangeRootHandler',
|
||||||
|
\ 'override': 1,
|
||||||
|
\ 'quickhelpText': "change tree root to the\n\" selected dir\n\" plus webdevicons redraw\n\" hack fix",
|
||||||
|
\ 'scope': 'Node' })
|
||||||
|
|
||||||
|
call NERDTreeAddKeyMap({
|
||||||
|
\ 'key': g:NERDTreeMapUpdir,
|
||||||
|
\ 'callback': 'WebDevIconsNERDTreeUpDirCurrentRootClosedHandler',
|
||||||
|
\ 'override': 1,
|
||||||
|
\ 'quickhelpText': "move tree root up a dir\n\" plus webdevicons redraw\n\" hack fix",
|
||||||
|
\ 'scope': 'all' })
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
" modeline syntax:
|
||||||
|
" vim: fdm=marker tabstop=2 softtabstop=2 shiftwidth=2 expandtab:
|
||||||
731
.vim/bundle/vim-devicons/plugin/webdevicons.vim
Normal file
731
.vim/bundle/vim-devicons/plugin/webdevicons.vim
Normal file
@@ -0,0 +1,731 @@
|
|||||||
|
" Version: 0.8.4
|
||||||
|
" Webpage: https://github.com/ryanoasis/vim-devicons
|
||||||
|
" Maintainer: Ryan McIntyre <ryanoasis@gmail.com>
|
||||||
|
" License: see LICENSE
|
||||||
|
|
||||||
|
let s:version = '0.8.3'
|
||||||
|
let s:plugin_home = expand('<sfile>:p:h:h')
|
||||||
|
|
||||||
|
" set scriptencoding after 'encoding' and when using multibyte chars
|
||||||
|
scriptencoding utf-8
|
||||||
|
|
||||||
|
" standard fix/safety: line continuation (avoiding side effects) {{{1
|
||||||
|
"========================================================================
|
||||||
|
let s:save_cpo = &cpo
|
||||||
|
set cpo&vim
|
||||||
|
|
||||||
|
" standard loading / not loading {{{1
|
||||||
|
"========================================================================
|
||||||
|
|
||||||
|
if exists('g:loaded_webdevicons')
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
|
let g:loaded_webdevicons = 1
|
||||||
|
|
||||||
|
" config enable / disable settings {{{1
|
||||||
|
"========================================================================
|
||||||
|
|
||||||
|
if !exists('g:webdevicons_enable')
|
||||||
|
let g:webdevicons_enable = 1
|
||||||
|
endif
|
||||||
|
|
||||||
|
if !exists('g:webdevicons_enable_nerdtree')
|
||||||
|
let g:webdevicons_enable_nerdtree = 1
|
||||||
|
endif
|
||||||
|
|
||||||
|
if !exists('g:webdevicons_enable_unite')
|
||||||
|
let g:webdevicons_enable_unite = 1
|
||||||
|
endif
|
||||||
|
|
||||||
|
if !exists('g:webdevicons_enable_vimfiler')
|
||||||
|
let g:webdevicons_enable_vimfiler = 1
|
||||||
|
endif
|
||||||
|
|
||||||
|
if !exists('g:webdevicons_enable_ctrlp')
|
||||||
|
let g:webdevicons_enable_ctrlp = 1
|
||||||
|
endif
|
||||||
|
|
||||||
|
if !exists('g:webdevicons_enable_airline_tabline')
|
||||||
|
let g:webdevicons_enable_airline_tabline = 1
|
||||||
|
endif
|
||||||
|
|
||||||
|
if !exists('g:webdevicons_enable_airline_statusline')
|
||||||
|
let g:webdevicons_enable_airline_statusline = 1
|
||||||
|
endif
|
||||||
|
|
||||||
|
if !exists('g:webdevicons_enable_airline_statusline_fileformat_symbols')
|
||||||
|
let g:webdevicons_enable_airline_statusline_fileformat_symbols = 1
|
||||||
|
endif
|
||||||
|
|
||||||
|
if !exists('g:webdevicons_enable_flagship_statusline')
|
||||||
|
let g:webdevicons_enable_flagship_statusline = 1
|
||||||
|
endif
|
||||||
|
|
||||||
|
if !exists('g:webdevicons_enable_flagship_statusline_fileformat_symbols')
|
||||||
|
let g:webdevicons_enable_flagship_statusline_fileformat_symbols = 1
|
||||||
|
endif
|
||||||
|
|
||||||
|
if !exists('g:webdevicons_conceal_nerdtree_brackets')
|
||||||
|
let g:webdevicons_conceal_nerdtree_brackets = 1
|
||||||
|
endif
|
||||||
|
|
||||||
|
" config options {{{1
|
||||||
|
"========================================================================
|
||||||
|
|
||||||
|
if !exists('g:WebDevIconsUnicodeDecorateFileNodes')
|
||||||
|
let g:WebDevIconsUnicodeDecorateFileNodes = 1
|
||||||
|
endif
|
||||||
|
|
||||||
|
" whether to show default folder glyphs on directories:
|
||||||
|
if !exists('g:WebDevIconsUnicodeDecorateFolderNodes')
|
||||||
|
let g:WebDevIconsUnicodeDecorateFolderNodes = 0
|
||||||
|
endif
|
||||||
|
|
||||||
|
if !exists('g:DevIconsEnableFoldersOpenClose')
|
||||||
|
let g:DevIconsEnableFoldersOpenClose = 0
|
||||||
|
endif
|
||||||
|
|
||||||
|
if !exists('g:DevIconsEnableFolderPatternMatching')
|
||||||
|
let g:DevIconsEnableFolderPatternMatching = 1
|
||||||
|
endif
|
||||||
|
|
||||||
|
if !exists('g:DevIconsEnableFolderExtensionPatternMatching')
|
||||||
|
let g:DevIconsEnableFolderExtensionPatternMatching = 0
|
||||||
|
endif
|
||||||
|
|
||||||
|
" whether to try to match folder notes with any exact file node matches
|
||||||
|
" default is to match but requires WebDevIconsUnicodeDecorateFolderNodes set
|
||||||
|
" to 1:
|
||||||
|
if !exists('g:WebDevIconsUnicodeDecorateFolderNodesExactMatches')
|
||||||
|
let g:WebDevIconsUnicodeDecorateFolderNodesExactMatches = 1
|
||||||
|
endif
|
||||||
|
|
||||||
|
if !exists('g:WebDevIconsUnicodeGlyphDoubleWidth')
|
||||||
|
let g:WebDevIconsUnicodeGlyphDoubleWidth = 1
|
||||||
|
endif
|
||||||
|
|
||||||
|
if !exists('g:WebDevIconsNerdTreeAfterGlyphPadding')
|
||||||
|
let g:WebDevIconsNerdTreeAfterGlyphPadding = ' '
|
||||||
|
endif
|
||||||
|
|
||||||
|
if !exists('g:WebDevIconsNerdTreeGitPluginForceVAlign')
|
||||||
|
let g:WebDevIconsNerdTreeGitPluginForceVAlign = 1
|
||||||
|
endif
|
||||||
|
|
||||||
|
" fix for refreshing NERDTree flags upon creating new files
|
||||||
|
if !exists('g:NERDTreeUpdateOnCursorHold')
|
||||||
|
let g:NERDTreeUpdateOnCursorHold = 1
|
||||||
|
endif
|
||||||
|
|
||||||
|
" config defaults {{{1
|
||||||
|
"========================================================================
|
||||||
|
|
||||||
|
if !exists('g:WebDevIconsUnicodeDecorateFileNodesDefaultSymbol')
|
||||||
|
let g:WebDevIconsUnicodeDecorateFileNodesDefaultSymbol = ''
|
||||||
|
endif
|
||||||
|
|
||||||
|
if !exists('g:WebDevIconsUnicodeDecorateFolderNodesDefaultSymbol')
|
||||||
|
if g:DevIconsEnableFoldersOpenClose
|
||||||
|
" use new glyph
|
||||||
|
let g:WebDevIconsUnicodeDecorateFolderNodesDefaultSymbol = ''
|
||||||
|
else
|
||||||
|
" use older glyph
|
||||||
|
let g:WebDevIconsUnicodeDecorateFolderNodesDefaultSymbol = ''
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
if !exists('g:DevIconsDefaultFolderOpenSymbol')
|
||||||
|
let g:DevIconsDefaultFolderOpenSymbol = ''
|
||||||
|
endif
|
||||||
|
|
||||||
|
" functions {{{1
|
||||||
|
"========================================================================
|
||||||
|
|
||||||
|
" local functions {{{2
|
||||||
|
"========================================================================
|
||||||
|
|
||||||
|
" scope: local
|
||||||
|
function s:isDarwin()
|
||||||
|
if exists('s:is_darwin')
|
||||||
|
return s:is_darwin
|
||||||
|
endif
|
||||||
|
|
||||||
|
if exists('g:WebDevIconsOS')
|
||||||
|
let s:is_darwin = g:WebDevIconsOS ==? 'Darwin'
|
||||||
|
return s:is_darwin
|
||||||
|
endif
|
||||||
|
|
||||||
|
if has('macunix')
|
||||||
|
let s:is_darwin = 1
|
||||||
|
return s:is_darwin
|
||||||
|
endif
|
||||||
|
|
||||||
|
if ! has('unix')
|
||||||
|
let s:is_darwin = 0
|
||||||
|
return s:is_darwin
|
||||||
|
endif
|
||||||
|
|
||||||
|
if system('uname -s') ==# "Darwin\n"
|
||||||
|
let s:is_darwin = 1
|
||||||
|
else
|
||||||
|
let s:is_darwin = 0
|
||||||
|
endif
|
||||||
|
|
||||||
|
return s:is_darwin
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" scope: local
|
||||||
|
function! s:strip(input)
|
||||||
|
return substitute(a:input, '^\s*\(.\{-}\)\s*$', '\1', '')
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" scope: local
|
||||||
|
function! s:setDictionaries()
|
||||||
|
|
||||||
|
let s:file_node_extensions = {
|
||||||
|
\ 'styl' : '',
|
||||||
|
\ 'scss' : '',
|
||||||
|
\ 'htm' : '',
|
||||||
|
\ 'html' : '',
|
||||||
|
\ 'slim' : '',
|
||||||
|
\ 'ejs' : '',
|
||||||
|
\ 'css' : '',
|
||||||
|
\ 'less' : '',
|
||||||
|
\ 'md' : '',
|
||||||
|
\ 'markdown' : '',
|
||||||
|
\ 'json' : '',
|
||||||
|
\ 'js' : '',
|
||||||
|
\ 'jsx' : '',
|
||||||
|
\ 'rb' : '',
|
||||||
|
\ 'php' : '',
|
||||||
|
\ 'py' : '',
|
||||||
|
\ 'pyc' : '',
|
||||||
|
\ 'pyo' : '',
|
||||||
|
\ 'pyd' : '',
|
||||||
|
\ 'coffee' : '',
|
||||||
|
\ 'mustache' : '',
|
||||||
|
\ 'hbs' : '',
|
||||||
|
\ 'conf' : '',
|
||||||
|
\ 'ini' : '',
|
||||||
|
\ 'yml' : '',
|
||||||
|
\ 'bat' : '',
|
||||||
|
\ 'jpg' : '',
|
||||||
|
\ 'jpeg' : '',
|
||||||
|
\ 'bmp' : '',
|
||||||
|
\ 'png' : '',
|
||||||
|
\ 'gif' : '',
|
||||||
|
\ 'ico' : '',
|
||||||
|
\ 'twig' : '',
|
||||||
|
\ 'cpp' : '',
|
||||||
|
\ 'c++' : '',
|
||||||
|
\ 'cxx' : '',
|
||||||
|
\ 'cc' : '',
|
||||||
|
\ 'cp' : '',
|
||||||
|
\ 'c' : '',
|
||||||
|
\ 'hs' : '',
|
||||||
|
\ 'lhs' : '',
|
||||||
|
\ 'lua' : '',
|
||||||
|
\ 'java' : '',
|
||||||
|
\ 'sh' : '',
|
||||||
|
\ 'fish' : '',
|
||||||
|
\ 'ml' : 'λ',
|
||||||
|
\ 'mli' : 'λ',
|
||||||
|
\ 'diff' : '',
|
||||||
|
\ 'db' : '',
|
||||||
|
\ 'sql' : '',
|
||||||
|
\ 'dump' : '',
|
||||||
|
\ 'clj' : '',
|
||||||
|
\ 'cljc' : '',
|
||||||
|
\ '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' : ''
|
||||||
|
\}
|
||||||
|
|
||||||
|
let s:file_node_exact_matches = {
|
||||||
|
\ 'exact-match-case-sensitive-1.txt' : 'X1',
|
||||||
|
\ 'exact-match-case-sensitive-2' : 'X2',
|
||||||
|
\ 'gruntfile.coffee' : '',
|
||||||
|
\ 'gruntfile.js' : '',
|
||||||
|
\ 'gruntfile.ls' : '',
|
||||||
|
\ 'gulpfile.coffee' : '',
|
||||||
|
\ 'gulpfile.js' : '',
|
||||||
|
\ 'gulpfile.ls' : '',
|
||||||
|
\ 'dropbox' : '',
|
||||||
|
\ '.ds_store' : '',
|
||||||
|
\ '.gitconfig' : '',
|
||||||
|
\ '.gitignore' : '',
|
||||||
|
\ '.bashrc' : '',
|
||||||
|
\ '.bashprofile' : '',
|
||||||
|
\ 'favicon.ico' : '',
|
||||||
|
\ 'license' : '',
|
||||||
|
\ 'node_modules' : '',
|
||||||
|
\ 'react.jsx' : '',
|
||||||
|
\ 'procfile' : '',
|
||||||
|
\}
|
||||||
|
|
||||||
|
let s:file_node_pattern_matches = {
|
||||||
|
\ '.*jquery.*\.js$' : '',
|
||||||
|
\ '.*angular.*\.js$' : '',
|
||||||
|
\ '.*backbone.*\.js$' : '',
|
||||||
|
\ '.*require.*\.js$' : '',
|
||||||
|
\ '.*materialize.*\.js$' : '',
|
||||||
|
\ '.*materialize.*\.css$' : '',
|
||||||
|
\ '.*mootools.*\.js$' : ''
|
||||||
|
\}
|
||||||
|
|
||||||
|
if !exists('g:WebDevIconsUnicodeDecorateFileNodesExtensionSymbols')
|
||||||
|
let g:WebDevIconsUnicodeDecorateFileNodesExtensionSymbols = {}
|
||||||
|
endif
|
||||||
|
|
||||||
|
if !exists('g:WebDevIconsUnicodeDecorateFileNodesExactSymbols')
|
||||||
|
" do not remove: exact-match-case-sensitive-*
|
||||||
|
let g:WebDevIconsUnicodeDecorateFileNodesExactSymbols = {}
|
||||||
|
endif
|
||||||
|
|
||||||
|
if !exists('g:WebDevIconsUnicodeDecorateFileNodesPatternSymbols')
|
||||||
|
let g:WebDevIconsUnicodeDecorateFileNodesPatternSymbols = {}
|
||||||
|
endif
|
||||||
|
|
||||||
|
" iterate to fix allow user overriding of specific individual keys in vimrc (only gvimrc was working previously)
|
||||||
|
for [key, val] in items(s:file_node_extensions)
|
||||||
|
if !has_key(g:WebDevIconsUnicodeDecorateFileNodesExtensionSymbols, key)
|
||||||
|
let g:WebDevIconsUnicodeDecorateFileNodesExtensionSymbols[key] = val
|
||||||
|
endif
|
||||||
|
endfor
|
||||||
|
|
||||||
|
" iterate to fix allow user overriding of specific individual keys in vimrc (only gvimrc was working previously)
|
||||||
|
for [key, val] in items(s:file_node_exact_matches)
|
||||||
|
if !has_key(g:WebDevIconsUnicodeDecorateFileNodesExactSymbols, key)
|
||||||
|
let g:WebDevIconsUnicodeDecorateFileNodesExactSymbols[key] = val
|
||||||
|
endif
|
||||||
|
endfor
|
||||||
|
|
||||||
|
" iterate to fix allow user overriding of specific individual keys in vimrc (only gvimrc was working previously)
|
||||||
|
for [key, val] in items(s:file_node_pattern_matches)
|
||||||
|
if !has_key(g:WebDevIconsUnicodeDecorateFileNodesPatternSymbols, key)
|
||||||
|
let g:WebDevIconsUnicodeDecorateFileNodesPatternSymbols[key] = val
|
||||||
|
endif
|
||||||
|
endfor
|
||||||
|
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" scope: local
|
||||||
|
function! s:setSyntax()
|
||||||
|
if g:webdevicons_enable_nerdtree == 1 && g:webdevicons_conceal_nerdtree_brackets == 1
|
||||||
|
augroup webdevicons_conceal_nerdtree_brackets
|
||||||
|
au!
|
||||||
|
autocmd FileType nerdtree syntax match hideBracketsInNerdTree "\]" contained conceal containedin=ALL
|
||||||
|
autocmd FileType nerdtree syntax match hideBracketsInNerdTree "\[" contained conceal containedin=ALL
|
||||||
|
autocmd FileType nerdtree setlocal conceallevel=3
|
||||||
|
autocmd FileType nerdtree setlocal concealcursor=nvic
|
||||||
|
augroup END
|
||||||
|
endif
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" scope: local
|
||||||
|
" stole solution/idea from nerdtree-git-plugin :)
|
||||||
|
function! s:setCursorHold()
|
||||||
|
if g:webdevicons_enable_nerdtree
|
||||||
|
augroup webdevicons_cursor_hold
|
||||||
|
autocmd CursorHold * silent! call s:CursorHoldUpdate()
|
||||||
|
augroup END
|
||||||
|
endif
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" scope: local
|
||||||
|
" stole solution/idea from nerdtree-git-plugin :)
|
||||||
|
function! s:CursorHoldUpdate()
|
||||||
|
if g:NERDTreeUpdateOnCursorHold != 1
|
||||||
|
return
|
||||||
|
endif
|
||||||
|
|
||||||
|
if !g:NERDTree.IsOpen()
|
||||||
|
return
|
||||||
|
endif
|
||||||
|
|
||||||
|
" winnr need to make focus go to opened file
|
||||||
|
" CursorToTreeWin needed to avoid error on opening file
|
||||||
|
let l:winnr = winnr()
|
||||||
|
call g:NERDTree.CursorToTreeWin()
|
||||||
|
call b:NERDTree.root.refreshFlags()
|
||||||
|
call NERDTreeRender()
|
||||||
|
exec l:winnr . 'wincmd w'
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" scope: local
|
||||||
|
function! s:hardRefreshNerdTree()
|
||||||
|
if g:webdevicons_enable_nerdtree == 1 && g:webdevicons_conceal_nerdtree_brackets == 1 && g:NERDTree.IsOpen()
|
||||||
|
NERDTreeClose
|
||||||
|
NERDTree
|
||||||
|
endif
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" scope: local
|
||||||
|
function! s:softRefreshNerdTree()
|
||||||
|
if g:webdevicons_enable_nerdtree == 1 && g:NERDTree.IsOpen()
|
||||||
|
NERDTreeToggle
|
||||||
|
NERDTreeToggle
|
||||||
|
endif
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" for vim-flagship plugin {{{3
|
||||||
|
"========================================================================
|
||||||
|
|
||||||
|
" scope: local
|
||||||
|
function! s:initializeFlagship()
|
||||||
|
if exists('g:loaded_flagship')
|
||||||
|
if g:webdevicons_enable_flagship_statusline
|
||||||
|
augroup webdevicons_flagship_filetype
|
||||||
|
autocmd User Flags call Hoist('buffer', 'WebDevIconsGetFileTypeSymbol')
|
||||||
|
augroup END
|
||||||
|
endif
|
||||||
|
|
||||||
|
if g:webdevicons_enable_flagship_statusline_fileformat_symbols
|
||||||
|
augroup webdevicons_flagship_filesymbol
|
||||||
|
autocmd User Flags call Hoist('buffer', 'WebDevIconsGetFileFormatSymbol')
|
||||||
|
augroup END
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" for unite plugin {{{3
|
||||||
|
"========================================================================
|
||||||
|
|
||||||
|
" scope: local
|
||||||
|
function! s:initializeUnite()
|
||||||
|
if exists('g:loaded_unite') && g:webdevicons_enable_unite
|
||||||
|
let s:filters = {
|
||||||
|
\ 'name' : 'devicons_converter',
|
||||||
|
\}
|
||||||
|
|
||||||
|
function! s:filters.filter(candidates, context)
|
||||||
|
for candidate in a:candidates
|
||||||
|
|
||||||
|
if has_key(candidate, 'action__buffer_nr')
|
||||||
|
let bufname = bufname(candidate.action__buffer_nr)
|
||||||
|
let filename = fnamemodify(bufname, ':p:t')
|
||||||
|
let path = fnamemodify(bufname, ':p:h')
|
||||||
|
elseif has_key(candidate, 'word') && has_key(candidate, 'action__path')
|
||||||
|
let path = candidate.action__path
|
||||||
|
let filename = candidate.word
|
||||||
|
endif
|
||||||
|
|
||||||
|
let icon = WebDevIconsGetFileTypeSymbol(filename, isdirectory(filename))
|
||||||
|
|
||||||
|
" prevent filenames of buffers getting 'lost'
|
||||||
|
if filename != path
|
||||||
|
let path = printf('%s', filename)
|
||||||
|
endif
|
||||||
|
|
||||||
|
" Customize output format.
|
||||||
|
let candidate.abbr = printf('%s %s', icon, path)
|
||||||
|
endfor
|
||||||
|
return a:candidates
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
call unite#define_filter(s:filters)
|
||||||
|
unlet s:filters
|
||||||
|
|
||||||
|
call unite#custom#source('file,file_rec,buffer,file_rec/async,file_rec/neovim,file_rec/neovim2,file_rec/git', 'converters', 'devicons_converter')
|
||||||
|
endif
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" for vimfiler plugin {{{3
|
||||||
|
"========================================================================
|
||||||
|
|
||||||
|
" scope: local
|
||||||
|
function! s:initializeVimfiler()
|
||||||
|
if exists('g:loaded_vimfiler') && g:webdevicons_enable_vimfiler
|
||||||
|
call vimfiler#custom#profile('default', 'context', {
|
||||||
|
\ 'columns' : 'type:devicons:size:time'
|
||||||
|
\ })
|
||||||
|
endif
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" for ctrlp plugin {{{3
|
||||||
|
"========================================================================
|
||||||
|
|
||||||
|
" scope: local
|
||||||
|
" Initialize for up to date ctrlp fork: ctrlpvim/ctrlp.vim
|
||||||
|
" Support for kien/ctrlp.vim deprecated since v0.7.0
|
||||||
|
" @TODO implementation for CtrlP buffer and find file mode
|
||||||
|
function! s:initializeCtrlP()
|
||||||
|
let l:ctrlp_warning_message = 'vim-devicons: https://github.com/kien/ctrlp.vim is deprecated since v0.7.0, please use https://github.com/ctrlpvim/ctrlp.vim'
|
||||||
|
let l:ctrlp_warned_file = s:plugin_home . '/status_warned_ctrlp'
|
||||||
|
|
||||||
|
if exists('g:loaded_ctrlp') && g:webdevicons_enable_ctrlp
|
||||||
|
let s:glyphASCIIRangeStart = 57344
|
||||||
|
let s:glyphASCIIRangeEnd = 63743
|
||||||
|
let g:ctrlp_open_func = {
|
||||||
|
\ 'mru files': 'webdevicons#ctrlPOpenFunc'
|
||||||
|
\ }
|
||||||
|
|
||||||
|
if exists('g:ctrlp_mruf_map_string')
|
||||||
|
" logic for ctrlpvim/ctrlp.vim:
|
||||||
|
let g:ctrlp_mruf_map_string = '!stridx(v:val, cwd) ? WebDevIconsGetFileTypeSymbol(strpart(v:val, strridx(v:val, "/"))) . " " . strpart(v:val, idx) : g:WebDevIconsUnicodeDecorateFileNodesDefaultSymbol . " " . v:val'
|
||||||
|
elseif empty(glob(l:ctrlp_warned_file))
|
||||||
|
" logic for kien/ctrlp.vim:
|
||||||
|
echohl WarningMsg |
|
||||||
|
\ echomsg l:ctrlp_warning_message
|
||||||
|
" only warn first time, do not warn again:
|
||||||
|
try
|
||||||
|
execute writefile(['File automatically generated after warning about CtrlP once', l:ctrlp_warning_message], l:ctrlp_warned_file)
|
||||||
|
catch
|
||||||
|
endtry
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" scope: local
|
||||||
|
function! s:initialize()
|
||||||
|
call s:setDictionaries()
|
||||||
|
call s:setSyntax()
|
||||||
|
call s:setCursorHold()
|
||||||
|
call s:initializeFlagship()
|
||||||
|
call s:initializeUnite()
|
||||||
|
call s:initializeVimfiler()
|
||||||
|
call s:initializeCtrlP()
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" local initialization {{{2
|
||||||
|
"========================================================================
|
||||||
|
|
||||||
|
call s:initialize()
|
||||||
|
|
||||||
|
" public functions {{{2
|
||||||
|
"========================================================================
|
||||||
|
|
||||||
|
" scope: public
|
||||||
|
function! webdevicons#version()
|
||||||
|
return s:version
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" scope: public
|
||||||
|
" allow the first version of refresh to now call softRefresh
|
||||||
|
function! webdevicons#refresh()
|
||||||
|
call webdevicons#softRefresh()
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" scope: public
|
||||||
|
function! webdevicons#hardRefresh()
|
||||||
|
call s:setSyntax()
|
||||||
|
call s:hardRefreshNerdTree()
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" scope: public
|
||||||
|
function! webdevicons#softRefresh()
|
||||||
|
call s:setSyntax()
|
||||||
|
call s:softRefreshNerdTree()
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" scope: public
|
||||||
|
function! webdevicons#ctrlPOpenFunc(action, line)
|
||||||
|
let line = a:line
|
||||||
|
" Remove non-breaking space which is present (NBSP U+00A0)
|
||||||
|
let line = substitute(line, ' ', '', '')
|
||||||
|
" Trim leading and trailing whitespace and replace private character range characters
|
||||||
|
let glyphASCIICandidate = char2nr(strpart(line, 0, 3))
|
||||||
|
|
||||||
|
if glyphASCIICandidate >= s:glyphASCIIRangeStart && glyphASCIICandidate <= s:glyphASCIIRangeEnd
|
||||||
|
let line = s:strip(strpart(line, 3))
|
||||||
|
endif
|
||||||
|
" Use CtrlP's default file opening function
|
||||||
|
call call('ctrlp#acceptfile', [a:action, line])
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" a:1 (bufferName), a:2 (isDirectory)
|
||||||
|
" scope: public
|
||||||
|
function! WebDevIconsGetFileTypeSymbol(...)
|
||||||
|
if a:0 == 0
|
||||||
|
let fileNodeExtension = expand('%:e')
|
||||||
|
let fileNode = expand('%:t')
|
||||||
|
let isDirectory = 0
|
||||||
|
else
|
||||||
|
let fileNodeExtension = fnamemodify(a:1, ':e')
|
||||||
|
let fileNode = fnamemodify(a:1, ':t')
|
||||||
|
if a:0 == 2
|
||||||
|
let isDirectory = a:2
|
||||||
|
else
|
||||||
|
let isDirectory = 0
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
if isDirectory == 0 || g:DevIconsEnableFolderPatternMatching
|
||||||
|
|
||||||
|
let symbol = g:WebDevIconsUnicodeDecorateFileNodesDefaultSymbol
|
||||||
|
let fileNodeExtension = tolower(fileNodeExtension)
|
||||||
|
let fileNode = tolower(fileNode)
|
||||||
|
|
||||||
|
for [pattern, glyph] in items(g:WebDevIconsUnicodeDecorateFileNodesPatternSymbols)
|
||||||
|
if match(fileNode, pattern) != -1
|
||||||
|
let symbol = glyph
|
||||||
|
break
|
||||||
|
endif
|
||||||
|
endfor
|
||||||
|
|
||||||
|
if symbol == g:WebDevIconsUnicodeDecorateFileNodesDefaultSymbol
|
||||||
|
if has_key(g:WebDevIconsUnicodeDecorateFileNodesExactSymbols, fileNode)
|
||||||
|
let symbol = g:WebDevIconsUnicodeDecorateFileNodesExactSymbols[fileNode]
|
||||||
|
elseif ((isDirectory == 1 && g:DevIconsEnableFolderExtensionPatternMatching) || isDirectory == 0) && has_key(g:WebDevIconsUnicodeDecorateFileNodesExtensionSymbols, fileNodeExtension)
|
||||||
|
let symbol = g:WebDevIconsUnicodeDecorateFileNodesExtensionSymbols[fileNodeExtension]
|
||||||
|
elseif isDirectory == 1
|
||||||
|
let symbol = g:WebDevIconsUnicodeDecorateFolderNodesDefaultSymbol
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
else
|
||||||
|
let symbol = g:WebDevIconsUnicodeDecorateFolderNodesDefaultSymbol
|
||||||
|
endif
|
||||||
|
|
||||||
|
" Temporary (hopefully) fix for glyph issues in gvim (proper fix is with the
|
||||||
|
" actual font patcher)
|
||||||
|
let artifactFix = "\u00A0"
|
||||||
|
|
||||||
|
return symbol . artifactFix
|
||||||
|
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" scope: public
|
||||||
|
function! WebDevIconsGetFileFormatSymbol(...)
|
||||||
|
let fileformat = ''
|
||||||
|
|
||||||
|
if &fileformat ==? 'dos'
|
||||||
|
let fileformat = ''
|
||||||
|
elseif &fileformat ==? 'unix'
|
||||||
|
if s:isDarwin()
|
||||||
|
let fileformat = ''
|
||||||
|
else
|
||||||
|
let fileformat = ''
|
||||||
|
endif
|
||||||
|
elseif &fileformat ==? 'mac'
|
||||||
|
let fileformat = ''
|
||||||
|
endif
|
||||||
|
|
||||||
|
" Temporary (hopefully) fix for glyph issues in gvim (proper fix is with the
|
||||||
|
" actual font patcher)
|
||||||
|
let artifactFix = "\u00A0"
|
||||||
|
|
||||||
|
return fileformat . artifactFix
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" for airline plugin {{{3
|
||||||
|
"========================================================================
|
||||||
|
|
||||||
|
" scope: public
|
||||||
|
function! AirlineWebDevIcons(...)
|
||||||
|
let w:airline_section_x = get(w:, 'airline_section_x', g:airline_section_x)
|
||||||
|
let w:airline_section_x .= ' %{WebDevIconsGetFileTypeSymbol()} '
|
||||||
|
if g:webdevicons_enable_airline_statusline_fileformat_symbols
|
||||||
|
let w:airline_section_y = ' %{&fenc . " " . WebDevIconsGetFileFormatSymbol()} '
|
||||||
|
endif
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
if g:webdevicons_enable == 1 && exists('g:loaded_airline') && g:loaded_airline == 1 && g:webdevicons_enable_airline_statusline
|
||||||
|
call airline#add_statusline_func('AirlineWebDevIcons')
|
||||||
|
endif
|
||||||
|
|
||||||
|
if g:webdevicons_enable == 1 && g:webdevicons_enable_airline_tabline
|
||||||
|
" Store original formatter.
|
||||||
|
if exists('g:airline#extensions#tabline#formatter')
|
||||||
|
let g:_webdevicons_airline_orig_formatter = g:airline#extensions#tabline#formatter
|
||||||
|
else
|
||||||
|
let g:_webdevicons_airline_orig_formatter = 'default'
|
||||||
|
endif
|
||||||
|
let g:airline#extensions#tabline#formatter = 'webdevicons'
|
||||||
|
endif
|
||||||
|
|
||||||
|
" for nerdtree plugin {{{3
|
||||||
|
"========================================================================
|
||||||
|
|
||||||
|
" scope: public
|
||||||
|
function! NERDTreeWebDevIconsRefreshListener(event)
|
||||||
|
let path = a:event.subject
|
||||||
|
let padding = g:WebDevIconsNerdTreeAfterGlyphPadding
|
||||||
|
let prePadding = ''
|
||||||
|
let hasGitFlags = (len(path.flagSet._flagsForScope('git')) > 0)
|
||||||
|
let hasGitNerdTreePlugin = (exists('g:loaded_nerdtree_git_status') == 1)
|
||||||
|
|
||||||
|
if g:WebDevIconsUnicodeGlyphDoubleWidth == 0
|
||||||
|
let padding = ''
|
||||||
|
endif
|
||||||
|
|
||||||
|
if hasGitFlags && g:WebDevIconsUnicodeGlyphDoubleWidth == 1
|
||||||
|
let prePadding = ' '
|
||||||
|
endif
|
||||||
|
|
||||||
|
" align vertically at the same level: non git-flag nodes with git-flag nodes
|
||||||
|
if g:WebDevIconsNerdTreeGitPluginForceVAlign && !hasGitFlags && hasGitNerdTreePlugin
|
||||||
|
let prePadding .= ' '
|
||||||
|
endif
|
||||||
|
|
||||||
|
if !path.isDirectory
|
||||||
|
let flag = prePadding . WebDevIconsGetFileTypeSymbol(path.str()) . padding
|
||||||
|
elseif path.isDirectory && g:WebDevIconsUnicodeDecorateFolderNodes == 1
|
||||||
|
|
||||||
|
let directoryOpened = 0
|
||||||
|
|
||||||
|
if g:DevIconsEnableFoldersOpenClose && len(path.flagSet._flagsForScope('webdevicons')) > 0
|
||||||
|
" isOpen is not available on the path listener, compare using symbols
|
||||||
|
if path.flagSet._flagsForScope('webdevicons')[0] == prePadding . g:DevIconsDefaultFolderOpenSymbol . padding
|
||||||
|
let directoryOpened = 1
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
if g:WebDevIconsUnicodeDecorateFolderNodesExactMatches == 1
|
||||||
|
if g:DevIconsEnableFoldersOpenClose && directoryOpened
|
||||||
|
let flag = prePadding . g:DevIconsDefaultFolderOpenSymbol . padding
|
||||||
|
else
|
||||||
|
let flag = prePadding . WebDevIconsGetFileTypeSymbol(path.str(), path.isDirectory) . padding
|
||||||
|
endif
|
||||||
|
else
|
||||||
|
if g:DevIconsEnableFoldersOpenClose && directoryOpened
|
||||||
|
let flag = prePadding . g:DevIconsDefaultFolderOpenSymbol . padding
|
||||||
|
else
|
||||||
|
let flag = prePadding . g:WebDevIconsUnicodeDecorateFolderNodesDefaultSymbol
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
else
|
||||||
|
let flag = ''
|
||||||
|
endif
|
||||||
|
|
||||||
|
call path.flagSet.clearFlags('webdevicons')
|
||||||
|
|
||||||
|
if flag !=? ''
|
||||||
|
call path.flagSet.addFlag('webdevicons', flag)
|
||||||
|
endif
|
||||||
|
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" standard fix/safety: line continuation (avoiding side effects) {{{1
|
||||||
|
"========================================================================
|
||||||
|
let &cpo = s:save_cpo
|
||||||
|
unlet s:save_cpo
|
||||||
|
|
||||||
|
" modeline syntax:
|
||||||
|
" vim: fdm=marker tabstop=2 softtabstop=2 shiftwidth=2 expandtab:
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
import pkg_resources
|
||||||
|
pkg_resources.declare_namespace(__name__)
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
import pkg_resources
|
||||||
|
pkg_resources.declare_namespace(__name__)
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# vim:se fenc=utf8 noet:
|
||||||
|
from __future__ import (unicode_literals, division, absolute_import, print_function)
|
||||||
|
|
||||||
|
try:
|
||||||
|
import vim
|
||||||
|
except ImportError:
|
||||||
|
vim = {}
|
||||||
|
|
||||||
|
from powerline.bindings.vim import (vim_get_func, buffer_name)
|
||||||
|
from powerline.theme import requires_segment_info
|
||||||
|
|
||||||
|
@requires_segment_info
|
||||||
|
def webdevicons(pl, segment_info):
|
||||||
|
webdevicons = vim_get_func('WebDevIconsGetFileTypeSymbol')
|
||||||
|
name = buffer_name(segment_info)
|
||||||
|
return [] if not webdevicons else [{
|
||||||
|
'contents': webdevicons(name),
|
||||||
|
'highlight_groups': ['webdevicons', 'file_name'],
|
||||||
|
}]
|
||||||
|
|
||||||
|
@requires_segment_info
|
||||||
|
def webdevicons_file_format(pl, segment_info):
|
||||||
|
webdevicons_file_format = vim_get_func('WebDevIconsGetFileFormatSymbol')
|
||||||
|
return [] if not webdevicons_file_format else [{
|
||||||
|
'contents': webdevicons_file_format(),
|
||||||
|
'highlight_groups': ['webdevicons_file_format', 'file_format'],
|
||||||
|
}]
|
||||||
606
.vim/bundle/vim-devicons/readme.md
Normal file
606
.vim/bundle/vim-devicons/readme.md
Normal file
@@ -0,0 +1,606 @@
|
|||||||
|
# VimDevIcons – Add Icons to Your Plugins
|
||||||
|
|
||||||
|
<h1 align="center">
|
||||||
|
<img src="https://github.com/ryanoasis/vim-devicons/wiki/screenshots/v0.8.x/branding-logo.png" alt="vim-devicons">
|
||||||
|
</h1>
|
||||||
|
|
||||||
|
[![GitHub version][img-version-badge]][badge-version]
|
||||||
|
[![Join the chat at https://gitter.im/ryanoasis/vim-devicons][img-gitter-badge]][badge-gitter]
|
||||||
|
[![Flattr this git repo][img-flattr-badge]][badge-flattr]
|
||||||
|
|
||||||
|
**VimDevIcons** adds filetype glyphs (icons) to other plugins such as [NERDTree], [vim-airline], [CtrlP][ctrlpvim-CtrlP], [powerline], [unite], [lightline.vim], [vim-startify], [vimfiler], and [flagship].
|
||||||
|
|
||||||
|
<h3 align="center">
|
||||||
|
<img src="https://github.com/ryanoasis/vim-devicons/wiki/screenshots/v0.8.x/overall-screenshot.png" alt="vim-devicons overall screenshot" />
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
Features
|
||||||
|
--------
|
||||||
|
|
||||||
|
**VimDevIcons integrates with these plugins and more:**
|
||||||
|
|
||||||
|
[NERDTree] | [vim-airline] | [CtrlP][ctrlpvim-CtrlP] | [powerline] | [unite] | [lightline.vim] | [vim-startify] | [vimfiler] | [flagship]
|
||||||
|
|
||||||
|
* 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 _[(» More details... «)](#detailed-features)_
|
||||||
|
* Supports full filename matches _[(» More details... «)](#detailed-features)_
|
||||||
|
* Supports library pattern matches _[(» More details... «)](#detailed-features)_
|
||||||
|
* Works with patched fonts, especially [Nerd Fonts]
|
||||||
|
|
||||||
|
Quick Links
|
||||||
|
-----------
|
||||||
|
|
||||||
|
| **[Screenshots](#screenshots)**| **[API](#api)** | **[Fonts ➶][patched-fonts]** | **[Patcher ➶][Nerd Fonts]** |
|
||||||
|
|--------------------------------|-----------------|------------------------------|-----------------------------|
|
||||||
|
| [![screenshots][img-visual-toc-screenshots]](#screenshots) | [![api][img-visual-toc-api]](#api) | [![patcher-logo-small][img-visual-toc-patched-fonts]][patched-fonts] | [![patcher-logo-small][img-visual-toc-fonts-patcher]][Nerd Fonts] |
|
||||||
|
|
||||||
|
Table of Contents
|
||||||
|
-----------------
|
||||||
|
|
||||||
|
[**TL;DR Installation**](#quick-installation)
|
||||||
|
|
||||||
|
[**Installation**](#installation)
|
||||||
|
|
||||||
|
[**Usage**](#usage)
|
||||||
|
* [**Lightline Setup**](#lightline-setup)
|
||||||
|
* [**Powerline Setup**](#powerline-setup)
|
||||||
|
* [**Extra Configuration**](#extra-configuration)
|
||||||
|
* [**Character Mappings**](#character-mappings)
|
||||||
|
|
||||||
|
[**Features**](#detailed-features)
|
||||||
|
|
||||||
|
[**Screenshots**](#screenshots)
|
||||||
|
|
||||||
|
[**Methods**](#public-methods)
|
||||||
|
|
||||||
|
[**Developer**](#developer)
|
||||||
|
* [**API**](#api)
|
||||||
|
* [**Contributing**](#contributing)
|
||||||
|
* [**Inspiration and special thanks**](#inspiration-and-special-thanks)
|
||||||
|
* [**Todo**](#todo)
|
||||||
|
* [**License**](#license)
|
||||||
|
|
||||||
|
[**FAQ / Troubleshooting**](#faq--troubleshooting)
|
||||||
|
|
||||||
|
[**Rationale**](#rationale)
|
||||||
|
|
||||||
|
<br />
|
||||||
|
|
||||||
|
<a name="quick-installation"></a>
|
||||||
|
Quick Installation (TL;DR)
|
||||||
|
--------------------------
|
||||||
|
|
||||||
|
1. Download and install a patched **[Nerd Font]** (or patch your own) _[(» More details... «)][Nerd Fonts]_
|
||||||
|
|
||||||
|
2. Install the plugin per your usual method _[(» More details... «)](#installation)_
|
||||||
|
|
||||||
|
3. Configure Vim _[(» More details... «)](#install-step3)_
|
||||||
|
* a. **vim**: Set your terminal emulator font
|
||||||
|
* b. **gvim**: Set `guifont` in your `vimrc`
|
||||||
|
|
||||||
|
Installation
|
||||||
|
------------
|
||||||
|
|
||||||
|
<a name="install-step1"></a>
|
||||||
|
### Step 1 `Nerd Font`
|
||||||
|
|
||||||
|
Get a [**Nerd Font!**][font-installation] or [patch your own.][nerd-fonts-patcher]
|
||||||
|
Without this, things break
|
||||||
|
|
||||||
|
<a name="install-step2"></a>
|
||||||
|
### Step 2 `VimDevIcons Plugin`
|
||||||
|
|
||||||
|
Choose your favorite plugin manager
|
||||||
|
|
||||||
|
#### [Pathogen](https://github.com/tpope/vim-pathogen)
|
||||||
|
* `git clone https://github.com/ryanoasis/vim-devicons ~/.vim/bundle/vim-devicons`
|
||||||
|
|
||||||
|
#### [NeoBundle](https://github.com/Shougo/neobundle.vim)
|
||||||
|
* Add to vimrc:
|
||||||
|
|
||||||
|
```vim
|
||||||
|
NeoBundle 'ryanoasis/vim-devicons'
|
||||||
|
```
|
||||||
|
* And install it:
|
||||||
|
|
||||||
|
```vim
|
||||||
|
:so ~/.vimrc
|
||||||
|
:NeoBundleInstall
|
||||||
|
```
|
||||||
|
|
||||||
|
#### [Vundle](https://github.com/gmarik/vundle)
|
||||||
|
* Add to vimrc:
|
||||||
|
|
||||||
|
```vim
|
||||||
|
Plugin 'ryanoasis/vim-devicons'
|
||||||
|
```
|
||||||
|
* And install it:
|
||||||
|
|
||||||
|
```vim
|
||||||
|
:so ~/.vimrc
|
||||||
|
:PluginInstall
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Manual
|
||||||
|
* copy all of the files into your `~/.vim` directory
|
||||||
|
|
||||||
|
<a name="install-step3"></a>
|
||||||
|
### Step 3 `Configure Vim`
|
||||||
|
|
||||||
|
Add the following in your `.vimrc` or `.gvimrc`:
|
||||||
|
|
||||||
|
##### Set VimDevIcons to load _before_ these plugins!
|
||||||
|
|
||||||
|
[NERDTree] | [vim-airline] | [CtrlP] | [powerline] | [unite] | [lightline.vim] | [vim-startify] | [vimfiler] | [flagship]
|
||||||
|
|
||||||
|
##### Set encoding to UTF-8 to show glyphs
|
||||||
|
|
||||||
|
```vim
|
||||||
|
set encoding=utf8
|
||||||
|
```
|
||||||
|
|
||||||
|
##### Set Vim font to a Nerd Font
|
||||||
|
|
||||||
|
Linux
|
||||||
|
```vim
|
||||||
|
set guifont=<FONT_NAME> <FONT_SIZE>
|
||||||
|
```
|
||||||
|
|
||||||
|
```vim
|
||||||
|
set guifont=Droid\ Sans\ Mono\ for\ Powerline\ Plus\ Nerd\ File\ Types\ 11
|
||||||
|
```
|
||||||
|
|
||||||
|
macOS (OS X) and Windows
|
||||||
|
```vim
|
||||||
|
set guifont=<FONT_NAME>:h<FONT_SIZE>
|
||||||
|
```
|
||||||
|
|
||||||
|
```vim
|
||||||
|
set guifont=Droid\ Sans\ Mono\ for\ Powerline\ Plus\ Nerd\ File\ Types:h11
|
||||||
|
```
|
||||||
|
|
||||||
|
**Note:** if you don't set `guifont` then you'll have to set your terminal's
|
||||||
|
font, else things break!
|
||||||
|
|
||||||
|
##### If you use vim-airline you need this
|
||||||
|
```vim
|
||||||
|
let g:airline_powerline_fonts = 1
|
||||||
|
```
|
||||||
|
|
||||||
|
##### vimrc examples
|
||||||
|
* [Sample Windows vimrc configuration 1](https://github.com/ryanoasis/vim-devicons/wiki/samples/v0.8.x/.vimrc-windows-1)
|
||||||
|
* [Sample Linux vimrc configuration 1](https://github.com/ryanoasis/vim-devicons/wiki/samples/v0.8.x/.vimrc-linux-1)
|
||||||
|
|
||||||
|
<br />
|
||||||
|
|
||||||
|
### That's it! You're done. ✅
|
||||||
|
|
||||||
|
<br />
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
If you installed and setup things correctly you should now see icons in the [supported plugins](#features)!
|
||||||
|
|
||||||
|
**Notes on include order:**
|
||||||
|
* for support of these plugins: [NERDTree], [vim-airline], [CtrlP], [powerline], [unite], [vimfiler], [flagship] you **must** configure vim to load those plugins **_before_** vim-devicons loads.
|
||||||
|
* for better [nerdtree-git-plugin] support, you _should_ configure vim to load nerdtree-git-plugin **_before_** VimDevIcons loads.
|
||||||
|
|
||||||
|
[Lightline Setup](#lightline-setup) and [Powerline Setup](#powerline-setup) require some extra setup as shown below:
|
||||||
|
|
||||||
|
|
||||||
|
### Lightline Setup
|
||||||
|
|
||||||
|
To add the appropriate icon to [lightline](https://github.com/itchyny/lightline.vim), call the function `WebDevIconsGetFileTypeSymbol()` and/or `WebDevIconsGetFileFormatSymbol()` in your `.vimrc`. For example, you could set your sections to:
|
||||||
|
|
||||||
|
```vim
|
||||||
|
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
|
||||||
|
```
|
||||||
|
|
||||||
|
### Powerline Setup
|
||||||
|
|
||||||
|
* _Note this is for the current [Powerline][powerline] not the [deprecated vim-powerline](https://github.com/Lokaltog/vim-powerline)_
|
||||||
|
|
||||||
|
To enable for [Powerline][powerline] some `vimrc` and powerline configuration changes are needed:
|
||||||
|
|
||||||
|
`vimrc` changes (only required if you don't already have powerline setup for vim):
|
||||||
|
|
||||||
|
```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
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"function": "vim_devicons.powerline.segments.webdevicons",
|
||||||
|
"priority": 10,
|
||||||
|
"draw_soft_divider": false,
|
||||||
|
"after": " "
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
file format segment
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"function": "vim_devicons.powerline.segments.webdevicons_file_format",
|
||||||
|
"draw_soft_divider": false,
|
||||||
|
"exclude_modes": ["nc"],
|
||||||
|
"priority": 90
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
for full example see [sample file](https://github.com/ryanoasis/vim-devicons/wiki/samples/v0.8.x/powerline/themes/vim/default.json)
|
||||||
|
|
||||||
|
Detailed Features
|
||||||
|
-----------------
|
||||||
|
|
||||||
|
* Adds filetype glyphs (icons) to various vim plugins, currently supports:
|
||||||
|
* [NERDTree][]
|
||||||
|
* [vim-airline][] (statusline and tabline)
|
||||||
|
* [CtrlP][ctrlpvim-CtrlP]
|
||||||
|
* Currently only MRU file mode supported
|
||||||
|
* [powerline][] (statusline)
|
||||||
|
* see: [powerline setup](#powerline-setup)
|
||||||
|
* [unite]
|
||||||
|
* Currently supports `file`, `file_rec`, `buffer`, `file_rec/async`, and `file_rec/neovim`
|
||||||
|
* [lightline.vim][] (statusline)
|
||||||
|
* see: [lightline setup](#lightline-setup)
|
||||||
|
* [vim-startify]
|
||||||
|
* [vimfiler]
|
||||||
|
* [flagship]
|
||||||
|
* Support is **experimental** because the [API may be changing](https://github.com/tpope/vim-flagship/issues/6#issuecomment-116121220)
|
||||||
|
* 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, scss, htm, html, slim, ejs, css, less, md, json, js, jsx, rb, php, py, pyc, pyd, pyo, coffee, mustache, hbs, conf, ini, yml, bat, jpg, jpeg, bmp, png, gif, twig, cpp, c++, cxx, cc, cp, c, hs, lhs, lua, java, sh, 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```
|
||||||
|
* 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, .bashprofile, favicon.ico, license, node_modules, react.jsx, procfile```
|
||||||
|
* Supports a few library pattern matches, by default:
|
||||||
|
* ```jquery, angular, backbone, requirejs, materialize, mootools```
|
||||||
|
* Works with patched fonts, especially [Nerd Fonts]
|
||||||
|
|
||||||
|
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:
|
||||||
|
|
||||||
|
```vim
|
||||||
|
" loading the plugin
|
||||||
|
let g:webdevicons_enable = 1
|
||||||
|
```
|
||||||
|
|
||||||
|
```vim
|
||||||
|
" adding the flags to NERDTree
|
||||||
|
let g:webdevicons_enable_nerdtree = 1
|
||||||
|
```
|
||||||
|
|
||||||
|
```vim
|
||||||
|
" adding the custom source to unite
|
||||||
|
let g:webdevicons_enable_unite = 1
|
||||||
|
```
|
||||||
|
|
||||||
|
```vim
|
||||||
|
" adding the column to vimfiler
|
||||||
|
let g:webdevicons_enable_vimfiler = 1
|
||||||
|
```
|
||||||
|
|
||||||
|
```vim
|
||||||
|
" adding to vim-airline's tabline
|
||||||
|
let g:webdevicons_enable_airline_tabline = 1
|
||||||
|
```
|
||||||
|
|
||||||
|
```vim
|
||||||
|
" adding to vim-airline's statusline
|
||||||
|
let g:webdevicons_enable_airline_statusline = 1
|
||||||
|
```
|
||||||
|
|
||||||
|
```vim
|
||||||
|
" ctrlp MRU file mode glyphs
|
||||||
|
let g:webdevicons_enable_ctrlp = 1
|
||||||
|
```
|
||||||
|
|
||||||
|
```vim
|
||||||
|
" adding to flagship's statusline
|
||||||
|
let g:webdevicons_enable_flagship_statusline = 1
|
||||||
|
```
|
||||||
|
|
||||||
|
```vim
|
||||||
|
" turn on/off file node glyph decorations (not particularly useful)
|
||||||
|
let g:WebDevIconsUnicodeDecorateFileNodes = 1
|
||||||
|
```
|
||||||
|
|
||||||
|
```vim
|
||||||
|
" 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
|
||||||
|
```
|
||||||
|
|
||||||
|
```vim
|
||||||
|
" whether or not to show the nerdtree brackets around flags
|
||||||
|
let g:webdevicons_conceal_nerdtree_brackets = 1
|
||||||
|
```
|
||||||
|
|
||||||
|
```vim
|
||||||
|
" the amount of space to use after the glyph character (default ' ')
|
||||||
|
let g:WebDevIconsNerdTreeAfterGlyphPadding = ' '
|
||||||
|
```
|
||||||
|
|
||||||
|
```vim
|
||||||
|
" Force extra padding in NERDTree so that the filetype icons line up vertically
|
||||||
|
let g:WebDevIconsNerdTreeGitPluginForceVAlign = 1
|
||||||
|
```
|
||||||
|
|
||||||
|
### Character Mappings
|
||||||
|
|
||||||
|
* `ƛ` is used as an example below, substitute for the glyph you **actually** want to use
|
||||||
|
|
||||||
|
```vim
|
||||||
|
" change the default character when no match found
|
||||||
|
let g:WebDevIconsUnicodeDecorateFileNodesDefaultSymbol = 'ƛ'
|
||||||
|
```
|
||||||
|
|
||||||
|
```vim
|
||||||
|
" enable folder/directory glyph flag (disabled by default with 0)
|
||||||
|
let g:WebDevIconsUnicodeDecorateFolderNodes = 1
|
||||||
|
```
|
||||||
|
|
||||||
|
```vim
|
||||||
|
" enable open and close folder/directory glyph flags (disabled by default with 0)
|
||||||
|
let g:DevIconsEnableFoldersOpenClose = 1
|
||||||
|
```
|
||||||
|
|
||||||
|
```vim
|
||||||
|
" enable pattern matching glyphs on folder/directory (enabled by default with 1)
|
||||||
|
let g:DevIconsEnableFolderPatternMatching = 1
|
||||||
|
```
|
||||||
|
|
||||||
|
```vim
|
||||||
|
" enable file extension pattern matching glyphs on folder/directory (disabled by default with 0)
|
||||||
|
let g:DevIconsEnableFolderExtensionPatternMatching = 0
|
||||||
|
```
|
||||||
|
|
||||||
|
```vim
|
||||||
|
" enable custom folder/directory glyph exact matching
|
||||||
|
" (enabled by default when g:WebDevIconsUnicodeDecorateFolderNodes is set to 1)
|
||||||
|
let WebDevIconsUnicodeDecorateFolderNodesExactMatches = 1
|
||||||
|
```
|
||||||
|
|
||||||
|
```vim
|
||||||
|
" change the default folder/directory glyph/icon
|
||||||
|
let g:WebDevIconsUnicodeDecorateFolderNodesDefaultSymbol = 'ƛ'
|
||||||
|
```
|
||||||
|
|
||||||
|
```vim
|
||||||
|
" change the default open folder/directory glyph/icon (default is '')
|
||||||
|
let g:DevIconsDefaultFolderOpenSymbol = 'ƛ'
|
||||||
|
```
|
||||||
|
|
||||||
|
```vim
|
||||||
|
" change the default dictionary mappings for file extension matches
|
||||||
|
|
||||||
|
let g:WebDevIconsUnicodeDecorateFileNodesExtensionSymbols = {} " needed
|
||||||
|
let g:WebDevIconsUnicodeDecorateFileNodesExtensionSymbols['js'] = 'ƛ'
|
||||||
|
```
|
||||||
|
|
||||||
|
```vim
|
||||||
|
" change the default dictionary mappings for exact file node matches
|
||||||
|
|
||||||
|
let g:WebDevIconsUnicodeDecorateFileNodesExactSymbols = {} " needed
|
||||||
|
let g:WebDevIconsUnicodeDecorateFileNodesExactSymbols['MyReallyCoolFile.okay'] = 'ƛ'
|
||||||
|
```
|
||||||
|
|
||||||
|
```vim
|
||||||
|
" add or override individual additional filetypes
|
||||||
|
|
||||||
|
let g:WebDevIconsUnicodeDecorateFileNodesExtensionSymbols = {} " needed
|
||||||
|
let g:WebDevIconsUnicodeDecorateFileNodesExtensionSymbols['myext'] = 'ƛ'
|
||||||
|
```
|
||||||
|
|
||||||
|
```vim
|
||||||
|
" 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](https://github.com/ryanoasis/vim-devicons/pull/135) for further details.
|
||||||
|
|
||||||
|
```vim
|
||||||
|
let g:WebDevIconsOS = 'Darwin'
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
Public Methods
|
||||||
|
--------------
|
||||||
|
|
||||||
|
```vim
|
||||||
|
" Returns the current version of the plugin
|
||||||
|
webdevicons#version()
|
||||||
|
```
|
||||||
|
|
||||||
|
```vim
|
||||||
|
" Calls webdevicons#softRefresh()
|
||||||
|
" basically a backwards compatibility convenience
|
||||||
|
webdevicons#refresh()
|
||||||
|
```
|
||||||
|
|
||||||
|
```vim
|
||||||
|
" Does a 'hard' refresh of NERDTree
|
||||||
|
" resets vim-devicons syntax and closes and reopens NERDTree
|
||||||
|
webdevicons#hardRefresh()
|
||||||
|
```
|
||||||
|
|
||||||
|
```vim
|
||||||
|
" Does a 'soft' refresh of NERDTree
|
||||||
|
" resets vim-devicons syntax and toggles NERDTree to the same state
|
||||||
|
webdevicons#softRefresh()
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
Developer
|
||||||
|
---------
|
||||||
|
|
||||||
|
### API
|
||||||
|
|
||||||
|
```vim
|
||||||
|
" 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()
|
||||||
|
```
|
||||||
|
|
||||||
|
#### API Examples
|
||||||
|
|
||||||
|
```vim
|
||||||
|
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
|
||||||
|
```
|
||||||
|
|
||||||
|
source: [vim-startify]
|
||||||
|
|
||||||
|
```vim
|
||||||
|
echo WebDevIconsGetFileFormatSymbol()
|
||||||
|
```
|
||||||
|
|
||||||
|
Todo
|
||||||
|
----
|
||||||
|
|
||||||
|
* [ ] more filetypes to support
|
||||||
|
* [ ] customize filetype icon colors
|
||||||
|
* [ ] more customization options in general
|
||||||
|
* [ ] more specific FAQ and Troubleshooting help
|
||||||
|
|
||||||
|
## License
|
||||||
|
|
||||||
|
See [LICENSE](LICENSE)
|
||||||
|
|
||||||
|
FAQ / Troubleshooting
|
||||||
|
---------------------
|
||||||
|
|
||||||
|
See [FAQ][wiki-faq]
|
||||||
|
|
||||||
|
## Screenshots
|
||||||
|
|
||||||
|
See [Screenshots][wiki-screenshots]
|
||||||
|
|
||||||
|
Contributing
|
||||||
|
------------
|
||||||
|
|
||||||
|
Best ways to contribute
|
||||||
|
* Star it on GitHub - if you use it and like it please at least star it :)
|
||||||
|
* [Promote](#promotion)
|
||||||
|
* Open [issues/tickets](https://github.com/ryanoasis/vim-devicons/issues)
|
||||||
|
* Submit fixes and/or improvements with [Pull Requests](#source-code)
|
||||||
|
|
||||||
|
### Promotion
|
||||||
|
|
||||||
|
Like the project? Please support to ensure continued development going forward:
|
||||||
|
* Star this repo on [GitHub][vim-devicons-repo]
|
||||||
|
* Follow the repo on [GitHub][vim-devicons-repo]
|
||||||
|
* Vote for it on [vim.org](http://www.vim.org/scripts/script.php?script_id=5114)
|
||||||
|
* Follow me
|
||||||
|
* [Twitter](http://twitter.com/ryanlmcintyre)
|
||||||
|
* [GitHub](https://github.com/ryanoasis)
|
||||||
|
|
||||||
|
### Source code
|
||||||
|
|
||||||
|
Contributions and Pull Requests are welcome.
|
||||||
|
|
||||||
|
No real formal process has been setup - just stick to general good conventions for now.
|
||||||
|
|
||||||
|
Rationale
|
||||||
|
---------
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
Inspiration and special thanks
|
||||||
|
------------------------------
|
||||||
|
|
||||||
|
* [vim-airline]
|
||||||
|
* [nerdtree]
|
||||||
|
* [nerdtree-git-plugin]
|
||||||
|
* [seti-ui](https://atom.io/themes/seti-ui)
|
||||||
|
* [devicons by Theodore Vorillas](http://vorillaz.github.io/devicons)
|
||||||
|
* [benatespina development.svg.icons](https://github.com/benatespina/development.svg.icons)
|
||||||
|
* [Steve Losh](http://learnvimscriptthehardway.stevelosh.com/)
|
||||||
|
* Also thanks to the many [contributors](https://github.com/ryanoasis/vim-devicons/graphs/contributors)
|
||||||
|
|
||||||
|
License
|
||||||
|
-------
|
||||||
|
|
||||||
|
See [LICENSE](LICENSE)
|
||||||
|
|
||||||
|
<!---
|
||||||
|
Link References
|
||||||
|
-->
|
||||||
|
|
||||||
|
[Nerd Fonts]:https://github.com/ryanoasis/nerd-fonts
|
||||||
|
[Nerd Font]:https://github.com/ryanoasis/nerd-fonts
|
||||||
|
[font-installation]:https://github.com/ryanoasis/nerd-fonts#font-installation
|
||||||
|
[nerd-fonts-patcher]:https://github.com/ryanoasis/nerd-fonts#font-patcher
|
||||||
|
[patched-fonts]:https://github.com/ryanoasis/nerd-fonts/tree/master/patched-fonts
|
||||||
|
[NERDTree]:https://github.com/scrooloose/nerdtree
|
||||||
|
[vim-airline]:https://github.com/bling/vim-airline
|
||||||
|
[lightline.vim]:https://github.com/itchyny/lightline.vim
|
||||||
|
[lightline]:https://github.com/itchyny/lightline.vim
|
||||||
|
[nerdtree-git-plugin]:https://github.com/Xuyuanp/nerdtree-git-plugin
|
||||||
|
[unite]:https://github.com/Shougo/unite.vim
|
||||||
|
[unite.vim]:https://github.com/Shougo/unite.vim
|
||||||
|
[vimfiler]:https://github.com/Shougo/vimfiler.vim
|
||||||
|
[flagship]:https://github.com/tpope/vim-flagship
|
||||||
|
[CtrlP]:https://github.com/kien/ctrlp.vim
|
||||||
|
[ctrlpvim-CtrlP]:https://github.com/ctrlpvim/ctrlp.vim
|
||||||
|
[powerline]:https://github.com/powerline/powerline
|
||||||
|
[vim-startify]:https://github.com/mhinz/vim-startify
|
||||||
|
|
||||||
|
[wiki-screenshots]:https://github.com/ryanoasis/vim-devicons/wiki/Screenshots
|
||||||
|
[wiki-faq]:https://github.com/ryanoasis/vim-devicons/wiki/FAQ
|
||||||
|
|
||||||
|
[vim-devicons-repo]:https://github.com/ryanoasis/vim-devicons
|
||||||
|
[vim-devicons-polls]:https://github.com/ryanoasis/vim-devicons/labels/poll
|
||||||
|
[badge-version]:http://badge.fury.io/gh/ryanoasis%2Fvim-devicons
|
||||||
|
[badge-gitter]:https://gitter.im/ryanoasis/vim-devicons?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge
|
||||||
|
[badge-flattr]:https://flattr.com/submit/auto?user_id=ryanoasis&url=https://github.com/ryanoasis/vim-devicons&title=vim-devicons&language=viml&tags=github&category=software
|
||||||
|
|
||||||
|
[img-version-badge]:https://badge.fury.io/gh/ryanoasis%2Fvim-devicons.svg
|
||||||
|
[img-gitter-badge]:https://img.shields.io/gitter/room/nwjs/nw.js.svg?style=flat
|
||||||
|
[img-flattr-badge]:https://img.shields.io/badge/donate-flattr%20this!-8DB65B.svg?style=flat
|
||||||
|
[img-visual-toc-screenshots]:https://github.com/ryanoasis/vim-devicons/wiki/screenshots/v1.0.0/branding-logo-screenshots-sm.png
|
||||||
|
[img-visual-toc-api]:https://github.com/ryanoasis/vim-devicons/wiki/screenshots/v1.0.0/branding-logo-api-sm.png
|
||||||
|
[img-visual-toc-patched-fonts]:https://raw.githubusercontent.com/ryanoasis/nerd-fonts/master/images/nerd-fonts-character-logo-md.png
|
||||||
|
[img-visual-toc-fonts-patcher]:https://raw.githubusercontent.com/ryanoasis/nerd-fonts/master/images/nerd-fonts-patcher-logo-md.png
|
||||||
26
README.md
26
README.md
@@ -29,6 +29,32 @@ This repo is a store my personal Debian and macOS dotfiles. I use zsh as default
|
|||||||
* and many more ;)
|
* and many more ;)
|
||||||
* For local system-specific changes (proxy settings, etc.), you can create *~.commonrc.local*
|
* For local system-specific changes (proxy settings, etc.), you can create *~.commonrc.local*
|
||||||
|
|
||||||
|
## Requirements
|
||||||
|
|
||||||
|
Some of configuration assets, needs [Nerd Fonts](https://github.com/ryanoasis/nerd-fonts) to be installed. You have to install the font only on the host side (your macOS or your Windows maschine).
|
||||||
|
|
||||||
|
### Installation of Nerd Fonts
|
||||||
|
#### Linux
|
||||||
|
```sh
|
||||||
|
mkdir -p ~/.local/share/fonts
|
||||||
|
cd ~/.local/share/fonts && curl -fLo "Droid Sans Mono for Powerline Nerd Font Complete.otf" https://raw.githubusercontent.com/ryanoasis/nerd-fonts/master/patched-fonts/DroidSansMono/complete/Droid%20Sans%20Mono%20for%20Powerline%20Nerd%20Font%20Complete.otf
|
||||||
|
```
|
||||||
|
|
||||||
|
#### macOS
|
||||||
|
```sh
|
||||||
|
cd ~/Library/Fonts && curl -fLo "Droid Sans Mono for Powerline Nerd Font Complete.otf" https://raw.githubusercontent.com/ryanoasis/nerd-fonts/master/patched-fonts/DroidSansMono/complete/Droid%20Sans%20Mono%20for%20Powerline%20Nerd%20Font%20Complete.otf
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Windows
|
||||||
|
Download [Droid Sans Mono for Powerline Nerd Font Complete Mono Windows Compatible.otf](https://github.com/ryanoasis/nerd-fonts/raw/master/patched-fonts/DroidSansMono/complete/Droid%20Sans%20Mono%20for%20Powerline%20Nerd%20Font%20Complete%20Mono%20Windows%20Compatible.otf) and put it in your font folder.
|
||||||
|
|
||||||
|
### iTerm2 Setup non-ASCII Text Font
|
||||||
|
I am currently using Source Code Pro as my default font, which does not include Powerline support. In addition to this, I do have nerd-fonts installed and configured to be used for non-ascii characters.
|
||||||
|
|
||||||
|
Then, you have configure the fonts in iTerm2:
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
$ cd ~
|
$ cd ~
|
||||||
|
|||||||
Reference in New Issue
Block a user