I'm trying to place a multiple cursor after every character in my selection? I am also trying to place a multiple cursor after every word in my selection. Is this possible?
Thanks I'm a new user to sublime and am thinking of making the move from notepad++
Related
What I want is a textarea (or any input taking element for that matter) in react to provide the following:
When a new character is inserted - get the character inserted and the position it was inserted at.
When a character is deleted - get the position of the character that was deleted.
I was thinking along the lines of using onChange and onKeyDown/Press together, but I am not sure if that is the right way to go about this. I could also do a diff on the initial text and the final text, but that is slow.
I am also open to using any open source libraries to achieve this. I am basically trying to make a text editor and want this information available to me when a user is working on the editor.
I am using MS Access 2013 to display data from a MySql database on another server. I have a table that uses the linked table. I have a textbox with about 100 words in it. When I click in the textbox the cursor can sometimes appear in the middle of a letter. If I try to add or delete text it appears offset from the position of the cursor. I have turned off auto-correct and tried changing the behavior of the enter key. How can I make the cursor behave normally?
Most probably the text contains a Tab character. The textbox doesn't show it but it messes up editing as you describe.
Copy the text into a text editor that can show invisible control characters.
I am making a word prediction software. I have a text area. I want that as the user types something in that text area, an option list should appear on that cursor, the option list should contain all the predictions.
I just want to know how that option list can appear near the cursor in text area.
this can be accomplished using Jquery AutoComplete, but you will need to save all the words to be predicted (may be in json format for example) or use a server-side function
I need to change occurrences of a term only in certain places in my project.
Is there a way in Sublime Text to navigate the search results (across an entire project) and only replace the occurrences of my choice?
⌘ShiftF opens the "search and replace" for the entire project, but the Replace button only gives me the option to replace all occurrences.
If you press the ... button in the search panel, a menu will open that allows you to refine your search. You can use the Where input field with a search pattern, or some tags like <open-files>.
http://docs.sublimetext.info/en/latest/search_and_replace/search_and_replace_files.html
Other than that, if you really need human input to decide where to replace and where not to replace, you can go to the next result by pressing Enter and pasting the code manually.
Just in case you didn't know: when you make a project search a new text file opens up with all the occurrences. You can click those occurrences to navigate to the file in question.
For posterity, the functionality to search/find and replace inside the open project does exist. ⌘ShiftF and add <open project> to the Where input field.
I am in need of being able to select multiple cursors for thousands of lines that would then let me add content before each of them at the same time. Is there a way to select all and then select the multiple cursor option to put the cursor before each character of each line? Hope that does not sound confusing :-(
On Windows / OS X
Make sure you have View > Word Wrap off
Select all: Ctrl / Cmd+A
Split into Lines:Ctrl / Cmd+Shift+L
Put the cursor at the beginning of the line: Home / Ctrl+A
Yes, though I don't know how well multiple selections works with thousands of lines.
Start with Select All or select the lines that you need to edit.
From the Selection menu -> Split into lines. This will create multiple selections, one for each line.
Move the cursor to the beginning of each line by using the Home key.
Insert your content.
You can do as was suggested in other answers, it will work perfectly fine, sublime can handle thousands of selections for sure, but it might get bit slow sometimes.
Use regex in search n' replace, that's what it's for.
ctrl+h opens search and replace tab
make sure "Regular expressions" is pressed, "wrap" is pressed and "in selections" is NOT pressed.
type ^ to top field, it will mean "beginning of line" in this context
type your text in bottom field
ctrl+alt+enter or whatever the shortcut is to "replace all"