Text Editor Settings
Text Editor Settings
Introduction
Here are some of my text editor settings. First there are tips how to do something and then settings for the text editors. See also: Useful Text Editors, Applications, Software.
Convert UNIX line endings to Windows line endings
Sublime Text. View, Line Endings, Windows. File, Save.
Count the number of times a string or a character appears on a file
TextWrangler. Select Find. Write your stuff. Press the "Find All" button.
Count the number of words
Google Docs/Drive. Create a new Google Docs document. Tools: Word count.
Open UTF-16 Encoded Text File in OS X 10.11
With Atom text editor open the text file (TextWrangler 5 shows a mess or crashes).
Copy and paste the text to LibreOffice Calc and UTF-16 should be suggested.
Copy and paste the text to TextWrangler and save as UTF-8.
Save as ASCII (OS X 10.11)
Atom 1. Edit, Select Encoding, Western (ASCII).
TextWrangler 5. Preferences, Text Encodings, Latin-US (DOS) (not DOS (CP 437).
Replace or remove tabs
Aquamacs. Copy a tab character on Aquamacs and it should look like you are searching for a caret and a vertical bar ^| in the Replace operation.
Aquamacs 2.5 (OS X 10.8)
Comments
Aquamacs version number is after the Emacs version info in the About dialogue window.
Emacs version: GNU Emacs 23.4.1 (x86_64-apple-darwin12.3.0, NS apple-appkit-1187.37) of 2013-06-14 on acs-trailblazer.ist.psu.edu.
Use spaces instead of tabs
Preferences: Editing: Indent: Indent Tabs Mode: off (nil)
Atom 1.6.0 (OS X 10.11)
Comments
I use Atom with Source Code Pro font with Medium typeface using webkit antialiasing.
Stylesheet
atom-text-editor {
color: black;
padding-left: 10px;
-webkit-font-smoothing: antialiased;
}
Settings: Theme
UI Theme: One Light
Syntax Theme: One Light
Settings: Core
[ ] Allow Pending Pane Items
[ ] Audio Beep
[ ] Automatically Update
[ ] Close Empty Windows
[ ] Remove Empty Panes
File Encoding: utf8
[x] Open Empty Editor On Start
Settings: Editor
[ ] Auto Indent
[ ] Auto Indent On Paste
[x] Back Up Before Saving
Font Family: SourceCodePro-Medium
Font Sixe: (Default: 14)
Line Height: 1
[ ] Scroll Past End
[ ] Show Indent Guide
[ ] Show Invisibles
[ ] Show Line Numbers
[ ] Soft Tabs
[ ] Soft Wrap
[ ] Soft Wrap At Preferred Line Length
Tab Length: 4
Tab Type: hard
[ ] Use Shadow DOM
[ ] Zoom Font When Ctrl Scrolling
Packages: enabled
[x] about
[x] incompatible-packages
[x] settings-view
[x] status-bar
[x] style guide (helps with Stylesheet settings)
[x] tabs
Packages: disabled
[ ] autocomplete-css
[ ] autocomplete-html
[ ] autocomplete-plus
[ ] autocomplete-snippets
[ ] autosave (I'm still testing Atom, so no saving)
[ ] background-tips
[ ] bookmarks
[ ] bracket-matcher
[ ] command-palette
[ ] encoding-selector
[ ] find-and-replace
[ ] go-to-line
[ ] grammar-selecter
[ ] image-view
[ ] language-go
[ ] language-text
[ ] line-ending-selector
[ ] link
[ ] metrics
[ ] notifications
[ ] snippets
[ ] spell-check
[ ] timecop (maybe sometimes)
[ ] tree-view
[ ] welcome
[ ] whitespace
[ ] wrap-guide
Emacs 22 (OS X 10.8)
Comments
Version: GNU Emacs 22.1.1
Create/modify the settings file
1) With TextWrangler: create UNIX-line UTF-8 (no BOM) .emacs file and move it to own directory: mv ~/Desktop/.emacs ~/
2) Check for error messages by starting emacs.
3) Open with emacs to change the file (TextWrangler doesn't show invisible files).
Notepad (Windows 7)
Start menu: Accessories: Notepad: right-click: Properties
Shortcut tab (set Desktop as the default working directory)
Start in: %USERPROFILE%\Desktop (default setting: %HOMEDRIVE%%HOMEPATH%)
When saving text files: Save As, Encoding: [UTF-8]
Notepad (Windows 10)
Format: Font
Consolas, Regular, 11 (default)
Courier New, Regular, 11 (not as good as Consolas)
Notepad++ 6 (Windows 7)
Tabs and spaces tricks
View: Show Symbol: [x] Show White Space and TAB
View: Show Symbol: [x] Show Indent Guide
Edit: Blank Operations: TAB to Space
Edit: Blank Operations: Space to TAB
Preferences
General
Localization
English
Toolbar
[ ] Hide
(*) Standard icons
Menu Bar
[ ] Hide (use Alt or F10 key to toggle)
[x] Show status bar
Document List Panel
[x] Show
Tab Bar
[ ] Hide
[ ] Multi-line
[ ] Vertical
[x] Reduce
[ ] Lock (no drag and drop)
[x] Darken inactive tabs
[x] Draw a coloured bar on active tab
[x] Show close button on each tab
[ ] Double click to close document
Editing
Carret Settings
Width: 1
Blink rate: about 1/10
Multi-Editing Settings
[ ] Enable
Folder Margin Style
(*) Box tree
Vertical Edge Settings
[ ] Show vertical edge
Border Width
2
Line Wrap
(*) Aligned
[x] Display line number
[x] Display bookmark
[x] Enable current line highlighting
New Document
Format
(*) Windows
( ) Old Mac
( ) Unix/OSX
Default language: [Normal Text] (or C++, Java, ...)
Encoding
( ) ANSI
(*) UTF-8 without BOM
[x] Apply to opened ANSI files
( ) UTF-8 (with BOM I guess)
( ) UCS-2 Big Endian
( ) UCS-2 Little Endian
( ) Choose: [ISO 8859-1, Windows-1252, OEM-US, ...]
File Association
Notepad
c, c++, objc
java, c#, pascal
web(html) script
public script
property script
fortran, TeX, SQL
misc
customize
Language Menu
[x] Make language menu compact
Comment: disable menu items here to tidy up the Language menu.
Tab Settings
cpp (C++)
Tab size: 3
[x] Replace by space
Java
Tab size: 3
[x] Replace by space
MISC.
Document Switcher
[x] Enable
[x] Enable MRU behaviour
Smart Highlighting
[x] Enable
[ ] Highlighting is case sensitive
[x] Enable Notepad++ auto-updater
[x] Auto-indent
[ ] Minimize to system tray
[ ] Show only filename in title bar
[ ] Remember current session for next launch (unnecessary to see previous files I have edited)
Clickable Link Settings
[ ] Enable (unnecessary to be able to click links)
[ ] Underline
File Status Auto-Detection
[x] Enable
[ ] Update silently
[ ] Scroll to last line after update
Highlight Matching Tags
[x] Enable
[x] Highlight tag attributes
[ ] Highlight comment/php/asp zone
Sublime Text 2 (OS X 10.8)
View
[x] Hide Minimap
Line Endings: (*) Windows
Preferences: Color Scheme
Eiffel (green/red/etc. text on white background)
Preferences: Settings - Default
"spell_check": false,
"tab_size": 4,
"translate_tabs_to_spaces": true,
"auto_match_enabled": false,
"default_line_ending": "windows",
"tab_completion": false,
"auto_complete": false,
"copy_with_empty_selection": false,
"find_selected_text": false,
"drag_text": false,
"tree_animation_enabled": false,
"hot_exit": false,
"remember_open_files": false,
"open_files_in_new_window": false,
"create_window_at_startup": false,
"preview_on_click": false,
TextEdit 1.7 (OS X 10.7)
Comments
If you update your operating system, check your settings again. For example New Document, Format should be Plaint Text for my use.
Preferences
New Document
Format
(*) Plain Text
Font
Plain text font: Monaco 11 (MacBook Pro with TextEdit 1.12 (macOS 10.12): Menlo Regular 11)
Rich text font: Helvetica 12
Options
[ ] Check spelling as you type
[ ] Check grammar with spelling
[ ] Correct spelling automatically
[x] Show ruler
[ ] Data detectors
[x] Smart copy/paste
[ ] Smart quotes
[ ] Smart dashes
[ ] Smart links
[ ] Text replacement
Open and Save
Plain Text File Encoding
Opening files: [Automatic]
Saving files: [Unicode (UTF-8)]
HTML Saving Options
Document type: [HTML 4.01 Strict]
Styling: [Embedded CSS]
Encoding: [Unicode (UTF-8)]
TextWrangler 5.5 (OS X 10.11)
Comments
TextWrangler opens up faster if you start Mac, then put the Mac to sleep and after all that you start TextWrangler for the first time.
Regular expressions
Search, Find, [x] Grep
TextWrangler uses the Perl Compatible Regular Expressions (PCRE) engine.
Find a number of n digits: \d+
Find a number of n digits and white spaces after that: \d+\s+
Appearance
[ ] Text options
[ ] Document navigation
[ ] Marker menu
[ ] Counterpart button
[ ] Included files menu
[ ] Document status
[ ] Function menu
[ ] Tab stops (depends, am I writing text or coding)
[x] Gutter
[ ] Page guide at [80] characters
[ ] Cursor position
[x] Language (for programming, e.g. C++, Java)
[x] Text encoding (usually Unicode: UTF-8, with BOM)
[x] Line break type (usually Windows: CRLF)
[x] Document lock state (is the document locked for some reason)
[x] Document save date
[x] Document statistics
[x] Text magnification
Application
[ ] Open documents into the front window when possible (I prefer to see each document on a separate window)
[x] Automatically refresh documents as they change on disk
Remember the [5] most recently used items
[x] Always show full paths in "Open Recent" menu
When TextWrangler becomes active:
(*) Do nothing
Editing
[x] Use "hard" lines in soft-wrapped views
Soft wrapped line indentation
(*) First line
Line spacing: about 5/100
Editor Defaults
[ ] Auto-indent
[ ] Balance while typing
[ ] Use typographer's quotes
[ ] Auto-expand tabs
[ ] Show invisible characters
[ ] Check spelling as you type
[ ] Soft wrap text to: (*) Page guide
Default font: [Courier-14]
Tab width: [4]
Keyboard
[x] Use Tab key to navigate Placeholders
"Home" and "End" keys: (*) Scroll to beginning and end of document
[ ] Enter key generates Return
[ ] Allow Tab key to indent text blocks
[ ] Enable Shift-Delete for forward delete
[ ] When auto-indenting, remove leading white space from indented line
[ ] Allow Page Up and Page Down keys to move the insertion point
Languages
Custom Language Preferences (you probably need to restart TextWrangler for changes to take effect)
Java
General
Line comment: [// ]
Block comment start: [/*]
Block comment end: [ */]
Editor
[x] Auto-indent
[ ] Balance while typing
[ ] Use typographer's quotes
[x] Auto-expand tabs
Tab width: [3]
[ ] Soft wrapt text to: (*) Page guide
Display
[x] Cursor position
[x] Language
[x] Text encoding
[x] Line break type
C++
General
Line comment: [// ]
Block comment start: [/*]
Block comment end: [ */]
Editor
[x] Auto-indent
[ ] Balance while typing
[ ] Use typographer's quotes
[x] Auto-expand tabs
Tab width: [3]
[ ] Soft wrapt text to: (*) Page guide
Display
[x] Cursor position
[x] Language
[x] Text encoding
[x] Line break type
Text File
General
Line comment: []
Block comment start: []
Block comment end: []
Editor
[ ] Auto-indent
[ ] Balance while typing
[ ] Use typographer's quotes
[ ] Auto-expand tabs
Tab width: []
[ ] Soft wrapt text to: (*) Page guide
Display
[x] Cursor position
[x] Language
[x] Text encoding
[x] Line break type
[x] Document statistics
Custom Extension Mappings:
(None)
Menus & Shortcuts
[x] TextWrangler
[x] Preferences...
[x] Setup...
[x] Hide TextWrangler
[x] Hide Others
[x] Quit TextWrangler
[x] File
[x] New
[x] Open...
[x] Save
[x] Save As...
[x] Export...
[x] Page Setup...
[x] Print...
[x] Edit
[x] Undo
[x] Redo
[x] Cut
[x] Copy
[x] Paste
[x] Clear
[x] Select All
[x] Select
[x] Lines
[x] Insert
[x] Copy Path
[x] Text Options...
[x] Normalize Options...
[x] Special Characters...
[-] Text
[x] Apply Text Filter
[x] Change Case (for news articles with CAPSLOCK heading)
[ ] Shift Left
[ ] Shift Right
[ ] Hard Wrap
[ ] Add Line Breaks
[x] Remove Line Breaks (if you copy-paste text from an email conversation or PDF document)
[ ] Educate Quotes
[x] Hard Wrap... (sometimes I force text to width of 80 characters)
[x] Sort Lines
[ ] Process Duplicate Lines
[ ] Process Lines Containing
[ ] Increase Quote Level
[ ] Strip Quotes
[ ] Zap Gremlins
[ ] Entab
[x] Detab (sometimes I remove tabs from code)
[x] Find Next Misspelled Word
[ ] #!
[ ] Scripts
Printing
[x] Print using document's font
Printing font: [Courier-10]
[ ] Frame printing area
[ ] Print page headers
[x] Print full pathname
[ ] Print line numbers
[ ] 1-inch gutter
[x] Print color syntax
Text Colors
[ ] Highlight insertion point: [turquoise] (sometimes with MacBook Pro when accuracy is necessary)
Text Encodings
(Available text encodings when using Save As):
[x] Central European (Mac OS)
[x] Latin-US (DOS) ("ASCII 128")
[x] Unicode (UTF-16 Little-Endian, no BOM)
[x] Unicode (UTF-16 Little-Endian)
[x] Unicode (UTF-16, no BOM)
[x] Unicode (UTF-16)
[x] Unicode (UTF-8, with BOM)
[x] Unicode (UTF-8)
[x] Western (ASCII)
[x] Western (DOS Latin 1)
[x] Western (ISO Latin 1)
[x] Western (ISO Latin 9)
[x] Western (Mac OS Roman)
[x] Western (Windows Latin 1)
Default text encoding for new documents:
[Unicode (UTF-8)] (UTF-8 with BOM may cause problems with source code)
Text Files
Line breaks: (*) Windows (CRLF)
OLDER VERSIONS (ARCHIVE)
TextWrangler 3.5 (OS X 10.7)
Application
Software Update
[ ] Check automatically (MacBook Pro with mobile connection)
[x] Automatically refresh documents as they change on disk
Remember the [5] most recently used items
[x] Always show full paths in "Open Recent" menu
At startup:
(*) Do nothing
Documents & Drawer
New & opened documents:
(*) Open in a new window (easier to find documents)
[x] Warn before closing a window containing multiple documents
Open the Documents Drawer:
(*) Never
Editing: General
[ ] Allow single-click line selection
[ ] Double-click to balance
[x] Include delimiter characters when balancing
[x] Use "hard" lines in soft-wrapped views
Soft wrapped line indentation
(*) First line
Extra space in text views
(*) None
Editor Defaults
[ ] Auto-indent
[ ] Balance while typing
[ ] Use typographer's quotes
[ ] Auto-expand tabs
[ ] Show invisibles
[ ] Check spelling as you type
[x] Syntax coloring (rarely needed, helps for example with HTML)
[ ] Soft wrap text
Text Colors
[ ] Highlight insertion point: [turquoise] (sometimes with MacBook Pro when accuracy is necessary)
Text Encodings
Default text encoding for new documents:
[Unicode (UTF-8)] (UTF-8 with BOM may cause problems with source code)
[x] Use UTF-8 for unix script I/O
Text Files
[x] Translate line breaks
Default line breaks: (*) Windows (CRLF)
Text Printing
[ ] Frame printing area
[ ] Print page headers
[ ] Print full pathname
[ ] Print line numbers
[ ] 1-inch gutter
[x] Print color syntax
Text Status Display
[ ] Show toolbar
[ ] Show navigation bar
[ ] Show status bar
[ ] Show page guide
[ ] Show tab stops
[ ] Show line numbers
[ ] Document icon
Windows
"Window" menu and palette: [x] Always show full paths
Last modified: June 4th, 2020
Author: Tomi Häsä (tomi.hasa@gmail.com)
URL: http://sites.google.com/site/tomihasa/text-editor-settings