Skip to content


Notepad++ Open File at Cursor

Also known as ‘Open Selection’, the action of ‘Open File at Cursor’ is useful when working with files of a common project, such as is often the case for the Web Developer. Whether working with files installed on a production server for example, as part of a WordPress installation, or in the instance of a user-created project residing on a development server, as part of a completely new code base unique to the developer’s own inception, a web developer is familiar with relative paths, as the source or markup requires for proper functioning of the application (e.g. html markup where anchors point to others in a collection of files residing under a common parent-container; files required in server-side scripting applications, such as ‘class/class-file.cfml’, or ‘wp-include/include-file.php’; markup with hyperlink reference anchors pointing to locations off-site from the project, requiring absolute paths like ‘Z:\Serverpath\htdocs\different_project\index.html’ or ‘http://different.site/path/altogether.html’)

Open Selection’ is a most useful function for developers working with source code containing such file path references. In my experience– having worked with many different Linux and win32 text-editors and web development IDE’s since circa 1997– many editors feature, as a context-menu entry in the main text-editor area, some variation on the function, as ‘Open Selection’ / ‘Open File at Cursor’ and sometimes as a variant of ‘Goto Definition’. After first discovering the useful feature, I found it to my surprise to see it much less often appearing as a built-in-function than other common functions afforded by popular IDE’s and Text Editors.

Notepad++ is one such editor which– to my knowledge– does not come packaged with an ‘Open Selection’ function. It is possible, however, to add ‘Open Selection’ functionality to open the selected file path with very little effort in Notepad++, via the built-in Run; ‘shortcuts.xml’ options.

Easy Add Open-Selection Function to Notepad++

Select “Run” from the Notepad++ main menu. A dialogue appears, offering to enter what program should be run. The dialogue accepts a handful of Npp built-in Environment variables, including $(CURRENT_WORD), which represents the current selected text. Place the following line, modifying it according to match the location of Notepad++.exe, and save it. From there, all that’s necessary to ‘Open Selection’, or ‘Open File at Cursor’ in Notepad++ is to select Run, and click whichever option appears in the list, according to what name was used on Save, at the time of entering the following line to the Run dialogue:
"C:\Program Files\Notepad++\notepad++.exe" "$(CURRENT_DIRECTORY)\\$(CURRENT_WORD)"

Enjoy!

Posted in Recommended, Software, Web Development.

Tagged with , , , , , , .


JAM TreeSize, Notepad2: This Bitchin' Playlist!

Though it is, for lack of a better term, somewhat the pain-in-the-ass when it comes to writing Regular Expressions, Florian’s Notepad2, based on Scintilla, is the text editor I use more than any other, as it simply launches almost immediately (i.e. NOTE the syntax, where the paranthesis chars, as denote each RegEx atom, for compliance with Notepad2– not unlike sed, i believe and any descendent of the early Unix-based text processors– the parenthesis at each regex atom must be escaped.)

JAM’s Treesize + Florian’s Notepad2 + RegEx = bitchin’ .m3u!

The data as output by TreeSize (as configured on this author’s system) provides the following [ File Size in Bytes Last Access Last Change Creation Date]. I found this process to be quite efficient; completed in a matter of seconds (thanks to TreeSize and REgex), an otherewise quite tedious task.

Here, TreeSize afforded a consice report (with the meta-data appended, which i didn’t need; which would muff the .m3u, of course, so it had to be eliminated): all files of extension .AVI as exist in a singular container, indicated here in NTFS/ MS Windows form, as “G:”, where each line might appear as, for example C:\some\path\to\unholy\film\media\vts_01.avi 2011 (while the same could be done, of course, on another platform, using something more like, perhaps /media/container_name/.*\.avi

Matching Expression: Eliminate Meta Data

^\(G:.*\.avi\)\(.*\)$

Replacement Expression

Since all i needed to do was eliminate data appearing only after that data i needed, on each line, this was a simple problem to solve: match everything beyond the file extension, then replace only that atom which contained the target data, like so:
\1
and viol-la! I’ve got a .m3u file, with 847 lines, including files in locations i’d never have thought to investigate otherwise.

Best wishes. Enjoy!

Posted in Entertainment, Recommended, Software.

Tagged with , , , , , , , , , , .


AP = Anything's Possible

Ladies and Gentlemen, please give warm welcome to Mr. Anthony Petrov: rise, and applaud for Anything’s Possible!

Aspiring Perchance toward Advanced Placement

Mr. Anthony Petrov: intelligent, easy-goin’, rock-and-rollin’ Russian Federation Folk(, yo!), The AP is our means of Advancement Pending.

Three cheers for Anthony. If I’m fortunate, perhaps He’ll add his own way of stating, as I have here, in his native language. What’s that word(s) I’m always asking him… something about :cheers:, as on the new year, etc.? hmmm…

Edit: For example…

Where the HELL is the unclosed <em> , or whatever is causing the italic text!

drives me insane!
it’s only on the goddamn front page!
seems to originate in that “Random in action” post… can you find it, Anthony?

Edit2: Nix the zBench for code in NN_Carrington

Something i need to do is get the Twitter and F/B code from Carrington transferred over to the zBench, if i want to use that theme.

I forget where it is– likely under Dashboard > Appearance > Themes > Editor > NN_Carrington > SinglePost.php (i’m guessing at names here)

Thanks for at least having a looksee…

Edit3: Not here

The italic bit, is not apparent under NN_Carrington. Go figure!
but, please, feel free to activate, and experiment w/ zBench — i really like that /Random/ posts widget. i don’t think Carrinton has it. Maybe there’s a /plugin/….

Posted in Entertainment, Recommended, Web Development.

Tagged with , , , , , , .


Random In Action

NoviceNotes™ Random Hi Jinx

A Bit of NoviceNotes™ Rand’onsense

I’d like for the reader to begin with the NoviceNotes™ Glossary Of Terms.

This day, I dare say what others have likely considered before: Let us abbreviate. Let us ensure we communicate, always with most accuracy; respect, and with intent for squelching as much noise from the signal; from every communication as sent, as we might find it possible.

I believe the English Language affords quite many an opportunity for new contractions, as may be appropriate, for example, should the reader venture upon a chit-chat, with the fine young man, A. Petrov; should the reader engage in so-called micro-blogging; should the reader wish to waste time in matters of communication between intelligent animals, humans, homo-sapient-sapiens, et al, etc. [e.g. When signal data storage is strictly limited to about 160 single-byte characters ; expression is force-fitted for a specific number of bytes, as programmed into the functionality of the web profile-application software, Twitter, publicly available, mass-solicited ]

Posted in Entertainment, General Interest, HTML, Linux, MS Windows, Recommended, Software, Web Development.

Tagged with , , , , , , , , , , , , , , , , .


Theming Nonsense

Readers, I apologize for the random nature of theming here. If you see “Carrington” it is for my need to prepare the proper code for the Twitter / FB bits, for a different theme I believe I will use, henceforth, upon completion of that coding task.
Best regards.

Posted in Web Development.

Tagged with , .