Skip to content

vim port of import-sort. Sort javascript/typescript imports

Notifications You must be signed in to change notification settings

ruanyl/vim-sort-imports

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

vim-sort-import

vim-sort-import

Please refer to import-sort for more details

Config example:

// enable auto sort import on write
let g:import_sort_auto = 1

// install import-sort packages
npm install --save-dev import-sort-cli import-sort-parser-babylon import-sort-parser-typescript import-sort-style-renke

// package.json:
"importSort": {
  ".js, .jsx, .es6, .es": {
    "parser": "babylon",
    "style": "renke"
  },
  ".ts, .tsx": {
    "parser": "typescript",
    "style": "renke"
  }
}

Available CMD

// run import-sort against current buffer
:SortImport

// start run import-sort on save
:StartAutoSortImport

// stop run import-sort on save
:StopAutoSortImport

About

vim port of import-sort. Sort javascript/typescript imports

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published