Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ruanyl/vim-sort-imports
vim port of import-sort. Sort javascript/typescript imports
https://github.com/ruanyl/vim-sort-imports
es6 import-sort sort typescript vim
Last synced: 2 days ago
JSON representation
vim port of import-sort. Sort javascript/typescript imports
- Host: GitHub
- URL: https://github.com/ruanyl/vim-sort-imports
- Owner: ruanyl
- Created: 2017-10-20T12:09:26.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2017-12-12T14:24:19.000Z (almost 7 years ago)
- Last Synced: 2024-08-08T16:15:09.639Z (3 months ago)
- Topics: es6, import-sort, sort, typescript, vim
- Language: Vim script
- Homepage:
- Size: 2.93 KB
- Stars: 33
- Watchers: 3
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
vim-sort-import
----------![vim-sort-import](https://user-images.githubusercontent.com/486382/31822807-a24b33d8-b5b2-11e7-8468-df9a6f45528e.gif)
Please refer to [import-sort](https://github.com/renke/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
```