News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

Editor Tweaks plugin

Started by dmoore, December 09, 2009, 10:58:23 PM

Previous topic - Next topic

dmoore

What is it?
* Temporarily change Word wrap, Line numbers, Tab and EOL handling settings per editor.
* Disables insert key

Uses
* Opened a text file that doesn't use doesn't use newlines in paragraphs? Solution: switch on word wrap without interfering with other open editors
* On windows working with windows sources, but opened a source file with unix newlines? Solution use the EOL tweaks to get the behavior you need for that file without interfering with your other editors.


Source code:
svn checkout http://svn.berlios.de/svnroot/repos/cbilplugin/branches/EditorTweaks


Binaries:
attached


Todo:
1. Use the main menu instead of the popup menu.
2. Implement "Strip Trailing Blanks Now"
3. Make disabling of insert key optional

Screenshot attached
win32 plugin binary attached (built against Nov 2009 nightly build)

The plugin is now one of the contrib plugins in the offical Code::Blocks repository (and has additional features)

[attachment deleted by admin]
Python plugins: [url="https://github.com/spillz/codeblocks-python"]https://github.com/spillz/codeblocks-python[/url]
Code::Blocks Daily Builds -- Ubuntu PPA: [url="https://launchpad.net/~damien-moore/+archive/codeblocks"]https://launchpad.net/~damien-moore/+archive/codeblocks[/url]

dmoore

Python plugins: [url="https://github.com/spillz/codeblocks-python"]https://github.com/spillz/codeblocks-python[/url]
Code::Blocks Daily Builds -- Ubuntu PPA: [url="https://launchpad.net/~damien-moore/+archive/codeblocks"]https://launchpad.net/~damien-moore/+archive/codeblocks[/url]

dmoore

added fold/unfold above level
added win32 plugin binary (see first post)
Python plugins: [url="https://github.com/spillz/codeblocks-python"]https://github.com/spillz/codeblocks-python[/url]
Code::Blocks Daily Builds -- Ubuntu PPA: [url="https://launchpad.net/~damien-moore/+archive/codeblocks"]https://launchpad.net/~damien-moore/+archive/codeblocks[/url]

blueshake

@dmoore
can you change the output path,so I don't need to copy the output to the cb relatived folder by myself but use cmd. :D
Keep low and hear the sadness of little dog.
I fall in love with a girl,but I don't dare to tell her.What should I do?

dmoore

as in ../../../devel/share/codeblocks/plugins/LIBNAME? I guess so.

Right now it defaults to building a cbplugin (which is the C::B plugin template default). so maybe I'll just add a second target to handle this case.
Python plugins: [url="https://github.com/spillz/codeblocks-python"]https://github.com/spillz/codeblocks-python[/url]
Code::Blocks Daily Builds -- Ubuntu PPA: [url="https://launchpad.net/~damien-moore/+archive/codeblocks"]https://launchpad.net/~damien-moore/+archive/codeblocks[/url]

cyberdyne

Hi guys, I am new to Cb .I am trying to install the editor tweak plugin and found
that the binaries have been removed.I did the svn checkout and found only the
source files.Could you help me to install it?

oBFusCATed

Yes, use a nightly build :)
Or tell us your OS so we can guide you to build C::B from source.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

dmoore

Cyberdine: Some time back the plugin was moved into the official C::B repository and is one of the "contrib" plugins. Apologies for not updating this post.
Python plugins: [url="https://github.com/spillz/codeblocks-python"]https://github.com/spillz/codeblocks-python[/url]
Code::Blocks Daily Builds -- Ubuntu PPA: [url="https://launchpad.net/~damien-moore/+archive/codeblocks"]https://launchpad.net/~damien-moore/+archive/codeblocks[/url]

cyberdyne

obfuscated:
I am using Ubuntu 11.04  and the code I checked out was for the plugin and not for CB coz I wasnt
clear with my last post.

dmoore:
Do you mean to say that the plugin has been integrated to the repo of CB?

Thanks guys

oBFusCATed

Yes, the code is in svn.

We have nightly build for ubuntu, too. See here for details: http://apt.jenslody.de/
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

carra

Hello, I would like to report a bug in the Aligner feature (very useful, by the way!) of Editor Tweaks.
I am now using a fresh copy of prebuilt Nightly build 7925 for Windows version. I have tested this on 2 machines, Vista and XP and the same happens.

Right after install, the Aligner option of the context menu provides 4 default alignment options, and lets the user create more of its own. This works fine: after creating them, the aligner menu shows all existing options and they work.

The bug comes when restarting C::B. It seems that the menu always loads only 4 entries. I have verified that even when default.conf contains more entries, the menu always shows only 4, and they may not be the default ones. Not a critical bug, but rather annoying!

MortenMacFly

Quote from: carra on April 24, 2012, 08:40:35 PM
the menu always shows only 4, and they may not be the default ones. Not a critical bug, but rather annoying!
It is hard coded in EditorTweaks.cpp:
    const unsigned int MaxStoreAlignerdEntries = 4;

The reason might be that dmoore didn't want to clutter the editor menu too much.However, if you compile C::B yourself you can just change the value (or use one of the first 4 entries ;))
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

carra

Well I don't compile C::B so I will have to use it as it is. It does seem weird though, that you are given the option to create more, and the code doesn't take this into account.

As an idea: If we don't want to clutter menu options, a better way to do this would be to not provide submenus: instead, just pop up an input box where you enter the character to be used for alignment in each use. This would be fast and practical, since in most cases it will be a single keystroke.

oBFusCATed

Another problem is that the Aligner menu is missing from the main menu.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

carra

Yeah, it is certainly not there. I did not even know that it was supposed to be there!
Well it seems to me much quicker to use the context menu, but it won't hurt if the option is in the main menu as well.