Book Mark Your Code

Absolutely right Mr. Junior; this isn’t about book marking the favorite recipe page that your colleague sent you the other day which was forwarded to her by her ex-mother in law’s boyfriend.  Stop reading and exit out of this page immediately, if you are looking to find the recipe page that was book marked half decade ago.

Mr. Junior, What is this about then? This is regarding a book marking a line of code on your favorite text editor or on Interactive Development Environment (IDE).  Book mark feature is almost available on all popular text editors except on notepad even though it is very popular. It is a great feature to have when debugging or developing a long piece of code. Sadly, this book mark feature is the least popular among DBA and developer. This article covers how to set, unset, and quickly search book marks on most popular Window’s and Linux /UNIX text editors, SQL Developer and SQL Server Management Studios for code debugging and database development.

SQL Server Developer is an Interactive Development Environment that is free with graphical user interface that allows database developer and administrator to work on their task with fewer clicks and keystrokes. This tool has improved the productivity of database users when comparing with SQL*Plus. SQL Developer supports Oracle Database 10g, 11g, and 12c and runs on any operating system that supports Java. This is a powerful editor for anyone working with SQL, PL/SQL. This is more than just a editor, it has utilities built in for Database Administration work like Data Pump, RMAN, Export, and Import just to name few.

SQL Server Management Studio (SSMS) is an Interactive Development Environment that is free graphical user interface that allows database developer and administers to work on their task with fewer clicks and keystrokes. This is a free product that comes with MS SQL Server. It has a broad group of graphical tools with a number of rich SQL and T-SQL editor to provide access to SQL Server to developers and Database Administrators.

To set your cursor at the desired location in code. You can set bookmarks by going to the Edit menu –>Bookmarks->Toggle Bookmark. The other way is when you have your cursor set you can use the keyboard shortcut of Ctrl+K, Ctrl+K to add a bookmark. When you’ve created a bookmark you’ll see a small grey/white box in the left side window.


Vi is the most popular one and it is the ubiquitous text editor. It is highly configurable text editor built to make creating and changing any kind of text very efficient. It is included as "vi" with most UNIX systems and with Apple OS X. Vim is rock stable and is continuously being developed to become even better. Among its features are:
1.       Persistent, multi-level undo tree
2.       Extensive plugin system
3.       Support for hundreds of programming languages and file formats.
4.       Powerful search and replace.
5.       Integrates with many tools.
There are no visible indications of where marks are set on VI like in most windows editor.  Markers in VI are used for flip back and forth through a code, copy/paste/delete large chunk of code, making code for folding.
Command Description:
set mark a at current cursor location
jump to line of mark a (first non-blank character in line)
jump to position (line and column) of mark a
delete from current line to line of mark a
delete from current cursor position to position of mark a
change text from current line to line of mark a
yank text to unnamed buffer from cursor to position of mark a
Multiple markers are allowed in a single file but you are limited to a-z therefore you can have 26 letters. Don’t ask me if you can have more than 26 markers in Chinese languages. Remember, markers are not permanent, of course nothing is permanent, even a permanent maker is not permanent.  If a line or character is deleted the marker is void without a notice.
Notepad ++ is a powerful text editor free source code editor that supports several languages. It runs in MS windows and it governed by GPL license. This is much advanced than the one that comes standard with Windows. It supports syntax highlighting and code folding for over 50 programming, scripting and markup languages. This supports tabbed editing which allows working with multiple open files in a sing window. Notepad++ is written on C++ which ensures higher execution speed and small program size.

To set marker, move and point mouse to line number where you want to mark a code, right-click will set a mark with a round circle as shown in the picture.You can mark/un-mark or search within mark by going into Search à Mark. The round ball on the left represent the mark
EditPlus: This is another rich and powerful text editor that replaces Windows free Notepad. Some Editplus user believes this editor even replaces Noptepad++. A tool that is rich in feature does not come free of cost, it costs for licensing but absolutely free to evaluate it. I have used both and I find Editplus a better tool for the task I do every day.

Toggle Marker: Places or removes a marker where the cursor is positioned
Clear All Markers
Takes the cursor to next marker (downward)
Takes the cursor to previous marker(upward)

The green rectangles represent row markers and the blue lines represent column markers. 

The green rectangles represent row markers and the blue lines represent column markers. 

Book-mark lets you mark a line of code so that anyone can quickly return to a specific location and jump back and forth between locations or points of interest. This is very useful when dealing with codes that are over several hundred lines. They are not recommended when the code is a page long. You can switch code locations without having to randomly scrolling up or down. This saves time on development and debugging.
Interested in working with me? I can be reached at pbaniya04[at] for any questions, consulting opportunities or you may drop a line to say HELLO. Thank your again for visiting my blog and looking forward to serving you more.

Have a Database-ious Day!

1 comment

  1. So nice I am enjoying for that post as for u latest version of this Security tool. You can visit this website Click here..


Powered by Blogger.