emacs like fill-paragraph option in textmate? - macos

Is there an option to reformat lines/paragraphs/selected text to 80 cols in TextMate like in emacs (fill-paragraph bound to M-q)? If not, do you know of any option to add this to TextMate - a known plugin/macro? any help in writing such a macro is most welcome too. :)

It only changes how the text is displayed — not the text itself — but in the menu bar, "View" > "Wrap Column" > "78". Or choose "Other…", it displays a vertical ruler you can move to the desired column.
If the "Soft Wrap" option is checked, your text will look like it's reformated.
To reformat the text for real, simply hit ctrlq. It will use the number checked in the aforementioned menu.

If what you want is to hard-wrap paragraphs see here: http://lists.macromates.com/textmate/2006-November/015707.html

Related

Is there a way to indent lines (not format them) in Visual Studio?

In Eclipse, there are two distinct features: one to format a selection, one to just indent the lines, see e.g. Difference between Ctrl+Shift+F and Ctrl+I in Eclipse. I found the format feature in Visual Studio but how can I actually just indent the lines? Is there some built-in command for that or possibly a 3rd party add-on?
Note: I have asked a couple of friend that use VS daily and they all tried to persuade me that I am looking for the format feature. No I'm not. I tried to live with it for a while and it is just a different feature. I am after the indent/reindent only.
EDIT: I am looking for a clever indent, sometimes called reindent, which is different to just pressing Tab or Shift+Tab (increase/decrease indent level). The indent feature in Eclipse behaves like this:
It places a beginning of current line at the right position, no matter where that line was starting before. So instead of thinking whether you need to increase or descrease the indent level (Tab or Shift+Tab), you just invoke the indent command and it will do the right thing.
Invoking the indent command on an empty line places the caret at the right position for the user to start typing.
It never influences any character beyond the first non-whitespace character.
If you just want to indent some lines, you can
Select them.
Press Tab.
To un-indent them, replace the second step to: Shift+Tab.
You can find more VS shortcuts here.
There are toolbar buttons for this, with wonderfully inconsistent labels (at least in the Visual Studio 2013 I'm using)...
In the "Text Editor" toolbar (in my default setup), I have to buttons whose tooltips are:
"Decrease Line Indent"
"Increase Line Indent"
In the "Customize" dialog, on the "Commands" tab (with "Toolbar" set to "Text Editor") they appear in the list as:
"Line Unindent"
"Line Indent"
And finally, if you press the "Add Command..." button (on the "Customize" dialog) to produce the "Add Command" dialog and select the "Edit" category, you'll see these two entries:
"Outdent"
"Indent"
As far as I can tell, these are all the same two commands, which should do what you want.
They also appear in the Edit -> Advanced menu, at the very bottom.
----- Edit -----
I believe you might be able to turn off all of the "formatting" actions except for indentation, so that when you use the "auto-format" command, only the indentation is "formatted" for you. (Of course this prevents you from ever using the rest of the formatting features without turning them on again, but if you don't use them, this might work!)

How to disable seemingly random syntax higlight in Notepad++

Can anyone suggest:
Why does it higlight like this? I don't seem to do anything to activate it:
How to disable it?
This is old, but I ran into the same problem and just figured out an easy fix.
From the file menu: Language > N > Normal Text
I'm not sure if this is the same issue as mine, but I wanted to keep the language setting enabled but remove the highlighting.
I did this by going to Settings --> Preferences --> Highlghting
Removed the Enable check mark for Highlight Matching Tags.
1) Go to settings -> Style Configurator.
2) Select the language that Notepad++ has chosen, usually based on filename extension. You can also change this manually under the Language menu setting.
3) Go through the Styles until you find the style that applied the highlighting. You can tell because the Background colour will match the highlighted color.
4) Change Background colour to white.
I do not have an answer for your first question
For your second question do the following steps
Inside Notepad++ press ctrl A( select all)
Right click for context menu.
select Remove style and click on Clear all Styles
This will clear all the highlights.
FYI. You may also see this sort of behavior when using a vertical edge in background mode. Switching to line mode will eliminate the highlighting of lines that run over the set character count for the vertical edge.

Textmate 2 indentation with Python

When I indent by tabbing "Tab" key, the tab is replaced by 4 spaces. Does anyone know how could I set it to normal?
At the bottom of the editor window there is a menu for tab size, you can set the desired width there as well as turning on soft tabs which inserts spaces instead of tabs but treats them as tabs when editing. Your choice will be saved based on the active file type so make sure to set it when in a python file.

Can I see line numbers in the VS2010 editor?

I spent time searching how to do this but came up with nothing. Is there a simple way I can make the editor show line numbers?
Tools, Options, Text Editor, All Languages, Show Line Numbers
You can also show them only for a specific language.
In the Tools menu, select Options. Under Text Editor, All Languages, General, you'll find "Display line numbers".
http://msdn.microsoft.com/en-us/library/ms165340.aspx
On the menu bar, choose Tools, Options.
In the categories list on the left side of the Options window, expand the Text Editor node.
Expand the All Languages subfolder, and then choose General to set this option globally.

Xcode 3.2 find and replace in selected text

Is it possible to find and replace in selected text in Snow Leopard Xcode 3.2? There always use to be an option for selected text. Really frustrating. Thanks.
Yeah, but it's a lot less obvious now. If you have the "Find" bar up, change the first dropdown menu to "Find & Replace". Then, if you hold option, the "Replace All" button turns into an "In Selection" button.
You can press Command+Ctrl+F to bring up directly the Find & Replace bar, and press Escape to remove it. I don't think there's anyway to activate the "Replace All" button using the keyboard, but then again there never was afaik.
In XCode 5 and earlier you can highlight a word and hit CMD+CTRL+E and then simply edit the word in line and it applies your edit to all occurrences of that word in the document.
Sometimes an image helps make things a little easier to grasp quickly. So this is to supplement the chosen answer.
And holding down Option:

Resources