Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Format Code In MonoDevelop

Tags:

monodevelop

I am using MonoDevelop on Mac to write MonoTouch apps. Automatica code indenting/formatting works great while I am typing.

The problem is that when I copy and paste code snippets, in many cases I lose the formatting and lines are combined together, indenting is lost, and it is a huge pain to implement the tabs, spacing, and line breaks manually. Is there anyway I can use a command in monoDevelop to automatically indent and apply the formatting to existing code.

I thought maybe Edit|Format|Format Document/Selection would work, but these commands don't have any affect on the code at all.

Any help?

like image 570
user1060500 Avatar asked May 04 '12 23:05

user1060500


People also ask

Does Notepad ++ have a formatter?

Code formatter (notepad++ 64) on 32 bit notepad++ one of the best plugins to reformat c++ code would be textfx, which is available at the built in plugins admin (notepad++ 7.6. x). the menu would be textfx > textfx edit > reindent c++ code as seen at the screencast below.

How do I beautify the code in Notepad ++?

The primary step is to install the XML tools using the Plugin Manager. Then navigate to Menu -> Plugins -> XML Tools -> Pretty Print. You can use the shortcut Ctrl + Alt + Shift + B. For the other older versions, you need to navigate to Menu -> text FX -> HTML Tidy -> Tidy: Reindent XML.


2 Answers

To format the entire document in one keystroke: control-I

To format a selection: Edit->Format->Format Selection

To customize the formatting: MonoDevelop->Preferences->Source Code->Code Formatting

like image 50
Jason Hartley Avatar answered Sep 23 '22 15:09

Jason Hartley


You actually need to select all your text, and then go to Edit->Format->Format Document. It doesn't seem to work otherwise.

like image 34
Erik Asmussen Avatar answered Sep 22 '22 15:09

Erik Asmussen