Giter VIP home page Giter VIP logo

autoindentwithsave's Introduction

AutoIndentWithSave

xCode plugin which indent the source code with save

(File->Save or Command + S)


by Thilina Chamin Hewagama
profile for Thilina Chamin Hewagama at Stack Overflow, Q&A for professional and enthusiast programmers

How to install

1) Download the project
2) Build
3) Quit xCode & Re-Launch

Note: Tested with xCode 6.4 (supports xCode 6 & above)


autoindentwithsave's People

Contributors

carlosefonseca avatar joelgerborelaser avatar thilinahewagama 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  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

autoindentwithsave's Issues

AutoIndentWithSave adds tabs on empty lines

The plugin shouldn't align empty lines if the "Automatically trim trailing whitespace" / "Include whitespace-only lines" option is enabled. This leads to lots of warnings when you're using Swiftlint for example.

e.g

    static func loginUser() {
        ...
    }

    static func logoutUser() {
        ...
    }

becomes

    static func loginUser() {
        ...
    }
**--------**
    static func logoutUser() {
        ...
    }

Allow specifying file extensions

We are using uncrustify and BBUncrustify plugin to format Objective-C code.
For Swift, however, we would like to use Auto Indent With Save.

So the feature request is to add a setting for plugin to configure file extensions for which the plugin should work. This way we can use it for Swift only, for Objective-C we will use uncrustify.

Code jumping on save

I know that when using Ctrl+I to re-indent in Xcode sometimes the code is jumping (scrolled) somewhere else. This is very inconvenient when using the plugin and saving the file while typing. The place I am currently writing disappears off-screen and I have to search for it again. Is there some solution that can keep the current position of the scroller or the current line where the cursor is?

Freezes Xcode 8

Modified Xcode 8 with MakeXcodeGr8Again, AutoIndentWithSave freezes Xcode, another package XXIndentOnSave also seems to freeze Xcode.

Plugin adds unneeded tabs for each blank line

Whenever I use Xcode's re-indent feature, it trims all the whitespaces if I chose it in the settings.
image

When I use the plugin, each time I save the file it adds unneeded tabs for each blank line...
image

I would expect the plugin to do the same thing as Xcode's re-indent feature.
Those tabs are absolutely not needed and should not be added.

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.