diff -r ac21392efb14 libyzis/mode_command.cpp
--- a/libyzis/mode_command.cpp	Fri Aug 22 01:19:32 2008 +0200
+++ b/libyzis/mode_command.cpp	Mon Sep 01 11:08:58 2008 +0200
@@ -137,6 +137,9 @@
     motions.append( new YMotion(YKeySequence("<ENTER>"), &YModeCommand::firstNonBlankNextLine, ArgNone) );
     motions.append( new YMotion(YKeySequence("+"), &YModeCommand::firstNonBlankNextLine, ArgNone) );
     motions.append( new YMotion(YKeySequence("-"), &YModeCommand::firstNonBlankPreviousLine, ArgNone) );
+    motions.append( new YMotion(YKeySequence("H"), &YModeCommand::topScreen, ArgNone) );
+    motions.append( new YMotion(YKeySequence("L"), &YModeCommand::bottomScreen, ArgNone) );
+    motions.append( new YMotion(YKeySequence("M"), &YModeCommand::middleScreen, ArgNone) );
     motions.append( new YMotion(YKeySequence("gg"), &YModeCommand::gotoLine, ArgNone) );
     motions.append( new YMotion(YKeySequence("G"), &YModeCommand::gotoLine, ArgNone) );
     motions.append( new YMotion(YKeySequence("}"), &YModeCommand::nextEmptyLine, ArgNone) );
@@ -1180,6 +1183,41 @@
     return viewCursor.buffer();
 }
 
+YCursor YModeCommand::topScreen(const YMotionArgs &args, CmdState *state)
+{
+    YViewCursor viewCursor = args.view->viewCursor();
+    args.view->moveTop(&viewCursor, args.count, args.standalone );
+    args.view->moveToFirstNonBlankOfLine( &viewCursor, args.standalone );
+    *state = CmdOk;
+
+    YSession::self()->saveJumpPosition();
+    return viewCursor.buffer();
+}
+
+YCursor YModeCommand::bottomScreen(const YMotionArgs &args, CmdState *state)
+{
+    YViewCursor viewCursor = args.view->viewCursor();
+    args.view->moveBottom(&viewCursor, args.count, args.standalone );
+    args.view->moveToFirstNonBlankOfLine( &viewCursor, args.standalone );
+    *state = CmdOk;
+
+    YSession::self()->saveJumpPosition();
+    return viewCursor.buffer();
+}
+
+YCursor YModeCommand::middleScreen(const YMotionArgs &args, CmdState *state)
+{
+    YViewCursor viewCursor = args.view->viewCursor();
+    args.view->moveMiddle(&viewCursor, args.count, args.standalone );
+    //use the following line instead if you don't want the argument to work with "H" command
+    //args.view->moveMiddle(&viewCursor, 0, args.standalone );
+    args.view->moveToFirstNonBlankOfLine( &viewCursor, args.standalone );
+    *state = CmdOk;
+
+    YSession::self()->saveJumpPosition();
+    return viewCursor.buffer();
+}
+
 YCursor YModeCommand::gotoLine(const YMotionArgs &args, CmdState *state)
 {
     YViewCursor viewCursor = args.view->viewCursor();
diff -r ac21392efb14 libyzis/mode_command.h
--- a/libyzis/mode_command.h	Fri Aug 22 01:19:32 2008 +0200
+++ b/libyzis/mode_command.h	Mon Sep 01 11:08:58 2008 +0200
@@ -233,6 +233,9 @@
     YCursor gotoMark(const YMotionArgs &args, CmdState *state);
     YCursor firstNonBlankNextLine(const YMotionArgs &args, CmdState *state);
     YCursor firstNonBlankPreviousLine(const YMotionArgs &args, CmdState *state);
+    YCursor topScreen(const YMotionArgs &args, CmdState *state);
+    YCursor bottomScreen(const YMotionArgs &args, CmdState *state);
+    YCursor middleScreen(const YMotionArgs &args, CmdState *state);
     YCursor gotoLine(const YMotionArgs &args, CmdState *state);
     YCursor searchWord(const YMotionArgs &args, CmdState *state);
     YCursor searchNext(const YMotionArgs &args, CmdState *state);
diff -r ac21392efb14 libyzis/view.cpp
--- a/libyzis/view.cpp	Fri Aug 22 01:19:32 2008 +0200
+++ b/libyzis/view.cpp	Mon Sep 01 11:08:58 2008 +0200
@@ -821,6 +821,40 @@
     return stopped;
 }
 
+void YView::moveTop( YViewCursor* viewCursor, int line, bool applyCursor )
+{
+    if( line <= 0) line = 1;
+    gotodxdy( viewCursor, 0, (getDrawCurrentTop() + line - 1 ), applyCursor );
+}
+
+void YView::moveBottom( YViewCursor* viewCursor, int line, bool applyCursor )
+{
+    int lineToGo;
+
+    if (line <= 0) line = 1;
+
+    //Checking end of file to manage the line to go if line arg is not 0
+    if ( ( getDrawCurrentTop() + mLinesVis ) > mBuffer->lineCount() )
+        lineToGo = mBuffer->lineCount();
+    else lineToGo = getDrawCurrentTop() + mLinesVis; 
+ 
+    gotodxdy( viewCursor, 0, ( lineToGo - line ), applyCursor);
+}
+
+void YView::moveMiddle(YViewCursor* viewCursor, int line, bool applyCursor)
+{
+    int lineToGo;
+    
+    if (line <= 0) line = 1;
+
+    //Checking end of file to manage the line to go if line arg is not 0
+    if ( ( getDrawCurrentTop() + mLinesVis/2 ) > mBuffer->lineCount() )
+        lineToGo = getDrawCurrentTop() + ( mBuffer->lineCount() - getDrawCurrentTop() )/2;
+    else lineToGo = getDrawCurrentTop() + mLinesVis/2; 
+
+    gotodxdy(viewCursor, 0, ( lineToGo + line -1), applyCursor);
+}
+
 QString YView::moveToFirstNonBlankOfLine( )
 {
     return moveToFirstNonBlankOfLine( &mainCursor );
@@ -856,6 +890,7 @@
 {
     gotoLastLine( &mainCursor );
 }
+
 void YView::gotoLastLine( YViewCursor* viewCursor, bool applyCursor )
 {
     gotoLine( viewCursor, mBuffer->lineCount() - 1, applyCursor );
diff -r ac21392efb14 libyzis/view.h
--- a/libyzis/view.h	Fri Aug 22 01:19:32 2008 +0200
+++ b/libyzis/view.h	Mon Sep 01 11:08:58 2008 +0200
@@ -293,6 +293,21 @@
     bool moveRight( YViewCursor* viewCursor, int nb_cols = 1, bool wrap = false, bool applyCursor = true);
 
     /**
+     * move the cursor of the current view to the top line of the screen
+     */
+    void moveTop( YViewCursor* viewCursor, int line, bool applyCursor );
+
+    /**
+     * move the cursor of the current screen view to the bottom line of the screen
+     */
+    void moveBottom( YViewCursor* viewCursor, int line, bool applyCursor); 
+
+   /**
+    * Move the cursor of the current view to the middle line of the screen
+    */
+    void moveMiddle( YViewCursor* viewCursor,int line, bool applyCursor);  
+
+   /**
      * moves the cursor of the current view to the first non-blank character
      * of the current line
      */
