Git Product home page Git Product logo

vim-sort-imports's Introduction

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

vim-sort-imports's People

Contributors

ruanyl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

vim-sort-imports's Issues

Can not find import-sort

I am having an issue where neovim is having trouble finding import-sort in the import_sort#run function. My neovim version is 0.5.0 and I am running this on a React project with the compact style setup in my package.json

This was working for me well in the past but recently started being an issue for me, and I'm not sure what has changed other than upgrading to neovim 0.5.0.

Duplicate export statement added

On some automatic sorts, a second export module statement is added to the bottom of the file. Temporary workaround involves deleting the export line, performing the sort command, and then adding it back again.

screencast 2019-08-07 16-07-11

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.