Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use? #12

Closed
bsantanna opened this issue Jan 10, 2017 · 10 comments
Closed

How to use? #12

bsantanna opened this issue Jan 10, 2017 · 10 comments

Comments

@bsantanna
Copy link

bsantanna commented Jan 10, 2017

Hello there, thanks for creating this plugin.

Well, I installed it successfully but now I'm having trouble to use it. How to map it to a keybinding?

If I select a a code block, how to format this selection?

I'm missing this documentation, it would be great!

@xuhdev
Copy link
Member

xuhdev commented Jan 10, 2017

Please see the FAQ

@xuhdev xuhdev closed this as completed Jan 10, 2017
@bsantanna
Copy link
Author

bsantanna commented Jan 10, 2017

Hello @xuhdev, I appreciate your attention.

I was able to do this "auto format using a keybinding" in Atom editor using this approach: http://stackoverflow.com/questions/22611377/auto-indent-code-in-atom-editor/33927654#33927654

This 'custom:reformat' event uses editorconfig settings from plugin (https://atom.io/packages/editorconfig)

It is working great and I'm satisfied, but I was looking to reproduce the same behavior in notepad++ with your plugin to offer a option to my teammates instead of Atom.

Well, best wishes to you and your plugin.

Thanks for your contribution to community.

@ffes
Copy link
Member

ffes commented Jan 10, 2017

EditorConfig is meant to make sure the basic settings are the same between various editors for easier corporation between team members. Not to extend an editor with additional features.

What you are asking is an additional features of I understand your question correctly.

Look for a code format plugin in the Plugin Manager.

@bsantanna
Copy link
Author

bsantanna commented Jan 11, 2017

Dear @ffes,

I see you couldn't understand my reasoning, I didn't made myself clear in the last message and will not commit this mistake in this one.

I agree with you regarding EditorConfig reason of existence and believe that it is a successful project in its efforts, I even advocate usage of EditorConfig whenever I can to my fellow colleagues.

From now on consider this message a feedback, if you're open to community feedback continue reading.

The scope of this feedback is the project in this repository, not the whole EditorConfig project.

I have a great experience using editorconfig in WebStorm, it is great the UX (maybe you have heard about it in the last months right?) is great, its seamless.

I just have a keyboard shortcut that formats everything and it is great! The bad news is that Webstorm is paid and probably many developers by any reason can't afford paying U$ 90,00 in a IDE (probably the major part of them).

What anyone would do instead, look for options right?

Not taking skills and expertise in consideration, an average user would take some minutes in each option to try and find which fits better to its own needs right?

Well the truth is I tried for a couple of minutes to use your plugin, and frankly speaking I'm not sure if it works, as a user (remember? UX?) I could not use it.

Maybe If I just had a keyboard shortcut and a README.md documentation entry stating the usage of this shortcut I could see if it works or not...

Talking about the plugin, it is a pity because probably you had lot of effort and for a simple thing it prevents it usage by a major audience...

Well, best wishes...

@bsantanna
Copy link
Author

By the way I could achieve this feature of keyboard shortcut thing in Atom
Using (again) this solution: http://stackoverflow.com/questions/22611377/auto-indent-code-in-atom-editor/33927654#33927654

@MAPJe71
Copy link

MAPJe71 commented Jan 11, 2017

@bsantanna so in short you would like to see the "Fix File" command as available in the Atom ConfigEditor plugin be implemented in the Notepad++ ConfigEditor plugin?

@bsantanna
Copy link
Author

It might be a good feature to be added to project backlog @MAPJe71

Kind regards, @bsantanna out (drops mic)

@MAPJe71
Copy link

MAPJe71 commented Jan 11, 2017

@bsantanna presuming that's a yes: please reread answer by @ffes.

@bsantanna
Copy link
Author

bsantanna commented Jan 11, 2017 via email

@ffes
Copy link
Member

ffes commented Jan 11, 2017

@bsantanna I misunderstood your question the first time.
@MAPJe71 Thanks for clarifying

I will open a new issue with the feature request for a "Fix file" option. I think you are right that having this feature would be an improvement to the plugin, but there are some things to be aware of here.

Notepad++ is not that great in putting the indenting right. Other editors have much more knowledge of the various programmings languages they are working with and how to indent those files properly.

When I need to reindent a file to convert spaces to tabs or vise versa, I use Ctrl+A followed by Tab (to indent everything one level) and directly follow by Shift-Tab (to unindent everything back). It works most of the time, but only for the tabs/spaces at the start of a line, not at the end (like when comments at the end of the line are aligned). Record and save a macro with those three keys strokes in N++ is really easy and you can do that yourself right now. Adding a shortcut key is easy as well.

Adding a "Fix file" option in the plugin is not too difficult either, but requires some more thought (checking settings, what can be fixed, etc) and work. So don't hold your breath. It could take a while ;-)

Also note that "fixing files" can lead to big changes and therefore big git diffs, which is not always what you want in a project. Not a problem per se, but just something to be aware of.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants