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

Add message box with keybindings bound to '?' key. #29

Merged
merged 3 commits into from Feb 8, 2015

Conversation

zakkak
Copy link
Contributor

@zakkak zakkak commented Feb 7, 2015

messagebox

@dannyedel
Copy link
Owner

Thanks, this is a really good idea and its very nice to do it in Pull-Request form : )

I'll be reading it through now, and either merge or give comments at the points in code.
One thing I see though: There's a lot of whitespace changes, which makes it a bit hard to see the actual changes.

While that is obviously my fault for commiting such.. uhm.. things (trailing whitespace, blank lines at eof etc...) I'm a bit disappointed that kdevelop/kate did not prevent me from doing that in the first place. (Or I have not found the correct configuration)

I've read up and the github blog says that by appending w=1 we can filter whitespace changes while viewing.

Side question: Do you know a good tool/editor to quickly walk through all those files, fix whitespace and commit? Maybe worth it's own pullrequest "fix whitespace"...
I'll get on to reading the actual code now.

msg.append("<tr><th width=200 align=left>Key</th><th width=400 align=left>Action</th></tr>\n");
/* I skip some navigation bindings (they have to many alternatives) */
msg.append("<tr><td>N or Left/Down arrow</td><td>Next slide</td></tr>\n");
msg.append("<tr><td>P or RIght/Up arrow</td><td>Previous slide</td></tr>\n");
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo: RIght

@dannyedel
Copy link
Owner

Found two wording issues, otherwise cool!

@zakkak
Copy link
Contributor Author

zakkak commented Feb 8, 2015

Sorry about the whitespace changes, it is my editor setup that removes trailing spaces.

Another "annoying" IMO thing is that indentation is not consistent. The code is indented using spaces and whenever a group of spaces can be reduced to a tab it gets replaced. I suggest either using solely tabs or spaces.

I am actually a fan of indenting with tabs and aligning with spaces, there is a nice example at the emacswiki.

smarttabs

@zakkak
Copy link
Contributor Author

zakkak commented Feb 8, 2015

Regarding your side question. Both vim end emacs have options to remove trailing spaces, I do not remember if kate was capable of doing the same, if not there is probably some plugin.

Another approach is the use of tools like uncrustify that apart from removing whitespace allow for a consistent code style. Unfortunately though, it is a pain to configure to your needs and is not available in every distribution (you most likely need to compile from source).

Also find . -name ".git" -prune -o -type f -exec sed -i 's/ *$//g' {} \; should do the trick.

@dannyedel
Copy link
Owner

Thanks for this function! Merge on the way. Whitespace-issue redirected to #30

dannyedel added a commit that referenced this pull request Feb 8, 2015
Add message box with keybindings bound to '?' and F1 key.
@dannyedel dannyedel merged commit 9d29af5 into dannyedel:master Feb 8, 2015
dannyedel added a commit that referenced this pull request Feb 8, 2015
@zakkak zakkak deleted the help branch February 8, 2015 22:38
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

Successfully merging this pull request may close these issues.

None yet

2 participants