Source Code Viewer

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
Walrez
Posts: 29
Joined: 05 May 2008 16:42

Source Code Viewer

Post by Walrez »

Hi,
I apologize if this has been asked, I tried searching.
I'd like a viewer that displays code with syntax highlighting, that can be used from xyplorer.
I couldn't find any external utility (I remember there were many years ago). I prefer portable.
If anyone can give a recommendation I'd be very grateful.
Thanks in advance

Horst
Posts: 1330
Joined: 24 Jan 2021 12:27
Location: Germany

Re: Source Code Viewer

Post by Horst »

I use the fine free Delphi-Preview-Handler from
https://github.com/RRUZ/delphi-preview-handler
It's installed on the OS level and not portable
but allows previews and more in Explorer, XY and Everything for me.
It can be registered for more file types than its default.

If you really need a portable viewer, why not using one of the many free editors
with Syntax highlighting, like AkelPad or PSPad.
Windows 11 Home, Version 25H2 (OS Build 26200.7171)
Portable x64 XYplorer (Actual version, including betas)
Display settings 1920 x 1080 Scale 100%
Everything 1.5.0.1400a (x64), Everything Toolbar 2.1.0, Listary Pro 6.3.6.99

eil
Posts: 1815
Joined: 13 Jan 2011 19:44

Re: Source Code Viewer

Post by eil »

Just for an option, i use Notepad++ for highlight, and AkelPad for ability to show 4 parts of code simultaneously(which nobody else can, for pity).
Win 7 SP1 x64 100% 1366x768|1900x1080

WirlyWirly
Posts: 260
Joined: 21 Oct 2020 23:33
Location: Win 10 @ 100% (3440x1440)

Re: Source Code Viewer

Post by WirlyWirly »

eil wrote: 22 Dec 2024 19:59 ...AkelPad for ability to show 4 parts of code simultaneously...
Who still writes code with only 4 parts at once? :lol:
2024-12-22_11-58-41.png
2024-12-22_11-58-41.png (1.36 MiB) Viewed 1230 times
In all seriousness, that Delphi-Preview-Handler is great, a nice quality-of-life for my home pc. Thanks Horst! :beer:

Walrez
Posts: 29
Joined: 05 May 2008 16:42

Re: Source Code Viewer

Post by Walrez »

Horst wrote: 22 Dec 2024 18:53 If you really need a portable viewer, why not using one of the many free editors
with Syntax highlighting, like AkelPad or PSPad.
I prefer not to use an editor for viewing, but in the end I settled with notepad++ with a command line switch that allows opening in read-only.

"C:\Tools\npp\notepad++.exe" -ro -nosession

The nosession switch is also nice, because it opens the file alone, without saved tabs from previous sessions.
After closing the viewed file, if opening npp again it will restore the previous opened tabs from a previous editing session (but also the one that was just viewed, for some reason).

I assigned it to a user command and a keyboard shortcut.

I'll try your suggestion as well, thanks!

eil
Posts: 1815
Joined: 13 Jan 2011 19:44

Re: Source Code Viewer

Post by eil »

WirlyWirly wrote: 22 Dec 2024 21:02 Who still writes code with only 4 parts at once? :lol:
Looks interesting, heard the name but didn't know it can do that.
Shame it isn't user-friendly, even trying to configure it is already a task.
Win 7 SP1 x64 100% 1366x768|1900x1080

WirlyWirly
Posts: 260
Joined: 21 Oct 2020 23:33
Location: Win 10 @ 100% (3440x1440)

Re: Source Code Viewer

Post by WirlyWirly »

eil wrote: 23 Dec 2024 11:56Looks interesting, heard the name but didn't know it can do that.
Shame it isn't user-friendly, even trying to configure it is already a task.
There is definitely a learning curve, and no vim is not known for being user-friendly, at-least not at first, which is why most people are turned away from it.

If you're looking to get started, there is gVim (which I've never used) or my preferred option; using vim in a terminal such as GitBash or WindowsSubsystemLinux (wsl).

You can simply enter vimtutor in the terminal and you'll get a quick interactive intro on the basics of using vim. Keep in mind that being able to touch-type everything on your keyboard (including the number-row and symbols) is kind of a prerequisite, otherwise you likely won't be able to fully utilize the editor nor enjoy the experience.

After going through vimtutor, you can start editing right-away, but if you really want to jump-start your productivity, I recommend the book, "Practical Vim: Edit Text at the Speed of Thought" by Drew Neil. It picks-up right where vimtutor leaves off, saving you years of fumbling around on your own.

eil
Posts: 1815
Joined: 13 Jan 2011 19:44

Re: Source Code Viewer

Post by eil »

WirlyWirly wrote: 23 Dec 2024 19:36 If you're looking to get started, there is gVim
I actually tried it first hand, and it has issue of not showing what options are enabled(which is frustrating). Nevertheless thank you for all the hints.
Win 7 SP1 x64 100% 1366x768|1900x1080

Post Reply