Author Topic: Editor Tweaks plugin  (Read 33532 times)

Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
Editor Tweaks plugin
« on: December 09, 2009, 10:58:23 pm »
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]
« Last Edit: December 14, 2011, 03:03:59 pm by dmoore »

Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
Re: Editor Tweaks plugin
« Reply #1 on: December 10, 2009, 06:08:46 am »
1. Use the main menu instead of the popup menu.

Done.

Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
Re: Editor Tweaks plugin
« Reply #2 on: December 16, 2009, 11:00:06 pm »
added fold/unfold above level
added win32 plugin binary (see first post)

Offline blueshake

  • Regular
  • ***
  • Posts: 459
Re: Editor Tweaks plugin
« Reply #3 on: December 17, 2009, 02:19:38 am »
@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?

Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
Re: Editor Tweaks plugin
« Reply #4 on: December 17, 2009, 03:08:07 am »
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.

Offline cyberdyne

  • Single posting newcomer
  • *
  • Posts: 2
Re: Editor Tweaks plugin
« Reply #5 on: December 14, 2011, 03:56:03 am »
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?

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Editor Tweaks plugin
« Reply #6 on: December 14, 2011, 09:49:10 am »
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!]

Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
Re: Editor Tweaks plugin
« Reply #7 on: December 14, 2011, 03:05:14 pm »
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.

Offline cyberdyne

  • Single posting newcomer
  • *
  • Posts: 2
Re: Editor Tweaks plugin
« Reply #8 on: December 14, 2011, 09:27:38 pm »
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

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Editor Tweaks plugin
« Reply #9 on: December 14, 2011, 09:39:48 pm »
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!]

Offline carra

  • Multiple posting newcomer
  • *
  • Posts: 117
Re: Editor Tweaks plugin
« Reply #10 on: April 24, 2012, 08:40:35 pm »
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!

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Editor Tweaks plugin
« Reply #11 on: April 25, 2012, 06:19:58 am »
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:
Code
    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: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline carra

  • Multiple posting newcomer
  • *
  • Posts: 117
Re: Editor Tweaks plugin
« Reply #12 on: April 25, 2012, 09:37:47 am »
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.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Editor Tweaks plugin
« Reply #13 on: April 25, 2012, 09:53:50 am »
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!]

Offline carra

  • Multiple posting newcomer
  • *
  • Posts: 117
Re: Editor Tweaks plugin
« Reply #14 on: April 25, 2012, 10:55:20 am »
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.