salcode / ironcode-vim

A Vim Configuration focused on WordPress development and predominantly used on a Mac with Neovim
9 stars 1 forks source link

Use vim-airline jsformatter for JavaScript files #203

Closed salcode closed 4 years ago

salcode commented 4 years ago

We are currently using the vim-airline plugin. Add the jsformatter for JavaScript files.

This addresses the problem where JavaScript files are often named index.js. Since we are displaying file names in the tabline, all buffers will be labeled index.js (which isn't helpful).

Using jsformatter the directory is displayed in the tab name.

Screenshot from vim-airline.

image

How to Add

We should be able to do this by adding

let g:airline#extensions#tabline#formatter = 'jsformatter'

to ftplugin/javascript.vim