It always amazes me of how frequently I have to manipulate text I in various ways. More often than not it is simply doing a SciTEfind and replace but being able to have other ways to manipulate text is also a great time saver!
In this video I walk through some of the tips & tricks of using SciTE search and replace text within the text editor. I also demonstrate one of the “coolest” features which is block / typing across multiple lines. This is a GREAT feature which many do not know how to use. The Regular Expressions and dealing with line returns / new lines are also very helpful.
In the video I also showed how I updated my AutoHotKey SciteUser.properties file. Below is the line I added #### Changing SciTE Find and Replace to posix regular expression mode so do not have to escape parens find.replace.regexp.posix=1
To avoid having to escape parens (watch above video) add the following in your SciTE user.properties file. If set to 0, syntax uses the old Unix style where \( and \) mark capturing sections while ( and ) are themselves. If set to 1, syntax uses the more common style where ( and ) mark capturing sections while \( and \) are plain parentheses.
Here are some useful POSIX terms which are more readable in your SciTE Find and Replace
[:xxx:] were xxx is one of the following words: NAMEDESCRIPTION alnum letters and digits alpha letters word “word” characters (like \w) digit decimal digits (like \d) space white space punct printing characters, excluding letters and digits lower lower case letters upper upper case letters
SciTE is a wonderful & powerful editor! I love using it for AutoHotKey, Python, HTML, SPSS, SQL, XML, and more! Below are SciTE Keyboard Shortcuts & Hotkeys to use with SciTE . I’ve bolded a few of the ones that I use very frequently. You also may like to check out the documentation. I have custom SciTE Hotkeys that I’ve added however they require updating files like the user.properties file which review in a this post.
You can download a printable version here. In the zip file you’ll find an Excel file which you can easily manipulate to your liking or just use the PDF versions.
SciTE Keyboard Shortcuts & Hotkeys
Magnify text size.
Reduce text size.
Restore text size to normal.
Cycle through recent files.
Delete to start of word.
Delete to end of word.
Delete to start of line.
Delete to end of line.
Go to start of document.
Extend selection to start of document.
Go to start of display line.
Go to end of document.
Extend selection to end of document.
Go to end of display line.
Expand or contract a fold point.
Select to next bookmark.
Select to previous bookmark.
Find selection backwards.
Line transpose with previous.
Selection duplicate. (Great to use in SciTE editor)
While SPSS has many strengths, string manipulation is NOT one of them! Don’t get me wrong, you can manipulate strings however the syntax for doing so is very complex.
If you are still using an older version of SPSS, this macro shows how you can easily remove character(s) from a string both anywhere in the string or at a certain location. Newer versions have a Replace command which can be used to remove unwanted characters.
Video demonstrating SPSS macro to remove characters from strings