Skip to content

Plugin to sort imports in javascript project for vim/neovim

License

Notifications You must be signed in to change notification settings

squgeim/bharyang-vim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 

Repository files navigation

bharyang-vim

Plugin to sort imports in a JavaScript project for Vim/NeoVim

Installation

bharyang-vim depends on bharyang-cli.

Installation with vim-plug

vim-plug can install bharyang-cli as a post-install hook, and lazy load this plugin for JavaScript projects.

Plug 'squgeim/bharyang-vim', { 'do': 'npm install -g bharyang-cli', 'for': ['javascript'] } 

For manual installations, install bharyang-cli from npm:

npm install -g bharyang-cli

Usage

Select the import lines in visual mode. Use any of the following commands:

Bharyang
BharyangAsc
BharyangDesc
BharyangGroup

The Bharyang command uses a configuration value to determine default sort type. The value can be one of asc, desc or group. For example, to set it to desc:

let g:bharyang_default_sort_type="desc"

Contribution

The code is quite straight forward, bharyang-cli does all of the heavy lifting. Pull requests are always welcome.

About

Plugin to sort imports in javascript project for vim/neovim

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published