Skip to content

Commit 94b7f2f

Browse files
committed
Merge branch 'master' into features/1-script-patch-fonts
2 parents 5af3ae9 + dd97f6e commit 94b7f2f

File tree

1 file changed

+59
-27
lines changed

1 file changed

+59
-27
lines changed

readme.md

Lines changed: 59 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,20 @@
11
vim-webdevicons
22
=================
33

4-
## Intro
4+
Adds filetype glyphs (icons) to other vim plugins such as nerdtree and vim-airline
55

6-
After seeing the awesome theme for Atom (set-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.
6+
## Usage
77

8-
Adds a global config map of characters to file extensions (or entire filenames).
8+
After installing the patched font and setting the vim font just open nerdtree or look at vim-airline (statusline or tabline)
9+
* _NOTE:_ if you don't have a vim font set and not running gvim you will need to set the terminal font
10+
11+
## Configuration
912

1013
Works without Configuration *ONLY* when used with the patched font provided (see lib folder), install font and add to your vimrc or gvimrc, e.g.:
11-
> set guifont=Droid\ Sans\ Mono\ for\ Powerline\ Plus\ Nerd\ File\ Types\ 11
14+
15+
```vim
16+
set guifont=Droid\ Sans\ Mono\ for\ Powerline\ Plus\ Nerd\ File\ Types\ 11
17+
```
1218

1319
* additional fonts coming soon
1420
* font patching coming soon
@@ -22,19 +28,16 @@ Works without Configuration *ONLY* when used with the patched font provided (see
2228
![image](screenshots/nerdtree.png)
2329

2430
* vim-airline
25-
26-
>> statusline
27-
28-
>>> ![image](screenshots/airline-statusline.png)
29-
30-
>> tabline
31-
32-
>>> ![image](screenshots/airline-tabline.png)
31+
* statusline
32+
![image](screenshots/airline-statusline.png)
33+
* tabline
34+
![image](screenshots/airline-tabline.png)
3335

3436
## Features
3537
* show developer file type glyphs from a font in various vim plugins, currently supports:
3638
* [NERDTree](https://github.com/scrooloose/nerdtree)
3739
* [vim-airline](https://github.com/bling/vim-airline) (statusline and tabline)
40+
* Adds a global config map of characters to file extensions (or entire filenames)
3841
* customizable and extendable filetype detections
3942
* ability to override predefined dictionary variable
4043
* if you are unhappy with the default glpyh used you can choose your own
@@ -53,24 +56,38 @@ Works without Configuration *ONLY* when used with the patched font provided (see
5356
* the following options are provided however for overriding
5457

5558
* enable/disable loading the plugin (default 1)
56-
> let g:webdevicons_enable = 1
59+
60+
> let g:webdevicons_enable = 1
61+
5762
* enable/disable adding the flags to NERDTree (default 1)
58-
> let g:webdevicons_enable_nerdtree = 1
63+
64+
> let g:webdevicons_enable_nerdtree = 1
65+
5966
* enable/disable adding to vim-airline's tabline (default 1)
60-
> let g:webdevicons_enable_airline_tabline = 1
67+
68+
> let g:webdevicons_enable_airline_tabline = 1
69+
6170
* enable/disable adding to vim-airline's statusline (default 1)
62-
> let g:webdevicons_enable_airline_statusline = 1
6371

64-
* character mappings
72+
> let g:webdevicons_enable_airline_statusline = 1
6573
6674
* turn on/off file node glpyh decorations (not particularly useful)
67-
> let g:WebDevIconsUnicodeDecorateFileNodes = 1
75+
76+
> let g:WebDevIconsUnicodeDecorateFileNodes = 1
77+
78+
### character mappings
79+
6880
* change the default character when no match found
69-
> let g:WebDevIconsUnicodeDecorateFileNodesDefaultSymbol = 'x'
81+
82+
> let g:WebDevIconsUnicodeDecorateFileNodesDefaultSymbol = 'x'
83+
7084
* change the default dictionary mappings for file extension matches
71-
> let g:WebDevIconsUnicodeDecorateFileNodesExtensionSymbols = { 'js': 'mycoolJSfontglyph' }
85+
86+
> let g:WebDevIconsUnicodeDecorateFileNodesExtensionSymbols = { 'js': 'mycoolJSfontglyph' }
87+
7288
* change the default dictionary mappings for exact file node matches
73-
> let g:WebDevIconsUnicodeDecorateFileNodesExactSymbols = { 'MyReallyCoolFile.okay': 'myreallycoolglyph' }
89+
90+
> let g:WebDevIconsUnicodeDecorateFileNodesExactSymbols = { 'MyReallyCoolFile.okay': 'myreallycoolglyph' }
7491
7592
## todo
7693

@@ -89,22 +106,37 @@ Works without Configuration *ONLY* when used with the patched font provided (see
89106
* Support for other fonts will come when patching is working
90107
* _NOTE:_ if running vim and no font set it will default to the termianl font that is set
91108
* check what the vim/gvim font is set to, from ex mode:
92-
> :set guifont?
109+
110+
> :set guifont?
111+
93112
* check if the plugin is loaded (should give '1'), from ex mode:
94-
> :echo loaded_webdevicons
113+
114+
> :echo loaded_webdevicons
115+
95116
* check if the plugin is enabled (should give '1'), from ex mode:
96-
> :echo g:webdevicons_enable
117+
118+
> :echo g:webdevicons_enable
119+
97120
* check if the plugin is enabled for NERDTree (should give '1'), from ex mode:
98121
* this should *NOT* need to be set under normal circumstances
99-
> :echo g:webdevicons_enable_nerdtree
122+
123+
> :echo g:webdevicons_enable_nerdtree
124+
100125
* check if you are able to see the characters, from ex mode:
101-
> :echo g:WebDevIconsUnicodeDecorateFileNodesDefaultSymbol
126+
127+
> :echo g:WebDevIconsUnicodeDecorateFileNodesDefaultSymbol
128+
102129
* if all this looks correct you may try this to see if any files show flags
103130
* last resort, see if you can even set the default symbol and have it display anywhere (NERDTree, vim-airline's statusline, vim-airlines's tabline), from ex mode:
104-
> :let g:WebDevIconsUnicodeDecorateFileNodesDefaultSymbol='x'
131+
132+
> :let g:WebDevIconsUnicodeDecorateFileNodesDefaultSymbol='x'
105133
106134
* @todo: more specific FAQ and Troubleshooting help
107135

136+
## Rationale
137+
138+
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.
139+
108140
## Inspiration and special thanks
109141

110142
* [vim-airline](https://github.com/bling/vim-airline)

0 commit comments

Comments
 (0)