Index: uspace/app/edit/edit.c
===================================================================
--- uspace/app/edit/edit.c	(revision 1e58e1b743cccee85a37aef4a4b20356c941bb16)
+++ uspace/app/edit/edit.c	(revision 034c4202bb5b0bac8287593257471bb34ca29e2e)
@@ -87,4 +87,5 @@
 	
 	char *previous_search;
+	bool previous_search_reverse;
 } pane_t;
 
@@ -159,6 +160,6 @@
 static void insert_clipboard_data(void);
 
-static void search(void);
-static void search_forward(char *pattern);
+static void search(char *pattern, bool reverse);
+static void search_prompt(bool reverse);
 static void search_repeat(void);
 
@@ -417,5 +418,5 @@
 		break;
 	case KC_F:
-		search();
+		search_prompt(false);
 		break;
 	case KC_N:
@@ -435,4 +436,7 @@
 	case KC_RIGHT:
 		caret_move_word_right(true);
+		break;
+	case KC_F:
+		search_prompt(true);
 		break;
 	default:
@@ -1161,4 +1165,13 @@
 }
 
+static int search_spt_reverse_producer(void *data, wchar_t *ret)
+{
+	assert(data != NULL);
+	assert(ret != NULL);
+	spt_t *spt = data;
+	*ret = spt_prev_char(*spt, spt);
+	return EOK;
+}
+
 static int search_spt_mark(void *data, void **mark)
 {
@@ -1186,8 +1199,19 @@
 };
 
+static search_ops_t search_spt_reverse_ops = {
+	.equals = char_exact_equals,
+	.producer = search_spt_reverse_producer,
+	.mark = search_spt_mark,
+	.mark_free = search_spt_mark_free,
+};
+
 /** Ask for line and go to it. */
-static void search(void)
+static void search_prompt(bool reverse)
 {
 	char *pattern;
+	
+	const char *prompt_text = "Find next";
+	if (reverse)
+		prompt_text = "Find previous";
 	
 	const char *default_value = "";
@@ -1195,5 +1219,5 @@
 		default_value = pane.previous_search;
 	
-	pattern = prompt("Search for", default_value);
+	pattern = prompt(prompt_text, default_value);
 	if (pattern == NULL) {
 		status_display("Search cancelled.");
@@ -1204,6 +1228,7 @@
 		free(pane.previous_search);
 	pane.previous_search = pattern;
-	
-	search_forward(pattern);
+	pane.previous_search_reverse = reverse;
+	
+	search(pattern, reverse);
 }
 
@@ -1215,8 +1240,8 @@
 	}
 	
-	search_forward(pane.previous_search);
-}
-
-static void search_forward(char *pattern)
+	search(pane.previous_search, pane.previous_search_reverse);
+}
+
+static void search(char *pattern, bool reverse)
 {
 	status_display("Searching...");
@@ -1225,9 +1250,18 @@
 	tag_get_pt(&pane.caret_pos, &sp);
 	
-	/* Start searching on the position after caret */
-	spt_next_char(sp, &sp);
+	/* Start searching on the position before/after caret */
+	if (!reverse) {
+		spt_next_char(sp, &sp);
+	}
+	else {
+		spt_prev_char(sp, &sp);
+	}
 	producer_pos = sp;
 	
-	search_t *search = search_init(pattern, &producer_pos, search_spt_ops);
+	search_ops_t ops = search_spt_ops;
+	if (reverse)
+		ops = search_spt_reverse_ops;
+	
+	search_t *search = search_init(pattern, &producer_pos, ops, reverse);
 	if (search == NULL) {
 		status_display("Failed initializing search.");
@@ -1249,5 +1283,10 @@
 		while (match.length > 0) {
 			match.length--;
-			spt_prev_char(*end, end);
+			if (reverse) {
+				spt_next_char(*end, end);
+			}
+			else {
+				spt_prev_char(*end, end);
+			}
 		}
 		caret_move(*end, true, true);
Index: uspace/app/edit/search.c
===================================================================
--- uspace/app/edit/search.c	(revision 1e58e1b743cccee85a37aef4a4b20356c941bb16)
+++ uspace/app/edit/search.c	(revision 034c4202bb5b0bac8287593257471bb34ca29e2e)
@@ -41,5 +41,6 @@
 #include "search_impl.h"
 
-search_t *search_init(const char *pattern, void *client_data, search_ops_t ops)
+search_t *search_init(const char *pattern, void *client_data, search_ops_t ops,
+    bool reverse)
 {
 	search_t *search = calloc(1, sizeof(search_t));
@@ -47,13 +48,27 @@
 		return NULL;
 	
-	search->pattern = str_to_awstr(pattern);
-	if (search->pattern == NULL) {
+	wchar_t *p = str_to_awstr(pattern);
+	if (p == NULL) {
 		free(search);
 		return NULL;
 	}
 	
+	search->pattern_length = wstr_length(p);
+	
+	if (reverse) {
+		/* Reverse the pattern */
+		size_t pos, half;
+		half = search->pattern_length / 2;
+		for (pos = 0; pos < half; pos++) {
+			wchar_t tmp = p[pos];
+			p[pos] = p[search->pattern_length - pos - 1];
+			p[search->pattern_length - pos - 1] = tmp;
+		}
+	}
+	
+	search->pattern = p;
+	
 	search->client_data = client_data;
 	search->ops = ops;
-	search->pattern_length = wstr_length(search->pattern);
 	search->back_table = calloc(search->pattern_length, sizeof(ssize_t));
 	if (search->back_table == NULL) {
Index: uspace/app/edit/search.h
===================================================================
--- uspace/app/edit/search.h	(revision 1e58e1b743cccee85a37aef4a4b20356c941bb16)
+++ uspace/app/edit/search.h	(revision 034c4202bb5b0bac8287593257471bb34ca29e2e)
@@ -59,5 +59,5 @@
 
 extern bool char_exact_equals(const wchar_t, const wchar_t);
-extern search_t *search_init(const char *, void *, search_ops_t);
+extern search_t *search_init(const char *, void *, search_ops_t, bool);
 extern int search_next_match(search_t *, match_t *);
 extern void search_fini(search_t *);
