Bookmarks: Difference between revisions

From Bluefish Wiki
Jump to navigation Jump to search
mNo edit summary
 
(8 intermediate revisions by the same user not shown)
Line 2: Line 2:
|lang=en
|lang=en
|rev=2.0.0
|rev=2.0.0
|st=d
|st=u
|Title=4. Bookmarks
|Title=4. Bookmarks
|prev=Man 2 ch06s03
|prev=Man 2 ch06s03
Line 8: Line 8:
|next=Man 2 ch06s05
|next=Man 2 ch06s05
}}
}}
 
{{toc}}
In Bluefish you can add bookmarks to a line in the text, and you can later use the bookmark to quickly jump to this location, or even to open the document referred to by the bookmark at that line.
In Bluefish you can add bookmarks to a line in the text, and you can later use the bookmark to quickly jump to this location, or even to open the document referred to by the bookmark at that line.


Bookmarks can be added to the current cursor location by using the <tt>Edit → Add Bookmark</tt> ('''Ctrl+D''') menu item; or by right-clicking in the text, and selecting Add bookmark. You can delete a bookmark using the Delete bookmark item in the document contextual menu.
== Creating Bookmarks ==


Each bookmark in a given document is marked by a blue background in the line number margin.  
Bookmarks can be added to the current cursor location by using the <tt>Document → Add Bookmark</tt> ('''Ctrl+K''') menu item; or by right-clicking in the text, and selecting Add bookmark. You can delete a bookmark using the Delete bookmark item in the document contextual menu.


[[File:Man2_bookmark_marked.png|none|frame|How Bookmarks are marked]]
Adding or deleting a bookmark: right click on the  Editing Area.
{|
|valign="bottom" align="center"|[[File:Man2 add bookmark.png|none|frame|add bookmark]]
|valign="bottom" align="center"|[[File:Man2 delete bookmark.png|none|frame|delete bookmark]]
|+
|colspan="2" align="center"|if the line is still bookmarked, you can delete the bookmark, else you can create one.
|}


