qlstephen
A QuickLook plugin that lets you view plain text files without a file extension
Top Related Projects
List of useful Quick Look plugins for developers
QuickLook generator for Markdown files.
Bring macOS “Quick Look” feature to Windows
Quick Overview
QLStephen is a QuickLook plugin for macOS that allows users to preview plain text files without a file extension. It enhances the built-in QuickLook functionality by enabling previews for files that would otherwise not be previewable, such as README, Makefile, and other extension-less text files.
Pros
- Improves macOS file browsing experience by enabling previews for plain text files without extensions
- Easy to install and use with no configuration required
- Supports a wide range of text file types, including source code files
- Integrates seamlessly with the native QuickLook functionality
Cons
- Limited to macOS only, not available for other operating systems
- Requires manual installation or use of a package manager
- May conflict with other QuickLook plugins that handle similar file types
- Lacks advanced features like syntax highlighting or text formatting
Getting Started
To install QLStephen, follow these steps:
-
Using Homebrew (recommended):
brew install --cask qlstephen
-
Manual installation:
- Download the latest release from the GitHub releases page
- Unzip the downloaded file
- Move
QLStephen.qlgenerator
to~/Library/QuickLook/
or/Library/QuickLook/
- Run
qlmanage -r
in Terminal to refresh QuickLook
After installation, QuickLook should automatically use QLStephen to preview plain text files without extensions. To use it, simply select a file in Finder and press the Space bar to activate QuickLook.
Competitor Comparisons
List of useful Quick Look plugins for developers
Pros of quick-look-plugins
- Comprehensive collection of multiple Quick Look plugins in one repository
- Regularly updated with new plugins and improvements
- Includes installation instructions for various package managers (Homebrew, MacPorts)
Cons of quick-look-plugins
- May include unnecessary plugins for some users
- Potential conflicts between plugins or with existing system plugins
- Requires more system resources due to multiple plugins
Code comparison
While both repositories primarily focus on providing Quick Look plugins rather than extensive code, here's a brief comparison of their installation methods:
QLStephen:
brew install qlstephen
quick-look-plugins:
brew install qlcolorcode qlstephen qlmarkdown quicklook-json qlimagesize suspicious-package apparency quicklookase qlvideo
QLStephen is a single plugin, while quick-look-plugins installs multiple plugins in one command.
Summary
QLStephen is a focused solution for previewing plain text files without extensions, while quick-look-plugins offers a broader range of Quick Look enhancements. Users who need only plain text previews may prefer QLStephen for its simplicity, while those seeking comprehensive Quick Look improvements might opt for quick-look-plugins despite potential resource overhead.
QuickLook generator for Markdown files.
Pros of QLMarkdown
- Specifically designed for rendering Markdown files, providing better formatting and styling
- Supports syntax highlighting for code blocks within Markdown files
- Offers customization options for appearance and behavior
Cons of QLMarkdown
- Limited to Markdown files only, unlike QLStephen's broader plain text support
- May require more system resources due to more complex rendering
Code Comparison
QLMarkdown (Objective-C):
- (NSData *)dataForPreviewItem:(id <QLPreviewItem>)item {
NSString *markdown = [NSString stringWithContentsOfURL:[item previewItemURL]
encoding:NSUTF8StringEncoding
error:nil];
return [self htmlForMarkdown:markdown];
}
QLStephen (Objective-C):
- (NSData *)dataForPreviewItem:(id <QLPreviewItem>)item {
NSString *fileContent = [NSString stringWithContentsOfURL:[item previewItemURL]
encoding:NSUTF8StringEncoding
error:nil];
return [fileContent dataUsingEncoding:NSUTF8StringEncoding];
}
The main difference is that QLMarkdown converts Markdown to HTML, while QLStephen simply returns the raw file content for display.
Bring macOS “Quick Look” feature to Windows
Pros of QuickLook
- Cross-platform support (Windows, macOS, Linux)
- Extensive file format support, including plugins for various file types
- Active development with frequent updates and bug fixes
Cons of QuickLook
- Larger installation size due to broader feature set
- May have a steeper learning curve for users familiar with simpler Quick Look plugins
Code Comparison
While a direct code comparison is not particularly relevant due to the different scopes of these projects, we can highlight some key differences in their implementation:
qlstephen (macOS Quick Look plugin):
- (NSString *)pathForResource:(NSString *)name ofType:(NSString *)ext
{
return [[NSBundle bundleForClass:[self class]] pathForResource:name ofType:ext];
}
QuickLook (cross-platform application):
public static string GetFileExtension(string fileName)
{
return Path.GetExtension(fileName).ToLowerInvariant();
}
The code snippets demonstrate the different approaches: qlstephen focuses on macOS-specific implementations, while QuickLook uses more generic, cross-platform methods.
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
QuicklookStephen
QLStephen is a QuickLook plugin that lets you view text files without their own dedicated QuickLook plugin. Files like:
README
INSTALL
Capfile
CHANGELOG
package.json
etc...
Installation
Homebrew
brew install --cask qlstephen
Pre-compiled
- Download the latest version of QuickLookStephen
- Unzip
- Copy the file into
~/Library/QuickLook
(You can create theQuickLook
folder if it doesnât exist)
Manually Compiled
Compiling the project yourself? Run:
make
make install
Permissions (Quarantine)
If you run into issues with macOS not letting you run the plugin because it's not signed by a verified developer you can follow these steps:
- Install the plugin using one of the methods above
- run
xattr -cr ~/Library/QuickLook/QLStephen.qlgenerator
(sudo if needed) - run
qlmanage -r
- run
qlmanage -r cache
- Restart Finder by...
- Restarting your computer
- or holding down the option key and right click on Finderâs dock icon, then select âRelaunchâ from the menu
For more disucssion on this you can read up on #81 starting here
Settings
Maximum file size
To keep quickview fast the preview is limited in its number of shown bytes. The default value is 100kB. You can change this using the shell to set your own max size.
defaults write com.whomwah.quicklookstephen maxFileSize 102400
Trouble?
If youâve installed the plugin, but donât see any changes:
- Run
qlmanage -m
and look for thepublic.data
line to make sure a different application'sqlgenerator
file hasn't taken precedence. (Not allqlgenerator
files are in~/Library/QuickLook/
or/Library/QuickLook/
!) - Make sure you are editing (a) the correct plist of (b) the correct bundle.
(For example, you might have two
QLStephen
plugins. Itâs possible the plugin in another directory â perhaps/Library/QuickLook/
â is what is being read.) - Run
qlmanage -r
in the Terminal. (This will restart QuickLook, which reloads all plugins.)
If you want to preview some text files that do have extensions (e.g., *.txt
), follow these instructions.
Why âQLStephenâ?
Because I was listening to Adam and Joe when I first wrote it.
Authors
Original author: Duncan Robertson
Special thanks to the following people for submitting patches over the years:
Contributing
- Fork the project
- Send a pull request
- Donât change the build number (Iâll do that when I release a new version)
Top Related Projects
List of useful Quick Look plugins for developers
QuickLook generator for Markdown files.
Bring macOS “Quick Look” feature to Windows
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot