medmond919 icon

VIM Let example

medmond919 | PRO | 03/25/18 06:49:13 PM UTC | 0 ⭐ | 246 👁️ | Never ⏰ | []
VIM |

630 B

|

None

|

0 👍

/

0 👎

let g:types = { 'sh'         : '', 'zsh'     : '', 'vim' : '', 'diff' : '',
            \   'python'     : '', 'c'       : '', 'cpp' : '', 'h'    : '',
            \   'markdown'   : '', 'html'    : '', 'xml' : '', 'css'  : '',
            \   'javascript' : '', 'clojure' : '', 'go'  : '', 'ruby' : '',
            \   'scala'      : '', 'lisp'    : '', 'lua' : '', 'php'  : '',
            \   'haskell'    : '',
            \ }
 
function! CurFiletype(active) abort " {{{2
    let l:ft = has_key(g:types, &filetype) ? g:types[&filetype] : ''
    return l:ft
endfunction

Comments