Bookmarks can be temporary or permanent. Permanent bookmarks are stored, and temporary bookmarks are gone after Bluefish is closed. The default is set in the preferences under Editor.
{{tip|text=If the line number margin is visible <tt>Document → Line numbers</tt> <small>(see also [[Preferences#Non-project initial documents settings |Preferences]] and [[Projects]])</small> you can set/unset a bookmark by doubleclicking on a line number.}}


Bookmarks can be found in the third tab of the side panel, sorted by document and line number.  
{{warning|text=You can't set a bookmark in an unsaved file.}}


[[File:Man2_bookmark_tab.png|none|frame|Bookmarks in the Side Panel]]
◼ Each bookmark in a given document is marked by a black square in the line number margin.


If you right click a bookmark in the bookmark tab of the side panel, you get a pop up menu with several options.  
== The bookmark browser ==
The bookmark browser provides access to previously marked positions in a file.  


[[File:Man2_bookmark_cm.png|none|frame|Contextual Menu on Bookmark in the Side Panel]]
Bookmarks can be found in the second tab of the side panel, sorted by document and line number.


The Goto bookmark item allows you to go to the bookmark location in the document, opening it if needed.
If you right click a bookmark in the bookmark tab of the side panel, you get a pop up menu with several options.
{|
|valign="bottom" align="center"|[[File:Man2_bookmark_browser.png|none|frame|Bluefish Bookmark Browser]]
|valign="bottom" align="center"|[[File:Man2_bookmark_browser_menu1.png|none|frame|bookmark browser menu]]
|valign="bottom" align="center"|[[File:Man2_bookmark_browser_menu2.png|none|frame|Show file sub-menu]]
|}


The Edit item allows you to change a bookmark from temporary to permanent or the other way around, to name it, and to give it a short description.  
Bookmarks can be temporary or permanent. Permanent bookmarks are stored, and temporary bookmarks are gone after Bluefish is closed. The default is set in the preferences under Editor.


[[File:Man2_bookmark_edit.png|none|frame|Editing a Bookmark]]
The Edit option let you set a name, a description and and toggle permanent/temporary option.


Note that after naming a bookmark, the default name - first characters of the bookmarked line - is displayed after the new name.
You can navigate trough bookmarks using the arrows in the bookmark browser or in Menu: <tt>Go → arrows Bookmark</tt>


[[File:Man2_bookmark_name.png|none|frame|A named Bookmark]]
{{top}}
== Generating several bookmarks at once ==


Via this contextual menu, you may also delete a bookmark, delete all bookmarks in the active document, or delete all bookmarks stored in the bookmark tab of the side panel. The latter ones are also available when you right click the name of a document in this tab.


[[File:Man2_bookmark_document_cm.png|none|frame|The Contextual Menu on a Document in the Bookmark Tab]]
[[File:Man2_bookmark_find_perl.png|left|frame|Bookmarking shell Functions via the Find Menu]]


== 4.1. Generating several bookmarks at once ==
To add many bookmarks at once, use the <tt>Edit → Find</tt> ('''Ctrl+F''') dialog, or the Search icon in Main Tool Bar. Check the Bookmark matches option, and all search results will be added to your bookmarks.
To add many bookmarks at once, use the <tt>Edit → Find</tt> ('''Ctrl+F''') dialog. Check the Bookmark result option, and all search results will be added to your bookmarks.


For example, the XML files for this manual have sections, each identified by a header like <tt><nowiki><sect1 id="nameofthesection"></nowiki></tt>. A way to automatically get a bookmark to every section is to search for the following posix regular expression pattern: <tt><nowiki><sect[0-9]+ id="[^"]+"></nowiki></tt> and bookmark all results.  
Here is an example which bookmarks all functions in Shell script file with POSIX or PERL regular expressions.


[[File:Man2_bookmark_find_posix.png|none|frame|Bookmarking with Posix Regular Expression]]
Check [[Man 2 ch06s05#Section 5.3, “Find and Replace Using Regular Expressions”|Section 5.3, “Find and Replace Using Regular Expressions”]] for more information on finding and replacing with regular expression in Bluefish.


Here is the result:
{{clear}}


[[File:Man2_bookmark_find_posix_result.png|none|frame|Bookmarks with Posix Regular Expression]]
;see also:
: [https://bugzilla.gnome.org/show_bug.cgi?id=611743 bug 611743] The menu options in the Go menu to move the edit point in a document to the first, previous, next or last previously set bookmark are non-functional. The edit point remains in the same place when these are clicked.


Here are two examples which bookmarks all functions in Objective-C and PHP files with POSIX or PERL regular expressions:
: [https://bugzilla.gnome.org/show_bug.cgi?id=612556 bug 612556] mutiple selection: the search pattern is used as name of the bookmarks.+ In BF 1 single add bookmark use the line to give a name, in Bf2 no name is given.


[[File:Man2_bookmark_find.png|none|frame|Bookmarking Objective C Functions via the Find Menu]]


[[File:Man2_bookmark_find_perl.png|none|frame|Bookmarking PHP Functions via the Find Menu]]
Check [[Man 2 ch06s05#Section 5.3, “Find and Replace Using Regular Expressions”|Section 5.3, “Find and Replace Using Regular Expressions”]] for more information on finding and replacing with regular expression in Bluefish.


{{top}}





Latest revision as of 10:15, 29 March 2010

 

In Bluefish you can add bookmarks to a line in the text, and you can later use the bookmark to quickly jump to this location, or even to open the document referred to by the bookmark at that line.

Creating Bookmarks[edit]

Bookmarks can be added to the current cursor location by using the Document → Add Bookmark (Ctrl+K) menu item; or by right-clicking in the text, and selecting Add bookmark. You can delete a bookmark using the Delete bookmark item in the document contextual menu.

Adding or deleting a bookmark: right click on the Editing Area.

add bookmark
delete bookmark
if the line is still bookmarked, you can delete the bookmark, else you can create one.
Man2 tip.gif If the line number margin is visible Document → Line numbers (see also Preferences and Projects) you can set/unset a bookmark by doubleclicking on a line number.
Man2 warning.png You can't set a bookmark in an unsaved file.

◼ Each bookmark in a given document is marked by a black square in the line number margin.

The bookmark browser[edit]

The bookmark browser provides access to previously marked positions in a file.

Bookmarks can be found in the second tab of the side panel, sorted by document and line number.

If you right click a bookmark in the bookmark tab of the side panel, you get a pop up menu with several options.

Bluefish Bookmark Browser
bookmark browser menu
Show file sub-menu

Bookmarks can be temporary or permanent. Permanent bookmarks are stored, and temporary bookmarks are gone after Bluefish is closed. The default is set in the preferences under Editor.

The Edit option let you set a name, a description and and toggle permanent/temporary option.

You can navigate trough bookmarks using the arrows in the bookmark browser or in Menu: Go → arrows Bookmark

Top.png

Generating several bookmarks at once[edit]

Bookmarking shell Functions via the Find Menu

To add many bookmarks at once, use the Edit → Find (Ctrl+F) dialog, or the Search icon in Main Tool Bar. Check the Bookmark matches option, and all search results will be added to your bookmarks.

Here is an example which bookmarks all functions in Shell script file with POSIX or PERL regular expressions.

Check Section 5.3, “Find and Replace Using Regular Expressions” for more information on finding and replacing with regular expression in Bluefish.


see also
bug 611743 The menu options in the Go menu to move the edit point in a document to the first, previous, next or last previously set bookmark are non-functional. The edit point remains in the same place when these are clicked.
bug 612556 mutiple selection: the search pattern is used as name of the bookmarks.+ In BF 1 single add bookmark use the line to give a name, in Bf2 no name is given.


Top.png