Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

add symbol for noeol #462

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion doc/webdevicons.txt
Original file line number Diff line number Diff line change
Expand Up @@ -651,7 +651,13 @@ Character Mappings ~
" set a byte character marker (BOM) utf-8 symbol when retrieving file encoding
" disabled by default with no value
let g:WebDevIconsUnicodeByteOrderMarkerDefaultSymbol = ''
<



" set a noendofline symbol when retrieving file format
" disabled by default with no value
let g:WebDevIconsNoEndOfLineDefaultSymbol = '󰭜'


>
" enable folder/directory glyph flag (disabled by default with 0)
Expand Down
8 changes: 7 additions & 1 deletion plugin/webdevicons.vim
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ call s:set('g:WebDevIconsTabAirLineAfterGlyphPadding', '')

call s:set('g:WebDevIconsUnicodeDecorateFileNodesDefaultSymbol', '')
call s:set('g:WebDevIconsUnicodeByteOrderMarkerDefaultSymbol', '')
call s:set('g:WebDevIconsNoEndOfLineDefaultSymbol', '')
call s:set('g:WebDevIconsUnicodeDecorateFolderNodesDefaultSymbol', g:DevIconsEnableFoldersOpenClose ? '' : '')
call s:set('g:WebDevIconsUnicodeDecorateFolderNodesSymlinkSymbol', '')
call s:set('g:DevIconsDefaultFolderOpenSymbol', '')
Expand Down Expand Up @@ -565,11 +566,16 @@ endfunction
function! WebDevIconsGetFileFormatSymbol(...)
let fileformat = ''
let bomb = ''
let noeolf = ''

if (&bomb && g:WebDevIconsUnicodeByteOrderMarkerDefaultSymbol !=? '')
let bomb = g:WebDevIconsUnicodeByteOrderMarkerDefaultSymbol . ' '
endif

if (!&eol && g:WebDevIconsNoEndOfLineDefaultSymbol !=? '')
let noeolf = g:WebDevIconsNoEndOfLineDefaultSymbol . ' '
endif

if &fileformat ==? 'dos'
let fileformat = ''
elseif &fileformat ==? 'unix'
Expand All @@ -580,7 +586,7 @@ function! WebDevIconsGetFileFormatSymbol(...)

let artifactFix = s:DevIconsGetArtifactFix()

return bomb . fileformat . artifactFix
return bomb . noeolf . fileformat . artifactFix
endfunction

" for airline plugin {{{3
Expand Down