I have a list of data in notepad and want to insert a space in the beginning of each line.
Example
This is how it looks in the notepad now
Number
"123"
"123"
"124"
"126"
"147"
I want it to look like below
Number
"123"
"123"
"124"
"126"
"147"
I am sure there is some short cut. Please advice.
Open your file in Notepad++
Press Ctrl+H to open the Replace window.
Change the "Search Mode" to Regular expression.
In the "Find what" box, type (\n|^)
In the "Replace with" box, type \1 (with your spaces or tab at the end)
Then click "Replace All"
Note: If you want tabs instead of spaces, a tab character can be typed with Alt+09
Press Alt and select the line no. move curser till the line no you want to have space . Now you can enter spaces as many you want or anything and save it.
Related
I'm using delphi 11.0(28.0.42600.6491).
Typing some tabs in code editor, and after a short pause, typing any character.
Then, I found tabs are replaced to space automatically.
And it seems to be happened when input character after already exists line.
My problem is like GIF image(animated).
I don't want that. tabs must be tabs strictly.
Is there any setting or way to do that?
The IDE Settings "Use tab character" and "Keep trailing blanks". Note you would also need to uncheck "Cursor through tabs" to see the cursor jump otherwise it will go space by space through tabs.
The "Keep trailing blanks" setting is really "Keep trailing whitespace" and deletes any tabs and spaces at the end of lines after a short delay. The cursor stays past the end of the line so if you type something it then puts in spaces.
This is a bug (in my opinion) that started in 10.4. I have reported it as RSP-36776: https://quality.embarcadero.com/browse/RSP-36776
I would like to replace
import Quick
import Nimble
with
import XCTest
Is it possible to do it in Xcode find and replace or I have to use Xcode regular expressions?
I have tried: import Quick\nimport Nimble but it doesn't work as expected
You can find for multiline text and replace it (cmd+opt+f) with new text. make sure to copy and paste multiline text as it is written on the Xcode file.
I don't know how you tried and failed. But I tried and it worked. Procedures as bellow:
First select and copy the lines you wanna replace.
Shift+Option+CMD+F to open Find navigator in Xcode, then CMD+V to paste the multiline text.
You can also choose a scope for search. Then input the new line.
THE FAST WAY:
You can simply copy both lines dragging with the mouse and the paste them on find textfield.
THE COOL LEEMUR'S WAY:
But also there is a great way to find expressions:
Press CMD + f
A find field will appear on the top of the editor.
At the right side of the find field there is a "+" sign
Press "+" will display a list of special characters
Its very useful, you can make something similar to regular expressions, mixing literal text with patterns
You can try to find the expression just in the current file writing it in the top find field. Or you can try to find the expression in the whole project using the Find Navigation tab on the left. As you will see the expression will appear there also.
Moreover if you want you can use an actual regular expression to find something if you press in the word "Contains" at the left of the "+" sign. It will show a list where you can select the option "Regular Expression"
If you want to find text select "Find" at the left of the editor. If you want to replace it, select "Replace" and a new field will appear below.
You can replace the text with another pattern, using some of the words that you used to find the text. If you double clic on "Word1" at the find field it will appear at the replace field.
In this example I'm changing the order of two words around MyText
I'm looking for a way to search any and all plaintext appearing outside of angle brackets, to replace it with blank so that only code appearing within angle brackets remains.
Does anyone know how to do this?
I assume the objective is to remove everything outside of the <tags> without affecting the <tags> themselves in an efficient way, inside TextWrangler. My solution is limited, in that it only matches text that is <tags>inside the tags<tags>. Which means that it will not remove any text that appears before or after the tags. i.e. Only text inside the tags gets removed. It is easy enough once this is done to select/delete the remaining text.
Assuming the file you want to edit is open.
Type: "command f" to open the find window.
Under "Find" enter (>.*?<)
Under "Replace" enter ><
I would post a picture, but I'm new so not allowed.
To see what will be replaced, click "Next".
To replace one occurrence at a time(slow), click "Replace & Find".
To replace all occurrences, click "Replace All"
I'm using Brackets editor http://brackets.io/ and I'd like to change behavior when I click TAB key it will put 4 SPACEs instead and also I'd like to change amount of spaces added.
Is it possible to do this adjustment?
In the lower right corner of the editor, you'll see text saying Spaces: 4 or the like.
You can click Spaces (or Tab) to toggle between those and click the number to change it.
I use Delphi 5 and I have one interesting question...
If you press Enter key when cursor is at the string's end Delphi IDE automatically aligns cursor position at the new line to the first word at the previous line.
But space between begin of new line and cursor position will be filled with SPACE chars.
How to change this behaviour? I want some amount of TAB characters from begin of new line to the cursor position, as notepad++ do that.
Thanks
Under Environment Options → Editor:
There are some options you should check:
Use tab character. Inserts tab characters when you press TAB in the Code Editor. If not checked, pressing TAB inserts spaces. To view tab characters, select Show tab character.
Smart tab. Tabs to the first non-whitespace character in the preceding line.